Uniswap v4 hook
UHI10HK-UHI10-1087live on unichain sepoliaOne pair.Several pools.One price boundary.
KNOT gives every participating pool a second price boundary: its own curve and a virtual curve built from the federation’s aggregate reserves. A trade may never take the better of both quotes.
What does the hook actually do?
Every swap is quoted twice. The taker gets the worse one.
Shallow pool
bound binds- local quote
- 18.993189
- aggregate quote
- 6.315922
- enforced
- 6.315922
- withheld → LPs
- 12.677266
Deep pool
bound inert- local quote
- 4.960273
- aggregate quote
- 6.315922
- enforced
- 4.960273
- withheld → LPs
- 0
Same trade size and manifest seed, reproduced by the contract tests. In this skewed fixture the aggregate quote binds; in the proportional control the local quote remains untouched.
boundary in 4× fixture
0bps
coalition weakening
0bps
passing Foundry cases
0
source line coverage
0.00%
How it works
Arithmetic, not a prediction.
No model to be wrong, no oracle to read, no classifier deciding who looks like an attacker. Both reserve states are read before the trade settles, and the taker is held to whichever is less favourable.
output = min(local, aggregate)input = max(local, aggregate)The problem
Why one pair can quote two realities
Pools price in isolation
The same token pair can sit behind different depths and reserve ratios.
One quote can be generous
A local curve may offer the taker more than the combined reserve curve would.
KNOT sets a ceiling
The hook compares both references and enforces the less favourable quote.
Contracts
view all →Stack
Try it
Connect a wallet and watch the bound bind.
Quotes are read from preview() on the deployed federation, the same call a swap executes against.
unaudited · testnet only