Blockchain in the Era of Large Language Models (LLMs) – AI Driving Blockchain Adoption through Intent-Based Transactions and Experiences

BeginnerDec 24, 2023
This article explores how LLMs complement intent, leveraging back translation to ensure user security.
Blockchain in the Era of Large Language Models (LLMs) – AI Driving Blockchain Adoption through Intent-Based Transactions and Experiences

TL;DR

Large Language Models (LLMs) excel in mapping between human languages, bridging informal to formal, natural language to intent, and intent to transactions. This makes LLMs an ideal interface for every user.

LLMs help you discover your intent, communicate on-chain, and negotiate more peer-to-peer (CoW) matches between semantically similar intents.

LLMs will soon author most retail transactions. By bridging the gap between UI and retail users, LLMs may lead to mass adoption of blockchain.

AI can access any human-specific resource on blockchain and employ humans in projects entirely managed by AI.

Introduction

Today, artificial intelligence and blockchain don’t seem to have many touchpoints. In this article, we argue that this will soon change; and it will have widespread implications for blockchain and blockchain-based teams.

LLMs, specifically ChatGPT, is not news to anyone. But what exactly makes these models so useful? How will they impact blockchain?

In this article, we’ll show how LLMs become a massive shortcut in user experience, freeing us from complete agony through LLMs adaptability, on-chain transparency, and flexible intent matching, which outperforms the user experience of neobanks.

We’ll also discuss how this will impact chains, protocols, and wallet teams, and how it will reshape the definition of success.

Finally, we’ll cover how blockchain can become an ideal rail for LLMs to banks and hire humans to do things that LLMs can’t do on their own, and how LLMs can start to manage human teams on-chain.

Artificial intelligence can bring mass adoption to blockchain.

First, let’s find a simple way to understand LLMs.

What Makes LLMs Effective?

LLMs are models for translation between any type of human expression.

One compelling aspect of LLMs is that, at a high level, they are universal translation machines between any form of human expression, much like bidirectional BabelFish.

It’s not just natural language vs. natural language (eg. English vs. Cantonese), but any expression, such as:

  1. Mathematical formulas -> English prose for 10-year-old children.
  2. Creativity -> Plans
  3. Plans -> Codebase
  4. Unclear ideas -> Questions suitable for clarification -> Clear ideas
  5. Haiku->Rap lyrics
  6. Description -> Images (with the help of image models)

Moreover, they contain many thoughts expressed by humans - an encyclopedia indeed.

So, one way to look at LLMs is as an interactive encyclopedia that you can talk to and get responses from any form of expression.

Now, what does this mean for blockchain?

Why is This Useful?

Blockchains are designed for developers.

Blockchains are powerful formal environments. They commoditize trust by providing unforgeable and decentralized historical records.

Blockchains are a young ecosystem written primarily by developers and for developers. They are highly open, modular, and well-documented.

This makes them ideal for decentralized collaboration between developers. But not so great for retail applications.

LLMs Can Bridge the Gap with Users

LLMs now commoditize translation between any expression modes. Consequently, they can entirely narrow the gap with retail users by converting natural language into blockchain transactions.

Leveraging open and well-documented interfaces, LLMs possess everything needed to convert natural language intent into CallData.

LLMs might be a magical shortcut to eliminating poor user experiences.

Mere translation isn’t enough; LLMs can also help us figure out what we want.

AI Can Help you Discover and Convey Your Intent

LLMs can help us discover and express latent intent.

People talk about intent as if what we want and how we communicate it are obvious. We just need an interface to engage with them.

But we find that, in most cases:

We don’t know our intent;

or

We don’t know how to turn what we want into a transaction.

LLMs can help you discover latent intent and effectively express them on-chain.

Discover Your Intent with LLMs

How do you turn a vague desire (“wise investments”) into a concrete transaction? Perhaps through a very noisy and incomplete process of research, recommendations, understanding, and analysis. At the end of this process, you might only know the next best steps.

LLMs can access all public data, analyze your wallet, and clarify your intent with your feedback.

They can streamline this process and help uncover intents you might overlook. They can:

Describe you with on-chain data

Refine your intent with your inputs and then

Do the research you wish to do.

Just by analysis, there will be many intents you didn’t have time to define.

Analyze Your Wallet

LLMs can translate best practices into intent based on your history and holdings.

Most blockchains are transparent. Your trading history and token holdings are public, illuminating a lot about you - your interests, risk tolerance, and what your next moves might be.

LLMs can analyze your wallet and do what family offices do for their clients: giving advice.

Here’s how LLMs turn on-chain data into meaningful suggestions.

Clustering

Nothing is easier for artificial intelligence than finding good embeddings. That is, find other wallets with similar behaviors and then make suggestions based on the functionality of those wallets.

But clustering alone is indistinctive. You can use LLM magic to get more customized results.

