GMX vs DerivaDEX

Slippage, smart liquidity and yield

Ainsley Sutherland
DerivaDEX
4 min readSep 20, 2022

--

This past weekend, someone (or group) was able to utilize the zero-slippage mechanism design on GMX to arbitrage between the GMX price and the price on reference exchanges (exchanges where the price feed is used as the source of truth for the GMX price oracle).

GMX caps open interest while investigating the exploit

DEX trading suffers from significant usability problems due to low liquidity on automated market makers (AMMs), a problem which GMX addresses via the GLP program. DerivaDEX takes a different approach: enabling modern market-making identical to what users enjoy on centralized exchanges.

Head of derivatives at Genesis Trading breaks down the exploit and the response

Liquidity and slippage: A key usability challenge for DEXes

A “zero-price-impact” design is appealing for DEX users, because so many crypto trading pairs have limited liquidity. For most DEXes, liquidity provider (LP) programs enable users to help support liquidity with otherwise non-productive capital using automated market makers (AMMs).

Slippage is the biggest usability blocker for AMM-based trading (and DEX trading generally). Rather than an AMM (i.e., on Uniswap), where illiquid assets result in a very high slippage percentage, GMX utilizes the “GLP” program to enable a zero price impact feature. In this model, users stake a basket of assets to the protocol and receive GLP in return. GLP is subject to variable mint/burn fees, which encourage suitable rebalancing of assets. GLP is thus used to absorb slippage and provide zero-price-impact trading. Price is then set by a price feed from reference exchanges, and not influenced by on-exchange trading. This is the mechanism which was exploited in last weekend’s incident to the detriment of GLP holders.

DerivaDEX’s approach to this quandary is to enable an industry-standard central limit order book — rather than an AMM, or other form of staked liquidity — so that market makers can employ advanced, modern liquidity management. This means that slippage on DerivaDEX, while not zero, will likely be closer to what you may see on a centralized exchange. Market-making like this isn’t possible or efficient on-chain, which is why DerivaDEX implements a network of off-chain operators, secured by trusted execution and accountable to on-chain checkpointing/settlement.

Pricing

Prices reflect slippage, and move algorithmically on a curve with AMMs. On GMX, prices are fixed to the input from a reference exchange, and variance is absorbed by GLP providers– So how does DerivaDEX establish a mark price? The DerivaDEX mark price is drawn from reference exchanges (identified via governance) and the order book. The mark price that governs exchange-based safeties (i.e., leverage limits) and the funding rate is a moving average with these inputs.

The funding rate is used to apply pressure when on-exchange prices don’t align with the reference exchange prices. This reflects best practices on centralized exchanges as well.

The question of yield

While AMMs and other on-chain mechanisms have developed a lot in the past few years, there are still many gameable opportunities. DerivaDEX looks to centralized exchange UX and mechanism design, uniquely enabled in a DEX by the exchange’s particular architecture.

Users are motivated by yield to provide liquidity to AMMs, GLP, and other liquidity mining programs, despite their risks. However, the majority of this expected value is founded on the expectation that value from an app token will contribute to that passive yield. In market making specifically, where the yield is driven by an efficient spread, AMMs and other passive liquidity models are at a disadvantage to traditional market makers, who are able to iterate and develop liquidity strategies in real-time.

DerivaDEX is designed for traditional, efficient market making. The key DerivaDEX user is a trader, not a passive liquidity provider. Triangulating motivations of LPs, traders, and the protocol is difficult, as all these users have competing interests, which is illustrated when savvy traders exploit a mechanism for price-setting to engage in cross-exchange arbitrage that is costly to liquidity providers. On DerivaDEX, trade mining replaces liquidity providing, and slippage is mitigated by efficient, modern market-making.

DerivaDEX takes advantage of the learnings and strengths of centralized exchanges, while leveraging the strengths of decentralized applications for security, governance, and transparency.

At DEX Labs we’re excited to be building in this space, and also supportive of the work of other innovative decentralized exchanges. The purpose of this analysis is not to be critical of work in new mechanism designs (i.e., GLP), but to illustrate the differences and tradeoffs in each exchange’s design– be that an AMM, GLP, or DerivaDEX’s off-chain trusted execution order book model.

Ainsley Sutherland is the product lead at DEX Labs, building DerivaDEX and other tools for decentralized finance.

--

--

Ainsley Sutherland
DerivaDEX

Product Lead @ DEX Labs (building DerivaDEX & more)