IPOR Protocol
  • The IPOR Protocol Documentation
  • IPOR Protocol V2
  • Research / Whitepapers
    • Conceptual Whitepaper
  • Audits
  • Community Links
  • IPOR Protocol Roadmap
  • IPOR FAQ
    • About the IPOR Protocol
    • Using the IPOR Protocol
    • Liquidity Mining
    • Swaps VS Perps
    • $FUSN Snapshot
  • About IPOR
    • Who Uses IPOR and for What?
    • Why IPOR?
    • IPOR Manifesto
  • IPOR Fusion ⚛️
    • Fusion Introduction
      • Defragmenting DeFi Yield
    • Why Fusion?
    • Users
    • Use Cases
    • Architecture Overview
      • Atomists
      • Alphas
    • Vaults
      • Access Management
    • Fuses
    • Security
      • For Liquidity Providers
      • For Vault Owners
      • Testing
    • Open-source Repository
    • Aragon Integration
  • IPOR Index
    • What is the IPOR Index
    • Working with the IPOR Index
    • IPOR stETH Index
  • Interest Rate Derivatives
    • Interest Rate Derivative
    • Index Calculation
    • IPOR Publication
    • IBT
    • Indicative Term Sheet
  • Automated Market Maker
    • The Automated Market Maker
    • Liquidity Provisioning
    • IPOR Swaps
      • Hedging example with Morpho protocol
    • Spread
      • Math behind the demand spread
    • Risk oracle
    • SOAP
    • Liquidations
    • Asset Management
  • Tokenomics
    • IPOR Token
    • Token distribution model
    • Power IPOR
    • Liquidity mining
      • Math behind the rewards contract
    • Power Token Liquidity Mining for Developers
  • IPOR DAO
    • IPOR DAO Governance
      • Discord - All Channels
      • Discord - Open Governance Forum
      • Discord - Formal Governance
      • Snapshot - Formal Governance
      • Governing Multisig wallets
    • Decentralizing IPOR
      • Configuration Parameters
  • Developers Docs
    • Fusion
      • Developing а Fuse
      • Configuring Pre-hooks
    • Deployed Contracts
      • Ethereum
      • Arbitrum
      • Base
    • Working with IPOR Router
    • ABI
    • V2 changes
    • IPOR Oracle
    • Vault Wrapper
Powered by GitBook
On this page
  • User power-up
  • Aggregate Power-up
  • Accrued rewards
  • Composite Multiplier
  • Account Mining Rewards
  • Basic assumptions

Was this helpful?

Edit on GitHub
  1. Tokenomics
  2. Liquidity mining

Math behind the rewards contract

LR - Block number when the last rebalancing took place. Certain variables would be rebalanced when the state change is necessary. Those events would include:

  • adding or modifying staked tokens balance by the user

  • changing parameters used to calculate boost, such as rewards per block

ULR - Time of rebalancing that occurrs when the user modifies his position (ipToken, pwToken delegation). It is saved under individual staking position.

User power-up

User power-up is calculated for each user whose position changes. That includes staking or unstaking ipTokens or modifying the delegated balance of pwIPOR.

The user's power-up is governed by the below function:

