How does Perpetual Protocol use the principle of zero-sum game to magically change AMM?

With the gradual implementation of expansion plans such as Layer 2, the projects in the derivatives track have recently attracted people’s attention again, and the token prices of some of the leading projects have also recently hit record highs. This includes the Perpetual Protocol, which has long occupied the largest transaction volume in the subdivision of perpetual contracts.

In the previous article “Why perpetual contracts are the most promising field in derivatives?” In “, Rhythm Research Institute has focused on the reasons why perpetual contracts are more suitable for on-chain trading environments than delivery contracts. In this article, we will focus on analyzing the core trading mechanism of Perpetual Protocol’s current V1 version, detailing the fundamental difference between the derivatives market and the spot market, and the innovation of Perpetual Protocol’s original virtual automatic market maker (vAMM) mechanism.

vAMM is not really AMM

The traditional AMM trading model has a large number of successful cases in the spot market, and no matter how special its market-making function is, the basic structure of each AMM platform can be divided into two parts, that is, the quotation algorithm and the fund pool. Therefore, the formula can be expressed as:

AMM trading platform = AMM automatic quotation algorithm + liquidity provider (LP)

Among them, the AMM automatic quotation algorithm has many mature solutions to choose from, such as the x*y = k constant product model adopted by the Perpetual Protocol team. But for many nascent DeFi agreements, the more critical issue is often how to obtain sufficient liquidity support in the early stages of development.

Unlike other projects that purchase liquidity through incentive mechanisms, the Perpetual Protocol team chose to actively bypass the problem of obtaining liquidity during the research and development process, and then developed a unique virtual automatic market maker mechanism, which is what we call vAMM. The main reason why it is called a virtual AMM is that its composition structure no longer includes the role of liquidity provider.

Therefore, the above formula can be modified to:

vAMM trading platform = AMM automatic quotation algorithm

After the bold deletions and changes mentioned above, the only function left on the vAMM platform is to provide traders with real-time quotation services. Therefore, it can be said that the Perpetual Protocol V1 version based on the vAMM mechanism is not an AMM trading platform in the traditional sense, and there is no real liquidity in the platform and the role of liquidity provider. Naturally, no LP needs to bear the risk of impermanent loss.

Of course, for traders, whether there is a liquidity provider behind the platform has no effect at all, and the trading experience is no different from ordinary AMM. The following is a screenshot of the ETH/USDC trading pair on Perpetual Protocol. The components are in order:

How does Perpetual Protocol use the principle of zero-sum game to magically change AMM?

1. Button to deposit and withdraw margin: only a certain amount of margin deposit is eligible to start trading;

2. Selection of long and short trading directions;

3. The number of transactions and the amount of margin occupied

4. Leverage multiples (at present, the maximum leverage is ten times)

5. The highest slippage a trader is willing to bear;

It can be seen that, apart from increasing the selection of margin deposits and withdrawals and trading leverage, there is basically no essential difference between trading on Perpetual Protocol and trading experience on Uniswap. This is actually the biggest advantage of Perpetual Protocol, which is that it can provide users with a trading experience similar to that of a spot trading platform without the participation of LP.

However, if there is no real capital in a trading platform to make the market, then who is the trader on this platform buying assets from, and finally selling the assets to whom?

To understand this problem, we need to understand the fundamental difference between the derivatives market and the spot market.

The basic feature of the derivatives market is the zero-sum game

The concept of zero-sum game must have been heard by most readers, but why some markets are zero-sum games and some are not? Maybe many readers have not seriously considered this issue.

The real derivatives market is a typical zero-sum game market. Let’s take the futures exchange in traditional finance as an example. When a trader chooses to go long or short, he must find the corresponding counterparty to conduct reverse transactions with you at the same time. Therefore, in the traditional futures market, every time a transaction occurs, a long order and a short order will be generated or destroyed at the same time, or an existing long or short order will be transferred. This makes the futures market always maintain a long position. The identity of the number of orders and empty orders.

Therefore, the profit of any party must correspond to the loss of the other party in the market by the same amount. This makes the futures market a zero-sum game market. All participants can only enter the game by paying a margin, and finally settle their profits and losses through the margin. The profit gained will only be reflected in the increase or decrease of the margin balance.

Although this zero-sum game does not increase the wealth of the society as a whole, it has other benefits, that is, the game no longer requires real assets. Therefore, the liquidity required by the traditional derivatives market does not require real assets, but requires enough players in the market, so that any participant can easily find a counterparty with the opposite transaction direction.

How Perpetual Protocol constructs a zero-sum game market

The game mechanism of Perpetual Protocol is similar, but there are some differences.

The players in Perpetual Protocol, when opening long or short orders, no longer need a counterparty who is opposite to their own game direction to exist at the same time, but directly settle with the vAMM algorithm. In order to continue to maintain the long-short identity, a new dimension needs to be introduced at this time, that is, time.

Since traders in Perpetual Protocol need to close their positions regardless of whether they make a profit or a loss in the end (closing is the reverse transaction of the initial opening), in the vAMM trading market of Perpetual Protocol, all long and short Orders maintain a long-short relationship at the time level. Before any participant leaves the market, the number of long and short orders submitted in the vAMM platform is the same.

This feature brings many advantages to the Perpetual Protocol protocol that other trading platforms cannot have. For example, there is no longer a need to incentivize liquidity, no need to consider the LP’s impermanent loss problem, new markets can be created arbitrarily according to demand, and so on.

While enjoying these advantages, the vAMM mechanism still has a problem that has not been solved, that is, the setting of the value of k in x*y=k.

How is the value of k determined in vAMM

In a normal AMM trading platform, the value of k does not require human intervention at all, because its size only depends on the amount of real liquidity in the fund pool. In the vAMM trading platform, since there is no real liquidity, what should be the value of k in x*y=k has become a problem that requires the manager’s subjective judgment.

In the scheme adopted by Perpetual Protocol V1, the value of k is actively managed by the project team. However, setting the value of k artificially is a work that needs to be carefully balanced. If the value of k is set too large, the virtual liquidity in vAMM will be too high, and the impact of a transaction on the existing price will be smaller. This can naturally reduce the slippage that users bear in the transaction process. However, once there are too few traders in a virtual fund pool and the target price changes too fast, it is easy to cause the contract price to de-anchor from the target price and destroy the permanent The product structure of the contract renewal. And if the value of k is set too low, it will make traders in the virtual fund pool suffer higher trading slippage, which will lead to a decline in the trader’s experience.

Whether this setup is done by a centralized team or determined by community governance voting, there are certain shortcomings in efficiency and fairness. Therefore, how to change the setting of k value to be executed by the market or algorithm as soon as possible has become a problem that Perpetual Protocol needs to solve urgently.

In the currently running version, the setting of k value will artificially refer to the real liquidity of the same trading pair in Uniswap, and use the real market as a reference, which can relatively reduce the adverse impact of subjective judgment. The development team of Perpetual Protocol also tried to develop an automatic algorithm for “floating k”. However, after the team weighed the pros and cons, the “floating k value” solution was finally abandoned in the V2 version upgrade.

In the next article, we will focus on the new version of the trading engine adopted by the Perpetual Protocol V2 version and its key improvements in capital efficiency and platform openness. And compare the development trajectory of the spot trading platform to analyze whether it is likely to continue to grow into the leading project of the perpetual contract trading track.

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/how-does-perpetual-protocol-use-the-principle-of-zero-sum-game-to-magically-change-amm/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply