Source: PermaDAO
A unified financial protocol is being born, which will provide a universal and unified specification, integrate various types of financial services, and seamlessly connect with AI to promote the popularization and development of smart finance.
From Permaswap Self-custody to AgentFi
Two years ago, we designed and implemented Permaswap Network (hereinafter referred to as PSN), a decentralized asset self-custody trading network. PSN is a network protocol that defines the behavior between LP and trading users and provides a trustless exchange mechanism for asset exchange. PSN is completely open source, and anyone can review the protocol and freely join or exit the network.
There are two types of nodes in the PSN network, namely Router and LP. Among them, Router is responsible for aggregating LP information and generating many-to-many transaction orders for users who need to trade. LP nodes are nodes that contain automatic market making programs. Users can flexibly configure their own LP node market making rules, such as configuring the k = x * y curve to become an AMM node.
Unlike Ethereum, the funds in PSN are not concentrated in a smart contract, but hosted by each LP node. Nodes exchange information through a unified protocol. When a user requests the network, he can get a many-to-many transaction order. A user's transaction may exchange assets with several or even dozens of LPs at the same time. Each order needs to be signed by all counterparties before it can be settled. If any party's signature is missing or any party cannot pay according to the order, the transaction will fail.
This self-hosted LP model can be considered as the prototype of AgentFi, which we mentioned on AO today. One big difference is that users in the PSN network need to run their own nodes to join the network, while AgentFi on AO abstracts the user's node program into a process on the AO computer, so users do not need to run the program locally, but can use the decentralized AO computer to run their own agent program.
From AgentFi to Smart Finance
In traditional DeFi, due to the performance limitations of public chain smart contracts, liquidity providers need to recharge assets to designated contracts before they can conduct financial business. AO and the agent model will change this situation. On AO, users can start their own processes, which are user-managed smart contracts with the characteristics of distributed and trustless operation. The cost of creating and using processes is much lower than that of public chain smart contracts such as Ethereum. The user's assets are automatically processed by their own processes. A process is an intelligent agent robot that can be programmed and automatically manage the user's assets.
Traditional blockchain smart contracts are difficult to modify and upgrade, and assets are usually managed in a unified smart contract. For example, Uniswap uses the k = x * y curve to uniformly manage asset exchange, and Compound uses a unified interest rate model to manage lending. Traditional smart contracts use a single strategy to manage a large number of assets, which is very "unintelligent". Through AO, users can use personal processes to manage assets, and users can modify the code of the process at any time to configure various strategies, which has higher flexibility.
From centralized management to decentralized intelligent management, the AO process will make assets more efficient and smarter.
At the same time, agent robots are very easy to access AI. The strategies of agent robots can be updated by AI, and AI can also provide oracle services for agent robots to adjust or modify strategies through external data. At present, large language models have been experimented and successfully run on AO. In the near future, agent finance may be fully taken over by AI, making money 24 hours a day and realizing intelligent finance.
Not only that, finance has a unified model
Our exploration does not stop there.
In ancient times, barter was used. Bookkeeping is a more convenient way of trading than bartering. Bookkeeping allows the physical objects of both parties to be delivered without immediate delivery, which greatly promotes the rate of value exchange. More efficient value exchange brings more efficient division of labor and productivity development. At the same time, there is a stronger demand for flexibility and convenience of transactions. On the basis of the ledger, notes gradually appeared. Bills are powerful and can be used to record various financial scenarios such as debt transfer, payment, assignment and financing. Checks are a common type of bill and a convenient and secure way of payment. Today, many payments have been replaced by electronic payments, but their essence is credit, and bills are an important medium for recording credit and transferring value. It can be said that all financial activities are carried out around bills, either directly using bills for value exchange or using variants of bills.
When designing financial products in traditional finance, designers need to consider the trust issue between different financial entities. The trust issue is guaranteed by supervision and law, so financial instruments need to spend a lot of energy to adapt to the law and coordinate the trust relationship between multiple parties. In the past few years, as a decentralized system, blockchain has no longer worried about trust issues. Developers have built a diverse DeFi financial system on the decentralized Ethereum. As blockchain technology matures, we can choose more powerful AO computers and continue to reconstruct the financial industry using the concept of AgentFi.
There are many types of bills in traditional industries, such as promissory notes, bills of exchange, checks, and discounts. The reason why there are so many types of bills is that different trust entities have different requirements for trust, that is, different requirements for laws and compliance. Putting aside the issue of trust, we will find that bills are bills, and we can use bills as prototypes to integrate various financial scenarios. Thus, AgentFi bills were born, which are very powerful. Almost all financial businesses can be expressed with AgentFi bills.
AgentFi bills mark a change in financial sovereignty. The trust problem of traditional bills determines that finance can only be a tool of authoritative institutions and sovereign states. The emergence of DeFi marks the change of finance from government sovereignty to code sovereignty. AgentFi bills will give financial rights to individuals, allowing everyone to issue their own bills, assets, and define personal sovereign financial instruments and financial behaviors.
Using AgentFi bills, we can unify finance by modeling any financial instrument. Let's take an example to illustrate how AgentFi bills implement various financial instruments:
Exchange
Assume that Alice and Bob are two counterparties to a transaction. Alice asks Bob for a price to exchange. At this time, Bob tells Alice that the price is P1. If Alice thinks P1 is reasonable, she will choose to trade. Otherwise, Alice will cancel the transaction.
Even if Alice agrees with P1, Bob may still reject the transaction because the transaction has not been settled. If Alice wants to trade, but Bob refuses to trade, Bob's offer is considered invalid. We believe that Bob's invalid offer is a malicious act because Alice loses the opportunity to request other offers when she obtains the offer and agrees with it. In this transaction process, Bob can always quote the best offer in the entire network, but always refuses to trade.
In order to prevent Bob from making malicious offers, we require the counterparty who provides the offer to provide a note with a collateral function.
Take Permaswap's token $HALO as an example. Alice requests Bob to exchange the price of $100, and Bob will return a note that pledges 10 $HALO (equivalent to $1). The validity period of the note is very short, perhaps only 10 seconds. If Alice can agree to the price within 10 seconds, she can initiate the settlement function to the smart contract. At this time, the tokens of both parties will be atomically exchanged. After the settlement is completed normally, the 10 $HALO staked will be returned to Bob. If Bob refuses to settle, his 10 $HALO will be confiscated and paid to Alice.
By combining the settlement capabilities of the note with the smart contract, we can make the exchange transaction process more trustless. Whether it is an AMM or an order book decentralized trading model, we can use notes to establish trust for different counterparties.
Futures
In the case of exchange, the expiration time of the note is only 10 seconds. If we provide a note with a longer term and a specific settlement time, the note can be used as a futures certificate.
Bob, made a note for an asset with a current value of $100 and a settlement time of 1 week. The note pledges more $HALO, but only 1% is pledged in the redemption scenario. In the futures scenario, Bob, as the issuer, needs to pledge 20% of the current value of the note. At the same time, the note requires the holder to pledge 20% of the asset.
Alice pledges and becomes the holder, and the note takes effect. A week later, the asset rises from $100 to $115. Alice can initiate liquidation and obtain the $115 asset in spot. If Bob refuses to make spot delivery, the 20% of the pledged $HALO will be confiscated and liquidated to Alice.
If the asset drops from $100 to $90. Bob initiates liquidation, Bob can still get $100. If Alice refuses to make spot delivery, the 20% of $HALO pledged by Alice will be liquidated to Bob.
Collateralized Lending
It is also a long-term bill certificate, which may expire in 1 year. And add interest rate function.
Bob holds a large amount of $HALO, and Bob wants to pledge his $HALO to borrow from Alice. Bob provides a note with a term of 1 year, which pledges 1,000 $HALO (worth $100). The value of the note is $80 and provides an additional annualized liquidation interest of 5%. After Alice pays $80 to purchase the note, Bob obtains a loan of $80.
During the one-year period, the value of 1,000 $HALO is always higher than $100, until the note expires, when Bob can initiate liquidation. Since the annualized interest rate is set at 5%, Bob needs to pay 80 * (1 + 5%), that is, $84 to liquidate the note. After liquidation, Bob will get back 1000 $HALO and Alice will get 84 USD.
If within a year, when the value of 1000 $HALO is about to fall below 84 USD (not 80 because it needs to include interest), for example, 85 USD, anyone can liquidate the note. After liquidation, Bob will lose all $HALO, Alice will get 84 USD, and the liquidator will get the difference between 85 USD and 84 USD from selling 1000 $HALO, that is, the liquidator will get a reward of 1 USD.
Currency
There is a close relationship between notes and currencies.
Bob can overcollateralize $HALO and specify a note with a price of $1. This note is equivalent to currency, equivalent to stablecoin, and can be circulated and used as a stablecoin in the market.
FusionFi: Becoming the Unified Financial Protocol of Permaweb
Finance has experienced significant development in the past thousands of years, especially in the past two hundred years, in order to cooperate with the development of industrialization and informatization, many different business types and directions have emerged in the financial industry. The emergence of blockchain technology will change all this. After solving the trust problem of the ledger, the construction of all financial businesses has become simpler. We have discovered the unity of finance, which can simplify and reconstruct complex financial businesses and ultimately achieve fusion finance.
From Permaswap's self-hosted network to AO's AgentFi, blockchain technology has made great progress. Permaswap will continue to adapt to technological progress, become a more complete blockchain financial protocol, and realize a unified financial protocol on Permaweb.