Compounded Dynamic Staking
Last updated
Last updated
Finceptor employs an auto-compounded vault mechanism for $FINC staking, compounding investor stakes to generate exponential returns and calculate the token sale allocations based on the compounded capital. An auto-compound mechanism is used to reinvest rewards generated from the staking pool into the same staking pool, creating a compound effect.
A time-based mathematical formula is used to track the rewards and staking balances of every staker in the vault and the formula is updated according to the last update time and current time after every staking amount changing transaction.
The parameters are as follows:
LastUpdateTime
(can be any user)
TotalSupply
(total staked amount)
UserBalance
Rewards[.]
(total reward added to the user so far)
PaidReward[.]
(Total rewards paid to all users so far)
RewardRate
(reward to pay in return for a single token per second)
Letās imagine user A staking 100 $FINC tokens. The updateRewards
function is called before the staking action and the initial parameters are updated as follows.
āThen, the reward parameters of user A, rewards[A] and userRewardPerTokenPaid[A]
, are updated as follows.
āAfter updating these parameters, the algorithm continues with the accumulation of totalSupply and balances[A].
Now that we have initialized the first staking parameters and we have a non-zero totalSupply
; letās imagine a new user B staking 200 tokens assuming t1
is the current time.
āāThen, the reward parameters of user B, rewards[B] and userRewardPerTokenPaid[B],
are updated as follows.
After updating these parameters, the algorithm continues with the accumulation of totalSupply and balances[B].
Now, let's imagine that another user joins the staking pool, say user C, staking 300 $FINC tokens.ā rewardsPerTokenStored and lastUpdateTime
is updated as follows.
āThen, the reward parameters of user C, rewards[C] and userRewardPerTokenPaid[C],
are updated as follows.
After updating these parameters, the algorithm continues with the accumulation of totalSupply and balances[C].
Now the essential part of the algorithm comes to play. What if user B wants to claim their rewards? How does the algorithm calculate how much B has earned since they staked after A but before C? getReward
function also triggers the updateRewards
function so the parameters are updated.
āThen, the reward parameters of user B, rewards[B]
, are updated as follows.
āFinally, userRewardPerTokenPaid[B]
is calculated as follows.
Now the necessary updates have been completed and user B is ready to claim their rewards which are stored in the rewards[B]
mapping that we just updated. The reward is sent to the user and is reset to 0 until they claim again at a later time. As seen from the calculations, the reward is calculated so that it does not account for the time period where B has not staked (There was only user A) but accounts for the time periods where there is<A, B>
and <A, B, C
> separately. This algorithm handles every userās rewards in the same way.
To understand auto-compound strategy in $FINC staking, the concept of APR (Annual Percentage Rate)
and APY (Annual Percentage Yield)
should be understood. Simply, APR
is simple and APY
is compound interest, reflecting the interest you make in your interest.
where InterestReturn
is the total interest paid over the life of the staking, principal
is the total deposit, and n
is the number of days in the total reward period. Hence, there is no rebasing or reinvesting included whereas, in the APY calculation, interest on the earned interest (reinvesting effect) is also considered.
where N
is the compounding frequency (e.g., daily, weekly, monthly, quarterly, etc.) With every rebase, the returned interest reward is added to the stakers' balance automatically resulting in a higher compound rate in the next period.
To compare APR
and APY
, let's imagine that $FINC staking offers 100% APR
at a certain timeframe, and imagine this APR
continues to remain the same for over one year. Then, let N = 365,
i.e., if compounding frequency is daily, and let Principal = $10,000
then APY, TotalInterest
andFutureValue
will be
Hence, there is a 71.4567%
interest rate difference between APR
and APY.
āDaily compound interest accumulated FutureValue
of the user to 27,145.67
which will be 20,000
if compound interest wouldn't be considered, creating a 7,145.67
extra interest. To compare the compound effect of the $FINC auto-compound staking pool with the simple staking pools, here is the graph representing the accumulated $FINC amount over time; the difference between auto-compounded capital and simple capital is increasing over time, reaching 7,145.67
at the end of the first year and 43688.76
at the end of the second year.
Note that staking/vault fees are not considered here; however, the calculation of the APR can be computed considering network fees as follows.
āwhere RealizedAPR
is the actual APR
rate after subtracting protocol fees FP.