UPU={10⋅(pwIporipToken)+0.2pwIporipToken<0.014⋅(pwIporipToken)+0.26pwIporipToken<0.023⋅(pwIporipToken)+0.28pwIporipToken<0.032⋅(pwIporipToken)+0.31pwIporipToken<0.041⋅(pwIporipToken)+0.35pwIporipToken<0.05VS+log⁡2(HS+pwIporipToken)pwIporipToken≥0.05UPU = \begin{cases} 10\cdot \left(\frac{pwIpor}{ipToken} \right) +0.2 & \frac{pwIpor}{ipToken} < 0.01 \\ 4\cdot \left(\frac{pwIpor}{ipToken} \right) +0.26 & \frac{pwIpor}{ipToken} < 0.02 \\ 3\cdot \left(\frac{pwIpor}{ipToken} \right) +0.28 & \frac{pwIpor}{ipToken} < 0.03 \\ 2\cdot \left(\frac{pwIpor}{ipToken} \right) +0.31 & \frac{pwIpor}{ipToken} < 0.04 \\ 1\cdot \left(\frac{pwIpor}{ipToken} \right) +0.35 & \frac{pwIpor}{ipToken} < 0.05 \\ VS + \log_2\left(HS +\frac{pwIpor}{ipToken}\right) & \frac{pwIpor}{ipToken} \ge 0.05 \\ \end{cases}UPU=⎩⎨⎧​10⋅(ipTokenpwIpor​)+0.24⋅(ipTokenpwIpor​)+0.263⋅(ipTokenpwIpor​)+0.282⋅(ipTokenpwIpor​)+0.311⋅(ipTokenpwIpor​)+0.35VS+log2​(HS+ipTokenpwIpor​)​ipTokenpwIpor​<0.01ipTokenpwIpor​<0.02ipTokenpwIpor​<0.03ipTokenpwIpor​<0.04ipTokenpwIpor​<0.05ipTokenpwIpor​≥0.05​

VS - Vertical Shift HS - Horizontal Shift pwIpor - User's pwIPOR balance delegated to a particular asset ipToken - User's staked ipToken balance

The curve can be swapped by the DAO for a different one at a later stage in time, affecting all future rebalancings. The user's power-up value is fixed and can only be changed if the rebalancing is triggered.

Aggregate Power-up

Aggregate Power-up is a synthetic summary of all power-ups across all users. It's used to calculate individual rewards in relation to the rest of the pool.

APU=∑#all users whitch stake ipTokens≥1(ipTokens⋅UPU)APU = \sum_{\# \text{all users whitch stake }ipTokens \geq 1} (ipTokens \cdot UPU)APU=#all users whitch stake ipTokens≥1∑​(ipTokens⋅UPU)

APU - Aggregate Power-up UPU - User Power-up

Accrued rewards

Accrued rewards are tracked over time to allow for the calculation of users' rewards between events of rebalancing.

accruedRewards⁡=accruedRewards⁡LR+rewardsPerBlock⁡ ⋅ (blockNumber−blockNumber⁡LR)\operatorname{accruedRewards} = \operatorname{accruedRewards}_{LR} + \operatorname{rewardsPerBlock} ~\cdot~ \left(\text{blockNumber} - \operatorname{blockNumber}_{LR}\right)accruedRewards=accruedRewardsLR​+rewardsPerBlock ⋅ (blockNumber−blockNumberLR​)

Composite Multiplier

CM=blockRewardsAPUCM = \frac{blockRewards}{APU}CM=APUblockRewards​

The composite multiplier (CM) accounts for the rewards per "boosted unit of liquidity staked" per block.

CMC=∑#blocksCMBlockCMC = \sum_{\# blocks}CM_{Block}CMC=#blocks∑​CMBlock​

Composite Multiplier Cummulative (CMC) is a sum of Composite multipliers for every block until now.

Account Mining Rewards

User rewards at block n can be calculated using the below formula. Block ULR is the block with the state of compositeMultiplierCumulative (CMC) at the time of the last rebalancing of user rewards.

userRewardsn​=ipToken∗UPU ∗ (CMC⁡n-1⁡​−CMCULR−1​)userRewards_{n}​=ipToken * UPU~*~\left(\operatorname{CMC}_{\operatorname{n-1}}​−CMC_{ULR-1}​\right)userRewardsn​​=ipToken∗UPU ∗ (CMCn-1​​−CMCULR−1​​)

The CMCULR−1CMC_{ULR-1}CMCULR−1​ is saved when the user modifies his position. It is calculated to reflect the state without accounting for the current block.

​

CMCULR−1=CMCLR−1+(URL−LR)⋅CMLRCMC_{ULR-1} = CMC_{LR-1} + \left(URL-LR \right) \cdot CM_{LR}CMCULR−1​=CMCLR−1​+(URL−LR)⋅CMLR​

When the user modifies their position, the most recent CMC is saved per the user's record.

Basic assumptions

VerticalShift ⇒ VS ⇒10−4 10^{-4}10−4 ≤\leq≤ VS ≤\leq≤ 3

HorizontalShift ⇒ HS ⇒ 1 ≤\leq≤ HS ≤\leq≤ 10310^{3}103

ipToken ⇒ 1 ≤\leq≤ ipToken

pwIpor ⇒ 0 ≤\leq≤ pwIpor ≤\leq≤ 25 ⋅\cdot⋅ 10610^{6}106

$blockRewards ≤\leq≤ 100

$totalRewards = 25⋅\cdot⋅10610^6106

PreviousLiquidity miningNextPower Token Liquidity Mining for Developers

Last updated 1 year ago

Was this helpful?