AI and Blockchain: Match-made in code?

Evanarp
SMUB Research
Published in
21 min readMar 1, 2023
Source: https://blockchainsimplified.com/blog/ai-and-blockchain-a-lethal-combination/

Introduction to Artificial Intelligence

Two articles back, we explored an Un(der)-collateralised lending protocol that utilised Artificial Intelligence (AI) and Machine Learning (ML) in order to determine whether a user is eligible for a loan on the platform. Fast forward two months later, ChatGPT 3 was released, and with it, came a spike of interest in AI-related tokens or coins. ChatGPT has certainly shown the world what AI is capable of doing and how it might help us, but is there a place for AI in blockchain and crypto? Or is it simply a case of combining two buzzwords together? Indeed, Andre Cronje seems to think so, saying “Blockchain doesn’t improve AI, AI doesn’t improve blockchain” and implied that crypto projects that have pivoted to AI are “simply doing so for pump and dump reasons”.

In this article, we aim to explore the potential (and existing) applications of AI in crypto/blockchain and find out whether there is truly a use case for integrating these two technologies together. To that end, we start off by exploring a select few sub-areas within the blockchain space where we think AI has real potential, proceed to enumerate the 3 potential benefits that AI could bring to the cryptocurrency markets, and finally 5 Crypto-AI projects that we think are worth exploring.

How AI is being/can be used in cryptocurrency & blockchain

Trading
The use of AI in high-frequency trading (HFT)is not new, in fact, it is amongst the most common form of technologies employed in this area. In traditional HFT with TradFi assets, one can gather and analyse various forms of past market data, and then create methods based on this back-dated analysis to predict future price movements.

However, in crypto, such AI models have access to data like on-chain blockchain data or Twitter sentiment analysis to construct more accurate and profitable AL trading models. The most common way for retail to get into this space is to utilise AI crypto trading bots. This mostly involves handing the external providers of these bots the API keys to your CEX account, in order to integrate and power your automated trades with AI capabilities.

The main benefits of using AI trading bots would largely be the fuss-free yet profitable experience it offers; users can sit back and let the bot do all the work without having to monitor the charts constantly. Such bots also offer beginners a chance to test out advanced trading strategies that they would otherwise not have the ability to do. That being said, there is always a chance that your API keys gets compromised. Security issues have always been a huge issue in DeFi, which leads nicely to the next area where AI could lend a massive helping hand to.

Security
One of the major security risks in the blockchain or DeFi space would be vulnerabilities in Smart Contracts. From unintentional oversights to purposefully designed “honeypots”, the amount lost due to Smart Contract exploitation is staggering, with one of the largest being the $US611 Million Polygon Network exploitation. Better security is therefore of imperative importance, and AI could be of aid in this regard.

Forta, is a “ decentralized monitoring network to detect threats and anomalies on DeFi, NFT, governance, bridges and other Web3 systems in real-time.”. Basically, Forta deploys bots onto blockchain networks, where these bots uses Machine Learning to identify possible threats or exploitations in the workings, from past data on the process of how such hacks occur.

That being said, using ML or AI in threat detection may prove futile, as hackers are constantly coming up with novel methods to exploit on-chain protocols. Relying too much on AI tools may lull developers into a false sense of confidence that their smart contracts are truly secure when it may be the opposite in reality.

Supply chain
According to IBM, Supply Chain Management is “the handling of the entire production flow of a good or service — starting from the raw components all the way to delivering the final product to the consumer.” For a long time, the inability to verifiably check on certain processes in the supply chain has vexed companies and suppliers. As such, with the advent of Blockchain Technology, some companies are turning to Decentralised Ledger Distribution or similar technologies to enable the company, at every stage of the supply chain, to accurately check up on the current status of the goods.

Foodlens, by Kratos Innovation labs, is one such example. It is a “blockchain network that allows multiple stakeholders like farmers, aggregators, processors, institutional buyers and consumers to verify a single source of truth.” This solution brought about many benefits to the farmers. For instance, they could obtain credit more easily for the financing of farming activities as the process of farming is now “verified” and “documented” which increases confidence on the end of the financers that the farmers will be able to pay them back.

