Planned module
Arb Recapture
When the pool's price drifts from other venues, the next swap that closes the gap pays part of that value back to the pool's LPs instead of all of it leaving with an outside bot. Design stage; not part of the first release.
Compose with Arb Recapture Planned · not in the on-chain v1
Callbacks
3
Swap gas
~190k
estimate
Touches
buy · sell · lp
Pools
--
see Pools page
How it behaves
- 1beforeSwap compares the pool price with a reference price and measures the gap the swap closes.
- 2A share of that gap is charged as extra fee and donated to in-range LPs after the swap.
- 3Needs a manipulation-resistant reference price; that is the open design question.
Parameters
| Parameter | Min | Default | Max | What it does |
|---|---|---|---|---|
| Recaptured share | 10 % | 50 % | 90 % | Share of the measured price gap returned to LPs. |
Bounds are enforced on chain by the registry, the launcher and the hook. Values are frozen when the pool is created.
Permission bits
13BI
12AI
11BA
10AA
9BR
8AR
7BS
6AS
5BD
4AD
3BSΔ
2ASΔ
1AAΔ
0ARΔ
BS beforeSwap · AS afterSwap · BSΔ beforeSwapReturnDelta
mask 0x00c8bits 000000110010003/14 on can change amounts
- beforeSwapSwapRuns before every swap, can override the LP fee. Fees can change per trade. Check the fee range.
- afterSwapSwapRuns after every swap with the final amounts. Reacts to trades: burns, pots, reward accounting.
- beforeSwapReturnDeltaDeltaLets beforeSwap take or give tokens itself. The hook can change what you pay in. Read every rule that uses it.