A Roadmap into Perpetual Protocol

Ap0ll0517
BanklessDAO
Published in
9 min readOct 19, 2021
Graphic Designed by @Dippudo

How to Leverage 2X Trading on Perpetual Protocol

Perpetual Protocol is a decentralized protocol that offers perpetual contract trading on a variety of assets. Users can choose to open long or short positions with up to 10x leverage on a variety of asset classes such as cryptocurrencies and in the near future commodities, and fiat currencies. Leverage trading is highly risky and is not recommended for beginners, or anyone with a low-risk tolerance. This guide shows you how to open a long position with 2x leverage.

  • Goal: Open a long position on ETH using 2x leverage
  • Skill: Easy to Intermediate
  • Effort: 15–30 minutes to open position and familiarize yourself with the user interface
  • Ongoing to manage position(s)

Background

As one of the top decentralized exchanges in the DeFi space, Perpetual Protocol is ranked 7th in coingecko’s list of Top Automatic Market Makers with a market cap over $600M. According to their Medium blog, they’ve generated more than $19B of trading volume since launch December 2020. Average daily trade volume exceeds $30M. Users can exchange a number of assets, with up to 10x leverage, with limited gas fees, all made possible by the protocol’s Virtual Automated Market Maker (vAMM).

The Virtual Automated Market Maker

Like its peers on the list of top decentralized exchanges, Perpetual Protocol is recognized as an Automatic Market Maker (AMM). There are some key differences between Perpetual Protocol and other AMMs such as Uniswap, Sushiswap, Curve, and Balancer. Namely, there are no liquidity providers. Usually AMM trades are conducted from pools of liquidity. Investors, referred to as liquidity providers, deposit their assets into smart contracts which facilitate trades on a peer to peer basis. With this mechanism in place, traders swap assets in a permission-less fashion.

But with Perpetual Protocol, there is no swapping. Traders deposit USDC and receive USDC due to the “virtual” aspect of vAMM. Perpetual Protocol’s vAMM uses the same x*y=k constant product formula as many AMMs, yet there is no real asset pool (k) stored inside the vAMM itself. Deposited USDC goes into a smart contract vault that manages all of the collateral backing the vAMM. With virtual automated market makers the traders provide liquidity to each other and the money comes from a vault sitting outside of the vAMM in a smart contract.

How It Works

Traders use USDC as collateral to open long or short positions in any given asset. Every time a trade is made, the vAMM calculates the entry or exit price in the same way prices are calculated on Uniswap or other AMM style exchanges. The on-chain price reflects trades on Perpetual Protocol — the price only moves when positions are opened or closed.

For example, let’s assume a trader named Alice wants to open a 2x long position on ETH.

  1. Alice deposits $100 USDC to the Clearing House on Perpetual Protocol.
  2. The Clearing House deposits $100 USDC to the vault.
  3. Perpetual Protocol updates the asset prices of the vAMM according to the margin amount, position direction (long or short), and the amount of leverage.
  4. Since Alice leveraged her $100 deposit two times, the amount of USDC in the vAMM increases by $200 USDC. Consequently, the amount of ETH decreases by 1.96.
  5. The Clearing House updates and opens Alice’s position with 1.96 ETH

From the diagram, you can see that no assets are transferred in or out of the vAMM. Deposits and withdrawals come from the vault. If the mechanics behind Perpetual Protocol’s functionality is still confusing, don’t worry. This guide will demonstrate how you can utilize this technology.

Open a 2x Long Position

Navigate to perp.fi

Click on the App button located in the top right corner of your screen.

Connect your wallet

Currently, you can connect a MetaMask wallet, a Trezor hardware wallet, or a Ledger hardware wallet.

Select pair

Click the drop down arrow on the left side of your screen to select the pair in which you would like to open a position. We’re going to select the ETH/USDC pair.

Set trade parameters

This is where you determine if you will open a long or short position, the size of the position, and the amount of leverage you wish to use. We are going to open a long position, using 2x leverage with $100 USDC as collateral. Click the Approve USDC button.

Approve USDC

The first of three transactions to open your position. First you have to approve USDC for trade. Click the Approve button.

Deposit USDC

The second of three transactions. Once USDC is approved, you can deposit the collateral to open your position. Click the Deposit button.

Now that you have deposited your collateral, you can execute any trade you like. You can go long on BTC with 5x leverage, you can short LINK with 7x leverage. The best part is that your collateral is now deposited on xDAI so your trade fees are extremely low.

Open Position

