iBGT rewards

For further information please refer to the iBGT education page.

APR calculation

Explains the method to calculate the APR of rewards distributed by the IMultiRewards contract. The APR represents the annualized rate of rewards for stakers and is derived based on the rewardRate function, which specifies rewards distributed per second.

  1. Accessing reward rate

    The rewardRate is a component of the Reward struct, which stores data on rewards distributed for a specific token in the contract. To get the rewardRate, call the rewardData function:

    (uint256 rewardRate) = IMultiRewards.rewardData(address rewardsToken);
    \_rewardsToken is the address of the rewards token.
    rewardRate returns the number of reward tokens distributed per second.
  2. Calculating total reward over a 30-day period

    To calculate the total rewards distributed over a 30-day period, use historical data. Formula:

    30-day reward value = sum_{n=1}^{30} (rewardRate_n × 86400 × historical iBGT price at day N)

    Steps: For each day, multiply the reward rate for that day (rewardRate_n) by the total seconds in a day (86,400). Convert the daily reward into asset value using the historical price of iBGT for that day. If historical data is not available (e.g., within the first 30 days after launch), use as much historical data as possible for the calculation.

  3. Annualizing the rewards

    To annualize the rewards:

    Annual reward value = 30-day reward value × 12
  4. Fetching the total staked value

    The total staked value can be found using the totalSupply function in the MultiRewards.sol contract:

    - @notice Returns the number of staked tokens.
    - @return uint256 The number of staked tokens.
      function totalSupply() external view returns (uint256) {
      return \_totalSupply;
      }
  5. Calculating the APR

    Finally, calculate the APR using the annual reward value and the total staked value:

    APR = Annual reward value / Total staked value

    Using a 30-day lookback average ensures that large changes do not disproportionately impact the APR.