mirror of
https://github.com/logos-co/staking.git
synced 2025-01-11 03:06:24 +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 {
|
filtered {
|
||||||
m -> !requiresPreviousManager(m) && !requiresNextManager(m)
|
m -> !requiresPreviousManager(m) && !requiresNextManager(m)
|
||||||
}
|
}
|
||||||
|
{ preserved with (env e){
|
||||||
|
requireInvariant accountMPIsZeroIfBalanceIsZero(e.msg.sender);
|
||||||
|
requireInvariant accountBonusMPIsZeroIfBalanceIsZero(e.msg.sender);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
invariant sumOfEpochRewardsIsPendingRewards()
|
invariant sumOfEpochRewardsIsPendingRewards()
|
||||||
sumOfEpochRewards == to_mathint(currentContract.pendingReward)
|
sumOfEpochRewards == to_mathint(currentContract.pendingReward)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user