One might then wonder, whether AI has a role to play in an already innovative solution. We would think so, as Blockchain is simply a method of recording and storing data. There is no reason why AI or ML methods cannot be applied in supply chain management involving blockchain. In fact, in the example given, Kratos uses “AI based deep vision datasets” in order to better detect and eliminate pests from crops.

NFTs
Typically, we view NFTs as illiquid JPEGs. How then, can AI be applied in such a context? Outside of the crypto space, AI generative art isn’t quite as new anymore. The ability to feed the AI model with a few prompts which gives back a piece of art based on these prompts is increasingly accessible to anyone.

In a similar fashion, AI would seem to provide retail with the ability to generate NFTs from scratch, without having to either create a novel artwork or code from scratch. More broadly, with the talk of enabling property rights or ownership in the context of owning NFTs, infusing AI within NFTs could unlock new paradigms in the DeFi space.

For instance, Alethea AI, a DeFi protocol backed by Mark Cuban, “is building a decentralized protocol that will enable the creation of interactive and intelligent NFTs (iNFTs)”. They claim to be “on the cutting edge of embedding AI animation, interaction and generative AI capabilities into NFTs”. Essentially, its value proposition is imbuing NFTs with “souls” that is intelligently interactive.

That being said, at this point, it is still unclear what exactly would be the value proposition of protocols like Alethea AI., especially since the “intelligence” of an iNFT is limited to the amount of native tokens you purchase and give to your iNFT

GameFi
One of the issues surrounding GameFi is the lack of organic growth surrounding player count. It is a challenge to make games “fun”, but nonetheless GameFi companies/protocols should strive to design their games with that goal in mind before bringing in the “Fi” portion of GameFi.

AI can help in this regard by offering a more immersive and enriching gaming experience that otherwise might not easily be achievable. This can come in the form of interacting with NPCs (non-playable characters) or other in-game assets. The game can even adapt to each individual player, offering a personalised gaming experience unique to each individual.One example of an AI-powered Web3 gaming ecosystem is Mirror World, where players have access to AI-powered digital companions known as “Mirrors”. “Mirrors” can communicate and generate autonomous behaviour in specific environments, and they are available across all available games in the Mirror ecosystem, offering players a refreshing and novel Web3 game. AI-powered games are still rather limited in numbers, and it’ll be interesting to see what other Web 3 games powered by AI will emerge over the next couple of months, and whether they can change the perception that GameFi games aren’t “fun”.

AI Integrity & Bias
ChatGPT, is an example of a Large Language Model which means that it has been trained on massive amounts of text data in order to generate outputs to the User’s query. However, one concern that might arise is, how might we ensure that the data that is fed into LLMs is free of bias, political or otherwise?

Since the launch of ChatGPT, users have observed that the AI appeared to have a bias towards viewpoints that is commonly associated with a certain side of the political spectrum. Researcher David Rozado conducted a mini-experiment where he applied the Political Typology Quiz from Pew Research to ChatGPT where he found that the AI exhibited “moderate left-leaning political orientation”. Although this bias in political view was corrected a few weeks later, this shows that we are generally not aware of what sort of data that LLMs like ChatGPT3 are being fed with. Blockchain could then offer

the ability to ensure the integrity and provenance of the data used to train AI systems. It can be used to secure and validate the data used to train AI systems, by creating a tamper-proof record of the data’s origin and any modifications made to it.

That being said, using blockchain as a means to verify that training data is “sound” may be overkill and not necessary. Nonetheless, the need to ensure that the data that we use for our AI systems is free from bias (of any kind) should be prioritised with the increasing proliferation and use of such technologies.

Smarter monitoring of Blockchain networks.
The prevalence of scams, fraud or generally illicit activity has long been associated with cryptocurrency. There may be some truth to such a reputation. The Chainalysis 2023 Crypto Crime Report stated that the total cryptocurrency laundered in 2022 reached an all-time high at $US 23.8 billion

2022 was also the “biggest year ever for crypto hacking”, with $3.8 billion stolen from crypto businesses, “primarily from DeFi Protocols and by North Korea-linked attackers”.

The increasing illicit activity on blockchain networks does not bode well for the ecosystem as a whole, and there is a need for better security/fraud prevention. AI might help in this regard, to aid in real-time scanning and monitoring of blockchain networks, alerting protocols to potential illicit activity before the hacker has an opportunity to strike.

