Dapp-a-day 24: Rate Accumulator
ethereum·@nexusdev·
0.000 HBDDapp-a-day 24: Rate Accumulator
 --- A `Rate Accumulator` is a building block for tracking a set of balances with a continuous variable return rate. It will correctly prorate balances in constant time no matter how frequently the rate is updated or balances are changed *(each at most once per timestamp)*. This comes at a cost of storage space that is linear with number of *"points"*: Any time the rate is changed or a balance is read, a storage slot is polluted forever. Reuse rate accumulators whenever possible - the same accumulator can be used for totally different balance sets with no extra penalty. ### https://github.com/nexusdev/ds-rate-accumulator
👍 nexusdev, goldmatters, bobbybillbob, napsy, steempower, bue-witness, robotev1, bue, mini, healthcare, boy, daniel.pan, bunny, moon, helen.tan, murh, taoteh1221, nikolai, sweetsssj, glitterfart, trev, cass, laonie1, laonie2, laonie3, laonie4, laonie5, laonie6, laonie7, laonie8, laonie9, laonie10, laonie11, anonymous, summon, borran, macartem, stevenh512, teamsteem, steem1653,