FusionFi Protocol: Connecting All Financial Agents

avatar
十四君
10 hours ago
This article is approximately 1789 words,and reading the entire article takes about 3 minutes
When block space is no longer a scarce commodity, please reimagine what on-chain finance should look like.

Previous review:

《AgentFi - A new concept DeFi driven by AO》

Continued from the last time. The entire blockchain industry is an evolutionary history of expansion. In order to increase speed and reduce fees, various routes are being tried, but each has its own ceiling. Until AO, a paradigm different from the traditional blockchain was born. Through clever design, the block space on AO is no longer a scarce commodity with a fixed supply, but a resource that can be created infinitely as needed, thus giving AO the ability to expand infinitely!

This also makes the agent-oriented financial model - AgentFi possible. Compared with traditional DeFi, AgentFi has a wider range of application scenarios.

The traditional DeFi protocol originated from Ethereum. Although various L2 and high-performance new public chains have been born, peoples imagination of the DeFi construction paradigm has always been limited to Ethereum. Now, lets step into a platform with no performance restrictions, just like recalling the development process of the Internet from read-only to read-write, to algorithm, to autonomy, and re-imagine what on-chain finance should look like. Will a new picture emerge in your mind? A financial equality scene where all users can create financial agents, and any computing unit can become a financial institution to provide customized financial services!

Why do we need a standard protocol for Agents?

On AO computers, processes communicate with each other through messages, and message delivery follows certain specifications. In fact, the same is true in financial scenarios.

Customization is the starting point of diversification. If different types of financial agents develop on their own, different protocol specifications will inevitably be generated. In this case, the interaction between agents becomes a big problem. How can agents communicate with each other and then match each other?

In order to avoid the lack of interoperability caused by the lack of unified standards, FusionFi Protocol (FFP) came into being.

As an interaction protocol between Agents, FusionFi Protocol defines the interaction rules between Agents, allowing various financial services created based on Agents to communicate with each other and integrate into one. At the time when AgentFi was just starting out, such a protocol can be said to be quite forward-looking.

FusionFi Protocol: Connecting All Financial Agents

FFP(FusionFi Protocol)

FusionFi Protocol is a protocol launched by EverVision founder outprog at the 2024 Arweave Asia conference.

The key concept in FusionFi Protocol is Note. It is an abstract representation model of commitment, which can be in the form of tokens, bonds, certificates, contract rights, etc. Using the Note model as a medium, FusionFi Protocol can support a variety of financial scenarios, such as trading, lending, staking, etc.

FusionFi Protocol not only provides a protocol specification, but also provides developers with a set of AgentFi development tools (FFP SDK) to help developers create AgentFi more efficiently and simply.

Currently, FusionFi Protocol already has two instances: AMM Agent and Orderbook Agent.

AMM Agent

Taking AMM Agent as an example, each AMM Agent can be understood as a personal sovereign liquidity pool, and the market-making rules of this liquidity pool can be set by itself. This also means that users do not need to rely on external platforms such as a fund pool that uses a unified market-making algorithm to independently implement the swap function and can find any suitable counterparty in the entire network. In other words, when a user creates an Agent, he is actually creating a decentralized exchange that belongs to him . Then FusionFi Protocol can allow many such personal exchanges to form a peer-to-peer network to achieve more efficient and flexible matching.

The following is the core process of AMM Agent:

FusionFi Protocol: Connecting All Financial Agents

It looks very simple. In fact, for LP, it seems to be a standard process of creating deposits, adding, exchanging and withdrawing. However, the difference is that the Agent is controlled by the user, while for LP, the assets are in their own hands. This is actually the ability of AgentFi itself. FusionFi has established a relatively unified entrance (and data structure) for this set of capabilities.

You can understand that as an LP, all you need to do is deposit and withdraw funds by calling a unified entry function. The function itself can be linked to multiple DeFi projects, and you don’t need to worry about how they interact and work in the future. This is the value of the protocol standard layer. It is similar to the application layer adapting to users after having standards such as ERC 20.

Below is a concrete code example of adding liquidity.

As you can see, this function can be quickly implemented with just a few lines of core code.

const minLiquidity = await agent.getMinLiquidityByX(helloAmount, ammSlippageOfPercent) //Set the quantity and slippage

const addLiquidityMessageId = await agent.addLiquidity(minLiquidity) //Initiate a 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 Note perspective and take a look at the transaction process between users and AMM Agents.

1. When a user initiates a price inquiry, all AMM Agents with corresponding liquidity will automatically create a quotation. This quotation is a Note. The validity period of this Note is very short. If the transaction cannot be completed quickly, the Note will become invalid. AMM Agents are equivalent to makers.

2. All notes will be stored in the systems Note Pool, which acts as a shared storage space in the system for easy access by other entities.

3. The user selects the most suitable quotation note from the Note Pool through the front-end web page and submits it to the Settlement Center for settlement. The Settlement Center is responsible for performing specific settlement operations, such as the swap here.

