FusionFi Protocol: Connecting All Financial Agents

Review of the previous section:

AgentFi - A New Concept of Decentralized Finance Driven by AO

Continuing from the previous. The entire Blockchain industry is a history of expansion. In order to speed up and reduce costs, various approaches have been attempted, 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 fixed and scarce supply, but a resource that can be infinitely created as needed, giving AO the ability to expand infinitely!

This also makes the financial model oriented towards agents - AgentFi possible, with a wider range of applications compared to traditional Decentralized Finance.

The traditional Decentralized Finance protocol originated from the Ethereum network. Despite the emergence of various L2 and high-performance new public chains, people’s imagination of the Decentralized Finance construction paradigm has always been limited to Ethereum. Now, let’s step into a platform without any performance restrictions, just like recalling the development process of the Internet from read-only to read-write, to Algorithm, to self-governing. Let’s reimagine what on-chain finance should look like. Will a completely new vision come to mind? A vision where all users can create financial agents, where any computing unit can become a ‘Financial Institution,’ and provide a vision of financial empowerment with customizable Financial Services!

Why do we need a standard protocol for an Agent?

On AO computers, processes communicate through messages, and message passing follows certain specifications. In fact, this is also the case in financial scenarios.

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

To avoid the lack of interoperability caused by the lack of unified standards, FusionFi Protocol (FFP) comes into being.

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

FFP(FusionFi Protocol)

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

The key concept in the FusionFi Protocol is Note, which is an abstract representation model of a promise 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.

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

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 an individual 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 that adopts a unified market-making algorithm, to independently implement swap functions and can search for any suitable counterparty across the network. In other words, when users create an Agent, they are actually creating a Decentralization exchange that belongs to individuals. 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’s actually a trap to create, deposit, add liquidity, exchange, and withdraw. The difference is that the Agent is controlled by the user themselves, and for LPs, the assets are in their own hands. This is actually the ability of AgentFi, and FusionFi is designed to unify this trap ability and establish a relatively unified entry (and data structure).

You can think of it as an LP, all you need to do is deposit and withdraw, 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 the application layer adapting to users after the introduction of standards such as ERC20.

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 quantity and Slippage

const addLiquidityMessageId = await agent.addLiquidity(minLiquidity)//Initiate the message to add Liquidity

const addLiquidityResult = await getProcessResult(addLiquidityMessageId, ammProcess)// Get the result

Source code example:

Note lifecycle

Here we can switch to the perspective of Note and take another look at the trading process between users and AMM Agents.

  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 executed, the Note will become invalid. AMM Agents act as makers.

  2. All Notes will be stored centrally 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 front-end webpage and submit it to the Settlement Center for Settlement from the Note Pool. The Settlement Center is responsible for executing specific Settlement operations, such as swap here.

  4. Note marked as ‘Settlement’, the Swap was successfully executed.

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

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

This integration brings great benefits. In the swap scenario, Liquidity can come from user quotes or from market-making Nodes. Users can use routing protocols to find Liquidity throughout the entire Node pool, achieving the best execution price. AMM provides basic Liquidity to the market, but it has the issues of large price impact and Impermanent Loss. On the other hand, the order book allows users to act as independent Makers, suitable for large trades and users with specific price requirements. After the integration, AMM provides continuous Liquidity, while the order book reduces price impact and increases Depth, making large orders trading more efficient. This model meets the needs of different types of users, from retail investors to institutions, allowing them to find suitable trading methods and thereby improving capital utilization and driving further market maturity.

Multiple Note Atomic Settlement

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

This brings some very useful features:

Large transaction split: Large orders are difficult to be filled by a single counterparty. FFP supports splitting large orders, making full use of dispersed Liquidity.

Multiple Transactions Aggregated into One Order: Multiple transactions can be combined into one atomic order. This can to some extent improve the transaction speed, which is crucial for high-frequency traders and complex trading scenarios.

Multi-hop trading: Multi-hop trading is an extension of the merge order function. Assuming that in the swap scenario, a swap from A to C needs to be completed, but there is no direct path from A to C, but there is a path from A to B to C, FFP can realize the merge order from 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 the so-called empty-handed Arbitrage. In essence, the Arbitrageur takes two notes with interest rate differentials and settles 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 it is currently the most mature DEX in the AO ecosystem. You can experience the above features at Permaswap (aopsn.com).

Settlement Center

Obviously, in the FusionFi Protocol, Settlement Center is a key component. It will process all the 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 Settle Center for Settlement.

When the volume of processing requests with notes expands, the Settlement Center can also easily scale out in a distributed manner, with multiple settlement processes to offload Settlement tasks. Depending on the pressure, the tasks are distributed to different settlement processes based on the ID of the note for processing.

The diversified applications of Note

The structured format of Note defined by the FusionFi Protocol actually has strong universality for various financial businesses. 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 the internet world is multi-point trading. 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 enables more efficient point-to-point matching between agents, and this matching is cross-protocol. Facing the Decentralized Finance field where competing for Liquidity is the main competition method and monopolizing Liquidity as the profit model, the changes brought by FusionFi Protocol are disruptive!

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

Reference materials:

  1. Smart Finance: From AgentFi to FusionFi

  2. FusionFi Protocol: Core Element for Achieving AgentFi Interoperability

  3. FusionFi Protocol Documentation

protocol Introduction.md

This article was first published on PermaDAO

Original link:

DEFI-5.54%
AGENT-0.86%
ETH-9.36%
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
  • 1
  • Repost
  • Share
Comment
0/400
PMSABBIR5vip
· 2024-11-27 13:40
back and new universities abroad tat March that
Reply0
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)