Skip to content

Commit

Permalink
chore(StakeManager.spec): fix spec to don't load totalMP greater than…
Browse files Browse the repository at this point in the history
… current sumOfMultipliers
  • Loading branch information
3esmit committed Sep 28, 2024
1 parent 41b4362 commit fefc4dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions certora/specs/StakeManager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ hook Sstore accounts[KEY address addr].totalMP uint256 newValue (uint256 oldValu
sumOfMultipliers = sumOfMultipliers - oldValue + newValue;
}

hook Sload uint256 newValue accounts[KEY address addr].totalMP {
require sumOfBalances >= to_mathint(newValue);
}

invariant sumOfBalancesIsTotalSupplyBalance()
sumOfBalances == to_mathint(totalSupplyBalance())
filtered {
Expand Down

0 comments on commit fefc4dc

Please sign in to comment.