Integrating with Angstrom L2
The Angstrom L2 hook charges every interaction an MEV tax that is proportional to the transaction’s priority fee. Arbitrageurs, routers, and liquidity frontends all interact with the pool through the standard Uniswap v4 manager; the only additional requirement is accounting for the tax before final settlement.
Arbitrageurs
- Set a tax bid: Each swap must fund a tax equal to
priorityFee * SWAP_TAXED_GAS * SWAP_MEV_TAX_FACTOR. Choose your max priority fee so that this amount matches the value you are willing to rebate to the pool. - Quote-aware routing: Use
AngstromL2.getSwapTaxAmount(priorityFee)or replicate the formula off-chain when deciding whether an arbitrage is profitable. - Swap flow: Submit swaps exactly as you would against another v4 pool. The hook escrows the tax in
currency0duringbeforeSwapand settles it alongside the normal swap deltas inafterSwap.