A Crash Course on Perpetual Protocol
Blockchain Derivatives for Fun and Profit: A Better Way To Trade
What is Perpetual Protocol?
Simply put, Perpetual Protocol is a derivatives exchange for perpetual contracts (defined below). Perpetual Protocol lets users trade perpetual contracts with up to 10x leverage on-chain with transactions processed on Optimism (podcast, explainer).
In finance, a perpetual futures contract is an agreement to non-optionally buy or sell an asset at an unspecified point in the future. They are contracts with no expiry or settlement, that allow for margin trades, and that trade very closely to the spot price of the asset
You can find out more in the Bankless newsletter as we ask the question: “Is PERP undervalued?”
Disclaimer: this article is based on PERP’s testnet implementation as of writing. There may be some changes when it is deployed on mainnet.
Educate, Then Act: Perpetual Futures
Let’s distill these contracts into their key elements:
- Perpetuals do not expire. They remain effective until the trader closes their position.
- You can go long or short on an asset. If you believe the price of the asset will go up, you go long. In practice, you buy the asset and sell it at a price in the future. If you believe the price will go down, you go short. Instead of buying, you borrow the contract and choose to buy it at a future date.
- The contract goes on through funding payments. Unlike traditional futures, the mechanism for keeping a perpetual contract ongoing is different. If the price of the asset is above the spot price (the price went down), longs pay shorts. If the price is below the spot price (the price went up), shorts pay longs.
- Your contracts can be leveraged. By posting collateral, you can borrow additional money to increase buying power on your contract up to 10x.
In PERP protocol, you can be a Trader or a Maker. Traders open contracts while Makers provide liquidity for trades.
Why Use a Perpetual Future?
There are several ways you can use such a derivative. One simple way is to hedge your position against unfavourable price changes. For example, you hold a position in ETH. To protect against a drop in the price of ETH, you might open a short position. Therefore if the price of ETH drops, you can earn funding payments.
Trading on PERP
Let’s start using Perpetual Protocol!
Preparation
Welcome to PERP! We’ll be using the testnet version of PERP for this article and Metamask will be the wallet used to interact with PERP..
- Immediately, the first thing you see is the account value and collateral you can use. You’ll need to first top up your account, much like a usual trading account to start using PERP.
2. Topping up your account with collateral is really easy: click on the circular button. You’ll notice that for now, only USDC can be used for collateral.
3. Confirm how much you want to top up and you’re done! Once again you’ll have to allow PERP to spend USDC on your behalf.
Open a Position
Let’s start using PERP to open a futures contract. You can either go long or short. With a quick glance around the platform, on the left you can select the asset you want to trade on while on the right you can open long or short positions. It’s really simple to open one!
- Type in the size of the contract you’d like to open. The entry price is the spot price of the asset on opening the contract. Here we show both a long and short contract being created.
2. Once you confirm your contract, you will be able to see your position. You can see the position size (in this case 0.01725 BTC) and the value of the position (at $999.045). What happens next is that the funding payments kick in for you to keep your position open.
Let’s illustrate this with an example. This contract was opened at $57,963.1 on Bitcoin. The price went up to $57,963.18. This means that the asset price went above the spot price. Therefore, longs pay shorts the funding payments and thus my funding payment is positive (0.02213).
Close Position
If you’re done, you can close your position. This will trigger the final payouts and close off the contract.
Continuing with the same example, the price of Bitcoin dipped! Now it’s at $57,824.7. This means I made a loss. Here’s why.
I bought $1000 in Bitcoin (0.01725 BTC). This is now worth $57,824.7*0.01725 = $997.476. This means my position is now worth $997.476-$1000 = -$2.524. Factoring the price impact and transaction fee, closing out this position will lead me to an overall loss of -$2.389.
Be a Maker on PERP
As a maker, you fill orders and provide liquidity. Adding liquidity as a maker is like posting a range of limit orders on a centralized exchange. When you become a maker, you deposit your USDC as collateral which is split into an equal value of the asset and USDC. When you remove your liquidity, you must return the same amount of the asset. For example, with 8000 USDC, you initially provided 1 ETH and 4000 USD. To remove your liquidity, you still have to return 1 ETH and 4000 USD worth of collateral. If the price of ETH goes up, it will cost more to remove the liquidity, too.
Here are the two assets that you can be a maker for.
PERP uses an Automatic Market Maker model. This is the same model that Uniswap uses. Let’s go through the different options you have when adding liquidity.
- Amount. You decide how much of an asset you’d like to provide. Take note that when you provide the asset, the same amount in USDC needs to be provided too.
- Range. Once you choose a range, it cannot be changed! You can place orders along several price ranges. If your order becomes in range of the current price, trades placed will take your order when they place market orders. Your liquidity will be used when trades are made by takers. When there are trades that use your liquidity, you will effectively be taking positions opposite to those trades.
- Slippage Tolerance. This lets you set the limit for the difference between the expected price of a trade and the actual price at which the trade is executed.
A note on ranges: When your order’s range is above the current price, your order will be entirely in USDC while if its below the current price, your order will be entirely virtual asset tokens. If the range is within the current price, your order will comprise both USDC and the asset. This depends on how much your price range is above or below the current price.
Why be a maker? Well, you can collect fees! These fees are 0.09% of all trades, proportional to your share of the liquidity pool for each asset.
To collect a fee, simply click on the position and click “Collect Fee”.
You’re ready! (Sans Experience)
Now you know how to use PERP! However, to fully utilise the power of derivatives contracts requires some experience. These instruments may be complicated and thus you should be careful when trading, especially when on margin. Here’s a summary of what you have learned:
- Trading perpetual futures — setting up a derivative contract that lets you take positions against an asset and how to estimate the value of your position based on price movements.
- Becoming a Maker — putting your liquidity to use for trades to execute and setting price ranges for your liquidity to trade in.
Conclusion
With the current market cap of DeFi sitting around 150 billion dollars, understanding how you can use perpetual contracts is a great addition to your DeFi toolkit. Thank you for taking the time to discover how you can successfully merge traditional derivatives contracts with the DeFi space to make the most of your trading activities.
BanklessDAO is the recipient of a Grant from Perpetual’s Grant Awards Program.
Author Bio
Qing Ze is a Product Manager at Tribe and actively contributes to Bankless and GitcoinDAO.
Additional Bankless Resources on Perpetual Protocols:
📖 Perpetual’s v2 “Curie”: A Nobel Prize for DeFi Applications
📖 A Roadmap into Perpetual Protocol
Perpetual Merchandising:
Perpetual Protocol’s online merch shop!
This post does not contain financial advice, only educational information. By reading this article, you agree and affirm the above, as well as that you are not being solicited to make a financial decision, and that you in no way are receiving any fiduciary projection, promise, or tacit inference of your ability to achieve financial gains.
Please also consider that Perpetual’s UI is not available in every country (e.g. it is NOT available to persons who dwell in the US). This may have to do with some restrictions or limitations of usage determined by local laws or regulations. In this regard, please DO your own research.
You also affirm that the sole purpose of reading this article is for expanding your educational awareness and nothing more. Be also aware that leverage puts your funds at risk of liquidation at any time. Be sure you understand the risks of leveraged trading before proceeding. This post does NOT include any legal advice.