Funding every 24 hours
How the stakers' 1% arrives, and how each funding streams by the second.
- Interval
- 24 hours
- Stream
- 24 hours, per second
- Caller
- Anyone
#Rewards arrive every 24 hours
The stakers’ 1% arrives as ETH from the token contract, each time the tax is sold (The 4% tax). It collects in the Staking contract until the next funding.
A funding starts a 24-hour stream of that ETH. Anyone may call notifyRewards() once 24 hours have passed since the last funding. The server’s worker checks every minute and calls it once it is due and new ETH has arrived.
| Rule | Value |
|---|---|
| Call | notifyRewards(), open to anyone |
| Interval | At least 24 hours after the last funding |
| Amount | All ETH in the contract not yet owed to stakers |
| Stream | The next 24 hours, by the second |
| Next funding | nextFundingAt() on the contract |
| Senders | The token contract, and one fee source the owner may name |
Staking refuses ETH from any other sender. ETH from anyone else would stream to stakers and, through Compound, buy $KYZN untaxed.
The fee source carries other protocol revenue to stakers, such as their share of synthetics fees. While the owner names none, only the token can send ETH.
#Streamed by the second
A funding divides its ETH over the 86,400 seconds of the next 24 hours. Each second, that amount is shared among stakers in proportion to stake.
rate = funding ÷ 86,400 seconds your rewards each second = rate × your stake ÷ total staked
- rate
- Whole wei per second, rounded down
- total staked
- All staked $KYZN, at that second
The rate rounds down to whole wei. The remainder, under 86,400 wei, stays in the contract for the next funding.
| Case | Rule |
|---|---|
| Nothing staked | ETH that streams while nothing is staked rolls into the next funding |
| Stake during a stream | Earns from the second the stake confirms |
| Stake just before a funding | Earns only the seconds staked: the stream pays per second, not per funding |
| Unstake | Earning stops that second; what was earned stays claimable |
| A late funding | Nothing streams between the end of one stream and the next funding; the ETH waits in the contract |
A stream lasts exactly 24 hours, and the next funding opens when it ends, so two streams never overlap. How a share turns into ETH, with a worked example: How rewards accrue.