mirror of
https://github.com/logos-co/staking.git
synced 2025-01-23 17:11:14 +00:00
fix(specs): make sumOfMultiplierPointsIsMultiplierpoints
work again
This invariant failed as the prover started making wrong assumptions about the relationship between anyone's account's `totalMP` and its `balance`, as well as an account's `bonusMP` and its `balance`. This commit fixes it by adding the necessary invariants to proof the property.
This commit is contained in:
parent
fc3578ee48
commit
c0bf36d14b
@ -75,6 +75,11 @@ invariant sumOfMultipliersIsMultiplierSupply()
|
||||
filtered {
|
||||
m -> !requiresPreviousManager(m) && !requiresNextManager(m)
|
||||
}
|
||||
{ preserved with (env e){
|
||||
requireInvariant accountMPIsZeroIfBalanceIsZero(e.msg.sender);
|
||||
requireInvariant accountBonusMPIsZeroIfBalanceIsZero(e.msg.sender);
|
||||
}
|
||||
}
|
||||
|
||||
invariant sumOfEpochRewardsIsPendingRewards()
|
||||
sumOfEpochRewards == to_mathint(currentContract.pendingReward)
|
||||
|
Loading…
x
Reference in New Issue
Block a user