Hook · IV. SUBA
SUBA.
Sealed-biduniform-pricebatchauctionoverNblocks.
Swaps buffered into epochs and settled at a single uniform clearing price.
Type
Execution
Status
—
Version
v1.0.0
Pools
0
Mechanics
How it works.
- 01
All swaps during an epoch are intercepted at beforeSwap and held as ERC-6909 claims against the manager.
- 02
At epoch end, the designated keeper calls settleEpoch() supplying a uniform clearing price.
- 03
Every order in the epoch executes at the same price — no front-running, no positional MEV.
- 04
Users may withdraw unbuffered positions if an epoch expires without a settlement transaction.
Integration
Code sample.
// Swaps are automatically batched — no special params needed
// Keeper settles each epoch at the end of the window:
subaHook.settleEpoch(
poolKey,
clearingSqrtPrice, // uniform clearing price for this batch
epochId
);