Many orders in. One swap out.
The batch hook settles a pool in rounds. Orders join the open batch; when it closes, buys and sells meet at the pool's own price and only the residual reaches the curve, as a single swap. Run that settlement here on a live pool's numbers and see exactly what the ledger would record.
Cast an order
Pick a market and an amount.
Nothing is signed or sent. The batch is computed in your browser against the pool's live price and liquidity.
The open batch
| # | Side | Amount | ≈ tokens at spot |
|---|---|---|---|
| No orders yet. | |||
What the ledger would see
Cast orders on both sides and watch them net.
Settled here
| Time | Market | Orders | Matched | Residual | Swap events |
|---|
Residual is signed the way a v4 Swap event reports it: negative means that currency was paid into the pool. Residual output uses the pool's current in-range liquidity and LP fee (no tick crossing), which is exact for small residuals and an estimate for large ones. A batch whose two sides match to the wei never reaches the PoolManager at all. Once the hook is on chain, this page stops simulating and reads its events instead.