Skip to content
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
Compare
Choose a tag to compare
@larry0x larry0x released this 01 May 18:22
· 19 commits to main since this release
a89cde7

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 in hub/src/math.rs. Previously, the Delegation 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.