EOSIO / eosio.contracts

Smart contracts that provide some of the basic functions of the EOSIO blockchain
https://eosio.github.io/eosio.contracts/latest
MIT License
326 stars 500 forks source link

[docs] I think the replenish algorithm description is wrong #587

Open pizzonia opened 2 years ago

pizzonia commented 2 years ago

File: docs/01_key-concepts/05_stake.md

The current text says:

it multiplies the currently accumulated average by (number of blocks in the window - number of blocks since last update) / (number of blocks in the window)

I interpret the wording "accumulated average" as a "currently available resource" (following terminology of the cleos get account output). However, the computed number is clearly less than one and multiplying the available resource by that number diminish it instead of replenish it! I suspect it is divided by that number even if I was not able to derive it from the code. Thank you for your work, Maurizio