Harmony Grant Spotlight: Perpetual Protocol — Decentralized Crypto Derivatives
A decentralized perpetual contracts protocol that is composable, permits anyone to provide liquidity and trade on-chain derivatives.
Overview
Perpetual Protocol is a decentralized perpetual contracts protocol that is composable, permits anyone to provide liquidity, and enables traders to buy and sell on-chain derivatives in a non-custodial manner. The protocol enables this through the use of smart contracts (programs) on Ethereum’s Layer 2 solution Optimism, eliminating the need for financial intermediaries.
With Perpetual Protocol, you can:
Use perpetual contracts to go long or short on a wide variety of assets (including Harmony’s ONE token)
Provide liquidity as a maker to earn transaction fees and liquidity provider (LP) rewards
Use leverage up to 10x as a trader or maker
History
Yenwen Feng and Shao-Kang co-founded Perpetual Protocol in 2018, known initially as Strike. This protocol was inspired by emerging DeFi projects, such as Uniswap and Synthetix. The founding team sought to combine the merits of the two platforms and create a decentralized protocol on Ethereum for trading perpetual contracts. Under the new name of Perpetual Protocol, the project launched its Mainnet in 2020.
The project initially distributed its tokens through a Balancer liquidity bootstrapping pool by offering 7.5 million of its native PERP tokens to investors, which represents 5% of the entire supply (capped at 150 million tokens). Most of the token supply is geared towards ecosystem rewards (54.8%) while the founding team and advisors retained 36 million PERP (21% of the entire supply). The remaining portion was distributed to seed and strategic investors.
How it works
Perpetual Protocol V1
Perpetual Protocol V1 is based on the Ethereum sidechain xDai. Perpetual contracts are derivatives similar to futures contracts. However, the former doesn’t have an expiration date. Similar to what happens on Uniswap, the Virtual Automated Market Maker (vAMM) model enables traders to gain exposure to different cryptocurrencies without involving third parties. vAMMs provide guaranteed on-chain liquidity with predictable pricing set by constant product curves, are market neutral and fully collateralized by design.
The protocol’s v1 uses xDai as its scaling technology to increase the speed of its trades. There are also zero gas fees on transactions. USDC is used as collateral and to settle trades on Perpetual Protocol.
The protocol uses a streamlined system that allows traders to gain the benefits of xDai scaling without necessarily setting up their wallets. Users can use their existing wallets to ‘deposit’ xDai, and they will be ready to trade. There is zero impermanent loss risk for all stakers on this protocol while at the same time earning rewards and fees on the staked tokens. PERP tokens staked are not used for liquidity or stored in the vAMM but safely in the smart contract, which means they aren’t exposed to impermanent loss.
vAMM
Although trading perpetual contracts using this protocol is largely similar to CEXs, there are some important differences as compared to other platforms:
Perpetual Protocol is 100% AMM-based; there is no order book. Trades are filled right away, which means you don’t have to pay a taker fee or wait for a counterparty.
Trades can settle slower than those on centralized exchanges. This especially happens during high volume, but the platform provides slippage control to mitigate this. All trading operations for v1 happen on xDai, which is faster than Ethereum.
Perpetual Protocol v1 doesn’t utilize liquidity or liquidity providers (v2 introduced the role of LPs, more on this below)
The on-chain price reflects trades on the platform. The price will only move when positions are closed or opened.
Traders on Perpetual Protocol use USDC as their collateral to open short or long positions in a given asset. The vAMM will calculate the exit or entry price just like what happens in other AMM-based exchanges, such as Uniswap, every time a trade is made.
Unlike in Uniswap, where a trader will enter with asset A and leave with asset B, in Perpetual Protocol V1, a trader arrives with USDC, which can be used to mint virtual tokens. Virtual tokens, which must be returned when a position is closed, have no intrinsic value and basically are used for accounting purposes. All trades are settled in USDC.
Leverage
At Perpetual Protocol, traders can use leverage by backing a position with a margin, that is, collateral worth less than the total position size. Traders on this platform can open positions with up to 10x leverage.
Liquidation
We cannot talk about leveraged trading and fail to mention liquidation. Every time you open a leveraged position, you are essentially using the collateral (USDC in this case) to borrow money from the exchange to purchase a particular asset.
If the value of your position (that asset) starts to fall, your losses will begin to approach the value of your initial collateral (margin). Such a scenario puts the exchange at risk, which means that a sudden price movement may make your position worth less than your collateral. If your asset’s value is below your collateral’s value, the exchange will be forced to liquidate your position in a bid to minimize losses.
Perpetual Protocol V2 (Curie)
Perpetual Protocol’s commitment to a user-first, developer-driven approach to DeFi applications gave rise to the development of Curie or Perp V2. Users and developers alike now have unprecedented access to robust financial instruments through Perp V2.
The diagram below illustrates how v2 differs from v1 from the perspective of a trader.
Why Perp 2?
Lower spreads and better liquidity, all thanks to Uniswap V3
Optimism brings about faster trading
The introduction of liquidity providers (LPs) and leverage for LPs
A new and improved UI and users can easily trade on desktop and mobile
Cross-margining for flexible position management
Dynamic liquidity for improved market responsiveness and market stability.
In V2, Curie integrates with Uniswap V3, one of DeFi’s flagship protocols. With V3, Uniswap introduced us to the world of concentrated liquidity (the ability for liquidity providers to specify a range along the price curve to provide liquidity for). Such an approach greatly improves liquidity providers’ capital efficiency and opens up various liquidity provision strategies.
Curie is built on Optimism, one of Ethereum’s Layer 2 optimistic roll-up solutions, bringing advantages such as lower gas fees with faster trade execution. All this happens with the decentralized and battle-tested security of the Ethereum network. Perp V2 creates a highly composable and deeply liquid futures trading platform that enables anyone to trade cryptocurrencies, provide liquidity with leverage or build new products on top of the protocol:
Trade on Perp v2
To trade, you must provide USDC as collateral on the Optimism network. A wallet like MetaMask or its equivalent, loaded with USDC, is required. Once your wallet is loaded with USDC, you can bridge any of your assets to Optimism using LI.FI’s bridge & swap widget (which is integrated into the Perp v2 interface).
Once you have bridged to Optimism, you are now ready to trade on Perp V2, a process that we won’t go into details about.
Provide Liquidity on Perp v2
First, you need to bridge to Optimism when you want to provide liquidity on Perp v2. You then need to select a pool that you want to provide liquidity for after depositing/converting your USDC and reflecting on your account overview. You can view a detailed guide on How to Provide Liquidity on Perp v2 for ETH.
Team
Yenwen Feng — Co-Founder at Perpetual Protocol
A serial inventor and entrepreneur in the software space since 2004, he has worked with Cinch Network (Decentralized Derivatives), Willmobile (Top mobile financial service app in Taiwan, acquired by Systex), Cubie Messenger (Mobile Messenger, 500 Startups B5, 10M downloads), Gamelet, Decore (Stripe Atlas for Crypto Companies) and now Perpetual Protocol.
Shao-Kang Lee-Co-Founder at Perpetual Protocol
Shao calls himself “Shadowy super coder at @perpprotocol.” He previously co-founded Decore, a payroll and accounting software for crypto companies. Other companies he has co-founded include Cinch Network, Zaoo Inc., and POPAPP.
Roadmap
The PERP token is used for staking and governance. Only 150 million PERP tokens will ever exist. PERP is primarily a utility token designed to incentivize and facilitate the decentralized governance of the protocol.
Grants
The Perpetual Protocol Grants Committee is the task force that goes through proposals for grants submitted by various projects. The committee was formed in July 2021 and had allocated $466K worth of grants by the end of the year. There were also bounties for Mask Network, Instadapp, and ShapeShift, bringing the total to $570K. Some of the notable projects that won grants are listed below.
Community Bot
Custom Telegram and Discord Bot with:
Track trades with the PERP token on decentralized exchanges, including Sushiswap and Uniswap,
Funding rates for all the pairs on the platform,
Detailed information about PERP token,
Lists of PERP social media handles.
Stakingbits
Stakingbits is a community educational platform that teaches DeFi in a project agnostic and simplified manner.
Atlantis World
Atlantis World is a pixel metaverse with video calling, token-gating, in-game DAO voting, and gamified DeFi. This platform integrates Perpetual Protocol to create a token-gated space for PERP token holders in the metaverse.
Frontier
Frontier is an NFT and DeFi wallet where you can store, send and invest in crypto assets. The platform will provide native protocol support for Perpetual Protocol. Its mobile interface will also extend ERC20 staking support for the PERP token.
UniDex
UniDex is a trading platform and doubles up as an aggregator for derivatives, NFTs, swaps, and lending. The platform integrates with Perpetual Protocol to provide deep data insights and tools such as One-Cancels-the-Other (OCO) orders, limit orders, and iceberg orders.
Seedle Finance
Seedle Finance is a performance tracking tool for Uniswap V3 positions. The tool provides performance analytics for Perp V2. It also benchmarks power users who are likely to deploy capital.
DAOFront
DAOFront is a tool for budgeting and bookkeeping for DAOs. The tool ships reports and other specs requested by the core development team.
IndexZoo
IndexZoo is a cross-chain DeFi ecosystem that takes care of tokenized indices. The platform is built for the lowest cost, maximum leverage, and accuracy.
Closing thoughts
Decentralized finance has been booming over the last few years, and the industry had an estimated $5 billion in revenue in 2021. More and more DeFi products are being released on a frequent basis, and Perpetual Protocol is one that stands out. Even though we have seen many protocols try to make crypto mainstream, not all are likely to succeed. The good news is that Perpetual Protocol has a unique proposition that is likely to change the landscape with its commitment to creating powerful financial tools open to everyone.