Background: Decentralized derivatives trading has huge opportunities

Since the beginning of 2022, the market value of cryptocurrencies has fallen from $2.2 trillion to $850 billion. The long bear market has greatly hit investors' confidence and speculative demand, and the total locked value (TVL) of DeFi protocols has also dropped from $167 billion at the beginning of the year to $44 billion. However, GMX, a decentralized perpetual contract trading protocol launched in August 2021, has developed an independent trend in the bear market: TVL denominated in US dollars has steadily increased, and its market value has reached nearly $300 million.

Chart 1: GMX’s TVL and market capitalization have continued to grow over the past 12 months

Figure 2: GMX ranks 4th in terms of 30-day vesting agreement revenue

Market opportunities

Consistent with traditional financial markets, the market size of derivatives trading in the crypto market is larger than spot trading. According to TokenInsight, the trading volume of perpetual contracts in Q2 21 was $19 trillion, equivalent to a daily trading volume of more than $200 billion, which has surpassed spot trading. If the total market value of cryptocurrencies reaches $10 trillion within five years, the accompanying derivative trading volume may reach $70-100 trillion.

Perpetual contracts are unique futures contracts in the field of cryptocurrency trading and are currently one of the most traded derivatives: they allow investors to use leverage to establish positions in contracts. However, unlike traditional contracts, perpetual contracts have no expiration date. In order to prevent futures prices from deviating too much from the underlying, regular fund settlement is often used to make the market price of perpetual contract derivatives return to the intrinsic value.

Figure 3: Tokeninsight’s Q2 21 crypto asset transaction volume composition

15% of spot trading volume has been achieved through decentralized exchanges (DEX), while perpetual contracts traded through DEX only account for 2%, which still has a lot of room for improvement. At present, centralized exchanges (CEX) such as BitMEX, Binance, and FTX are still the main providers of contract products. However, users often complain that the perpetual contracts provided by CEX have problems such as opaque liquidation mechanisms, frequent inability to trade under extreme market conditions, and excessive fees. The recent FTX crash has caused users to be unable to withdraw cash, which will further increase users' distrust of CEX. In contrast, the contract code of decentralized exchanges is open and can be checked by anyone. Any user can trade by connecting to a wallet, without the experience of pre-depositing funds, and the risk of funds being misappropriated is greatly reduced.

In terms of spot trading, the leading DEX uniswap started from providing liquidity for long-tail assets, and its daily trading volume has reached US$3 billion. It is even better than CEX in terms of trading volume and mainstream currency trading depth. Based on its successful experience, the market space for perpetual contract decentralized exchanges is very large. However, realizing perpetual contract trading through a decentralized approach is more complicated than spot trading: the underlying price of the perpetual contract has huge fluctuations in a very short period of time, and traders place orders frequently, so it poses a huge challenge to the exchange in terms of quotation, transaction execution and timely liquidation. There are higher requirements. Most decentralized contract exchanges are deployed on L2 and high-speed public chains, representative ones include dYdX, MCDEX, GMX, Perpetual protocol, etc.

Figure 4: Huge opportunity for decentralized derivatives exchanges

Core Viewpoint

Project Highlights

  1. The cryptocurrency derivatives market has a vast space, and the potential share of decentralized perpetual contract transactions has reached trillions of dollars. GMX is one of the few protocols that can grow against the trend in a bear market, generate real income and distribute it to token holders.

  2. The design of global liquidity and oracle quotes is innovative. GMX can provide 30x leverage and large-scale zero-slippage transactions, which is a good selling point to attract traders (dYdX and Perpetual have slippage > 1% at a depth of one million US dollars)

  3. The token value is fully captured, which can effectively attract liquidity providers: the protocol income is distributed to liquidity providers/token holders through ETH/AVAX, rather than through additional token issuance, bringing 15-20% real annualized returns. The model of floor price funds and lock-up to bring more income provides strong support for token prices.

  4. GLP can be used as a crypto asset ETF to embed into various DeFi protocols like Lego blocks, and has reached cooperation with multiple yield aggregators, yield protocols and derivative contracts.

Project Risks

  1. There is no naked position protection for liquidity providers: the GLP pool bears directional market risk (trader profit = liquidity provider loss) and asset pool price change risk. When there is a significant mismatch between long and short positions and professional investors enter and make large profits, the liquidity provider's risk of loss increases.

  2. The quotes are obtained from CEX by relying on oracles, which have no price discovery capabilities and can only support a small number of currencies. In addition, the oracle attack incidents that have occurred have revealed loopholes in its mechanism. Only when the transaction volume of the corresponding currency of GMX is smaller than that of mainstream exchanges can similar incidents be prevented, so it cannot be scaled up.

  3. The L2 solution did not solve the problem caused by high transaction concurrency. During the Odyssey period, the gas fee once soared to $10 per transaction.

