Getting Started
Liquid StakingSecurity Developer docs
  • Hatom's Ecosystem
    • Introduction
    • Lending Protocol
      • Networks
      • Protocol Math
        • Cash Dynamics
        • Borrow Dynamics
        • Protocol Reserves Dynamics
        • Interest Rate
        • Exchange Rate
        • Rewards Dynamics
      • Glossary
        • Money Markets or "MM"
        • Utilisation Rate
        • Collateral Factor or Loan to Value
        • Borrow Limit Used
        • BorrowCap
        • Liquidation Factor/Threshold or Health Factor
        • Liquidation Limit Bar
        • Liquidation Incentive
        • Reserve Factor
        • Close Factor
        • ActiveCollateralCapUSD
        • Supply/Borrow APY
        • HTokens
        • Underlying Token
        • Cash
        • Reserve Balance
      • Fundamental Functions
      • HTokens
      • Lending Protocol Rewards
      • Hatom Price Oracle Infrastructure
        • Oracle Bots
        • Price Aggregator Smart Contract
        • Price Oracle Smart Contract
        • Guardian bot
      • Liquidation
        • How much is the liquidation penalty ?
        • Can you give me an example ?
        • How can I avoid getting liquidated ?
        • Can I participate in the liquidations ecosystem ?
    • Liquid Staking
      • Liquid Staking Derivatives
      • Basic Functionalities
      • Liquid Staking Delegation Algorithm
    • Hatom USD
      • USH Facilitators
        • Lending Protocol Facilitator
          • Borrow Repayment and Liquidations
          • Borrow Rate
        • Isolated Pools Facilitator
          • USH Redemption
          • How to Participate in Redemption
      • Price Stability
      • USH Staking Module
      • Frequently Asked Questions
    • Booster
      • Booster Math
    • Accumulator
    • TAO Bridge
      • Ecosystem Integration
      • Bridging Process
      • Bridging Fees
      • Video Guides
  • Governance
    • Introduction
    • How to vote ?
      • The Voting Process
      • Unstaking HTM Tokens During Voting
      • Increasing Voting Power
      • Voting on Multiple Proposals
    • Tuning Hatom Protocol Parameters
  • Learn more about "Hatom token"
    • Introduction
    • HTM Token
    • Roadmap
  • Security
    • Introduction
    • Security reports
    • Adding an Asset
      • Methodology
      • Risk Parameters
    • Bug Bounty
  • Troubleshooting
    • Guides: Lending Protocol
      • Supply an asset
      • Activate as collateral
      • Borrow an asset
      • Repay a borrow
      • Remove collateral
      • Withdraw your asset
    • How to translate ?
      • Translate "Hatom Protocol":
      • Translate "Docs Section":
    • Request assistance
  • Hatom Protocol
  • USH
  • Blog
  • Syfy
Powered by GitBook
On this page
  • Rewards Distribution
  • Boosting a Position
  • Average Compliance
  • Compliance in Reward Distribution

Was this helpful?

Export as PDF
  1. Hatom's Ecosystem
  2. Booster

Booster Math

as of 02/01/2025

Rewards Distribution

Pools of tokens like each collateral in the controller or stakes in USH staking can have multiple batches of rewards in the booster. Each batch of rewards distributes a rewards token at a defined speed S→ Amount of tokens distributed per second, the batch has an Index (Ib) (I_b)(Ib​) that is updated at each interaction of any user

ΔIb=S×ΔtP\Delta I_b = \frac{S \times \Delta t}{P}ΔIb​=PS×Δt​

Where Δt\Delta tΔt is the time in seconds since the last distribution of the batch and P is the total amount of tokens in the pool, equal to the sum of all user amounts in the pool (P=∑ipi)(P = \sum_i p_i)(P=∑i​pi​). The difference between the batch index and the user index allow to calculate the rewards earned by a user since the last time he received rewards.

ΔRi=(Ib−Ii)×pi\Delta R_i = (I_b - I_i) \times p_iΔRi​=(Ib​−Ii​)×pi​

The previous equation implies that ∑iΔRi=S×Δt \sum_i \Delta R_i = S\times \Delta t∑i​ΔRi​=S×Δt so, all rewards distributed are in the hands of the users in the pool.

Boosting a Position

To earn rewards users will need to boost their position, staking HTM or HTM-related tokens in the Booster V2. In the case of HTM-related tokens, only the proportion of its values related to HTM is taken into account in the price; for example in the case of an LP token:

LPprice($)=HTMprice($)×HTMreserveLPTotal SupplyLP_{price}(\$) = HTM_{price}(\$) \times \frac{HTM_{reserve}}{LP_{\text{Total Supply}}}LPprice​($)=HTMprice​($)×LPTotal Supply​HTMreserve​​

Therefore the total staked by a user (Si)(S_i)(Si​) in USD value is the sum of the tokens staked (Zi)(Z_i)(Zi​) in the booster multiplied by the token price (Ps)(P_s)(Ps​):

Si=∑sZi,s×PsS_i = \sum_s Z_{i,s}\times P_sSi​=s∑​Zi,s​×Ps​

