Review of the Previous Article:
“AgentFi - A New Concept DeFi Driven by AO”
Continuing from the last article. The entire blockchain industry is a history of expansion evolution. Various routes are being attempted to speed up and reduce costs, but each has its own ceiling. Until AO emerged, a paradigm different from traditional blockchain. Through clever design, the block space on AO is no longer a fixed supply scarce resource, but a resource that can be infinitely created according to needs, thus endowing AO with unlimited scalability!
This also makes the financial model aimed at Agents—AgentFi—possible. Compared to traditional DeFi, AgentFi has a broader range of application scenarios.
Traditional DeFi protocols originated from Ethereum. Although various L2s and high-performance new public chains have emerged, people's imagination of the DeFi construction paradigm has always been limited to Ethereum. Now, let us step into a platform completely free from performance limitations, reminiscent of the internet's evolution from read-only to read-write, to algorithms, to autonomy, and reimagine what on-chain finance should look like. Does a brand new picture emerge in your mind? A scene where all users can create financial Agents, and any computational unit can become a "financial institution," providing customized financial services in a financially equitable manner!
Why is a Standard Protocol for Agents Needed?
On the AO computer, processes communicate with each other through messages, and message transmission follows certain specifications. The same applies in financial scenarios.
Customization is the starting point of diversification. If different types of financial Agents develop independently, it will inevitably lead to different protocol specifications, making interaction between Agents a significant challenge. How can Agents communicate with each other and facilitate transactions?
To avoid the lack of interoperability caused by the absence of unified specifications, the FusionFi Protocol (FFP) was born.
As an interaction protocol between Agents, the FusionFi Protocol defines the interaction rules between Agents, allowing various financial services created based on Agents to interconnect and integrate. At the early stage of AgentFi, such a protocol can be considered quite forward-looking.
FFP (FusionFi Protocol)
The FusionFi Protocol is a protocol launched by EverVision founder outprog at the 2024 Arweave Asia Conference.
The key concept in the FusionFi Protocol is Note. It is an abstract representation model of a commitment, which can take the form of tokens, bonds, certificates, contract rights, etc. By using the Note model as a medium, the FusionFi Protocol can support a rich variety of financial scenarios, such as trading, lending, and staking.
The FusionFi Protocol not only provides a protocol specification but also offers developers a set of development tools for AgentFi (FFP SDK), helping developers create AgentFi more efficiently and simply.
Currently, the FusionFi Protocol has two instances: AMM Agent and Orderbook Agent.
AMM Agent
Taking the AMM Agent as an example, each AMM Agent can be understood as a liquidity pool of "personal sovereignty," where the market-making rules of this liquidity pool can be set independently. This means that users do not need to rely on external platforms, such as a funding pool using a unified market-making algorithm, to autonomously implement swap functions and can seek any suitable counterpart across the network. In other words, when users create an Agent, they are essentially creating a decentralized exchange belonging to themselves. The FusionFi Protocol allows many such "personal exchanges" to form a peer-to-peer network for more efficient and flexible matching.
Here is the core process of the AMM Agent:
It seems simple, but for LPs, it still appears to be a standard process of creating, depositing, adding, exchanging, and withdrawing. However, the difference is that the Agent is controlled by the user themselves, meaning that the assets are in their hands. This is actually the capability of AgentFi itself, and FusionFi establishes a relatively unified entry point (and data structure) for this capability.
You can understand that, as an LP, all you need to do is complete the deposit and withdrawal operations by calling a unified entry function. The function itself can link to multiple DeFi projects, and how they interact subsequently can be disregarded, which is the value of the protocol standard. It is similar to how applications adapt to users after the establishment of standards like ERC20.
Below is a specific code example for adding liquidity.
You can see that only a few lines of core code can quickly implement this function.
const minLiquidity = await agent.getMinLiquidityByX(helloAmount, ammSlippageOfPercent) // Set amount and slippage
const addLiquidityMessageId = await agent.addLiquidity(minLiquidity) // Initiate the message to add liquidity
const addLiquidityResult = await getProcessResult(addLiquidityMessageId, ammProcess) // Get the result
Code example source:
https://github.com/permadao/ffp-demo
Note Lifecycle
Here we can switch to the perspective of Note and take a look at the transaction process between the user and the AMM Agent.
When a user initiates a price inquiry request, all AMM Agents with corresponding liquidity will automatically create a quote, which is a Note. This Note has a very short validity period; if it cannot be executed quickly, it will expire. AMM Agents act as makers.
All Notes will be centrally stored in the system's Note Pool, which serves as a shared storage space in the system, facilitating access for other entities.
Users select the most suitable quote Note from the Note Pool through the front-end webpage and submit it to the Settlement Center for settlement. The Settlement Center is responsible for executing specific settlement operations, such as the swap here.
The Note is marked as "settled," and the swap is successfully executed.
Here, the Settlement Center is a key component of the FusionFi Protocol, responsible for handling various Note settlement operations within the system.
The same applies to the Orderbook Agent; the limit orders in the Orderbook Agent are also Notes, and their settlement process is identical to that of the quote Notes created by the AMM Agent. This means that the FusionFi Protocol can actually integrate liquidity from both AMM and order books.
This integration brings significant benefits. In swap scenarios, liquidity can come from user quotes or market-making nodes. Users can leverage routing protocols to search for liquidity across the entire Note pool to achieve the best execution price. AMM provides basic liquidity to the market but has issues with significant price impact and impermanent loss, while order books allow users to place orders independently, suitable for large trades and users with specific price requirements. After integration, AMM provides continuous liquidity, while order books reduce price impact and increase depth, making large trades more efficient. This model meets the needs of different types of users, allowing both retail and institutional participants to find suitable trading methods, thereby improving capital utilization and further maturing the market.
Multi-Note Atomic Settlement
The above case is limited to settling one Note at a time, but in fact, the FusionFi Protocol can also support settling multiple Notes at once, and this settlement is atomic. All Notes in a single settlement must be completed before the state of the Notes can be changed. Otherwise, the state of all Notes will not be changed.
This brings some very useful features:
Large Order Splitting: Large orders are difficult to be consumed by a single counterparty. FFP supports splitting large orders to fully utilize dispersed liquidity.
Multiple Transactions Merging: Multiple transactions can be merged into a single atomic order. This can enhance transaction speed, which is crucial for high-frequency traders and complex trading scenarios.
Multi-hop Trading: Multi-hop trading is an extension of the merging function. Suppose in a swap scenario, you want to complete a swap from A to C, but there is no direct path from A to C; however, there is a path from A to B to C. FFP can achieve the merging of A to B and B to C. Moreover, this multi-hop trading is atomic, meaning there will be no situation where A to B succeeds, but B to C fails.
Zero-Capital Arbitrage: This is what is known as "arbitrage without capital." Essentially, arbitrageurs take two Notes with existing interest rate differentials and settle them simultaneously. You can see the diagram below.
Image source: https://x.com/Permaswap/status/1854212032511512992
Permaswap is the first AgentFi DEX built on the FusionFi Protocol and is currently the most mature DEX in the AO ecosystem. If you're interested, you can experience the above features on Permaswap (aopsn.com).
Settlement Center
Clearly, in the FusionFi Protocol, the Settlement Center is a key component. It processes all notes based on chronological order, and as long as the AO's SU system is functioning normally, this chronological order can be obtained. Anyone can extract notes from the note pool and submit them to the Settlement Center for settlement.
When the volume of processing requests for notes increases, the Settlement Center can also easily scale through a distributed approach, using multiple settlement processes to divert and handle settlement tasks. The amount of pressure can be calculated based on the note's ID to distribute it to different settlement processes for handling.
Diversified Applications of Notes
The structured format of Notes defined by the FusionFi Protocol has strong universal applicability for various financial services. Therefore, the application methods of Notes are diverse. They can be used not only to represent quotes for spot trading but also for futures trading, contract trading, lending, and other scenarios. Thus, FusionFi can integrate not just liquidity but also a variety of financial forms.
Outlook
In the author's view, the essence of this internet world is multi-point transactions. Therefore, solving high-frequency trading among multiple groups holds significant value, and the AgentFi model can cover almost all DeFi scenarios. The FusionFi Protocol enables more efficient peer-to-peer matching between Agents, and this matching is cross-protocol. In the DeFi space, where the main competition revolves around liquidity acquisition and monopolizing liquidity as a profit model, the changes brought by the FusionFi Protocol are revolutionary!
Of course, the FusionFi Protocol is a brand new protocol standard and may need continuous adjustments and optimizations based on business needs. This can refer to the models of BIP (Bitcoin Improvement Proposal) and EIP (Ethereum Improvement Proposals), which absorb ideas through co-creation.
Reference Materials:
- Smart Finance: From AgentFi to FusionFi
https://x.com/perma_daoCN/status/1801474305597050906
- FusionFi Protocol: Core Element for Achieving AgentFi Interoperability
https://x.com/Permaswap/status/1854212032511512992
- FusionFi Protocol Documentation
https://github.com/zyjblockchain/ffp-doc/blob/main/doc/FusionFi%20Protocol%20Introduction.md
This article was first published on PermaDAO.
Original link: https://mp.weixin.qq.com/s/r5bhvWVhoEdohbhTt_7b5A
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。