Skip to main content

Calculating Projected APRs

The APR represents the annual percentage rate of return on investments factoring out compounding interest. We must first determine their respective yields to calculate the APR for fixed and variable tranches. The fixed or variable yield represents the returns accrued during a specific period.

There are three stages that an interest-rate product can reside:

OPEN: Interest-rate products are open for investment and users can subscribe to them. Funds are not deployed in this stage, and an estimated yield is calculated.

INVESTED: In this stage, funds would have been deployed into the underlying yield-bearing position. A combination of estimated and realized yield is calculated, as yield has accrued and continues to accumulate.

WITHDRAWN: Interest-rate products are matured and APR is determined solely from the realized yield of the investment as funds have matured and been withdrawn from underlying positions.

The Liquidity Pool (LP) Yield for different AMMs are estimated differently:

For GMX based on rewards per second, assuming rewards per second remain constant throughout the duration.

LPYield (GMX)=rewardsPerSecond×durationAUM\text{LP}_{\text{Yield (GMX)}} = \frac{\text{rewardsPerSecond} \times \text{duration}}{\text{AUM}}

The fixed yield would be equal to the fixed rate determined during product creation since funds in the product has not yet been deployed.

FixedYield=FixedRate\text{Fixed}_{Yield} = \text{Fixed}_{Rate}

Variable Yield can be simply calculated as:

VariableYield=2×LPYieldFixedRate\text{Variable}_{Yield} = 2 \times \text{LP}_{Yield} - \text{Fixed}_{Rate}

We can then calculated the fixed and variable APR accordingly:

FixedAPR=FixedYield×YEAR_IN_SECONDSduration\text{Fixed}_{APR} = \text{Fixed}_{Yield} \times \frac{\text{YEAR\_IN\_SECONDS}}{\text{duration}}
VariableAPR=VariableYield×YEAR_IN_SECONDSduration\text{Variable}_{APR} = \text{Variable}_{Yield} \times \frac{\text{YEAR\_IN\_SECONDS}}{\text{duration}}

INVESTED State:

As mentioned earlier, in this stage, a combination of estimated and realized yield must be calculated as yield accrued and continues to accumulate.

LPYield=(currentValueOfLPstartValueOfLP)×(1+remainingLPYield)1\text{LP}_{Yield} = \left(\frac{\text{currentValueOfLP}}{\text{startValueOfLP}}\right) \times (1 + \text{remainingLP}_{Yield}) - 1

The fixed yield at this stage can be calculated as:

FixedYield=min(1+2×LPYield,FixedRate)\text{Fixed}_{Yield} = \min(1 + 2 \times \text{LP}_{Yield}, \text{Fixed}_{Rate})

And variable yield as follows:

VariableYield=max((1+2×LPYieldFixedRate)×PriceAcurrentPriceBcurrent×PriceBstartPriceAstart1,1)\text{Variable}_{Yield} = \max\left(\frac{(1 + 2 \times \text{LP}_{Yield} - \text{Fixed}_{Rate}) \times \text{PriceA}_{current}}{\text{PriceB}_{current}} \times \frac{\text{PriceB}_{start}}{\text{PriceA}_{start}} - 1, -1\right)

WITHDRAWN State:

The fixed yield at this stage can be calculated as:

FixedYield=tokensAtMaturitytokensInvestabletokensInvestable\text{Fixed}_{Yield} = \frac{\text{tokensAtMaturity} - \text{tokensInvestable}}{\text{tokensInvestable}}

The fixed yield at this stage can be calculated as:

FixedYield=tokensAtMaturitytokensInvestabletokensInvestable\text{Fixed}_{Yield} = \frac{\text{tokensAtMaturity} - \text{tokensInvestable}}{\text{tokensInvestable}}

And variable yield as:

VariableYield=tokensAtMaturitytokensInvestabletokensInvestable\text{Variable}_{Yield} = \frac{\text{tokensAtMaturity} - \text{tokensInvestable}}{\text{tokensInvestable}}

Calculating the APRs:

Once we have the fixed and variable yields, the fixed and variable APR can be calculated accordingly:

FixedAPR=FixedYield×YEAR_IN_SECONDSduration\text{Fixed}_{APR} = \text{Fixed}_{Yield} \times \frac{\text{YEAR\_IN\_SECONDS}}{\text{duration}}
VariableAPR=VariableYield×YEAR_IN_SECONDSduration\text{Variable}_{APR} = \text{Variable}_{Yield} \times \frac{\text{YEAR\_IN\_SECONDS}}{\text{duration}}

GLossary:

  • Fixed APR: APR for the fixed tranche
  • Variable APR: APR for the variable tranche
  • Fixed Rate: The rate set during product creation
  • LP Yield: Yield for the liquidity pool
  • Fixed Yield: Yield for the fixed tranche
  • Variable Yield: Yield for the variable tranche
  • APR: Annual percentage rate
  • Yield: Realized or estimated returns of a tranche based on historical data
  • TokenA: Fixed tranche token reference
  • TokenB: Variable tranche token reference

This disclaimer by Struct Finance is provided in connection with sharing calculations and formulas used by the protocol to calculate investment returns. Struct Finance offers no guarantee or commitment regarding the utilization of its assets, funds, or personnel and disclaims any duties or obligations to protocol users, except for those under non-waivable tort laws. All software related to the protocol is provided on an as-is basis without representations or warranties, and Struct Finance assumes no liability for damages arising from its use. Forward-looking statements in this disclaimer are subject to numerous assumptions, risks, and uncertainties, and Struct Finance reserves the right to change plans and intentions at any time without updating or revising any statement. This disclaimer is not intended to provide legal, financial, or investment advice, and individuals should not make decisions based on this information.