Staking rewards

Staking rewards calculations

Staking rewards distribution will follow a polynomial down-trend function $r = 1-t^2$, where $t$ is the normalized value of time that has passed between the moment staking started and 40 years, while $r$ is the normalized value of rewards distributed.
The reward calculation mechanism is as follows. Every time there is a stake created, the stake gets updated (due to withdraw or restake) or deleted we calculate a variable that we're calling $S$, this $S$ represents the value of each TAL locked in staking in regards to the rewards that are being distributed. When a stake is created we update the value of $S$ at that moment and store it. So if there are 10 stakes active we'll have stored 10 different values for $S$.
The only two exceptions to this flow is if the is less than 1%, in that case we attribute 1% to the talent, the second exception is if the total rewards would make you mint more than the maximum amount allowed for each talent token because that is not possible. Once a talent token reaches the maximum value rewards are no longer rewarded to active stakes in that talent.