The final transaction to open your position. Click the Trade button, sign your transaction, and open your position. Congratulations! You now have a long position on ETH using $100 USDC with 2x leverage. You can see your Position Size, Leverage Amount, Entry Price, Liquidation Price, Margin Ratio, and PNL.

Managing Your Position

Now that you have an open position, you can manage it by adding USDC to it or removing collateral from it. It’s important to monitor your position to avoid liquidation. To change your position size, either open a new buy or sell order. The new position will be merged with your active position.

You can also choose to close your position once you’re ready. There is no expiry time on a perpetual contract. You can close your position after a day, a month, or more than a year.

Staking on Perpetual Protocol

If trading on Perpetual Protocol isn’t your cup of tea, you can also stake PERP tokens to earn rewards. It’s important to note that although trading is done on xDAI, staking is done on Ethereum Mainnet. The goal of staking on Perpetual Protocol is to ensure demand for PERP, while also keeping PERP off the market. Stakers are compensated PERP rewards for securing the protocol with their PERP tokens. This guide shows you how to stake your PERP tokens.

  • Goal: Stake your PERP tokens
  • Skill: Easy
  • Effort: 15–20 minutes
  • ROI: 28.9 % estimated APR

Background

You may stake for as long as you wish. You can stake your PERP tokens for a week or for over a year. There is no minimum staking period to earn PERP rewards. However, there is a seven day cool down period if you decide to unstake your PERP tokens. This means that you will have to wait seven days before you can receive your PERP tokens back. Staking will remain in Stage 1 until protocol v2 staking is launched. V2 staking is expected to launch later in 2021. Currently, during Stage 1, 150K PERP tokens will be granted as staking rewards each week. These tokens are distributed from the Perpetual DAO rewards pool.

Staking Rewards

Rewards will be updated over time in order to maintain a healthy number of staked PERP tokens. Right now, rewards are distributed as liquid rewards and vested rewards. Liquid rewards can be withdrawn immediately and vested rewards can be withdrawn after 6 months.

Perpetual Protocol calculates liquid rewards using 50% of the weekly exchange fees from trades. This amount is distributed to stakers as PERP tokens from the DAO rewards pool. Vested rewards are calculated using the difference of 150K weekly PERP rewards and weekly liquid rewards. A simple equation looks like: 150K PERP — Liquid Rewards = Vested Rewards.

Rewards are calculated and issued weekly, on Mondays at 06:00 UTC, and your proportion of the staking pool is calculated per minute (not per block). Because of this, early entry into the pool does not give you any disproportionate benefits.

Stake PERP tokens

Navigate to perp.fi

Click on the App button located in the top right corner of your screen.

Connect your wallet

Currently, you can connect a MetaMask wallet, a Trezor hardware wallet, or a Ledger hardware wallet.

Select Staking

Click the Staking tab located right above the chart. It will be located between Trading and Rewards tabs.

Connect wallet again

You will have to connect your wallet again to engage with the staking interface.

Select PERP and Approve

Click on either the plus (+) or minus (-) buttons to choose the amount of PERP tokens you want to stake. Once you have the desired amount selected, click on the Approve Staking button.

Stake PERP

Once you have approved PERP for trade, you can now deposit to the staking pool. Click the Stake button.

Manage your stake

After your transaction approves, you will see your staked PERP in your dashboard. Here is where you can see your estimated APR, Pool Share %, and the total amount of staked PERP.

Remember that rewards are calculated weekly, so you won’t see anything available to claim until Mondays at 06:00 UTC. You can add to or remove your stake at any time.

As mentioned at the beginning, Perpetual Protocol is a decentralized protocol that offers perpetual contract trading on a variety of assets. Users can choose to open long or short positions on a variety of asset classes such as cryptocurrencies, commodities, and fiat currencies with up to 10x leverage. Don’t forget that leverage trading is highly risky and is not recommended for beginners, or anyone with a low-risk tolerance. Though this is not financial advice, any interested trader may do well to begin with rather small positions, and to see if they are able to be successful over a predetermined time period, such as 3–6 months. Nobody wants a margin call (where your collateral is liquidated).

More Bankless resources on Perpetual Protocols:

Perpetual’s v2 “Curie”: A Nobel Prize for DeFi Applications

Meet the Nation: Perpetual Protocol

Is PERP Undervalued? A full analysis of Perpetual Protocol including a DCF on the PERP token

Not financial nor legal advice. This post is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. 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. This post does NOT include any legal advice.

Ap0ll0517 is a crypto enthusiast interested in blockchain technology, DeFi, and DAO governance. He actively participates in educating the masses in order to help onboard 1 billion people to the crypto ecosystem.

--

--