Each pool included in the Booster has a Staking Ratio (SR)(SR)(SR) which represents a percent between 0 and 100 of the value in the pool that needs to be staked in HTM to receive the full rewards. Notice that pools can have different Staking Ratio, and the HTM staked required is a global value:

Sreqi=∑ppi,p×Pp×SRpS_{{req}_i} = \sum_p p_{i,p} \times P_p \times SR_pSreqi​​=p∑​pi,p​×Pp​×SRp​

Where Pp P_pPp​ is the price of the token in the pool. Given the previous amount of Total Staked (Si)(S_i)(Si​) and the Stake Required (Sreq)(S_{req})(Sreq​), the compliance can be defined:

Ci=SiSreqi=∑sZi,s×Ps∑ppi,p×Pp×SRpC_i = \frac{S_i}{S_{{req}_i}}= \frac{\sum_s Z_{i,s}\times P_s}{ \sum_p p_{i,p} \times P_p \times SR_p}Ci​=Sreqi​​Si​​=∑p​pi,p​×Pp​×SRp​∑s​Zi,s​×Ps​​

The previous definition of Compliance is instantaneous and doesn’t take into account changes over time in the variables.

Average Compliance

To calculate an average value in time a simple idea is to calculate its integral through time and then divide between the time integral (time elapsed):

Ci^=∫tt+ΔTCi(t)dt∫tt+ΔTdt\hat{C_i} = \frac{ \int_t^{t+\Delta T} C_i(t)dt}{\int_t^{t+\Delta T}dt}Ci​^​=∫tt+ΔT​dt∫tt+ΔT​Ci​(t)dt​

For this to be valid we require the values to be continuous, which is not fulfilled when the user interacts by changing his position in the pool or the amount staked; but we can calculate the integral by part at any interaction of the user:

Ii=∫tt+ΔTCi(t)dt=∑j∫tjtj+ΔtjCi(t)dtI_i = \int_{t}^{t+\Delta T} C_i(t)dt = \sum_j \int_{t_j}^{t_j+\Delta t_j} C_i(t)dtIi​=∫tt+ΔT​Ci​(t)dt=j∑​∫tj​tj​+Δtj​​Ci​(t)dt

Where the j-intervals are those in which the user did not interact; in other words, at each user interaction, the increment of the integral since the last user interaction is calculated:

ΔIi,j=∫tjtj+ΔtjCi(t)dtIinew=Iiold+ΔIi,j\Delta I_{i,j}= \int_{t_j}^{t_j+\Delta t_j} C_i(t)dt \\ I_i^{new} = I_i^{old}+ \Delta I_{i,j}ΔIi,j​=∫tj​tj​+Δtj​​Ci​(t)dtIinew​=Iiold​+ΔIi,j​

So far in a j-interval, we know that the pools and stake amounts are constants; but the prices can change even in a really short interval. When calculating the integral in a j-interval, we’re going to use the average price of the token in that interval, to know the average price we’re going to have a price integral that will be updated at any user interaction:

Px^=∫tt+ΔtPx(t)dt∫tt+Δtdt\hat{P_x} = \frac{\int_t^{t+\Delta t} P_x(t)dt}{\int_t^{t+\Delta t} dt}Px​^​=∫tt+Δt​dt∫tt+Δt​Px​(t)dt​

Using an average price for the token in a j-interval (interval between user interactions) is an approximation, but is enough for us and allows simple tracking of average compliance.

Recapping:

  • Each time a user interacts, the price integral is going to be updated.

  • Each time a user interacts, the compliance integral will be updated for that user.

  • Each time we need to distribute rewards to a user in a pool, an average compliance will be calculated using the last value of the user compliance integral and the value of the compliance integral from the last time the user receive rewards from that pool.

Ci(T)=∫0T∑sZi,s×P^s∑ppi,p×P^p×SR^pC_i(T) = \int_0^T \frac{\sum_s Z_{i,s}\times \hat{P}_s}{ \sum_p p_{i,p} \times \hat{P}_p \times \hat{SR}_p}Ci​(T)=∫0T​∑p​pi,p​×P^p​×SR^p​∑s​Zi,s​×P^s​​
C^i[t,t+T]=Ci(t+T)−Ci(t)T\hat{C}_i [t, t+T] = \frac{C_i(t+T) - C_i (t)}{T}C^i​[t,t+T]=TCi​(t+T)−Ci​(t)​

Compliance in Reward Distribution

The compliance will affect the amount of rewards received by a user, any user with a compliance lower than 1 will receive a penalty (pi) (p_i) (pi​) on the rewards:

pi=Max(0,1−Ci)p_i = Max (0, 1-C_i)pi​=Max(0,1−Ci​)

Note that a compliance of 1 or higher will imply a zero penalty. Then, the new rewards earned in the booster by the user are:

ΔRiB=ΔRi×(1−pi)\Delta R_i^B = \Delta R_i \times (1-p_i)ΔRiB​=ΔRi​×(1−pi​)
PreviousBoosterNextAccumulator

Last updated 5 months ago

Was this helpful?