STX per stSTX Calculation
How the ratio of STX per stSTX is enforced in Clarity
Each cycle, the amount of STX backing a single stSTX token should go up, unless the amount of withdrawals have been greater than deposits (i.e. a net outflow). Nonetheless, each stacker using the protocol will get their pro-rata share of the yield each stacking cycle.
Let's take a look at the code that calculates the ratio:
In the above calculation, we simply take the ratio of total deposits against PoX rewards that have been earned in STX.
Last updated