GMX Project Introduction

GMX is a decentralized spot and perpetual contract exchange deployed on Arbitrum and Avalanche. It supports users to conduct spot exchange and perpetual contract transactions with a maximum of 30 times. Currently, it supports four assets on Arbitrum: ETH, WBTC, LINK, UNI; and four assets on Avalanche: AVAX, WETH, WBT, USDC.

product design

The biggest highlight of GMX in terms of trading experience is zero slippage for large transactions: users initiate transaction requests and use the liquidity pool (GLP) as the counterparty, and the transaction is completed in real time according to the oracle quote.

Spot trading: traders exchange directly with the liquidity pool (GLP). The handling fee will be adjusted according to the proportion of assets in the liquidity pool and the target ratio to achieve the set target ratio.

Perpetual contract trading: After depositing a margin, traders can open long or short positions with a leverage ratio of up to 30 times, and pay a fee of 0.1% of the nominal size when opening or closing a position. In addition, borrowing fees are charged hourly: hourly borrowing rate = size of borrowed assets/size of GLP corresponding assets*0.01%. The design of using a higher rate as more funds are borrowed from GLP compensates for the increased potential loss of GLP.

GMX Trading Interface

GLP (Liquidity Provider)

Users can deposit the acquired assets into the pool to mint GLP, and then add them to the liquidity pool for market making. If the corresponding assets need to be redeemed, GLP will be destroyed. GLP is composed of a basket of cryptocurrencies such as BTC, ETH, USDC, USDT, DAI, etc. in a certain proportion. Liquidity providers (GLP) will not face impermanent losses. (AMM liquidity providers often provide two tokens in a 1:1 ratio to participate in market making, and may face impermanent losses due to currency price fluctuations)

GLP Adjustment Model

In theory, the token structure of GLP is 50% stablecoins and 50% risky assets (BTC, ETH, etc.), but the proportion will be adjusted according to the trader's open positions: when traders are generally long ETH, the rate for converting ETH to GLP will be reduced to increase the proportion of ETH in GLP's basket of tokens; if the overall position is short, the proportion of stablecoins in GLP will be increased.

The price of GLP is affected by two factors: one is the price of the asset behind GLP, and the other is the overall profit or loss of the trader: this is because the liquidity pool takes an opposite position to the trader, so any profit made by the trader is a loss for the liquidity pool, and vice versa.

The following table simulates the impact of asset price changes and trader profits/losses on GLP: Assume that $2,000 is used to purchase GLP (assuming 50% each of ETH and stablecoins). GLP earns less when ETH rises and loses less when it falls. Traders' utilization of ETH partially offsets the volatility of GLP's corresponding risky assets. When the utilization rate reaches 100%, the GLP price remains constant relative to U. In theory, GLP can always pay for traders' profits and losses, and the profit and loss of investing in GLP is smaller than directly purchasing risky assets.

Figure 5: Changes in GLP's assets denominated in U under various circumstances

Historically, GMX traders have accumulated losses, which has brought GLP an average annualized return of more than 20%. Statistically, trader failure is a high probability event, and high leverage will increase the probability of loss.

Chart 6: Historically, GMX traders have accumulated losses, while GLP has gained

Quotes and execution of trading instructions

In earlier versions, in order to prevent arbitrage robots from taking advantage of the external price feed delay of the oracle to make profits, GMX stipulated that traders could not close their positions unless the price change was >1.5% and lasted for at least 3 hours. In March 22, GMX lifted this restriction and introduced Keeper to solve it: the user's trading operations on GMX will be divided into two parts: one is the user sending the transaction, and the other is the execution operation is completed by Keeper: Keeper has the authority to execute within 0.12% of the oracle's quotation, and will not be enforced until the maximum deviation reaches 2.5%. In order to supervise the keeper not to tamper with the oracle's price, the watcher node is also introduced for verification. Although this improvement improves the user experience, it also brings the risk of malicious behavior by the keeper.

The risk of oracle manipulation buried in mechanism design

In September this year, GMX suffered a price manipulation attack. The attacker first opened a contract on GMX, then manipulated the price of AVAX on FTX, and then closed the position on GMX to gain profit; this is because traders can predict the price of AVAX, and there is no price impact when executing large transactions on GMX. After the attack was repeated 5 times, liquidity providers lost about $570,000. GMX's solution is to limit the opening of low-liquidity tokens, making the cost of manipulation higher than the potential profit, and controlling the loss of LPs.

