How perpetual trading and margin trading work, compare and evolve in the bear market
TL;DR
This long read gives an ELI5 answer to ‘What is perpetual trading and margin trading? How do they differ?’ and introduces a snapshot of the current market landscape captured from a few interesting perspectives. It compares GMX with its forks, attempts to analyze non-trivial metrics, explores dependence between total value locked (TVL) in trading protocols and their market cap, and presents Marginly and a few other leveraged trading protocols as a reasonable middle ground between perps and margin trading. Let’s take a deep dive into the world of decentralized leveraged trading together.
What is this all about?
DeFi leveraged trading is a financial practice that allows traders to amplify their exposure to assets in the cryptocurrency market. It’s a mechanism that enables traders to use borrowed funds (leverage) to trade larger positions than they would with their capital. In the DeFi context, this is achieved through decentralized platforms and smart contracts, eliminating the need for traditional intermediaries like banks or brokers.
Here’s how DeFi leveraged trading typically works:
- Collateralization: Traders deposit a certain amount of cryptocurrency as collateral (margin) into a smart contract. This collateral serves as a guarantee for the borrowed funds and is used to cover potential losses.
- Leverage: Once the collateral is deposited, traders can borrow additional funds, often in the form of a stablecoin like DAI or USDC, to increase their trading position. This borrowed capital is used to open leveraged positions in the market.
- Trading: With the borrowed funds and collateral, traders can enter leveraged positions. For example, if they have $1,000 in collateral and borrow an additional $1,000, they can effectively trade with $2,000 worth of assets.
- Profit and Loss: As the market moves, traders can profit or incur losses on their leveraged positions. The potential for gains is amplified, but so is the risk of losses.
- Liquidation: DeFi leveraged trading platforms often have liquidation mechanisms to manage risk. If the value of the trader’s position falls to a certain threshold and doesn’t recover, the collateral is used to repay the borrowed funds, and the trader may incur a loss.
Perpetual Trading (Perps) vs. Spot Margin Trading
Perpetual contracts, often referred to as “perps” or “perpetual swaps,” are a specific type of derivative used in leveraged trading. They have distinct differences from traditional spot margin trading. Here are the main comparison criteria you need to consider:
DeFi leveraged trading, often facilitated through perpetual contracts, allows traders to access leveraged exposure to assets in the cryptocurrency market without the constraints of expiration dates and with the added complexity of funding rates. While it offers opportunities for amplified gains, it also carries higher risk, making risk management a crucial aspect of successful trading in this space.
Now that we have covered the basics let us delve deep into the heart of DeFi leverage trading protocols, peeling back the layers to unveil the factors that shape their success. Our journey begins by dissecting these protocols' choices when selecting the blockchain networks they operate on. With a keen eye on metrics such as Total Value Locked (TVL), trading volume, fully diluted market capitalization, and funding rates, we seek to understand the drivers of success in this competitive landscape.
Furthermore, we spotlight the critical role of oracles in ensuring accurate price feeds, a cornerstone for trust and reliability within these protocols. Understanding the oracles preferred by these platforms provides valuable insights into the robustness of their infrastructure.
Taking a closer look at the historical performance, we investigate the timelines for DeFi leverage trading protocols to reach the coveted milestone of 10 million TVL, both in bull and bear market conditions. This analysis provides additional context and meaning to the TVL numbers we can observe today.
Lastly, we scrutinize the TVL drop-off from peak levels and the native token price performance of leverage trading protocols. This allows us to gauge how well protocols can retain TVL in adverse market conditions and gain a basic understanding of how native tokens perform across the board.
We have used DeFiLlama and Dune dashboards (where available) to pick out some of the top protocols by TVL. Additionally, we looked at some of the more minor up-and-coming protocols that piqued our interest. Twenty-one protocols in total have been selected. Two protocols, Openleverage and LeverFi, are leveraged trading protocols closest to Marginly’s implementation. They offer spot borrowing (leveraging) of ERC-20 tokens, just like Marginly, but the user journey is similar to perps. Others operate with derivatives where no physical ERC-20 token movements happen when people make a trade.
Where’s all the action at?
Most protocols prefer to launch on several blockchains simultaneously or add additional blockchain support shortly after the mainnet launch. Just 8 of the 21 protocols we looked at operate on a single blockchain. Arbitrum tops the list by number of protocols, TVL, and trading volume. Ethereum is second (primarily because of DYDX), with BSC rounding out the top 3. The narrative here is that while users and liquidity still largely reside on Ethereum, some L2 blockchains have positioned themselves as DeFi hubs for the new money in crypto and enjoyed quite a bit of success already despite them being relatively new to the space.
Fully diluted market cap (FDMC) / TVL
Let’s consider the FDMC/TVL ratio. First, we need to establish what FDMC is. It can be described as the total market capitalization of the project if all its tokens entered circulation. This is a commonly used metric for investors and analysts.
The FDMC/TVL ratio can provide insights into how well a crypto’s market capitalization aligns with actual usage and currently locked value inside the protocol.
High ratios are indicative of overvalued projects enjoying bullish market sentiment. However, big ratios also mean that the current market cap is mainly based on speculative interest and future expectations rather than real adoption and utility. A low ratio may suggest that the project is undervalued or general market sentiment is bearish.
It is also worth noting that projects with high ratios can significantly increase circulating supply over time, diluting existing holders’ shares.
Funding rates
Funding rates are fees to balance contract price and the underlying in perpetual contracts. Most rates are dynamic in the 3.5–8% range.
High funding rates indicate that traders are using high leverage, meaning a high-risk appetite exists in the market. They also mean a significant imbalance exists between perpetual contract price and spot price. Arbitrage opportunities are more likely to arise in such conditions.
Preferred oracles
Most DeFi protocols require continuous price feeds to maintain their operations. One of the options here is TWAP (Time-Weighted Average Price), a calculation method used to determine the average price of an asset over a specific time interval. TWAP can feed prices to DeFi apps, and it requires just access to a historical bonding curve of DEXs. As you can imagine, this method is 100% decentralized, but its speed and accuracy could be questionable.
Another option is Chainlink, a popular oracle network that provides real-world data, notably asset prices, to smart contracts on blockchain platforms. Chainlink relies on its centralized infrastructure that aggregates prices from multiple sources and feeds them on-chain. Chainlink is fast but 100% centralized and can be a potential point of failure or manipulation.
Oracle selection is an important decision for any protocol offering perpetual contracts and margin trading. Let’s see which options they bet on.
As such, Chainlink is the most popular, with 56.25%, followed by TWAP with 25%. The rest make up 18.75% combined. This is hardly surprising given Chainlink’s well-established presence in the space and the popularity of Uniswap v3’s TWAP oracle.
Days to $10M TVL
Another interesting consideration is how many days it took popular protocols to achieve $10M TVL in their contracts.
Projects launched in the bull market phase have significantly fewer days to $10M TVL. It is reasonable to expect $10M TVL in the 150–230 days range when launching in the bear market phase. This is a testament to how much harder it has become to attract retail liquidity since markets shifted from the bull phase to the bear phase. While individual protocols may or may not have had investor support to get them past the $10M TVL milestone, the overall trend is clear: liquidity is much more expensive now compared to 2021 and early 2022.
GMX forks
The following are marked as GMX forks (out of top-50 $1M+ TVL projects):
While the combined TVL of ~$25M might not seem impressive, the number of different protocols illustrates how widespread the GMX model is. The product lineup and tokenomics model are de facto shaping crypto's entire leverage trading space. Much like the DEX landscape is oversaturated with Uniswap forks on every blockchain, greatness sparks imitation.
TVL drop from peak
Projects that launched in the Bear market phase are closer to peak TVL. Those who launched in the Bull market phase crashed hard as market conditions changed.
Native tokens have been destroyed and fell by 60–90% in most cases. There are many possible reasons for this: harsh market conditions, unsound tokenomics, and lack of actual use cases for native tokens all likely contributed to this worrying trend. The GMX model seems to be the de facto benchmark and industry standard. At the moment, there is plenty of room for improvement in this regard within the space.
Preferred assets
Usually, there are 5–10 assets on offer for leveraged trading. The menu always consists of BTC and ETH with some altcoins added. Every network includes native tokens for the blockchains it is launched on. The most widely used memecoin is DOGE.
FOREX-style platforms (GNS, Unidex, Pika, Vela, HMX, ApolloX, MUX) usually have more extensive menus and higher max leverage with 20–50 cryptos on offer and max leverage in the 100x — 1000x range.
Max leverage
Most protocols offer up to 50x leverage on crypto. Additionally, advertised max leverage is usually available for Forex and currency pairs, while crypto blue chips have lower max leverage. Altcoins and long-tail assets often have even lower max leverage. For example, UniDex offers up to 500x on currency, 100x on BTC, and ETH but only 3x on BITCOIN. Many of you have experienced what 20x BITCOIN leverage with infinite liquidity can do in the latest testnet trading contest on Marginly.
Also, it might be pretty surprising most users prefer 2X-3X leverage over 125X based on the survey by Panoptics. Their analyst studied positions open on GMX over time and found that most have leverage in the range of 3X at max.
Marginly is the best of both worlds
Between margin trading and perps, Marginly takes a special place. The protocol is yet to be a margin trading venue, not a perpetual trading. It’s essential to distinguish Marginly from perps platforms to understand how the protocol works.
When trading perps, no physical movement of assets takes place. Every trade you make is recorded inside the perp DEX smart contract or centralized backend service. All accounting happens within the system/pool. Perp protocols track PnL and margin requirements and seize assets when a user defaults or gets liquidated due to insufficient margin.
Marginly uses on-chain AMM DEXs with physical assets/tokens to execute actual asset swaps. Whenever a user makes a trade, the protocol buys an asset on an AMM and puts it back in the Marginly pool. Trade proceeds combined with the initial user margin represent a leveraged position of the user. Margin calls involve asset movement. See how the protocol manages liquidations here. Funding rates are carefully derived from option pricing theory and reflect market dynamics like all funding rates should.
Let’s see how Marginly is compared to its peers:
Marginly services its traders by connecting to multiple liquidity sources (DEXs). The protocol needs a router to facilitate the actual movement of assets and execute trades on-chain. Not just any router, but one that would seamlessly integrate multiple liquidity sources and provide optimal trade routing for Marginly users given their asset type, allowed slippage, order size, and other user-defined parameters. A good router is essential to large blue chip and long-tail asset trades.
Marginly’s configuration is closer to spot margin trading protocols regarding transparency and decentralization: all trades are executed and recorded on-chain, while a few notable features are shared with perps trading platforms. There are no repayment dates; the protocol aims to improve leverage flexibility and asset availability via a novel router design and integration of multiple liquidity sources. Regarding risk management and liquidations, the protocol is moving towards automated deleveraging and a no-liquidations approach.
Conclusion
We have seen how leverage trading protocols are designed by combining perps trading and margin trading features. Each makes unique design choices that aim to achieve the best possible compromise.
Marginly is set to become a compelling alternative to both spot margin trading and perps platforms out of the box. V2 designs of the protocol strive to expand on this foundation by adding more product features: expanding the asset menu and available leverage while maintaining the spot margin trading approach of executing asset swaps on connected DEXs.
The endgame in this space, as we see it is truly mouthwatering: imagine a smart contract-charged wallet that automatically optimizes and executes complex DeFi strategies based on user-defined parameters. All of this goodness in a slick and easy-to-use interface with complex blockchain interactions abstracted away from the user.