Some existing solutions include Merkle Science and AnChain.ai. The former offers, among others, Crypto-Compliance-as-a-Service, employing “Machine learning driven & behaviour-based transaction monitoring”, aiding companies to “create custom clusters for specific criminal behaviour, and identify criminals.”. The latter also offers similar services, with a “patented machine learning risk engine inferred risk score based on compliance related transactions such as suspicious activity, behaviour patterns and more.”

Although one could say that criminals may simply resort to more novel methods of hacking or laundering of funds to evade such AI-powered tools, they can still be a powerful tool in one’s arsenal against the fight against illicit actors within the crypto ecosystem.

The potential benefits of AI on the cryptocurrency market and its overall adoption

Security

Fraud detection

AI can help detect and prevent fraudulent activities, such as:

  • illegal transfers,
  • fake transactions,
  • and money laundering

They use algorithms to analyse vast amounts of data and detect suspicious patterns that might be overlooked by humans. One interesting application of AI in detecting fraud can be seen in AnChain’s Blockchain Ecosystem Intelligence (BEI™) API.

AnChain is officially partnered with MultiversX(formerly Elrond) blockchain network to enhance compliance and prevent fraud in their ecosystem. To date, they have screened more than 49 million MultiversX transactions and thousands of crypto wallets. Their risk scoring engine allows them to remove the time consuming tasks of conducting due diligence, allowing for quick and smooth detection of fraud while remaining compliant with regulations.

Improved wallet security

AI can assist in securing digital wallets by detecting and preventing unauthorised access attempts. By implementing machine learning algorithms, advanced authentication tools like biometric authentication ensure that only authorised users can access their accounts.

For instance, Coinbase uses SageMaker to develop machine learning algorithms for image analysis to beat scammers. Scammer often use the same photo for multiple IDs of different accounts. The algorithm extracts faces from IDs that have been uploaded and compares a given face across other IDs uploaded. This allows Coinbase to quickly detect forgery and ensure a smoother and faster customer onboarding experience.

It can also help users keep their private keys safe by automatically generating and storing them in a secure location. Some crypto wallet technology requires artificial neural networks. Storing the twenty-four password private keys with two-factor authentication often requires large amounts of data that can only be managed with deep learning technology.

Transparency

Improved traceability

AI can help track the flow of cryptocurrencies on a large scale, making it easier to identify fraudulent or illegal activities. Integrating this feature with Blockchain is ideal since Blockchain struggles with scalability and efficiency, AI solves this by providing efficiency and scalability.

Imagine analysing thousands of transactions on the blockchain using machine learning algorithms to detect fraud, suspicious user transactions, anomalies, make market predictions, analyse transaction flows etc

This increased transparency can help build trust in the market and attract more participants.

Better reporting

AI can automate the process of gathering and reporting data on the cryptocurrency market. This can lead to more accurate and up-to-date information, which can help investors make informed decisions.

For instance, CryptoIndex is an AI-powered cryptocurrency market index that uses a proprietary algorithm to analyse market data and provide a real-time ranking of the top 100 cryptocurrencies.

Enhanced compliance

AI assists in ensuring compliance with regulatory requirements. For example, AI algorithms can monitor transactions to ensure they are in line with anti-money laundering (AML) and know-your-customer (KYC) regulations.

Elliptic is an AI-based compliance and blockchain analytics platform that provides solutions for cryptocurrency exchanges, banks, and other financial institutions to detect and prevent illicit activity, such as money laundering, terrorist financing, and sanctions evasion. The platform uses machine learning algorithms to analyze blockchain data and identify suspicious transactions. BitGo’s compliance department uses Elliptic’s blockchain analytics tool to manage and monitor their data as well as to analyze risk in a relevant and material way.

Governing DAOs

AI can play a key role in the governance of decentralized autonomous organizations (DAOs), which are self-governing communities that operate on blockchain technology. AI algorithms can help DAOs operate more transparently and efficiently by automating decision-making processes and ensuring that all participants are treated fairly.

They can also interact directly with smart contracts that run the DAOs, increase DAO security by checking for malicious proposals, allow DAOs to offer AI powered products/services and many more.

Efficiency

Improved market analysis and prediction

AI can process vast amounts of data and identify patterns and trends that might not be apparent to human traders. This can help traders make more informed investment decisions and improve their overall efficiency.