4. The Note is marked as “settled” and the Swap is successfully executed.

Here, Settlement Center is a key component in FusionFi Protocol, responsible for handling various Note settlement operations within the system.

In fact, the same is true for Orderbook Agent. The limit order in Orderbook Agent is itself a Note, and its settlement process is exactly the same as the quotation agent created by AMM Agent. This means that FusionFi Protocol can actually integrate liquidity from AMM and order book.

Such integration brings great benefits. In the swap scenario, liquidity can come from user quotes or market-making nodes. Users can use the routing protocol to find liquidity in the entire Note pool to achieve the best transaction price. AMM provides basic liquidity for the market, but there are problems with large price impact and impermanent loss, while the order book allows users to place orders independently, which is suitable for large transactions and users with specific price requirements. After the integration, AMM provides continuous liquidity, and the order book reduces price impact and increases depth, making large-order transactions more efficient. This model meets the needs of different types of users. From retail investors to institutions, they can find suitable trading methods, thereby improving capital utilization and promoting further maturity of the market.

Multi-Note Atomic Settlement

The above example is limited to settling only one Note at a time, but in fact, FusionFi Protocol can also support the settlement of multiple Notes at a time, and this settlement is atomic. The status of the Note can only be changed after all Notes in a single settlement are settled. Otherwise, the status of all Notes will not be changed.

This brings some very useful properties:

  • Large transaction splitting: Large orders are difficult to be taken by a single counterparty. FFP supports the splitting of large orders to make full use of decentralized liquidity.

  • Multiple trades can be combined into one atomic order. This can improve transaction speed to a certain extent, which is crucial for high-frequency traders and complex trading scenarios.

  • Multi-hop transaction: Multi-hop transaction is an extension of the order consolidation function. Assuming that in the swap scenario, the A→C swap is to be completed, but there is no direct path from A→C, but there is a path from A→B→C, FFP can realize the order consolidation of A→B and B→C. Moreover, this multi-hop transaction is atomic, and there will be no situation where A→B succeeds and B→C fails.

  • Zero-capital arbitrage: It is the so-called making money out of nothing. The essence is that the arbitrageur settles two notes with interest rate differentials at the same time. You can see the picture below.

FusionFi Protocol: Connecting All Financial Agents

Image source: https://x.com/Permaswap/status/1854212032511512992

Permaswap is the first AgentFi DEX built on FusionFi Protocol and is also the most mature DEX in the AO ecosystem. If you are interested, you can experience the above features on Permaswap (aopsn.com).

Settlement Center

Obviously, in FusionFi Protocol, Settlement Center is a key component. It processes all notes based on time order, which can be obtained as long as the AOs SU system is normal. Anyone can extract notes from the note pool and submit them to the Settle Center for settlement.

When the number of note processing requests increases, the Settlement Center can also be easily expanded in a distributed manner, with multiple settlement processes handling the settlement tasks. The amount of pressure is calculated based on the note ID and distributed to different settlement processes for processing.

FusionFi Protocol: Connecting All Financial Agents

Multiple applications of Note

The structured format of Note defined by FusionFi Protocol is actually very universally applicable to various financial businesses. Therefore, Note can be applied in various ways. It can not only be used to represent quotation sheets for spot transactions, but also for futures transactions, contract transactions, lending and other scenarios. Therefore, FusionFi can integrate not only liquidity, but also various financial forms.

Outlook

In my opinion, the essence of this Internet world is multi-point transactions, so solving high-frequency transactions between multiple groups is of great value. The AgentFi model can be used in almost all DeFi scenarios, and the FusionFi Protocol allows Agents to conduct peer-to-peer matching more efficiently, and this matching is cross-protocol. Faced with the DeFi field, which uses competition for liquidity as the main form of competition and monopolizing liquidity as a way of profit, the changes that FusionFi Protocol can bring are subversive!

Of course, FusionFi Protocol is a brand new protocol standard, and it may need to be continuously adjusted and optimized according to business needs. This can refer to the model of BIP ( Bitcoin Improvement Proposal ) Bitcoin Improvement Proposal and EIP ( Ethereum Improvement Proposals ) Ethereum Improvement Proposal to absorb creativity in co-creation.

References:

1. Smart Finance: From AgentFi to FusionFi

https://x.com/perma_daoCN/status/1801474305597050906

2. FusionFi Protocol: Core Element for Achieving AgentFi Interoperability

https://x.com/Permaswap/status/1854212032511512992

3. FusionFi Protocol Documentation

https://github.com/zyjblockchain/ffp-doc/blob/main/doc/FusionFi Protocol Introduction.md

This article was first published on PermaDAO

Original link: https://mp.weixin.qq.com/s/r5bhvWVhoEdohbhTt_7b5A

    Original article, author:十四君。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

    ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

    Recommended Reading
    Editor’s Picks