Perpetual Protocol is a decentralized perpetual contract protocol for every asset, made possible by a Virtual Automated Market Maker (henceforth referred to as a “vAMM” or “vAMMs”).
For those who aren’t familiar with perpetual contracts: A perpetual contract is a derivative similar to a futures contract but without an expiry date. For conventional futures contracts such as WTI, the contract’s price will gradually converge with the underlying asset’s spot market price as the expiry date approaches. Perpetual contracts are futures contracts that automatically roll every few hours. In order to keep the perpetual contract in line with the underlying index, one side pays the other the funding rate. The funding rate effectively implies a cost of capital and the steepness of the futures curve. You can learn more about how funding works by reading our documentation or this piece from FTX’s help center.
Key features of the Perpetual Protocol include:
10x Leverage On-Chain Perpetual Contact Traders can trade with up to 10x leverage long or short, have transparent fees, and 24/7 guaranteed liquidity.
Go Long or Short on Any Asset Every asset can be supported via a perpetual contract on Perpetual Protocol. Whether it's gold, fiat, BTC, BCH, ETH, ERC-20s, XRP, EOS, LTC, ZEC, XMR, and more - Perpetual Protocol can support it all. All that Perpetual Protocol requires is a price feed for the underlying asset from an oracle.
Lower Slippage than Other AMMs Traders on constant product (x*y=k) market makers like Uniswap suffer higher slippage than traders on centralized exchanges (CEXs) because k is capped by the liquidity provided. Perpetual Protocol’s vAMM can set K algorithmically to provide lower slippage to traders.
In the following sections, we’ll dive into each component of the Perpetual Protocol that makes these features possible, starting with our vAMM. Before we start, it’s recommended to understand the concept of an automated market maker (AMM). If you’re not familiar with it, you can familiarize yourself with this subject by reading this piece.
Before Perpetual Protocol, most AMMs focused on token swaps, rather than derivatives trading, such as perpetual contracts.
To enable on-chain perpetual contract trading, Perpetual Protocol introduces a novel approach called a Virtual Automated Market Maker(vAMM). Perpetual Protocol’s vAMM uses the same x*y=k constant product formula as Uniswap. As the "virtual" part of vAMM implies, there is no real asset pool (k) stored inside the vAMM itself. Instead, the real assets are stored in a smart contract vault that manages all of the collateral backing the vAMM. Perpetual Protocol uses a vAMM as a price discovery mechanism instead of a direct liquidity pool for spot trading like Uniswap, Balancer, or Curve.
Here is an example showing how a vAMM works under the hood:
1. Before a vAMM is created on the blockchain, the creator of a vAMM sets the number of virtual assets stored inside the vAMM. Suppose the price of ETH is trading at 400 DAI. The creator can set an initial amount of vETH and vDAI on vAMM with a ratio of 1-to-400. For simplicity, imagine the creator sets the initial state on that vAMM as 100 vETH and 40,000 vDAI.
2. Trader Alice wants to go 10x long ETH with 100 DAI as collateral:
Alice deposits 100 DAI into Perpetual Protocol’s vault, which, as mentioned above, is a smart contract on Perpetual Protocol.
Perpetual Protocol credits 1,000 vDAI (10x leverage on 100 DAI) from Alice to the vAMM, which, in return, calculates the amount of the vETH that Alice receives according to a constant function (x*y = k).
Perpetual Protocol records that Alice now has 2.4390244 vETH and the state inside this vAMM becomes 97.5609756 vETH and 41,000 vDAI.
3. Trader Bob then goes 10x short ETH with 100 DAI as collateral, meaning that:
Bob deposits 100 DAI into the same vault in which Alice deposited.
Perpetual Protocol credits -1,000 vDAI from Bob to the vAMM, which, in return, calculates the amount of the negative vETH that Bob receives according to a constant function (x*y = k).
Perpetual Protocol records that Bob has now shorted 2.4390244 vETH, and the state inside this vAMM now becomes 100 vETH and 40,000 vDAI.
The PERP token is Perpetual Protocol’s ERC-20 native token. It has two main functions:
PERP holders can lock-up, or "stake,” the PERP in their possession for a fixed amount of time to the Staking Pool. In return, stakers are rewarded with the staking incentive, which includes (1) PERP-denominated staking rewards, and (2) a portion of the network trading fees in quote assets (the remaining trading fee goes to the Insurance Fund, more on this in the next section).
Once PERP holders have staked their tokens, they can then use their staked PERP to vote on or propose new ideas that can be used to improve the protocol. One thing to note is that before the on-chain governance voting platform is ready for PERP token holders, core protocol contributors will make critical decisions based on the project vision and informal input from the community. This is intentional, as we think it’s important to keep governance nimble in the early days of the protocol.
There are two distinct situations that can result in losses for the Insurance Fund:
Losses in the Liquidation Process When market prices are volatile and the Ethereum network is congested, Keepers on Perpetual Protocol, whose responsibility is to liquidate under-collateralized positions, can fail to liquidate positions in time, creating insolvency risk.
Funding Payments Since vAMMs always act as the counterparty for each trade, they're obligated to pay or receive the funding payments on every position they hold (as every trader does on the platform). Even though the funding payments paid and received by the vAMM should balance out in the long run, the system may temporarily have a negative equity balance on shorter time horizons.
When either one of the aforementioned situations happens, Perpetual Protocol will first use the capital from the Insurance Fund, which receives 50% of the trading fees from the system, to backstop losses. Should the Insurance Fund be depleted, the Insurance Fund will trigger the Perpetual Protocol smart contract to mint new PERP and subsequently sell them at market to ensure the system’s solvency.
We have designed a transaction mining program to attract more traders to the system and kickstart a positive feedback loop for traders and stakers. It works like this:
Once per week, core protocol contributors will (1) aggregate all the trading fees and funding payment paid by each network participants of the given week into a spreadsheet, and (2) calculate the TWAP of the PERP in USD for that week.
Core protocol contributors will then calculate the number of PERP each participant should get based on (1) 100% of their aggregated trading fees plus 50% of their aggregated funding payment of that week in USD, and (2) the TWAP of the PERP in USD. However, if the combined amount of the PERP from all of the participants exceeds the amount of PERP reward for transaction mining in that week, participants will instead share the reward proportionally.
The spreadsheet will be released to the public for everyone to verify.
Perpetual Protocol pays each network participant by submitting an on-chain (or several) transactions.
The $PERP tokens for transaction mining for each week will come from 50% of the inflation and the remaining 50% will be used as staking rewards.
One thing to point out is that 60% of the paid $PERPs are locked on-chain for one year, and the remaining 40% is transferable right away. The locked rewards cannot be staked in the Staking Pool. Let’s say Alice pays $50 of trading fees to open a long position on Monday and pays $20 of funding to shorts on the same day. At the end of the week, she will receive $60 of $PERP to compensate her fees. Although she can only claim $24 of $PERP right away, and the other $36 of $PERP will not be claimable until one year after.
To discourage wash trading, 50% of the funding payment in USDC will be sent to the Insurance Fund. As an example: if Alice in the example above tried to go long and short at the same time, and thus paid $20 of funding to herself, she would only receive $10 of PERP (and hence would lose $10).