AI can assist in analyzing the cryptocurrency market by processing vast amounts of data, identifying trends, and making predictions about future price movements. This can help investors make informed decisions and reduce the risk of investment.

In a 2022 study done by Karlsruhe Institute of Technology, researchers employed machine learning models to predict daily market movements, their results show that all employed models make statistically viable predictions, whereby the average accuracy values calculated on all cryptocurrencies range from 52.9% to 54.1%.

Blockchain analysis

AI can assist in analysing the blockchain, the technology that underlies most cryptocurrencies. This can help identify and address bottlenecks in the system, leading to more efficient and faster transactions.

The disadvantages of the use of AI in Cryptocurrency and Blockchain

We’ve seen many cases of universities and schools blocking and banning AI software like ChatGPT being used to complete assignments, etc. The main reason for this is 2 fold: automation stunts originality, while also making users more careless. Let’s take a closer look at both these factors.

Decreased Originality
Using a trained model to generate content or ideas is generally a very bad idea, given that such models, for the most part, are excellent at only rehashing old data into new formats. They cannot synthesise new content. This could result in new protocols being simple rehashes of older protocols, or the underlying smart contract code having fewer and fewer optimisations, efficiencies, novel approaches, etc. This over-reliance can come to replace human decision-making, leading to a loss of critical thinking and sometimes even a failure to consider the wider implications of decisions.

Increased Carelessness
AI Models are only as good as the data they are trained on. If the data used to train an AI algorithm is inaccurate, it could lead to flawed predictions or decisions. An example of this is the fact that ChatGPT seems unable to do basic arithmetic.

The main reason here is that ChatGPT is first and foremost a language model that is trained to create well-formed sentences based on trained data. This results in clarity being prioritised over accuracy. This then leads to solutions that need to be double or even triple-checked for errors. This is particularly concerning in the cryptocurrency industry, where a small error in prediction could lead to significant financial losses.

With the release of ChatGPT, we saw a slew of budding and experienced traders spin up PineScript or python trading algorithms to assist or even shortcut their trading systems. Therefore, it is not a stretch to believe that smart contracts could soon be written entirely by Artificial Intelligence models. In fact, something along those lines are already in the works; ChainGPT is a take on combining AI Models with Blockchain. ChainGPT profers to fit multiple use cases, from code explanations, to blockchain analytics to even smart contract development. While plug and play solutions like these would greatly hasten the level of innovation in the crypto space, it will also greatly increase the propensity for errors. Users must be extremely careful in debugging and spotting known exploits (Masterchef Migration exploit, etc) that could have been included into the smart contract by the AI Model.

Regulation
Another pain point is regulation. Regulation has barely caught up with the crypto space. Therefore, we cannot expect regulation to properly govern the use of trained AI any time soon. This is due to the possibility of copyrights being infringed when such data is being used as training. One way out of this mess that our team foresees is having permissioned AIs, each with differing levels of training data. If you’d like to make simple queries, then the AI trained with only royalty-free/open-source information would suffice. However, if your company would like to do deeper content creation, then additional training data can be bought, which would essentially cover the cost of the source materials’ copyrights. This way, content creators/artists still get the payments that they deserve, while the layman can still use AI in their workflow.

Lack of Transparency
Where blockchain attempts to be the paragon of transparency, AI Models trained on proprietary sets of training data will be anything but. As such, integration of AI with a blockchain can result in messy situations where participants can become unwilling data points that they cannot opt out of.

The future of AI in Cryptocurrency and Blockchain

The convergence of A.I and blockchain is still largely unexplored. However, when merged together, it has the potential to solve the pitfall of the respective technology. Artificial intelligence could aid with the scalability of blockchain projects while blockchain will allow artificial intelligence to be more transparent.

We will explore what a decentralised A.I system could look like.

Combining artificial intelligence with blockchain

A.I POV

Many have raised centralisation concerns of tech companies holding the keys to A.I. If DAOs were to have their own A.I system, they can potentially leverage on decentralised data storage projects such as Arweave and Filecoin.

However, there may be some obstacles regarding this proposition. Firstly, artificial intelligence is a data vacuum, the accuracy of the system is correlated with the number of datasets provided. Just for comparison, the amount of data stored on Arweave as of the time this was written is 120 TiB (132381 GB) while it was reported in 2018 that AWS S3 service alone had over 100 EB (1e+11GB).

