Continuing the discussion from MIP-4: Reserve Balance Introspection:
I’ve been working with the Cortex Open Source Working Group’s MIPs subgroup on a reusable MIP-4 guard for smart accounts and application contracts. While implementing the guard, I found a case where dippedIntoReserve() does not provide enough information to judge one operation safely.
The precompile returns one Boolean for the whole transaction. When an operation starts with false, the result is clear:
false -> false: the operation did not introduce a violation
false -> true: the operation introduced a violation
The problem starts when an operation begins with true.
Account A dips below reserve -> true
Account B performs an innocent call -> true
The result is also true -> true when Account B adds another violation:
Account A dips below reserve -> true
Account B also dips below reserve -> true
A contract can see the same result in both cases, but it cannot tell whether B was innocent or added a second violating account. The c++ client and monad-revm maintain the violating addresses internally. The 0x1001 precompile only exposes whether that set is empty.
For EntryPoint or smart-account integrations that execute several operations in one transaction, what behavior does Category Labs recommend when an operation begins with dippedIntoReserve() == true?
Should the integration reject the operation because it can no longer attribute the violation? Or is there an isolation pattern that Category Labs expects these integrations to follow?
I documented the two-account case here: Test multi-account reserve dips when the transaction is already in violation · Issue #21 · Cortex-XYZ/monad-mip-lab · GitHub