-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stkXPRT audit fix rebased (#766)
* fix: noisy unit test * fix: [oak-14] misleading attribute name emitted during unstake * fix: [oak-12] incorrect amount of stkXPRT minted due to rounding * fix: [oak-11] incorrect new_shares attribute emitted * fix: [oak-9] missing CwLockedPoolAddress address validation for Params * fix: [oak-8] updateParams allows governance to change any parameter without restrictions * chore: format proto * feat: whitelisted validators list upgradeable by admin * fix: [oak-7] arbitrary validator weights and units are configurable make it required to match 10000 cents. * fix: [oak-6] only one active validator is needed to allow liquid staking check for 33.33% quorum when considering active liquid validators map * fix: [oak-5] forcing users to stake liquid amount during MsgStakeToLP Adjust checks so msg.LiquidAmount can be left empty * fix: [oak-4] delegation failures cause fees to be repeatedly charged moved fee charging below delegation code, so it's calculated but not executed unless autocompounding is successful. * fix: [oak-3] undelegated funds will be distributed as auto-compounding fees auto-compounding fees only on withdrawn reward value, fix unit tests. * test: [oak-1] first depositor can initiate a share inflation having initial deposit on the protocol before launching it * [HEX-PRST-1] Division By Zero In Share Conversion Leads To Panic And Denial Of Service Prevent this by checking values and erroring out. Normally it must not be reachable, if division by zero occurs, DoS of the module is better than loss of funds. Added c_value event to better monitor the outcome of liquid staking and spot this kind of issues earlier. * [HEX-PRST-4] Unbonding Of Validators Does Not Give Priority To Inactive Validators Added liquid validators prioritisation based on inactive state, need to study gas implications and practicality of DivideByCurrentWeight on an inactive subset separately. * [HEX-PRST-3] Whitelisted Validators Cannot Be Inactivated The list of whitelisted validators is updated by an offchain process and always has active validators allowed to accept liquid stake, not supposed to be inactivated by 0 target weight. All target weights must be positive and add up to 10000. * feat: safety flag to pause the module Admin account can pause and unpause staking/unstaking/stake-to-lp functions of the module, as well as the logic in BeginBlocker. Allows to do emergency updates or fixes. * [HEX-PRST-4] fix slice sort for inactive validators
- Loading branch information
Max Kupriianov
authored
Feb 21, 2024
1 parent
0818a31
commit 0a0a033
Showing
25 changed files
with
1,895 additions
and
375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.