This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
v1.0.0-rc2
Pre-release
Pre-release
Bug fixes
- Fix a bug in
register_received_coins
where if there are multiple coin-receiving events, only the first one is parsed.
Improvements
- Optimize the gas cost for staking and harvesting: Instead of delegating the deposited Luna evenly to all validators, now only delegate to the validator with the smallest amount of delegation from Steak Hub. Gas cost for mainnet (15 whitelisted validators) is reduced from ~$2 to $0.6.
- To account for possible imbalance cause by the previous change, introduce a new execute command
rebalance
which performs a number of redelegations to achieve balance across validators. - Refactor types in
hub/src/types.rs
and helper functions inhub/src/math.rs
. Previously, theDelegation
type can mean either delegation, undelegation, or redelegation, which could be confusing. Also,compute_delegations
is in fact used in the calculation of redelegations instead of delegations. In this update,Delegation
are split into 3 types,{D,Und,Red}elegation
, and helper functions are renamed to accurately reflect their roles in the contract.