Explaining The GLP APY And How It’s Pulled Into Voltz Protocol

February 28, 2023

A new market on GMX’s LP token, GLP, is now live to trade on Voltz Protocol.

A new market on GMX’s LP token, GLP, is now live to trade on Voltz Protocol. 

GMX is the biggest perpetual derivatives exchange on Arbitrum. The GLP index is composed of assets like WETH, WBTC, LINK, DAI etc. The index fund is used for providing liquidity to the GMX protocol. The LP fees earned by this fund are distributed to GLP owners, generating a variable rate of return.

Users now have the opportunity to hedge against GLP’s rates volatility and speculate on future LP fees, using Voltz Protocol.

GLP Interest Rate Swap pool on Voltz Protocol

This pool is built around the yield generated by the GLP index through LP fees. esGMX rewards have historically been distributed to GLP owners, but if that were turned on again it would not be accounted for in this pool. Instead, the pool just looks at GLP returns.

On Arbitrum, the LP rewards are distributed in ETH, meaning ETH is the underlying asset of the GLP Interest Rate Swap pool on Voltz Protocol. Margin, notional and cashflows are denominated in ETH, consequently, the variable rate of return is calculated according to ETH initial investments and rewards.

How does the GLP yield work?

The weekly rewards for GLP owners are based on the LP fees earned by the index during the previous week. Every Wednesday, the weekly distribution value is set and the yield starts accumulating on a block-per-block basis, proportional to the user’s GLP balance. The following Wednesday, another reward amount is set, and that value will start being distributed in the same manner.

Here’s an example. Week 0. From the total LP fees earned during this week by the GLP index, GMX calculated that the distribution should be 100 ETH for next week. Week 1. Alice buys 1000 GLP tokens and pays 4 ETH for them. Assuming the GLP supply is 5M and it remains constant, the weekly rewards per 1 GLP Token are 0.00002 ETH. At the end of week 1, Alice gained 0.00002 * 1000 = 0.02 ETH, resulting in a weekly yield of 0.02/4 = 0.5%

There are several ways to retrieve and interpret the APY. 

On one hand, DefiLlama retrieves the instantaneous yield per second and multiplies it by seconds in a year to get the APY. This assumes no rewards are reinvested. On the other hand, Voltz Protocol looks at the differences of a cumulated rewards index. The next section will describe why these approaches result in slightly different APYs.

The GLP APY in Voltz Protocol

Voltz Protocol needs to be aware of the variable rates of GLP to calculate the position’s margin requirements and cashflows. The Rate Oracle is responsible for gathering this information from the GMX contracts. 

The previous Rate Oracles (for protocols like Aave or Compound) use a compounding index model. This index increases over time by compounding the rate of rewards growth between the last observation (last compounding point) and the current observation.

The above approach makes sense for markets where the yield is denominated in the same asset as the base one and therefore compounds. But for GLP, ETH rewards are distributed based on users’ GLP balance. 

The GLP Rate Oracle tracks a growing rate index, which is a sum of non-annualised rates. This index is updated every time there is a trade on Voltz Protocol, with the minimum time between updates being 1h. 

At every update, the value of rewards between the last update and the current time is added to the previous index. To retrieve the rewards, Voltz Protocol looks at a GMX variable that tracks the cumulative rewards in ETH per 1 GLP token since the inception of GLP. The gains between two points in time are simply the difference between this cumulative value, scaled by the ETH price denominated in GLP. The Oracle’s index grows like such:

Index = index + (cumulativeRewards_timeB - cumulativeRewards_timeA) * ETHPriceInGLP_timeA

It is important to note that the GMX cumulative variable rate does not update if there is no staking or claiming action between oracle updates. Like all smart contracts, the Rate Oracle needs a state changing transaction to record new data.

In the context of Oracles, the APY is calculated by taking the difference between two indexes and multiplying it by timeInYear/timeDelatBeweenIndexes.

How does this affect the cashflow and margin?

The GLP Rate Oracle currently updates this index at a minimum of one hour to ensure the rates are up to date with the latest market conditions without consuming a lot of gas.

The Voltz GUI displays instant rates to help with traders’ decision-making. The differences between the instant rate and the oracle rate approach come from:

  • the aggregation of past ETH/GLP prices over time embedded in the index
  • the potential lag of cumulative rewards due to action-based updating in GMX
  • The minimum of 1 hour between index updates

There is also a very small difference between what you see on DefiLlama vs the Voltz GUI due to precision calculations, where the Voltz GUI uses 18 decimal places, and frequency of update.

The margin requirements are calculated using a look-back window for 4 weeks to capture a holistic view of the rate behavior, keeping in mind the rates drastically change once a week. This helps avoid extreme movements of the margin requirements that would cause a large number of liquidations each week.

As always, any further questions are welcomed on our Discord :)