Joshua Liam, head of Genesis’ derivatives trading department, commented that this type of attack is a loophole in the design of the GMX mechanism, and the only way to avoid it is to cancel the zero-slippage feature of the transaction.

Figure 7: Attacker manipulates the price of AVAX/USDT on FTX

Team and History

Although the team members are currently anonymous, the core developer @xdev_10’s strong product iteration capabilities and rich DeFi design experience can be seen from the series of products he has developed in the past. GMX has continued the characteristics of past products and has made optimizations in continuous practice.

In 2020, the team launched the first generation product XVIX, and then launched the leveraged token X2, using the handling fees of X2 to incentivize XVIX users. The third generation product Gambit is both a combination of the first two generations of products and the prototype of GMX: depositing whitelisted assets such as ETH to mint an equivalent value of USDG (asset value at redemption = value at minting), and using it as a counterparty for leveraged transactions. In the design of GMX, USDG is replaced by GLP, which has price fluctuations, and handling fees are used to attract liquidity.

August 2021: GMX goes live when Arbitrum opens to the public. Offers rewards to early adopters.

September 2021: Two weeks after its launch, GMX's trading volume reached US$150 million and generated US$300,000 in revenue.

November 2021: Three months after launch, GMX’s trading volume reached $6.5 billion. Contracts were deployed on Avalanche. Cooperation was reached with lending platform Olympus Pro

In the X4 plan announced in August 2022: GMX will shift from a trading platform to a project creation platform: allowing project parties to create AMMs with full control and issue tokens with various functions: dynamic rates, single/multi-currency payments, price curves, etc. X4 will also aggregate GMX and other DEXs to guide initial liquidity for newly established AMMs. Opening up capabilities to project parties may give GMX and GLP more use cases, similar to Curve becoming a solution for stablecoin and packaged asset issuance.

Another important proposal, PvP AMM, will allow long and short parties to match and participate in transactions through an intermediate currency GD, and liquidity providers can choose whether to participate.

Business conditions

Whether from the perspective of user numbers, transaction amount or AUM, GMX's performance since its launch has been outstanding.

User volume: Currently, there are 155,000 users, with about 15,000 users trading every week. Arbitrum's Odyssey event in June 2022 will bring a wave of user peaks to GMX.

Figure 8: GMX weekly user statistics

Figure 9: GMX weekly trading volume statistics

Transaction Fees: As of 22/11/10, the cumulative transaction fees collected by GMX are $109 million ($84.06 million on Arbitrum and $23.66 million on Avalanche).

AUM: As of 22/11/10, AUM was US$400 million (of which Arbitrum was US$360 million and Avalanche was US$50 million), a significant increase from US$100 million at the beginning of 22.

Figure 10: GMX’s AUM statistics

Future growth opportunities

Cooperation with yield aggregators brings in more funds: GMX cooperates with yield aggregators such as 1inch, YieldYak, BreederDAO, etc. Currently, YieldYak guides approximately 35% of transactions to GMX.

Become part of the DeFi ecosystem: GLP can be integrated into other DeFi protocols like Lego blocks as a "cryptocurrency ETF". For example, the income product launched by Umami uses GLP as the underlying asset, while Mycelium shorts the risk asset part of GLP to hedge the risk. In the backtest, the APR can reach 20%.

Competitive Landscape

Business scale

Based on the transaction volume in the past 30 days, dYdX ranks first, and GMX is about 1/3 of dYdX. However, from the perspective of protocol fees, GMX ranks first, because dYdX provides more transaction fee reductions to new users and token holders.

Figure 11: Comparison of business scale of major decentralized perpetual contract exchanges

Representative model comparison

Injective and Mango both use the same order book model as dYdX, and their transaction volume is far from that of dYdX. Therefore, only representative targets are selected for comparison: The following table compares dYdX, perpetual protocol and GMX from the perspectives of mechanism design, transaction depth, target availability, and liquidity provider income.

dYdX currently has a much higher trading volume than similar products, but its core mechanism is still copied from CEX. Apart from offering token incentives to attract liquidity, there is not much innovation. Due to the high transaction costs on the chain, DEX with an order book model is difficult to compete with CEX. In addition, dYdX is not decentralized in use: users need to complete KYC and pre-deposit funds for transactions. Its founder also said that their target customer groups are professional traders and institutional users with high trading volumes (there will be a large number of pending and canceling orders).

Perpetual takes full advantage of the composability of DeFi and uses UniswapV3 as an execution layer to support any asset as a contract transaction. However, the transaction depth of its perpetual contract is far lower than that of decentralized exchanges, and the scale of risk reserves cannot be compared with that of decentralized exchanges. In addition, the profit and loss calculation of Perpetual Protocol traders is very complicated. In short, the current customer experience of Perpetual Protocol needs to be improved.