Secondly, the training process for artificial intelligence is still very centralised. ChatGPT uses a supervised learning model and someone will tell it what the objective function is through annotations. Even with a decentralised data source, perhaps some form of centralised intervention is needed to guide the system to give the right answer, but who should determine what is the ‘right’ answer?

Blockchain can also increase accountability within the A.I engine. Thankfully, robots outsmarting and destroying humans still only exist in sci-fi but there is a possibility of the data and model being tampered with or even the system going rogue. Placing the A.I model onchain allows us to trace and understand the decision making process on the ledger.

‘To prevent AI from messing around, we need to allow AI to have sovereignty, but its sovereignty should be established on the blockchain, not to have this sovereignty on an uncontrolled Internet, which is also a very frightening thing.’- Longman during a PermaDAO weekly space

Blockchain POV

The blockchain is relatively slow and clunky compared to centralised systems. A.I can mine and manage huge datasets on the ledger at a rapid speed which can aid the decision-making process of blockchain-based business. An example of this use case would be the Vechain blockchain, designed to enhance supply chain management. The platform is used to track product information from manufacturing to delivery. Integrating A.I into Vechain can potentially enable the system to select the optimal shipping route.

This article by CyberPunkMetalHead explores the possibility of a ‘self-aware blockchain with absolute knowledge of the chain data’. Integrating A.I into the blockchain may enable the chain to detect any potential exploits, an unprecedented volume of transactions to a new wallet for instance. It can potentially identify bottlenecks within the network and suggest ways to balance the load across the nodes, improving overall efficiency.

5 Projects that are utilising AI

CryptoAI

Crypto AI is a crypto investment tool that uses “artificial intelligence (AI)” to analyze the cryptocurrency market and provide investment recommendations. The goal of Crypto AI is to help investors make informed decisions about their cryptocurrency investments by providing top notch AI services to anyone with a Telegram or Twitter account. If you’re concerned with their project, rest assured that it has been audited.

A distinguishing feature is that it can be used by everyday investors on the everyday social messaging platform: Telegram. This means that there is no need to register anywhere or be concerned about privacy. These bots are safe, anonymous, free and fast to use.

The native token of the CryptoAI project is $CAI, an ERC-20 token representing the core value of this project. $CAI is a key component that fuels the CryptoAI ecosystem. It will be primarily used for all the operations within the CryptoAI ecosystem.

CryptoAI currently has multiple telegram bots for use with several still in production, some of which include:

  1. CryptoBuys
    This bot tracks onchain buys and notifies your group when a new buy or sell happens, by displaying crucial information. It displays a category of trending tokens, top gainers and top losers. Sounds like the perfect tool for speculators.
  2. DirectSwap (in-production)
    DirectSwap facilitates buys on DEXs. The bot provides users with their own personal wallet address so they can send ETH directly to the wallet and use it to purchase cryptocurrency of their choice on the platform.
  3. MultiAI (Beta mode; only available for $CAI holders)
    The success of ChatGPT is undeniable. However, this success is not pervasive. ChatGPT is not available in certain countries and demographics. MultiAI is a responsive AI tool not unlike ChatGPT that allows anyone to go on their telegram or twitter to use the bot for free.
  4. ContestAI
    ContestAI automates the process of entering and winning the lottery or the biggest buy contest for crypto projects. Discard your worries of claiming or waiting for the prize.
  5. 24/7 Raid bot (in-production)
    Raid bot automates some of the processes involved in facilitating a twitter raid. Aimed at crypto projects, every time a member of the community tweets with a specific hashtag or ticker, the bot will automatically post the tweet (including message and images/videos/gifs) in their telegram community group to encourage users to raid and be active.

NUMERAI

Numerai is a crowdsourced hedge fund that uses artificial intelligence (AI) and machine learning (ML) to generate trading signals for the stock market. It was founded in 2015 by Richard Craib, an entrepreneur and mathematician, and is based in San Francisco, California.

Their platform allows data scientists from around the world to submit predictions for financial models, which are then integrated into the company’s trading algorithms. The company provides a dataset of encrypted financial data to its community of data scientists, who use the data to create machine learning models to evaluate and predict thousands of stocks weekly.

