Batches · chain 4663

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.

Simulated · hook not deployed yet
—market
—pool price now, read from slot0
0orders in the open batch
—in-range depth

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

#SideAmount≈ tokens at spot
No orders yet.

What the ledger would see

Cast orders on both sides and watch them net.

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.