GMX is more like a casino that values ​​user experience: the good trading experience with zero slippage attracts retail investors to enter the market, and the good token design attracts liquidity providers. However, the mechanism itself has defects and cannot be scaled. The reliance on oracle quotes leads to a small number of supported currencies and no price discovery function.

To sum up, the above models have their own advantages and disadvantages at this stage. Decentralized exchanges are still further iterating their products. It is currently impossible to judge which model is most likely to succeed. Perhaps these models can find the most suitable application scenarios.

Analysis of Token Economic Model

Total Token Supply and Distribution

GMX adopts a dual-currency model: GLP as liquidity proof, with no upper limit on supply; GMX as a governance and utility token. Holders can propose proposals and vote on tokens, with a total of 13.25 million, of which 7.99 million are in circulation (60%). GMX holders can DAO vote on proposals to increase the total supply of GMX.

Reserve Price Fund

The reserve fund is used to ensure the liquidity of GLP and provide ETH rewards for pledged GMX. In the future, it can be used to repurchase and destroy GMX to ensure the relative price between GMX and ETH.

Value capture of tokens

GMX's token value is fully captured, and 100% of the revenue is distributed to token holders (30% to GMX, 70% to GLP). And through the issuance of ETH and AVAX, rather than the issuance of additional platform tokens, real benefits are brought to token holders.

In addition, GMX's token economy also introduces Escrowed GMX and multiplication points to encourage long-term holding, as follows:

Escrowed GMX

Escrowed GMX is GMX under custody, which is non-transferable and can be pledged and unlocked: pledging Escrowed GMX can share the platform fee income just like GMX. It takes 1 year to gradually unlock Escrowed GMX, during which time users still need to continue to pledge GMX or GLP.

Multiply Point

When a user stakes GMX, he or she will receive multiplication points every second. Staking 1,000 GMX for a year will earn you 1,000 multiplication points. Users can continue to stake multiplication points, and each multiplication point can earn the same staking income as GMX. Once a user cancels the staked GMX, the corresponding proportion of multiplication points will be destroyed. In other words, when a user initially stakes GMX, he or she can obtain esGMX and multiplication points MP. esGMX and MP can be staked again to increase the APR. The larger the amount of staked GMX and the longer the time, the higher the proportion of protocol income that can be shared.

Valuation Level

Horizontal valuation comparison

Currently, 60% of GMX tokens have been released, 50% of Perpetual has been released, and only 13% of dYdX has been released. The more tokens are not released, the more the token value will be further diluted in the future. According to the data of token terminal on 2022/10/11, from the perspective of fully diluted valuation/transaction fees and fully diluted valuation/protocol revenue, GMX's valuation is cheaper than dYdX and Perpetual Protocol.

Vertical Valuation Comparison

Judging from the fully diluted market value/fee valuation over the past six months, GMX is also in a relatively low valuation range.

Future Outlook

At present, GMX is more like a well-run casino than an exchange, attracting speculators to trade continuously, generating more fees to provide good returns to GMX/GLP, and attracting more liquidity providers. However, there are many flaws in the design of GMX: for example, few supported currencies, high risk exposure of liquidity providers, oracle manipulation, and the model cannot be scaled. These need to be solved by the development team in future version iterations. The upcoming X4 is expected to transform GMX from a trading platform to a DeFi toolbox available to project parties.

The packaged sale of trading platform liquidity is another growth point for GMX. GMX also mentioned in the second phase of the roadmap that it will pay more attention to structured products. The demand for GLP from other DeFi protocols and yield aggregators will further drive its TVL growth.

Multi-chain expansion and support for more assets are also possible growth methods: Avalanche, which was launched at the end of 2021, currently contributes 1/3 of the transaction volume. The team has experience in developing on BSC and plans to support more EVM-compatible chains.

Greater room for imagination comes from using smart contracts to replace financial intermediaries in DeFi, thereby reducing "middleman" expenses for users: GMX, an on-chain exchange that has created a transaction volume of tens of billions of dollars, initially had a core team of only 4 people, and the rest were built spontaneously by the community. Compared with traditional financial institutions and technology companies, GMX has higher income per employee and lower valuation. If DeFi technology can eventually break out of the cryptocurrency field, there will be greater room for growth and potential.

Information Sources

https://threadreaderapp.com/thread/1571554171395923968.html

https://gmxio.gitbook.io/gmx/

https://gmx-io.notion.site/gmx-io/GMX-Technical-Overview-47fc5ed832e243afb9e97e8a4a036353

https://www.panewslab.com/zh/articledetails/1643522822971920.html

https://messari.io/report/gmx-spotting-the-future

https://foresightnews.pro/article/detail/9580