
Author: YBB Capital Researcher Ac-Core
1. What Story Does DeFAI Tell?
1.1 What is DeFAI?
In simple terms, DeFAI refers to AI + DeFi. AI has been a hot topic, with markets going through multiple cycles of hype, ranging from AI computing power to AI memes, from different technical architectures to various infrastructure setups. While the overall market value of AI agents has been seeing a decline recently, the concept of DeFAI is emerging as a breakthrough trend. The current DeFAI landscape can broadly be categorized into three types: AI abstraction, autonomous DeFi agents, and market analysis and prediction. Specific classifications within these categories are shown in the diagram below.
1.2 How Does DeFAI Work?
In a DeFi system, the core of an AI agent is based on LLM (large language models), involving multi-layered processes and technologies that encompass everything from data collection to decision-making execution. According to a study by @3sigma in the IOSG article, most models follow six specific workflows: data collection, model inference, decision-making, hosting and operation, interoperability, and wallet management. Below is a summary of these processes:
1.Data Collection: The primary task of an AI agent is to understand its operating environment comprehensively. This includes gathering real-time data from multiple sources:
On-chain Data: Real-time blockchain data, such as transaction records, smart contract states, and network activities, is obtained through indexers and oracles. This helps the agent stay synchronized with market dynamics.
Off-chain Data: Price information, market news, and macroeconomic indicators are sourced from external data providers such as CoinMarketCap or Coingecko, ensuring the agent’s understanding of external market conditions. These data are typically provided through API interfaces.
Decentralized Data Sources: Some agents may obtain price oracle data through decentralized data feed protocols to ensure data decentralization and trustworthiness.
2. Model Inference: After data collection, the AI agent enters the inference and calculation phase, where it relies on multiple AI models for complex reasoning and prediction:
Supervised and Unsupervised Learning: By training on labeled or unlabeled data, AI models can analyze market behavior and governance forum activities. For example, by analyzing historical transaction data, they can predict future market trends or assess governance proposals’ likely outcomes.
Reinforcement Learning: Through trial and error and feedback mechanisms, AI models autonomously optimize strategies. For example, in token trading, the AI agent can simulate multiple strategies to determine the optimal buy or sell time, allowing it to continuously improve in dynamic market conditions.
Natural Language Processing (NLP): By understanding and processing natural language input, the agent can extract key information from governance proposals or market discussions, helping users make better decisions. This is particularly important when scanning decentralized governance forums or processing user commands.
3. Decision Making: Based on the collected data and inferred results, the AI agent enters the decision-making phase. Here, the agent not only analyzes the current market conditions but also balances multiple variables:
Optimization Engine: The agent uses an optimization engine to find the best execution path under various conditions. For example, when providing liquidity or performing an arbitrage strategy, the agent must consider slippage, transaction fees, network latency, and fund size to find the optimal path.
Multi-Agent System Collaboration: In complex market situations, a single agent may not fully optimize all decisions. In such cases, multiple AI agents can be deployed, each focusing on different tasks, collaborating to enhance the overall system’s decision-making efficiency. For instance, one agent may specialize in market analysis, while another focuses on executing trading strategies.
4. Hosting and Operation: AI agents often need to handle substantial computations and therefore rely on off-chain servers or distributed computing networks for hosting:
Centralized Hosting: Some AI agents may depend on centralized cloud computing services, like AWS, to host their computing and storage needs. This approach ensures efficient model operation but also brings potential centralization risks.
Decentralized Hosting: To reduce centralization risks, some agents use decentralized distributed computing networks (e.g., Akash) and decentralized storage solutions (e.g., Arweave) for hosting models and data. These solutions ensure decentralized model operation while providing data storage durability.
On-chain Interaction: While models may be hosted off-chain, AI agents need to interact with on-chain protocols to execute smart contract functions (e.g., transaction execution, liquidity management) and manage assets. This requires secure key management and transaction signing mechanisms, such as MPC (multi-party computation) wallets or smart contract wallets.
5. Interoperability: The key role of AI agents in the DeFi ecosystem is to seamlessly interact with various DeFi protocols and platforms:
API Integration: Agents bridge with decentralized exchanges, liquidity pools, and lending protocols through API connectors, allowing them to access real-time market prices, counterparties, and borrowing rates, among other crucial information, for trading decisions.
Decentralized Messaging: To ensure synchronization with on-chain protocols, agents can use decentralized messaging protocols (e.g., IPFS or Webhook) to receive updates. This enables the AI agent to process external events in real-time, such as governance proposal voting outcomes or liquidity pool changes, allowing it to adjust its strategy accordingly.
6. Wallet Management: AI agents must be able to perform actions on the blockchain, which requires secure wallet and key management mechanisms:
MPC Wallets: MPC wallets split private keys across multiple participants, allowing the agent to perform transactions securely without the risk of a single key compromise. For example, the wallet used by Coinbase Replit shows how MPC enables secure key management while allowing users to delegate some autonomy to the AI agent.
Trusted Execution Environment (TEE): Another common key management solution is using TEE technology, where private keys are stored in a secure hardware enclave. This enables the agent to conduct transactions and make decisions in a fully autonomous environment without third-party intervention. However, TEE faces challenges related to hardware centralization and performance overhead, though it may become more feasible as these challenges are addressed. Once solved, fully autonomous AI systems could become a reality.
1.3 Origins of the Sect? From Intent to DeFAI
If the vision of DeFAI is to enable users to manage their portfolios autonomously through AI agents and various AI platforms, allowing everyone to easily participate in crypto market trading, does this vision naturally lead us to the concept of “intent”?
Let’s revisit the concept of “intent” first introduced by Paradigm. In normal trading, we need to specify a clear execution path, such as swapping Token A for Token B on Uniswap. However, in an intent-driven scenario, the execution path is determined jointly by the solver and AI. In other words: Transaction = I specify how the TX is executed; Intent = I only care about the TX result, not the execution process. From a retrospective perspective, the narrative of DeFAI not only closely aligns with the ultimate vision of AI agents but also perfectly complements the realization of the “intent” concept. In this comprehensive view, DeFAI can be seen as a new path to realizing intent.
The ultimate version of large-scale blockchain application realization in the future might be: AI Agent + Solver + Intent-Centric + DeFAI = Future?