
A Uniswap v4 hook that gives a pool a posterior.
A weather vane cannot see the wind. It reveals the wind by turning.
A pool cannot see information. VANE makes it reveal information by turning — inferring the informed signal from the deflection of its own order flow, and correcting its quote accordingly. No oracle, no auction, no operator, and no off-chain co-processor.
The problem
The pool under-reacts, and gets worse as it deepens
Every automated market maker does two jobs with one mechanism. Settlement — who gets what, at what ratio — which the curve does well. And price discovery — updating beliefs when a trade carries information — which the curve does by accident, and always by too little.
When a trader buys because they know something, a human market maker moves their quote past where the trade landed, because the trade was evidence. An AMM moves exactly the trade distance along its curve and stops. The difference is money left on the table, and an arbitrageur collects it a block later.
Price impact for a concentrated-liquidity position is λ_amm = 2/D where D = L·√P. The informationally efficient impact from Kyle (1985) is λ* = σ/(2U). Setting them equal gives an optimal depth:
Loss-versus-rebalancing scales with the liquidity sitting in the pool. So the incentive to attract capital runs directly against price-discovery quality. That follows from multiplying two published results that have coexisted for years.
The mechanism
Settlement stays on the curve. Discovery moves to a belief.
dδ = κ·dq − θ·δ·dt
κ = λ* − λ_amm = σ/(2U) − 2/DNote that κ grows with depth. The correction scales with the disease, which is the property you want and almost never get.
Oracle-free
Every other mitigation needs an exogenous price — a feed, an auction, a validator set. VANE derives the correction from order flow, because that is what Kyle’s model is: extracting the informed signal from aggregate flow when the true value is unobservable.
Signed, not a fee
When the belief is positive a buyer pays slightly more and a seller receives slightly more. Both sides trade at a shifted price. A fee is unsigned and takes from everyone; this is a quote that moves in a direction.
Self-limiting
Flow against the belief is paid out, but that same flow drives the belief toward zero, so the exposure extinguishes itself. A round trip through the belief loses money for the trader.
Live state
Read from the deployed contract
The hook is deployed on Ethereum Sepolia. These are the addresses; the estimator values are deliberately not rendered here yet, because a figure on this page should come from a live read rather than a build-time snapshot.
Estimation
Three routes, one of which is a control loop
Ticks are already log prices
A tick is defined by P = 1.0001^tick, so a difference of ticks is a log return scaled by a constant. Every variance estimate is integer arithmetic on int24 values — no logarithm, no exponential, no precision loss. The constant enters exactly once, at the end.
Route A — Kyle’s variance identity
In equilibrium, informed and noise flow contribute exactly equally to order-flow variance, so the noise scale is the root of half the observed variance, taken from flow the pool already sees.
Volatility from the horizon, never per block
A pool that under-reacts shows a small short-horizon volatility; arbitrage reveals the fundamental only over several blocks. Deriving it per block understates the volatility, shrinks the gain toward zero, and fails silently in the direction of doing nothing — the most likely way for this design to look like it works while doing nothing.
Route B — autocovariance cross-check
The serial correlation of informed flow is identified from the ratio of lag-two to lag-one autocovariance rather than supplied as a parameter. Route A is exact only at an informed share of one half; Route B holds more generally, so their divergence measures how far the pool sits from the model Route A relies on.
Route C — variance-ratio control
Under efficient pricing, variance scales linearly with horizon. The pool measures whether its own price is a martingale and tunes its own gain until it is. This is model-free: it needs only the definition of an efficient price.
Status
Where the work stands
The signed offset and its v4 accounting, both variance estimators, depth and open-loop gain, the leaky controller, the divergence check, the reserve and its graceful degradation, and a validated deploy path are implemented and tested — including seven stateful invariants over roughly fifty thousand randomised calls.
This is research code. The replay simulator does not exist yet, so the decay rate and horizon are documented placeholders rather than calibrated values, and the self-funding claim is unproven on real flow. The worst-case gas path is over its own budget. Nothing here has been audited by a third party.
Audit
Incident register
Every finding below was reproduced with a failing test first, then fixed, then kept as a regression. The open rows are listed with the same weight as the closed ones.
| Finding | Severity | State |
|---|---|---|
| Entire reserve stealable in one transaction. The offset was sized from the requested amount, which a price limit decouples from what actually executes. | Critical | Fixed |
| Large honest swaps bricked the swap path. Scaling the belief by reserve over target cannot bound the payout, because the reserve level cancels algebraically. | Critical | Fixed |
| The belief could never form. One extra division by the fixed-point scale truncated every update to zero, so the mechanism was inert at any parameter setting. | Critical | Fixed |
| Gain inflatable 2.16 times by liquidity added and removed inside one block. | High | Fixed |
| Reserves had no withdrawal path and were permanently stranded, including on discovering a bug. | High | Fixed |
| The second-estimator guard failed open under alternating flow, which is exactly the wash trader it exists to catch. | Medium | Fixed |
| Worst-case gas is 74,369 against a 45,000 budget. | — | Open |
| Parameters are documented placeholders pending the replay simulator. | — | Open |
The third row is the instructive one. Two audit passes measured the symptom — the belief never moved, and the tests had to set the gain by hand — and both concluded the parameters needed re-deriving. It was not the parameters. No parameter choice could have fixed it, because the extra division discards the result’s entire scale regardless of magnitude.
Prior art
What this does not claim
ZeroSwap and Adaptive Curves share the oracle-free goal and the motivation, and Adaptive Curves has a v4 hook. So VANE claims neither “first oracle-free adaptive AMM” nor “first adaptive v4 hook”. Both are built on Glosten-Milgrom; Kyle appears in each only as a bibliography entry, and neither derives an optimal depth or matches price impact. Adaptive Curves reshapes the bonding curve and depends on an off-chain machine-learning co-processor.
What it does claim is narrower:
- Matching Kyle’s impact coefficient by closing the gap between pool depth and
D* = 4U/σ - Settling through a signed offset that moves buyers and sellers in opposite directions, rather than reshaping the curve
- Computed entirely on chain, with no oracle and no co-processor