-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hybrid Inflation Model #1077
Hybrid Inflation Model #1077
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/bench shibuya-dev pallet_block_rewards_hybrid |
Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/6889749488. |
Benchmarks have been finished. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general!
/bench shibuya-dev block_rewards_hybrid |
Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/6892810709. |
Benchmarks have been finished. |
Minimum allowed line rate is |
Pull Request Summary
closes #1049
This PR adds a new pallet
block_rewards_hybrid
that is forked frompallet-block-reward
.Changes:
issue
as well asburn
total issuance inon_timestamp_set
hook and it looks not idiomatic.Before
A fixed amount of
BLOCK_REWARD
was distributed (to stakers, dapps, collators, and treasury) so inflation was fixed. The TVL (fluctuating) was distributing thereward_config.adjustable_percent
rewards between stakers and treasury.Now
The TVL (fluctuating) is not distributing the
reward_config.adjustable_percent
rewards between stakers and treasury anymore. instead the proportion is only distributed to the stakers (and is calculated the same way). The remaining proportion that was previously reward to treasury is now just omitted (not minted), that's why the rewards per block/inflation is now dynamic.To help review
The main update and code logic updated from previous pallet is in
on_timestamp_set
and the two new functionscalculate_rewards
anddistribute_rewards
(HERE in master).Check list