Dapp Use Cases
Sum of all positions
Assert that the sum of all positions is the same as the total supply reported by the protocol
Use Case
Check that the sum of all positions is the same as the total supply reported by the protocol. This is useful to make sure that there isn’t a way to manipulate the protocol by minting or burning positions without it being accounted for in the total supply.
Explanation
The sum of all positions is the total amount of assets that have been borrowed or supplied in a lending protocol.
Note
This assertion assumes a cheatcode that allows iteration over all non-zero entries in a mapping.