Implement release_stake and release_unbonded for delegations#138
Implement release_stake and release_unbonded for delegations#138ismellike wants to merge 10 commits into
Conversation
|
How can we handle rewards with delegator stake lazy calculation? There's going to be a state mismatch since we can't call update_stake for all users of a delegate that has released stake: https://github.com/Lay3rLabs/commitments/blob/297b7d0869fe4e9004ce22b4d875d98ec1bc703a/packages/apis/src/rewards/state.rs#L160-L167 |
This reverts commit 62aec9d.
TODO added for rewards accounting
We could iterate over the keys of |
No need to filter_map staker_info anymore
Need historical access to staker delegations for processing of all release_stake requests
I meant every delegator needs their stake updated through the rewards calculator, because points_correction will not reflect the actual state. We cannot do this though, because we have an unbounded # of delegators per delegate. |
Simplifies event releases to just use Vec<Coin>
|
We also can't immediately normalize outflows, because this is defined over all denoms. |
TODO: - more thorough tests - test for rewards implications - revise STAKER_INFO vs STAKED_AT
closes #61
WIP - thinking in code for #128