Home  >  Article  >  Paradigm: All DeFi products are power perpetual contracts

Paradigm: All DeFi products are power perpetual contracts

WBOY
WBOYforward
2024-03-07 22:30:13986browse

Recently, we have been thinking about the issue of power perpetual contracts (power perps). Power perpetual contracts are derivative contracts that track a power of an index, such as an index squared or an index raised to the third power. This is an interesting rabbit hole. The longer you think about power perpetual contracts, the more you’ll realize that everything in the DeFi world is similar to it.

Here, we start with three surprising points:

  • Cryptocurrency-collateralized stablecoins (such as DAI or RAI) are like level 0 perpetual contracts.
  • Margin futures (such as dYdX) are level 1 perpetual contracts.
  • Constant product AMMs such as Uniswap are replicating portfolios of 0.5-order perpetual contracts, and constant geometric mean AMMs such as Balancer are replicating portfolios of power perpetual contracts of any value between 0 and 1.

This is awesome because it reveals a surprisingly tight design space behind three major fundamental concepts in the DeFi space. Before explaining the concepts one by one, let us first define perpetual contracts and power perpetual contracts.

Paradigm:一切 DeFi 产品都是幂永续合约

#Perpetual contracts are contracts that do not require delivery and track a specific index. In this type of contract, the transaction price adjusts based on changes in the target index price, and when the gap between the transaction price and the index price increases, funding charges are incurred. The payment of this funding fee is made periodically, and the amount is related to the difference between the transaction price and the index price. Perpetual contracts provide a speculative opportunity for investors who can profitably trade on changes in the marked price. Since there is no actual delivery requirement in the contract, investors can participate in the market without holding actual assets and earn profits based on price fluctuations. This form of contract provides investors with a flexible way to participate in the market and earn returns on their investment without holding actual assets. Through perpetual contracts, investors can take advantage of market fluctuations to obtain income, but they also need to bear corresponding risks.

The payment of the funding rate is based on the calculation formula of the funding rate. During the funding cycle Changes based on the difference between the mark price and the index price. Long positions pay fees to short positions when the mark price is higher than the index price, and short positions pay fees to long positions when the mark price is lower than the index price. This mechanism is designed to maintain a balance between the contract price and the underlying asset price to ensure that market participants do not make excessive profits or losses. Changes in funding rates can serve as an opportunity for market participants to speculate or arbitrage, as this payment mechanism provides them with an avenue to potentially profit. Therefore,

Paradigm:一切 DeFi 产品都是幂永续合约

There are many options for the method of payment of funding fees and the mechanism for price setting interest rates, such as cash or in-kind payment, regular or continuous funding fees, etc., as well as various Different interest rate setting mechanisms, such as the proportional mechanism used by Squeeth and the PID controller used by Reflexer. However, the core idea of ​​these mechanisms is the same: when the mark price is higher than the index price, longs should pay shorts a funding fee, and vice versa.

Power perpetual contract definition: A perpetual contract that tracks the index price raised to the power p.

To create a short position in the Power Perpetual Contract, you first lock some collateral in a vault and mint (i.e. borrow) the Power Perpetual Contract. This minted power perpetual contract is sold to enable shorting. If you want to go long, buy from someone who owns a power perpetual contract.

This mechanism is driven by the required collateral to debt ratio:

Collateral Ratio = Equity / Debt = ((Collateral Amount) * (Collateral Price)) / ((perpetual contract quantity) * (index price)^p )

The ratio must remain safely above 1 so that there is enough collateral to repay the debt, otherwise the contract will pass through the purchase Enough perpetual contracts are liquidated to liquidate the collateral.

The design space of the power perpetual contract

The design space of the power perpetual contract involves the power p, the minimum collateral ratio c>1 and three asset choices:

  • Collateral assets: e.g. USD
  • Indexed assets (assets whose value is tokenized): e.g. ETH
  • Denominated assets (units of measurement of value): Typically USD

Now we make three propositions.

Proposition 1: Stablecoin is a 0-order power perpetual contract

Stablecoin is a loan minted with reliable collateral as a guarantee. The following configuration gives an example of a USD stablecoin:

  • Collateral asset: ETH
  • Index asset: ETH
  • Denominated asset: USD
  • Staking rate: 1.5
  • Power: 0

This means we stake ETH and mint stablecoin tokens. The index is the zeroth power of the ETH price, that is, ETH^0 = 1.

If I deposit 1 ETH as collateral and ETH is trading at $3000, I can mint up to 2000 tokens.

Collateralization rate = equity/debt = ((collateral quantity) * (collateral price)) / ((power perpetual contract quantity) * (index price)^p)= 1 * 3000 / (2000 * 1) = 1.5

The funding fee is the current trading price (mark price) of the stablecoin minus the 0th power of the index price.

Funding fee = mark price - index price^0 = mark price - 1

The funding fee mechanism provides a good solution for the stablecoin’s trading price to be anchored at 1 USD of incentives. If it trades well above $1, users sell their stablecoin holdings and then mint and sell more stablecoins for a profit. If the price is trading below $1, users can purchase the stablecoin to earn a positive interest rate and potentially sell it at a higher price in the future.

Not all stablecoins use this precise (mark price - index price) funding fee mechanism, but all collateralized stablecoins share this basic structure, using the stablecoin as good collateral of loans. Even stablecoins with interest rates set through governance will set them to a level similar to mark price - 1 to maintain their peg to $1.

Claim 2: Margin futures are 1-order power perpetual contracts

