In 2015, a hike in Hong Kong's trails marked the birth of the perpetual swap, also known as a perpetual future or 'perp' for short. Ben Delo, BitMEX's co-founder and a mathematician, was on this hike with Bavik, a derivatives trader, grappling with a problem that had been bothering him for months. BitMEX had tried various approaches - quarterly, monthly, weekly, and even 24-hour futures contracts - but nothing seemed to work. Customers complained about their positions closing without warning, seeking a product that resembled spot trading but offered the leverage of derivatives.

Delo's question to Bavik, 'What if a future never expired?' sparked a pivotal conversation. Bavik's response, 'Mathematically, it would be worth infinity,' highlighted the technical challenge. However, he also suggested charging traders the bitcoin overnight rate, similar to LIBOR in traditional finance.

The issue was that this rate didn't exist at the time. Delo decided to create it, thereby inventing one of the most significant financial products of the 21st century. The journey to build BitMEX and the perpetual swap involved understanding the needs of institutional hedgers and adapting to the demands of retail traders. The exchange initially targeted institutional clients but ended up catering to sophisticated retail traders seeking high leverage and speculation opportunities.

By offering 100x leverage and a real-time margining system, BitMEX listened to its customers and evolved. The perpetual swap, launched in May 2016, was a straightforward concept: a futures contract with no expiry date, anchored to the spot price through a daily funding rate.

The funding rate mechanism, which was initially derived from third-party lending markets, was later dynamically adjusted to reflect the swap's trading conditions. This adjustment was crucial in maintaining the balance between the swap's price and the spot price of bitcoin. The solution involved measuring the gap between the swap and spot prices over an eight-hour window and back-calculating the annualized rate from it. This approach gave market makers notice of how the funding rate was calculated and when it would be charged, creating a dynamic equilibrium.

The perpetual swap's success can be seen in its adoption by major derivatives exchanges worldwide. 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 one instrument.

Competitors took notice, and the perpetual swap is now a staple in crypto, with some estimating it facilitates $40-50 trillion in turnover annually. BitMEX chose not to patent the perpetual swap, focusing instead on building and innovating.

The market's response has been overwhelming, with traditional finance regulators now taking notice. The prospect of perpetual swaps being listed on traditional exchanges like the CME is a testament to the product's validity and potential for further growth.