Customized General Advice

Advice on how to manage your assets is easy to find. But turning the general advice of “decentralize your investments” into practical trading strategies for your wallet takes effort.

LLMs make it easy to translate these general advice into specific intents customized for your wallet.

For example, LLMs could translate the general advice “decentralize your stablecoin holdings” into “you can split your USDT into USDT, USDC, LUSD, and RAI based on market caps.”

But it’s hard to be defined solely by your wallet and what “experts” say.

User-guided Discovery

The most valuable source of discovering your intent is yourself.

LLMs can help you go from high-level goals to concrete intents based on your wallet history and your answers to certain questions.

However, in many cases, what you want also depends on objective facts that you need to research (such as current loan rates).

Outsource Your Research

LLMs can study structured and unstructured data to inform your intent.

LLMs are not limited to your input. They can also look into things you wish you had time to do. For example, scouring your Twitter, collecting the latest loan pool APYs, monitoring protocol launches, or finding out where airdrops are happening. Artificial intelligence can completely automate these actions for you.

Finally, you will have a list of things you want to do - your intent.

However, turning what you want into a specific on-chain transaction is another challenging task.

Translate Your Intent into Transactions

User experience (UX) - or the way intent is translated into transactions - is a major challenge in the crypto space.

However, LLMs can directly convert your intent into smart contract calls, eliminating all friction between knowing what you want and expressing it on-chain as a transaction.

LLMs can build smarter transactions than we have today.

Make CoWs Happen through Fuzzy Intent Matching

CoWs (Coincidences of Wants) are rare, but LLMs make this happen more often.

Your intent doesn’t exist in isolation. In many cases, you are looking for someone else to trade with: a counterparty.

P2P trading is more efficient than peer-to-pool trading, so we should find as many CoWs as possible.

Unfortunately, even in “CowSwap”, CoWs rarely happen. If you want to trade ETH for USDC, you need someone trading USDC for ETH in the same block.

But what if someone submits an intent to trade USDT for ETH and also holds USDC - perhaps they’d also be willing to buy ETH with USDC? Then, your transaction may have a CoW.

LLMs can help locate these CoW opportunities by converting nearly matching intent into matching intent. Just like that.

LLMs make it easy to map specific expressed intent to the higher-level intent space behind them (“what the user might actually want to do”). Then, they can fuzzy-match semantically similar intent. LLMs can do this out of the box due to its understanding of semantics.

On top of this, LLMs can help you obtain more CoWs through renegotiation:

Internal intent renegotiation: Find other intents that fuzzily match yours and offer you an expression of your intent to match what other intents it discovered on-chain. For example, “Can I buy LUSD instead of USDC?” I found a matching limit order and with this CoW you can save 0.3% in trading fees. “

External intent renegotiation and offer: Ask other LLMs with almost the same intent to propose adjustments to their people: “I want to buy another BAYC of yours, will you sell it to me for X ETH?”

Wallets can even show intent to match your assets. “Do you want to sell this position?” There are matching OTC offers on the market as well. “

With LLMs, we can effortlessly expand intent negotiations and find more win-wins.

But fuzzy matching isn’t even the most efficient way to increase peer-to-peer matches.

Broad Intent – Let CoWs Happen with Range-Conditions

Broad intent makes CoWs easier.

LLMs can also help you frame broader intent. This includes intents with various acceptable conditions - to make matching easier.

Some examples of intents with options:

Includes a list of substitution options for the assets in the trade (e.g. buy any staked ETH instead of WETH; buy an NFT using any stablecoin in your wallet; or get an ETH loan from any top lending platforms)

Price and time frame: Specify an acceptable price range (no slippage is posted) and a longer execution time frame.

Oracle checks and conditions within the block (e.g. invalidating the transaction if caught in the middle) or specifying fallback options if the transaction fails.

All these will significantly increase CoWs and reduce your transaction costs.

So far, we’ve seen how LLMs allow you to interact with the blockchain seamlessly. But just letting LLMs compose complex transactions by calling a series of smart contracts sounds a bit risky.

Constraining LLMs Using Composable Intent Modules

Content modules provide LLMs with the syntax to construct intent into secure transactions.

We mentioned earlier that LLMs are very good at mapping semantically to any formal language. So let’s define a new language designed to safely express intent, restrict LLM’s use of that language, and then safely compile transactions from there.

We call this language “composable intent modules”. Modules are designed as secure building blocks.

For example, imagine a secure swap wrapper that double-checks that you’ve received enough funds for the swap. For example, it can check if you get at least the median of five credible Oracle prices. The wrapper causes the transaction to fail if no offer exists or the exchange returns less value.

Another could be a lower-level module like Good Swap, which fetches quotes from five trusted solutions, selects the best one, and submits the transaction via three private RPCs.

