The "Smart Automation" Era: Can Intentional Trading and AI-Agents Spark a Flame?
0
3
0
Author: LT, Ethos Lau
Read time: 14 Minutes
Introduction
Many experts and industry leaders, including Ethereum founder Vitalik Buterin and the team at Paradigm, believe that intent-centric transactions will be one of the important directions for the development of blockchain applications in the future. In our article, we explore the concept of intentional trading and its potential, analyzing how this model can simplify user experience, enhance transaction security, and bring more innovative opportunities for decentralized applications. We also discuss the role of AI agents, exploring how they can be combined with intentional trading to further promote the automation and intelligence of smart contracts, providing users with a smarter and more personalized blockchain interaction experience.
What is Intentional Trading
When you want to take a taxi, you open a travel app, select the starting point, and a price range will appear at the bottom of the interface for you to set; when you use a food delivery app to order delicious food, after searching for similar products, the interface has filtering conditions for price, time, distance, etc., for you to choose. In this scenario, "what I want to buy," coupled with time and price restrictions, constitutes a trading intent. Nowadays, many apps add options to let customers fill in their "intent" to facilitate their use. Of course, the intent does not only include preset transaction prices; the price is one of the most commonly used parameters in the intent.
In the context of blockchain, intentional trading refers to the user executing blockchain operations in a goal-oriented manner. In this process, users only express their ultimate goals (time, transaction price, and other transaction conditions) without caring about the specific steps involved. In this process, users sign a contract, allowing users to "outsource" the creation of transactions to a third party. Intermediate steps are handled by third-party problem solvers (which may be human/programs). As long as the output is within the range specified in the user's intent, the solver (also known as the "solver") can freely achieve the result (usually searching and matching other intents in the community, exchanges, etc., to meet the needs of multiple users). Users usually need to pay a certain amount of money to the solver to help complete the transaction.
Two Core Features of Intentional Trading:
Firstly, intent-based blockchain transactions adopt a "declarative programming method," which does not specify the sequence of steps to be executed but directly declares the expected outcome of the transaction.
Secondly, once users have defined their trading intent, the process of building the actual transaction is handed over to a third-party solver, who is responsible for generating the traditional blockchain transactions needed to achieve the expected outcome.
A necessary condition for the establishment of intentional trading: A series of digital currencies represented by Bitcoin has a unique feature, that is, they have an inherent unity, that is, all bitcoins are essentially the same, similar to the unity of electrons and other fundamental particles. This characteristic makes Bitcoin show consistency and substitutability in transactions and use. Therefore, the method of intentional trading is suitable for dealing with virtual currencies with the "same" attribute, and users do not have to worry about the quality of the goods purchased at a lower price being lower than the goods purchased at a higher price.
Potential Benefits and Applications of Intentional Trading
The most obvious benefit of intent-based trading is to simplify the trading process.
Through this approach, transaction details (which may include buying tokens/other in-app purchases) can be reduced to enhance the user experience in dApps. It not only helps with normal transactions but also supports repeated transactions so that users can avoid the inconvenience of regular manual purchases/transfers. It can also support time-related or condition-based transactions, which may include automatic recharge of balances. For example, when the balance is insufficient, a simple command like "When my wallet balance is less than 100, transfer/buy xx coins" can automatically transfer. It can also eliminate the hassle of regularly buying tokens through simple commands.
In terms of helping the user experience, this promotes the use of blockchain technology because it allows newcomers to cryptocurrencies not to deal with all the tedious steps.
Since intent-based trading only focuses on the output, orders do not need to be traded immediately. Due to the system's flexibility in time, it can execute orders when the market is most favorable, thereby reducing slippage when prices change. The solver tries to find the best path, sometimes meaning it can aggregate orders for larger transactions to further reduce slippage. Users can also specify the maximum slippage fee they are willing to pay in their intent so that each transaction is ideal for them. Note: Slippage in trading refers to the difference between the executed price and the expected price. This usually occurs during periods of high market volatility or low liquidity when the market cannot match orders at the preferred price. Slippage can be positive or negative. Positive slippage means that the order is executed at a better price than expected, while negative slippage means that the order is executed at a worse price than expected.
Intent-based trading can set conditions and goals to achieve on-chain operations and has many potential applications. For example, setting limit orders to buy tokens at the target price, setting slippage (acceptable difference range), regularly buying tokens at a fixed time, automatically transferring when the balance is insufficient, and buying or selling tokens in time according to significant events reported by the oracle. Or, using the oracle method, when an event (economic event, political event) occurs, immediately execute an operation, such as automatically selling when the stock market falls to a certain level, automatically buying Bitcoin when a candidate Terry successfully takes the position of president.
The current traditional trading model has issues with opacity and centralized risks - users have limited understanding of the actual execution process when submitting transactions. The transaction results are largely affected by factors such as network congestion at specific execution times, the behavior of miners or validators, and the overall state of the blockchain. This opacity makes users vulnerable to front-running, back-running, and other "Maximal Extractable Value" (MEV) techniques. In addition, the high degree of transaction freedom given to miners, validators, and relayers allows them to easily extract value through reordering, censorship, and other techniques. The lack of execution visibility exacerbates users' vulnerability to MEV attacks.
MEV attacks are a phenomenon in the cryptocurrency and blockchain field that exploits information asymmetry and transaction privileges to obtain excessive profits. This type of attack affects the user experience, undermines market fairness, threatens system stability, and wastes resources. Common forms include front-running, sandwich attacks, liquidation arbitrage, back-running transactions, and miner self-interested behavior, etc.
Taking the sandwich attack as an example, it usually involves a malicious trader in a decentralized finance (DeFi) protocol or service, manipulating asset prices by placing orders before and after a user's transaction at the same time. This attack method not only affects the price of transaction execution but may also affect the commission earned by liquidity providers.
To guard against sandwich attacks, some platforms such as 1inch have introduced new order types called "flashbot transactions," which are not broadcast to the transaction pool but are only visible after being mined, thus protecting transactions from being seen and exploited by malicious traders. In addition, users can keep their transactions private by using custom RPC endpoints, avoiding being seen and exploited by sandwich bots.
Random time trading, as a strategy, is based on the core idea of making transaction times unpredictable, increasing the difficulty of market manipulation. By executing transactions at different times randomly, the risk of being predicted and exploited by malicious traders can be reduced. However, it is worth noting that although random time trading can serve as a preventive measure, whether sandwich attacks are worth doing by attackers also depends on whether the cost of executing these transactions exceeds the financial benefits the attackers can obtain from other traders. Therefore, random time trading combined with other protective measures can more effectively prevent market manipulation and sandwich attacks.
Intentional Trading Case: UniswapX
Introduction to Uniswap
Uniswap was individually invented by Hayden Adams, a former mechanical engineer. After becoming unemployed in 2017, Hayden Adams was inspired by the concept of Automated Market Maker (AMM) by Ethereum co-founder Vitalik Buterin. He began to self-study the smart contract programming language Solidity and started developing Uniswap. In November 2018, the first version of Uniswap, V1, was launched on the Ethereum mainnet, providing decentralized token exchange services based on AMM. Subsequently, Uniswap developed rapidly, launching V2 and V3 versions, continuously optimizing the trading experience and liquidity provision mechanisms.
Introduction to UniswapX
UniswapX is an innovative decentralized trading protocol that uses a permissionless, open-source (GPL) auction mechanism, allowing users to trade between different AMMs and other liquidity sources. The core of this protocol is intentional trading, where users only need to express their trading intentions without worrying about the specific execution process of the trade. Users only need to clarify their intent, and a single signature can complete all operations.
In UniswapX, there are three different types of reactors: Limit Order Reactor, Dutch Order Reactor, and Exclusive Dutch Order Reactor (Dutch and Exclusive Dutch order reactors), which are responsible for processing different types of orders that participants may place. Among them, the Exclusive Dutch Order is a new type of order, similar to the Dutch auction, but with a limit on the number of participants.
When users place Dutch or Exclusive Dutch orders through UniswapX, they will contract with Permit2, allowing the transfer of their tokens. Once signed, these orders are published and available for anyone to take and complete. Traders only need to indicate their willingness to trade and receive within a specified time, and 'fillers' can complete the order.
The basis of intentional trading is to allow participants to focus on their desired goals rather than the specific trading process. The premise of intention-based trading is that participants do not have to handle the trade themselves but list the goals they want to achieve. In this way, 'fillers' can use various methods to complete the trade, allowing UniswapX to benefit from a variety of liquidity pools, including decentralized exchanges (DEXs), centralized exchanges (CEXs), cross-chain liquidity networks, native bridging, stablecoin pools, etc., to ensure the best price.
In addition, 'fillers' are motivated to complete the trade as quickly as possible to benefit from higher prices and higher fees per transaction. 'Fillers' will complete the trade as quickly as possible to obtain a higher price and higher fees per transaction. Reactors will verify the contract to ensure that the output of tokens meets expectations.
In summary, UniswapX provides users with a more efficient, transparent, and user-friendly trading environment through its innovative auction mechanism and the concept of intentional trading, while solving some of the problems faced by traditional AMMs, such as trading costs, MEV attacks, and slippage wear and tear.
What is an AI-Agent?
AI-Agent, also known as an Artificial Intelligence Agent, is a computer program capable of making decisions autonomously and executing tasks based on the environment, inputs, and predefined goals. The core components of an AI-Agent include a Large Language Model (LLM) acting as its "brain," enabling it to process information, learn from interactions, make decisions, and take action; observation and perception mechanisms, allowing it to sense the environment; reasoning processes, which involve analyzing observations and memory content and considering possible actions; action execution, as an explicit response to thinking and observation; and memory and retrieval, storing past experiences for learning purposes.
AI-Agents can be reactive, proactive, learning, or collaborative, and they typically operate independently to perform complex tasks. LLMs are trained on vast datasets that include books, articles, websites, and various user inputs.
Some common examples of AI-Agents include ChatGPT, Tesla's Autopilot, and Netflix's recommendation engine. Traditional LLMs are generally used for generating text dialogues, while the concept of an AI-Agent emphasizes the ability to use and control other tools. ChatGPT is a virtual assistant that uses Natural Language Processing (NLP) to learn how to understand text. During training, the LLM learns to predict the next word in a sentence, helping it understand context, grammar, and meaning. In contrast, Tesla's Autopilot makes calculations in milliseconds to determine the car's speed and angle of travel. It is trained on images and videos to determine distances between objects and what the objects might be. On the road, the agent uses all cameras to identify different objects and generate a virtual map of its surroundings to accurately determine how to drive. Netflix's AI-Agent recommends movies to users based on what they have previously watched. It collects a large amount of data on how users int