-
Notifications
You must be signed in to change notification settings - Fork 2
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
Introduce compounder cap #220
base: main
Are you sure you want to change the base?
Conversation
…cking in extra_cap based on their voting power in previous round.
… the new code - validate_denom() modified to be able to execute for past rounds as well
pub fn validate_denom( | ||
deps: Deps<NeutronQuery>, | ||
env: Env, | ||
round_id: u64, |
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.
This is to support denom resolution for the past rounds. We need to pass in the round_id because sometimes this function gets executed in current round, but we are interested for past rounds (e.g. for compounder cap to determine users voting power in previous round).
pub max_locked_tokens: u128, | ||
// The maximum number of tokens (out of the max_locked_tokens) that is reserved for locking only | ||
// for currently known users. This field is intended to be set to some value greater than zero at | ||
// the begining of the round, and such Constants would apply only for predefined period of time. |
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.
// the begining of the round, and such Constants would apply only for predefined period of time. | |
// the begining of the round, and such Constants would apply only for a predefined period of time. |
Description
This PR introduces the "compounder cap" which reserves certain amount of tokens (out of the total number of tokens allowed to be locked) and allows users that had voting power in previous round to exclusively lock in this cap, for a certain time frame. The "compounder cap" is meant to be active for some time at the beginning of the round. After this time has expired, any amount of tokens that wasn't locked by the compunders will be at disposal to any other user to freely lock, up to the limit of total cap, that is enforced at any time. Implementation also supports re-activation of "compunders cap" at any time during the round, which is controlled by the contract governance and handled by the
update_config()
action (as it is the case with initial activation).Techinical Details
Updated contract stores:
Newly added stores:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
.changelog
make compile
and included content of the artifacts directory into the PRmake schema
and included generated files into the PR