The Implementation of The Ledger of Things Node. Layer 1 decentralized blockchain platform for the tokenization of objects. Proof of Scan protocol. Useful smart-contracts and dApps.
When mining rewards are given out to a pool, each entry in pool's PowStat is given some amount of coins through
https://github.com/3Dpass/3DP/blob/110c140a97ac8e726889ff21127adad8f907d0f6/pallets/rewards/src/lib.rs#L409-L414do_reward_per_account gives up 1 coin unlocked and rest are locked, so if the pool has multiple powstat entries, it will generate up to that number of unlocked coins for each block, allowing you to get all block rewards unlocked instantly.
I think that the best fix is instead of giving 1 unlocked coin through each do_reward_per_account call, specifically in
https://github.com/3Dpass/3DP/blob/110c140a97ac8e726889ff21127adad8f907d0f6/runtime/src/lib.rs#L457
give a set percentage of the total amount, for example 0.5%, which would sum up to about 1 unlocked coin per block with current rewards. Since validators are also receiving rewards through do_reward_per_account, it should probably have an additional parameter, specifying whether the coins should be locked at all, to keep the current behavior of validators receiving everything unlocked.
When mining rewards are given out to a pool, each entry in pool's PowStat is given some amount of coins through https://github.com/3Dpass/3DP/blob/110c140a97ac8e726889ff21127adad8f907d0f6/pallets/rewards/src/lib.rs#L409-L414
do_reward_per_account
gives up 1 coin unlocked and rest are locked, so if the pool has multiple powstat entries, it will generate up to that number of unlocked coins for each block, allowing you to get all block rewards unlocked instantly. I think that the best fix is instead of giving 1 unlocked coin through eachdo_reward_per_account
call, specifically in https://github.com/3Dpass/3DP/blob/110c140a97ac8e726889ff21127adad8f907d0f6/runtime/src/lib.rs#L457 give a set percentage of the total amount, for example 0.5%, which would sum up to about 1 unlocked coin per block with current rewards. Since validators are also receiving rewards throughdo_reward_per_account
, it should probably have an additional parameter, specifying whether the coins should be locked at all, to keep the current behavior of validators receiving everything unlocked.