Project History

  • Updated

Perp v1 Background

Perpetual Protocol (initially known as Strike) was launched in December 2020, inspired by innovators such as Synthetix and Uniswap. Building on Uniswap's Automated Market Maker (AMM) model, Perp v1 pioneered the virtual AMM concept.

The plan was to launch on Ethereum mainnet in September 2020. A large spike in gas fees on Ethereum during DeFi Summer (2020) led Perpetual Protocol core team to change course and instead deploy on xDai (now Gnosis Chain). After a few months of porting work, audits and final tweaks, Perp v1 launched in December 2020.

As Perp v1 gained traction, a slow drain on the insurance fund was discovered, and the core team set to work seeking solutions.

The underlying cause, known as the long-short skew (explained in more detail here) refers to the situation where there was a high chance of funding being paid from the insurance fund due to an imbalance between longs and shorts, something that is unavoidable in a pure vAMM system where liquidity is fixed and static. The assumption was that inflows and outflows would balance out over the long-term, but the sustained bull market during the first few months after Perp v1 launched caused the insurance fund to struggle to grow and at times decrease dramatically.

This issue and others were discussed in Community call #4 during April 2021. The team also discussed these issues with different people involved in the crypto ecosystem, including investors and other experts, but since automated market makers were a fairly new concept, a satisfactory solution remained elusive.

Perp v1 details

This section covers some noteworthy implementation details and challenges.

  • A key planned feature of Perp v1 was a “dynamic k” system which would allow k values for each perpetual swap market to be adjusted manually or automatically was completed in May 2021 but never rolled out. Despite months of research and consultation, no “ideal” dynamic k system could be found, and the model that was developed but not deployed used certain trade-offs that would have made the trading experience more complex and diverge farther from the traditional orderbook model many traders are familiar with. This uncertainty and the shift to the Perp v2 model led the core team to put the dynamic k rollout on hold indefinitely.
  • A PERP backstop minting feature was intended as part of the original Ethereum mainnet design. This minting mechanism would allow the exchange to automatically mint and sell PERP in the event of the insurance fund balance reaching zero. However, as Perp v1 ultimately launched on xDai, the minting system was not built as planned due to most PERP liquidity being on mainnet with very little liquidity available on xDai, making the system infeasible. It can also be noted that the Perp v1 insurance fund never reached the proposed minting conditions during its time of operation.

Transitioning to Perp v2

While researching ideas to counter the issues of v1, the team came up with a completely new model that moved away from a pure vAMM model toward an LP-driven derivatives AMM (dAMM) solution that solved v1’s issues and promised improved composability and performance. Work started on Perp v2 Curie in May 2021 and v1 entered maintenance mode.

After the launch of Perp v2 on Optimism in November 2021, active maintenance on v1 began to wind down and warnings were placed on the UI to alert traders to the risks of continuing to use the old version. While maintenance was reduced, active monitoring continued as usual and Perp v1 remained operational, was stable and had many active users, so there was no motivation to shut it down.

Closing v1

Up to April 2022, monitoring showed v1 to be running well, however, the market downturn in April & May brought v1’s flaws back to the fore. As asset prices fell, perp prices could not keep up with spot and the funding payments became very large. A short-term solution was implemented in the form of a funding rate cap to stem outflows from the insurance fund and maintain solvency while the search for a longer term fix continued.

The funding rate cap had a side effect that some arbitragers were no longer attracted to trade, despite APRs over 100%. Combined with rapidly changing prices, many Perp v1 markets diverged from spot prices significantly.

At this point, a decision was made to upgrade the vAMM contracts and decrease the K value of each, making it easier to keep the perpetual swap prices closer to the spot price.

A few days later, on May 15, a large short position in the CREAM market was liquidated during chaotic price action, causing over $2 million in bad debt. The v1 protocol moved money from the insurance fund to the clearinghouse to ensure solvency, bringing the insurance fund to a dangerously low level.

At this point, the core team decided an emergency halt in trading was required to prevent further loss of funds. Extensive discussions began both internally, with advisors and with the v1 user community as to how to handle the disbursement of remaining funds.

Ultimately a governance vote was held to decide how to distribute the remaining funds. The full proposal can be found on the project governance forum: Sunsetting Perp v1. From among several options, the vote decided that the remaining funds were to be distributed to cover 99% of users according to their margin plus PnL (where negative PnL would reduce the amount), from smallest to largest account. The remaining funds would be distributed to the largest accounts, again proportionally to margin plus PnL.

The distribution occurred on June 1st, 2022.

Staking 1.0 to vePERP

The original staking system rolled out a few months after the launch of Perp v1, in March 2021. The original design anticipated fee sharing to start not long afterward, but as issues with Perp v1 became apparent, work on Perp v1 and Staking 1.0 were put on pause as resources were directed toward the development of Perp v2.

After Perp v2 launched in November 2021, development of key features and upgrades, as well as countless optimizations and improvements, occupied the core team for several months. Ultimately, Staking 2.0 featuring vePERP began its rollout in August 2022.

Future

As further historical events occur, they’ll be added to future sections.