Skip to main content
A lending deposit should increase a recorded aggregate by the deposited amount. This example checks that local accounting relationship for each covered call.

Behavior

Despite its PositionSumAssertion name, the example does not sum user positions. It registers deposit(address,uint256) and requires the change in total supply at slot 0 across the matched call to equal the amount argument.

Configuration

Use this only when the amount and aggregate are in the same units and deposits increase that aggregate one-for-one. Replace the selector, argument decoding, and storage slot for your contract. Share-based accounting needs the expected share conversion instead of a raw asset amount.

Scenarios

Coverage limits

This does not establish backing, reconcile all positions, or cover withdrawals. For independent asset and liability totals, see accounting conservation. For vault custody, use the ERC-4626 components.

Source

The reviewed source is a teaching template. The example setup guide provides the pinned checkout and test procedure.