Modules can also come with meta-information. For example, provide your LLMs with instructions on how to monitor Good Swap execution and a description of how the module works so that the LLM can explain it to you.

Intent modules can contain different levels of abstraction:

Low layer: trusted calls and contracts;

Application layer: trusted protocol, oracle, solver;

Decorators: security wrappers (oracle price checks, token lists, trade simulations)

Micro-intents: swap, pledge, lend, borrow, bridge;

Macro-intents: Markowitz portfolio optimization, yield optimization, dollar cost averaging, iceberg orders, managing leveraged CDPs.

Combine larger intents with smaller, predefined building blocks.

But LLMs are not limited to on-chain components.

Intent Modules for Querying Off-chain Data

Intent modules can also use off-chain data. This module can specify an open source library that LLMs can run to obtain off-chain data (such as optimized swap route) to construct your intent. To verify that the LLM is running the correct code, the code can generate a zero-knowledge proof that will be verified by on-chain components.

Therefore, using a trusted formal intent language, LLMs can easily transform your intent (described in natural language) into a formal language that is compiled into a transaction.

But how do you verify that a transaction will indeed execute as you requested?

Trustworthy Back Translation

Make AI-constructed transactions readable with secure back-translation.

Habitual users may read intent language like pseudocode. But most people need explanations in natural language.

We do not trust LLMs to use this back translation to protect us from deception. But intent modules can simply contain natural language explanations of what they do.

For example, a good swap could contain the template “You pay X and will receive at least Y, otherwise this swap fails.”

But LLMs can do more than discover what you want.

LLMs will Complete the Transaction We Wish to Complete

We can use LLMs to do things that we think are easy to express but are actually difficult to do.

Unlimited Attention

React to a wide range of even unpredictable events exactly as you want.

LLMs are faster and have unlimited attention. They can:

Execute long sequences of transactions with arbitrary waiting times or failures in between;

Monitor unusual events (outliers) and find safe responses;

Explore a wealth of information (e.g. read documentation and whitepapers or view all APRs on stable pools) and choose the most suitable option;

Monitor condition types and then execute precise predefined strategies.

Likewise, the difference between pure automation and LLMs is that LLMs can semantically match intent and specific situations. Due to their fuzziness, they can cover a wider range of scenarios than simple on-chain intent.

LLMs make it easy to reinvest or move positions at the right times, react the way you want to news, have the patience to complete a bridge trade, or write a strategy and prepare for an airdrop.

But time and attention aren’t the only things holding us back from making good trades.

Overcome Emotional Bias

Easily prepare for a wide range of scenarios.

There is a difference between how we wish we would react – for example, exiting after hitting a price target, or reacting strategically if a stablecoin crashes – and how we actually react – with greed and panic.

LLMs help us make ideal decisions and steadfastly execute the intent we define during calm moments.

With the help of LLMs, we can prepare a complete set of intents for various scenarios. We can have our LLM execute it when the time comes - or at least provide us with a pre-planned signing plan.

But making your daily transactions frictionless is just the beginning of what LLMs can do on the blockchain.

LLMs Will Use Blockchain as a Financial Rail

Blockchains are ideal environments for LLMs to conduct banking operations. Permissionless, trustless, deterministic, transparent, well-documented, and open-source.

Blockchain also has no obstacles to artificial intelligence. It does not require human lubrication or KYC. No one can flip a switch and close your account. Financial Minecraft: Simple and infinitely programmable blocks – every AI’s dream.

If LLMs representing millions of users choose blockchain as their financial rails, this could easily drive mass consumer adoption of the blockchain.

Mass Consumer Adoption

LLMs have been widely adopted as a chatbot. Giving them access to the blockchain and allowing users to express financial intent is just a small step.

We will not only use LLMs to obtain information, but also to find, select and pay for products. Get a loan and make investment choices.

If blockchain matures quickly enough, LLM’s rational choice will be to use them instead of tradfi. That might be enough to turn the tide.

Regardless of mass adoption, blockchain is likely to be where LLMs seek out and pay for the services they want to purchase.

AI Employs Humans Through Blockchains

LLMs can hire humans to complete any task on-chain.

LLMs are limited to what the software can do. But through blockchain, AI can bribe humans. Some services that AI may purchase from humans include:

Higher intelligence: As long as AIs are not as smart as humans, they can purchase human input to improve decision-making.

Proof of humanity: If certain actions require proof of humanity - such as verifying a wallet with worldcoin, providing proof of residence, opening a bank account, or solving a CAPTCHA - AI can pay humans to do these things for them.

Representation: Represent AI in real-world meetings, or do anything that is currently required or more efficiently done by humans.

Physical things: Doing things that require a physical body: to collect something, assemble something, conduct an experiment, or do some human thing for another human.

With today’s LLMs, you may not be able to tell whether a human or artificial intelligence is managing the project.

AI-Managed Projects

