The concept of the perpetual swap, also known as a perpetual future or 'perp,' was conceived on a hiking trail in Hong Kong in 2015. Ben Delo, BitMEX's co-founder and a mathematician, was discussing a persistent problem with a friend named Bavik, a derivatives trader. BitMEX had experimented with various futures contracts, including quarterly, monthly, weekly, 48-hour, and even 24-hour contracts, but none of them seemed to work. Customers consistently complained about their positions being closed without warning, seeking a product that resembled spot trading but offered the leverage of a derivatives exchange.

Delo posed a question: 'What if a future never expired?' Bavik's immediate response was that it would be mathematically worth infinity, given that a futures contract's value is partly derived from its remaining time to expiry and the cost of carrying the position. However, Bavik suggested charging traders the bitcoin overnight rate to address this issue.

The problem was that such a rate did not exist at the time. Delo decided to create it, thereby inventing one of the most significant financial products of the 21st century. To understand the impact of the perpetual swap, it's essential to consider BitMEX's origins.

Founded in 2014 by Delo and Arthur Hayes, the exchange aimed to provide a platform for institutional hedgers, such as bitcoin miners and payment companies, to manage their exposure. However, instead of attracting institutions, the exchange drew in sophisticated retail traders seeking high leverage and speculation opportunities. By October 2015, BitMEX was offering 100x leverage, facilitated by Delo's real-time margining system.

The issue with futures contracts, even those with short durations, was the basis – the premium at which a futures contract trades above the spot price of the underlying asset. This concept was unfamiliar to many in the crypto space at the time. Customers would often inquire why bitcoin prices were higher on BitMEX, and the exchange would explain that it was due to the implied interest rate. The solution to this problem was the perpetual swap, which launched in May 2016.

The core mechanism was straightforward: a futures contract with no expiry date, anchored to the spot price through a daily funding rate. Longs paid shorts, or vice versa, depending on whether the swap was trading above or below spot. Initially, the funding rate was derived from third-party lending markets, but this approach eventually proved inadequate. As bitcoin's price rose in 2016 and 2017, demand for long exposure on BitMEX overwhelmed the funding mechanism, causing the swap to trade at a persistent premium to spot.

Delo had to dynamically adjust the funding rate calculation, replacing the fixed reference point with a dynamic one that looked inward at how the swap was trading on BitMEX. The new approach measured the gap between the swap and spot prices over an eight-hour window, treating it as an implied basis, and back-calculating the annualized rate from it.

This solution was elegant and effective, providing market makers with notice of how the funding rate was calculated and when it would be charged. By 2017, BitMEX had become the most liquid bitcoin market, processing $3-4 billion daily, with the perpetual swap at its core.

The concentration of liquidity was a direct result of the swap's design, which consolidated market maker capital into a single instrument. Competitors took notice, with some exchanges copying the perpetual swap, while others developed their own versions based on the funding rate architecture.

Delo believes that the fact that every major exchange in crypto now offers a perpetual swap is a testament to its financial innovation. The product has attracted the attention of traditional finance regulators, with the CFTC reportedly making room for perpetual swaps under its framework. Delo sees this as the final validation of a concept that began as a question on a hillside above Hong Kong, driven by the desire to address customers' complaints about disappearing positions.