Parallax
A cross-chain shield that raises a Uniswap v4 pool's fee the moment its price goes stale.
Overview
A reactive contract watches a reference pool on Base, and through a callback updates a Uniswap v4 hook on Unichain. Swaps that arbitrage toward the new price pay a decaying surge fee, so LPs keep value that would otherwise leak to arbitrageurs.
The problem
The same pair trades on many chains. When the price moves on one venue, a pool elsewhere keeps quoting the old price until an arbitrageur trades it back, and that profit comes straight out of LPs' pockets. The pool can't defend itself because it doesn't know the price elsewhere.
What I built
- A reactive Diamond on Reactive Lasna subscribed to Swap events on the Base Sepolia v4 PoolManager, with a 10-tick threshold
- A hook Diamond on Unichain Sepolia deployed with CREATE2 at a mined address carrying exactly the AFTER_INITIALIZE and BEFORE_SWAP permission bits
- A dynamic fee: base + gap × capture × 2^(−t / half-life), charged only on swaps that move toward the reference, capped and with a deadband
- A control pool with the shield switched off, so every result has an exact counterfactual
- A multipage monitor site with live telemetry, loop latency measurements and a page where anyone can fire a real price shock
Decisions
Decay the surge
Because the fee halves every 20 seconds, arbitrageurs effectively bid in a Dutch auction for the right to rebalance, and LPs capture most of the gap.
Measure, don't assume
The shield only works after the callback lands, so the end-to-end loop latency across three chains is measured and published.
More screens


Under the hood
How it flows
On-chain
| Base Sepolia | v4 PoolManager (reference)0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408 |
| Reactive Lasna | Reactive Diamond0x259195A8490e2738f50f48181e577C5Bb8B3E4cd |
| Unichain Sepolia | Hook Diamond0xa89cE82274b7Cdd6408478803Afc9A10FAff9080 |
| Unichain Sepolia | Callback proxy0x775c9B990ADe401060B78D0e98684eEf8d2466C1 |
