AngstromL2 on Base
Uniswap v4 Hook Contract 0x02c17501e53fbb7eb0e243c74afc6a9e01c265cf on Base · MEV protection · Verified contract
- Volume (24h)
- $8.13K
- Value locked (TVL)
- $6.09K
- All-time volume
- $152.42K
- Pools using this hook
- 1
- Swaps (24h)
- 750 (195 traders)
- Total swaps
- 12,722
What it does
AngstromL2 is an MEV-protection hook for ETH-quoted Uniswap v4 pools that charges a priority-fee-based tax on swaps and optionally on liquidity moves, then redistributes that tax to in-range LPs while taking protocol and creator fees.
How it works step by step
- Charges a swap MEV tax proportional to the priority fee above a floor, using swapMEVTaxFactor and a fixed 120000 gas constant.
- Requires pools to use ETH as currency0 and a static fee, rejecting dynamic-fee pools.
- Takes a configurable protocol and creator swap fee from the unspecified currency on each swap.
- Distributes the LP share of swap tax to in-range liquidity via reward growth accounting paid as ERC-6909 claims.
- Optionally applies a JIT tax on liquidity adds and removes when jitTaxEnabled is set.
- Can enter withdraw-only mode via the factory, blocking swaps and adds while keeping removals open.
- Swap behaviour
- beforeSwap charges a priority-fee MEV tax above a floor and takes the exact-in swap fee; afterSwap collects exact-out fees, updates reward growth across crossed ticks, and distributes the tax to LPs as native-currency reward claims.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity update per-position reward growth checkpoints; the JIT tax (if enabled) is taken from ETH via return delta on add and remove; accrued LP rewards are paid out as ERC-6909 burns on removal.
- Fee behaviour
- Charges a priority-fee-based MEV tax on swaps (swapMEVTaxFactor * 120000 * (priorityFee - floor)) taken as a before-swap delta, optionally on liquidity adds and removes when JIT tax is enabled, plus a configurable swap fee (creator plus protocol share, max 20% creator swap fee) taken from the unspecified currency; the tax share is split between LPs, creator and protocol, with LP tax minted as ERC-6909 native-currency claims that are distributed to in-range LPs as rewards.
- Owner & admin controls
- Owner (Solady Ownable, two-step handover) can withdraw accrued creator revenue via withdrawCreatorRevenue and transfer or renounce ownership; the factory (FACTORY) alone can set swapMEVTaxFactor (capped at 9999), priorityFeeTaxFloor (capped at 100 gwei), jitTaxEnabled, and the protocol swap and tax fee splits per pool; the contract is not upgradeable.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize restricts pools to native-ETH currency0 with static fees and reverts other initialization; afterAddLiquidity and afterRemoveLiquidity (with return deltas) apply the optional JIT MEV tax and settle reward claims; beforeSwap (with return delta) charges the priority-fee MEV tax and the swap fee for exact-in; afterSwap (with return delta) collects the protocol and creator fees for exact-out, updates reward tick growth, and distributes swap tax to in-range LPs via ERC-6909 mint.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The factory can change MEV tax parameters and fee splits for all pools at any time; the factory can also activate withdraw-only mode which blocks adds and swaps but still allows removals. The owner controls creator revenue withdrawal and ownership. Taxes are capped (creator swap fee at 20 percent, creator tax at 50 percent, total fees under 100 percent), so the factory cannot take more than the caps allow, but it can raise the MEV tax factor up to 9999 times the base amount, making swaps above the floor very expensive.
Risk to user funds: The hook can take ETH and pool currency through beforeSwap and afterSwap return deltas and mint ERC-6909 claims to itself; users pay the MEV tax and swap fee, and LPs receive reward claims, so funds flow through the hook. The factory can block swaps and adds through withdraw-only mode, and can raise the MEV tax, but the hook cannot seize existing LP principal.
Security findings
- [medium] Adjustable MEV tax by factory: Factory can set swapMEVTaxFactor up to 9999 and priorityFeeTaxFloor up to 100 gwei, so swap and liquidity costs can be raised sharply above the floor with no pool-level cap besides the factor max.
- [medium] Swaps and adds can be halted: Withdraw-only mode, toggled via the factory, makes beforeSwap and afterAddLiquidity revert with WithdrawOnlyMode, so swaps and new liquidity can be blocked for all pools while removals continue.
- [info] Hook holds and redistributes funds via return deltas: Hook takes ERC-6909 claims on native ETH through return deltas and mints LP reward claims (UNI_V4.mint), so it holds pool-side claim balances and pays out LP rewards on removal; the reward distribution depends on tick growth accounting.
- [low] Owner can withdraw creator revenue: Owner can withdraw accrued creator revenue to any address with withdrawCreatorRevenue; ownership is Solady Ownable with a two-step handover.
- [info] Non-upgradeable: Contract is not behind a proxy; no upgrade path was found in the verified source.
Contract details
- Verified source
- Yes (AngstromL2)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 23,235 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, mev-protection, moves-currency, ownable, return-delta, rewards, tax
Pools using AngstromL2
- ETH / USDC (0.016% fee) — 24h volume $8.13K, TVL $6.09K, 750 swaps today