Tap to Trade in Gate Square, Win up to 50 GT & Merch!
Click the trading widget in Gate Square content, complete a transaction, and take home 50 GT, Position Experience Vouchers, or exclusive Spring Festival merchandise.
Click the registration link to join
https://www.gate.com/questionnaire/7401
Enter Gate Square daily and click any trading pair or trading card within the content to complete a transaction. The top 10 users by trading volume will win GT, Gate merchandise boxes, position experience vouchers, and more.
The top prize: 50 GT.
 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.
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.
All Notes will be stored in the system’s Note Pool, which serves as a shared storage space for easy access by other entities.
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.
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:
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.