Explain a balance left on the sender after an OP Stack deposit

A native-ETH user deposit can mint funds to its L2 sender and spend a different amount on the target call. A reconciliation that credits everything directly to the destination misses the split.

Read mint and value separately

Decode the portal event into the deposited transaction and inspect its sender, mint, target and value. In this example, on successful execution with no other balance movements the sender receives three ETH and transfers two ETH to the destination.

mint  = 3 ETH
value = 2 ETH
sender balance before deposit = 0 ETH

The remaining one ETH belongs to the L2 sender. If the L1 caller was a contract, resolve the deposit’s actual L2 sender before looking up that residual balance. A contract deposit can use address aliasing.

Handle a reverted target call

The mint occurs before the execution snapshot used for the call, so a reverted call can leave the minted funds with the sender. Inspect the deposit receipt and L2 balances before describing the destination as credited. This example assumes a native-ETH OP chain. specs.optimism.io OP Stack specification