If we modify the power of the stablecoin in the previous section to 1 and change the collateral to US dollars, we get Tokenized ETH assets:

  • Collateral assets: USD
  • Index assets: ETH
  • Denominated assets: USD
  • Collateral ratio: 1.5
  • Power: 1

I staked $4500 and minted one stable ETH (price $3000).

Collateral Ratio = Equity/Debt = ((Collateral Quantity) * (Collateral Price)) / ((Power Perpetual Contract) * (Index Price) ^p ) = 4500 *1 / (1 * 3000 1) = 1.5

The funding fee for this perpetual contract is the USD trading price (mark price) minus the target index price^1.

Funding fee = mark price - index price^1= = mark price - ETH/USD price

The funding fee mechanism is a good incentive for perpetual contracts to close ETH price for trading. If the price of the perpetual contract increases significantly, funding fees will encourage arbitrageurs to buy ETH and short the perpetual contract. If the price of the perpetual contract drops significantly, it will encourage them to sell ETH and buy the perpetual contract.

I can sell this stable ETH asset to short the price of ETH and use USD as collateral.

From tokenized short assets to margined short perpetual assets

The stable ETH assets we built are not very capital efficient. We put up $4500 in collateral, gaining short ETH exposure worth $3000 (or 1 ETH). We can be more capital efficient by selling minted ETH contract tokens (stableETH) and then using that as collateral to mint more ETH tokens.

If the minimum mortgage rate is 1.5 and ETH is 3000, we operate as follows:

  • Deposit 4500 US dollars and mint 1 ETH contract token;
  • Sell ​​ETH contract tokens at a price of $3,000, and then use the US dollars obtained from the sale as collateral to mint 1/1.5 = 0.666 ETH contract tokens;
  • Sell ETH contract tokens at a price of $2,000, and mint ( 1/1.5)^2 = 0.444 ETH contract tokens;
  • Sold ETH contract tokens at a price of $1333.33 and minted (1/1.5)^3 = 0.296 ETH contract tokens.

Note: Leverage can usually be calculated by 1/(collateralization rate -1). In this example, leverage multiple =1/(1.5-1)=2.

Ultimately, we minted and sold 3 ETH contract tokens, which was $4500 in collateral and ended up with $9000 in short ETH exposure. This position is equivalent to opening a 2x leveraged short ETH/USD perpetual contract.

This process would be simplified if we could use flash transactions or flash loans. We can flash 3 ETH contract tokens into USD and use the proceeds as collateral to mint ETH contract tokens to pay it back.

If the collateral ratio requirement is 110%, we can open a 10x position.

Go long instead of short

If you want to go long, users can buy ETH contract tokens. To go long leverage, users can borrow more USD using ETH contract token collateral and use the borrowed USD to purchase more ETH contract tokens, repeating the process up to 2x exposure. If using flash transactions or flash loans, this can be done in a single transaction.

This means that over-collateralized perpetual contracts can be converted into under-collateralized perpetual contracts.

Claim 3: Uniswap and other CFMMs are (almost) 0.5-order power perpetual contracts

The value of the liquidity position in the Uniswap pool is proportional to the square root of the relative price of the two assets. For the ETH/USD pool, the value of LP (liquidity provider) is:

V = 2 * (k * (ETH price))^0.5

where k is the product of the two token quantities. The trading pool will generate a certain amount of trading fees every cycle.

Now consider the power perpetual contract:

  • Collateral assets: USD
  • Index assets: ETH
  • Denominated assets: USD
  • Collateral ratio: 1.2
  • Power: 0.5

This power perpetual contract will track the square root of the ETH price.

LP will receive the difference between the funding fee and the AMM fee. Since this trade offsets price risk, the 0.5 power perpetual contract should trade just below:

Expected Uniswap Fees = Index Price - Mark Price

This gives us a good result, i.e. equilibrium Uniswap fees (note: if the annualized volatility of the trading pair is 90%, you need to get 1/8 * 0.9^2 = 10.125% return from LP fees. Therefore, If you own $100 in Uniswap LP, you need to earn $0.028 per day in fees to cover impermanent losses. The funding fee for a 0.5 power perpetual contract is 2.8 basis points per day.) should be the funding rate for a 0.5 perpetual contract. In the simplified case of zero interest rates:

Equilibrium Uniswap return = σ²/8

where σ² is the price of one asset relative to another in the trading pool Variance of returns. We also get this result from a Uniswap perspective (see Appendix C here). We also introduce it in detail from the perspective of power here.

Paradigm:一切 DeFi 产品都是幂永续合约

Thus, stablecoins (and mortgages more broadly), margined perpetual futures contracts, and AMMs are all a type of power perpetual contract.

What else has been overlooked?

High-level power perpetual contract: start with the quadratic power perpetual contract. Squeeth is the first quadratic perpetual contract, providing exposure to quadratic price. By combining higher-order power perpetual contracts and 1-order power perpetual contracts with 0-order power perpetual contracts as collateral, we can obtain many approximations of returns.

If we need more accurate results, we can simulate any function using a combination of power perpetual contracts with integer powers in Taylor series powers: sin(x), e^x2, log(x).

What’s worth looking forward to next? How interesting would it be to have a world that allowed power perpetual contracts, collateralized assets, and Uniswap LP to coexist harmoniously.

The above is the detailed content of Paradigm: All DeFi products are power perpetual contracts. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:chaincatcher.com. If there is any infringement, please contact admin@php.cn delete