The models are then submitted to Numerai, and the company combines the models with its own proprietary algorithms to make trades in the stock market. To date, they have paid up to USD $58 Million to their data scientists, contain 5200 staked models and have an average of 25.14% 3 month return on stake. Also note, that they have nothing to do with blockchain or trading cryptocurrencies, but leverage on their tokens to incentivise their community.

Numerai is unique in that it operates as a decentralized autonomous organization (DAO). The company’s hedge fund is controlled by a smart contract on the Ethereum blockchain, which governs the allocation of funds and the distribution of profits. The company’s token, called Numeraire (NMR), is used as a reward for data scientists who submit successful models.

People who submit their models can stake NMR on their models. If their predictions turn out right, they are rewarded with additional rewards but if they don’t then some of their stake is burnt. This reward model uses the “skin in the game” principle and prevents bad actors from abusing the system.

FETCH.AI

According to Messari, Fetch.ai is “is building a decentralized machine learning platform based on a distributed ledger, that enables anyone to share or exchange data.” What does this mean?

The proposition that Fetch.ai starts off with is that although data occupies a very important position in tech applications such as AI and machine learning, such power related to data is mostly concentrated in the hands of a few big players. Fetch.ai offers users “Autonomous Agents”, programs on the Fetch blockchain that serves as Digital Twins (a virtual representation/digital copy of a system that can be used to interact with its real-world counterpart.). These Agents can then interact directly with another Agent on the peer-to-peer network, based on each individual’s business requirement.

For example, suppose you want to book an appointment with a plumber to fix something. You would have to navigate through traditional search applications and find a suitable slot that accommodates both the service provider and the consumer. What Fetch.ai does is that it utilises ML/AI to aid in sourcing out this service through a peer-to-peer network, which reduces the work that you have to put in because the AI does the heavy lifting in relation to finding the most suitable service provider.

Vaiot

Imagine a ChatGPT for business. Enter VAIOT. VAIOT is a platform that offers automated services and transactions to businesses and consumers, consisting of two main services: the Virtual AI Legal Assistant and the AI-backed Digital Service Distribution Channel.

The two primary components of the VAIOT network are AI Assistants and Intelligent Contracts. AI Assistants are powered by artificial intelligence and utilise natural language processing and machine learning to provide automated services and transactions. They are capable of understanding user requests and responding in a conversational manner, and can assist with customer service, guide users through complex processes, and facilitate transactions.

Intelligent Contracts are blockchain-based agreements between two or more parties that are executed on the blockchain. These contracts are secure, transparent, and immutable, and are used to automate services and transactions by enforcing the terms and conditions of an agreement.

Ocean Protocol

Private data is highly valuable for enhancing research and business outcomes, but it is difficult to access it due to concerns regarding privacy and control. Moreover, data is not being shared between corporations, which hinders its potential.

To address this issue, Ocean Protocol was established in 2017 with the objective of making data sharing and monetization easy, while still ensuring data privacy. The Ocean Market app allows data owners to sell their data, maintain privacy and control, and monetize it. Data consumers can purchase private data without compromising privacy.

Through the Compute-to-Data mechanism, Ocean Protocol offers specific access to private data instead of sharing it directly, which enables the use of data while maintaining privacy and control. Data owners can authorize the use of AI algorithms on their data, which allows the training of AI models for improved predictive accuracy and other benefits without compromising data privacy.

Conclusion

The price action of these projects have spiked tremendously over the past month with some of the tokens increasing over 10x. While it is incredibly tempting to FOMO trade, we would be cautious when it comes to trading these tokens. Some of the A.I crypto projects have been around for a few years without any significant development or breakthrough and the reason these projects are pumping are mostly due to the popularity of chatGPT.

Microsoft had previously dabbled with the metaverse with its involvement in AltspaceVR and crypto enthusiasts have been speculating whether chatGPT will be integrated into its metaverse developments. However Microsoft recently ended its metaverse project and members of the team have been laid off, which suggests any integration between chatGPT and metaverse will not happen anytime soon.

With that being said, there is definitely huge potential for the merger of these exciting technologies. The global A.I market is set to surpass $1.5 trillion by 2030 and you can be sure that there will be some exciting developments involving blockchain and A.I.

--

--