FusionFi Protocol: Connecting all financial intermediaries

Source: PermaDAO

Continuing from the previous part. The entire Blockchain industry is a history of expansion. Various approaches have been tried to improve speed and reduce costs, but each has its own limitations. Until AO, a paradigm different from traditional Blockchain emerged. Through clever design, the block space on AO is no longer a scarce resource with fixed supply, but a resource that can be infinitely generated according to needs, giving AO the ability to infinitely expand!

This also makes it possible to create a financial model oriented towards agents - AgentFi, which has a wider range of applications compared to traditional Decentralized Finance.

The traditional Decentralized Finance protocol originated from the Ethereum network, and although various L2 and high-performance new public chains have emerged, people’s imagination of the Decentralized Finance building paradigm has always been limited to the Ethereum network. Now, let us step into a platform with no performance limitations, just like recalling the development process of the Internet from read-only to read-write to Algorithms to autonomy. Can you imagine a new vision of on-chain finance? A vision where all users can create financial agents, where any computing unit can become a ‘Financial Institution’, and where custom Financial Services can be provided!

Why do we need a standard protocol for an Agent?

On the AO computer, processes communicate through messages, and message delivery follows certain rules. In fact, it is the same in financial scenarios.

Customization is the starting point of diversification. If different types of financial agents develop independently, different protocol specifications will inevitably be generated. In this way, the interaction between agents has become a major problem. How to enable agents to communicate with each other and then match with each other?

To avoid the loss of interoperability caused by the lack of uniform standards, FusionFi Protocol (FFP) came into being.

FusionFi Protocol, as the interaction protocol between Agents, defines the interaction rules between Agents, allowing various financial businesses based on Agents to interoperate and thus integrate. At the early stage of AgentFi, such a protocol can be said to be forward-looking.

FFP (FusionFi Protocol)

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

The key concept in the FusionFi Protocol is the Note, which is an abstract representation model of a commitment that 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 variety of financial scenarios, such as trading, lending, stake, etc.

The FusionFi Protocol not only provides a protocol specification, but also provides a development tool called trap AgentFi (FFP SDK) for developers, helping them create AgentFi more efficiently and easily.

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

AMM Agent

Taking AMM Agent as an example, each AMM Agent can be understood as a ‘sovereign’ liquidity pool, and the market-making rules of this liquidity pool can be set independently. This also means that users do not need to rely on external platforms such as a fund pool using a unified market-making algorithm to achieve swap function independently and can find any suitable counterparty across the network. In other words, when a user creates an Agent, they are actually creating a personal Decentralizationexchange. Then the 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:

It seems simple, but for LPs, it seems to be a standard process of creating deposits, adding, exchanging, and withdrawing traps. The difference is that the Agent is controlled by the user himself. For LPs, the assets are in their own hands. This is actually the ability of AgentFi itself, while FusionFi is aimed at this trap ability, establishing a relatively unified entry (and data structure).

You can think of it as an LP, you only need to complete the deposit and withdrawal operations, and call the unified entry function. The function itself can be linked to multiple Decentralized Finance projects, and you don’t need to worry about how they interact or function in the future, which is the value of the protocol standard. It’s similar to having standards like ERC20, and then the application layer adapts to the user.

Below is the specific code example for adding Liquidity.

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

const minLiquidity = await agent.getMinLiquidityByX(helloAmount, ammSlippageOfPercent)//Set the amount and Slippageconst addLiquidityMessageId = await agent.addLiquidity(minLiquidity)//Initiate the message to add Liquidityconst addLiquidityResult = await getProcessResult(addLiquidityMessageId, ammProcess)//Get the result

Source code example:

Note life cycle

Here we can switch to the perspective of Note and take another look at the transaction process between the user and the AMM Agent.

  1. When a user initiates an 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, and if it cannot be quickly traded, the Note will expire. AMM Agents act as makers.

  2. All Notes will be stored in the system’s Note Pool, which serves as a shared storage space for easy access by other entities.

  3. Users select the most suitable quotation 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 swap here.

  4. Note marked as “Settlement”, Swap executed successfully.

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

In fact, it’s the same for Orderbook Agent. The limit orders in Orderbook Agent are actually a Note, and their Settlement process is exactly the same as the quote agent created by AMM Agent. This means that FusionFi Protocol can actually integrate Liquidity from both AMM and order book.

This fusion brings great benefits. In the swap scenario, Liquidity can come from user quotes or from market-making Nodes. Users can use routing protocols to search for Liquidity in the entire Node pool and achieve the best execution price. AMM provides basic Liquidity to the market, but it has a large price impact and Impermanent Loss. The order book allows users to make their own makers, suitable for large transactions and users with specific price requirements. After the fusion, 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, enabling them to find suitable trading methods, thereby improving capital utilization and promoting further market maturity.

Multi Note Atomic Settlement

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

This brings some useful features:

  • Large-size trading split: Large orders are difficult to be absorbed by a single counterparty, FFP supports splitting large orders to make full use of dispersed Liquidity.
  • Multiple transactions can be merged into a single atomic order. This can significantly improve transaction speed, which is crucial for high-frequency traders and complex trading scenarios.
  • Multi-hop Trading: Multi-hop trading is an extension of the aggregation function. Assuming that in the swap scenario, it is necessary to complete the exchange 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 realize the aggregation of A to B and B to C. Moreover, this multi-hop trading is atomic, and there will be no situation where A to B succeeds and B to C fails.
  • Zero Capital Arbitrage: It is essentially what is known as arbitrageur. The essence is that arbitrageurs take two notes with interest rate differentials and settle them at the same time. You can see the picture below.

Image Source:

Permaswap is the first AgentFi DEX built on the FusionFi Protocol and 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 the FusionFi Protocol, the Settlement Center is a key component. It processes all notes based on the time order, as long as the AO’s SU system is functioning properly, the time 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 with notes expands, Settlement Center can also easily scale out in a distributed manner, with multiple settlement processes to handle the Settlement tasks. Depending on the pressure, the processing of Settlement tasks will be distributed to different settlement processes based on the ID of the note.

Note the diversified application of Note

The structured format of the Note defined by the FusionFi Protocol actually has strong universality for various financial transactions. Therefore, the application of Note is diverse. It can be used not only to represent quotes for spot trading, but also for futures trading, contract trading, 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. Therefore, solving high-frequency transactions between multiple groups has great value. The AgentFi model can cover almost all Decentralized Finance scenarios, while the FusionFi Protocol can enable more efficient peer-to-peer matching between Agents, and this matching is cross-protocol. Faced with the competition in the Decentralized Finance field, where the main way to compete is to attract Liquidity and monopolize Liquidity as a profit model, the changes that FusionFi Protocol can bring are revolutionary!

Of course, the FusionFi Protocol is a brand new protocol standard, which may need to be constantly adjusted and optimized according to business needs. This can refer to the mode of BIP (Bitcoin Improvement Proposal) BTC improvement proposal and EIP (Ethereum Improvement Proposals) Ethereum Improvement Proposal, absorbing creativity in co-creation.

AGENT2.36%
DEFI-0.67%
ETH-2.93%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)