It is feasible that today’s LLMs can manage the entire project. LLMs can make up for any lack of intelligence with precise coordination and unlimited support.

When more intelligence is needed, AI can ask for input from experienced humans. For example, on overall project goals, plans, or software architecture.

Rails that allow AI to manage projects already exist. Task platforms like Dework provide everything an AI needs to employ humans on-chain.

An interesting project for AI would be to have humans build the missing pieces to satisfy the AI ​​user intent. For example, missing intent modules, or missing protocol authentication. Then crowdsourcing the development from users needing these components.

But really any project is possible.

Changes to how we will transact and use blockchains could have important impacts on chains, protocols, and wallets.

How to Win in the World of LLMs

How will LLMs change game rules?

Provable Facts are More Important than Branding and “Marketing”

LLMs may not be influenced by unsubstantiated claims and “marketing”.

Instead, verifiable facts (uptime, transaction costs, block times, pre-confirmations, depth/liquidity, price, proof of security) will be more important.

If your documentation and SDK are primarily used by LLMs, you can also write them differently.

Better Solutions Can Win Overnight

When AI constructs your intent and optimizes it properly, protocols like Morpho, which are rigorous improvements to existing solutions, can gain significant market share almost overnight.

This means that solutions with economies of scale will grow faster – but rent seekers will be quickly overturned by better solutions.

Today, you may still use SushiSwap out of habit, but tomorrow LLMs will choose CowSwap.

Blockchain Will Become More Useful

Chat with an AI for a few minutes and you can map out your investment strategy for the year. Thanks to translation, modularity and open interfaces, you can express all of this on-chain. Additionally, you can find direct counterparties and eliminate transaction fees. Blockchain will become even more useful.

Will LLMs Make Monolithic UIs Obsolete?

A single UI needs to cater to everyone. LLMs will build the UI that everyone wants.

If LLMs author most transactions and LLMs can interact directly with the protocol, then a fixed UI may become less important.

Conversations like the following are already possible:

User: “Show me a reasonable timeline for my token holdings.”

LLM: “Sure, I would chart the past 12 months, group similar assets (e.g. stablecoins) together and increase the thickness of the lines based on the log of the dollar value of the tokens held. How does that sound?”

You: “Sounds good.”

LLM: “Here’s the chart.”

The difficulty of building a UI that works for everyone may have been solved. LLMs will build the UI that everyone wants.

What Can a Wallet Do?

What is a wallet? It can save your keys, make RPC calls for you, provide you with a UI to express your intent, and monitor your transactions. We may still want a wallet to hold our keys, but LLMs may be able to do other things as well.

Some wallets may use a fine-tuned LLM that helps you find intents faster, express intents securely using an intent whitelisted module, and provide LLMs with nice UI building blocks for using information about the wallet (e.g., an adaptable dashboard).

Blockchains that Attract LLMs Will Gain Significant Volume

Whoever becomes the main chain of ChatGPT and other LLMs will be one step ahead in terms of mass adoption. The potential capacity of a single large LLM service can dwarf today’s wallet capacity. The LLM integration is probably the most valuable order flow integration.

Protocols Can be More Specialized

If branding was less important and every solution was equally visible to the AI, more specialized solutions would become more feasible.

You could build a protocol specifically for small over-the-counter (OTC) trading, or TWAP only for volatile tokens, or KYB lending between small German businesses. When they fit an intent, the AI ​​will find them.

Security Concerns

LLMs are intricate and hard to coordinate. You can’t guarantee that there aren’t some hidden hints in the smart contract that tell you to send the funds to the trash while telling you that this is just a normal swap.

Formal intent modules and safe back-translation may be ways to control this risk. But this requires more research.

There are also concerns about providing financial regulation to systems that may soon be smarter than us. There’s probably little we can do about it, but that’s a discussion for another article.

Conclusion

We make some bold claims in this article.

LLMs will make blockchain more interesting by discovering and describing our intents. With smart understanding of intent, more P2P transactions will happen and global barter trading will make us all better off.

Maybe LLMs will help us solve a large part of user experience problems.

Most of the blockchain traffic will be driven by LLMs. Especially consumer LLMs using blockchain as a financial rail.

Chains and protocols that gain AI attention will win.

Soon (or today?) we will see AI managing projects and bribing humans to help them solve problems.

It is unclear how LLMs can be safely brought on-chain. But we show that a formal intent language can serve as a starting point.

We hope that some of the implications and ideas we have highlighted will serve as a useful starting point for teams exploring the impact of LLMs on blockchain.

It’s not AI or blockchain, it’s AI Blockchain.

Disclaimer:

  1. This article is reprinted from [propellerheads]. All copyrights belong to the original author [Yellow Propeller]. If there are objections to this reprint, please contact the Gate Learn team([email protected]), and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
Start Now
Sign up and get a
$100
Voucher!
Create Account