Repository navigation
v1.1.0
Backrun premium on pool fills. After a pool fill moves the price, a later pool fill within 2 blocks that moves it back pays half the price gap it closes, from its output (capped at half). Half is donated to in-range LPs, half goes to the FeeVault. The premium is averaged over each fill's start and end ticks, so splitting a backrun doesn't lower it.
In the test scenario the backrunner now keeps 1.34 USDC of the gap instead of 3.39, and LPs plus the FeeVault capture 2.65.
Integration notes
- New linked library
BackrunPremium; deployments must link it, likeAsyncMatching. - The public
asyncOrdersgetter returns 5 fields (addsrefTick,refBlock). - The premium is taken in the fill's output currency.
888 Foundry tests pass. The Lean proofs don't cover this release yet.
Full change: #47
Superseded by v1.1.1: this version can't be deployed with
script/deploy.sh(the new library isn't linked), andBackrunPremiumwas renamedDynamicFeeOrdering. Deploy v1.1.1.