-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor and bugfixing #7
Conversation
[MTG-234] calculate weighted stake
…eration instead of withdraw
/// * `max_extra_lockup_vote_weight_scaled_factor`: max extra weight for lockups, in 1/1e9 units | ||
/// * `lockup_saturation_secs`: lockup duration at which the full vote weight bonus is given to | ||
/// locked up deposits | ||
/// * `grand_authority`: The keypair that might be an authority for Grand/Clawback |
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.
It's Grant
/// * `grand_authority`: The keypair that might be an authority for Grand/Clawback | |
/// * `grant_authority`: The keypair that might be an authority for the Grant/Clawback operation |
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.
Ahah, sure. Didn't notice
/// * B with digit_shift=0, baseline_vote_weight_scaled_factor=1e9, | ||
/// max_extra_lockup_vote_weight_scaled_factor=1e9 | ||
/// to not lose precision on B tokens. | ||
/// The vote weight for `amount` of native tokens will be 1:1. Therefore, all active |
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 comment for this method is a bit misleading.
Creates a new exchange rate for a given mint. This allows a voter to ...
doesn't reflect the nature of registering the token that may be used in staking lockups and for voting. This may be both the community and the governance tokens. (Am I getting this last part right?) The operation also persists the grant authority for the specified mint, that will be able to provide grants to other users and may clawback those if the grant terms are violated
@@ -115,14 +99,12 @@ pub fn withdraw( | |||
|
|||
// Governance may forbid withdraws, for example when engaged in a vote. | |||
// Not applicable for tokens that don't contribute to voting power. |
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 part of the comment is irrelevant to our implementation and should be removed
…-deposit-authority-signature MGT-345: Initialize rewards-pool deposit authority signature
…extend_stake-operations Kstepanov/mtg 398 unify stake extend stake operations
fixed weighted_stake function, added tests
* update spl_governance to 3.1.1 * update governance * refactor dependencies
…nto devnet-version
…eration instead of withdraw
* update spl_governance to 3.1.1 * update governance * refactor dependencies
…taking into refactor-and-bugfixing
improved error handling
* initial delegate * add delegate initial design * update tests * update tests && fixtures * initial delegate * add delegate initial design * update fixtures * remove redundant reprs * store deposit mining on each creation of deposit entry && add additional validations for stake and extend methods * update tests * remove redundant file * mtg-425: Error handling improvements (#14) improved error handling * initial delegate * add delegate initial design * update tests * update tests && fixtures * initial delegate * add delegate initial design * update fixtures * remove redundant reprs * store deposit mining on each creation of deposit entry && add additional validations for stake and extend methods * update tests * remove redundant file * add delegate as a dedicated wallet instead of delegate_mining * Update program-states/src/state/deposit_entry.rs Co-authored-by: Stanislav Cherviakov <[email protected]> * Update programs/voter-stake-registry/src/cpi_instructions.rs Co-authored-by: Stanislav Cherviakov <[email protected]> * unify mining verification * simplify mining verification * [mtg-308] (#15) * added change delegate function * Fixes after rebase * fix aligment * Update program-states/src/state/deposit_entry.rs Co-authored-by: Stanislav Cherviakov <[email protected]> --------- Co-authored-by: Stanislav Cherviakov <[email protected]> --------- Co-authored-by: Matiukhin Vlad <[email protected]> Co-authored-by: Stanislav Cherviakov <[email protected]>
No description provided.