-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When calculating the staking rewards, we use the rounded stake. While there is no nomination, that should be fine since stake will always be an integer. However, with nomination enabled, slashing can result in non-integer stakes. See:
interbtc/crates/staking/src/lib.rs
Lines 582 to 584 in 820a01f
| let stake = | |
| SignedFixedPoint::<T>::checked_from_integer(Self::compute_stake_at_index(nonce, vault_id, nominator_id)?) | |
| .ok_or(Error::<T>::TryIntoIntError)?; |
I have a fix for this in a wip branch but it needs cleanup. Since there is a known bug in staking anyway that blocks nomination from being enabled, this fix has low prio.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done ✅