AngstromL2 on Base
Uniswap v4 Hook Contract 0x7fa49d29481b6d168505ccde26635e204c09e5cf on Base · Utility · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $2.48
- All-time volume
- $670.90K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 44,824
What it does
A Uniswap v4 hook for native-ETH pools that charges a priority-fee-based MEV tax on swaps and liquidity changes, plus a creator and protocol swap fee, and redistributes the MEV tax as ERC-6909 rewards to in-range liquidity providers.
How it works step by step
- Forces pools to use native ETH as currency0 and a static fee via beforeInitialize and initializeNewPool checks
- Charges a swap MEV tax equal to swapMEVTaxFactor times 120000 times priority fee above a floor, using beforeSwap return deltas
- Splits the swap MEV tax between LP compensation, creator and protocol shares, minting ERC-6909 native claims for LP compensation
- Distributes LP compensation across ticks via reward growth accounting so LPs that were in range during the swap earn rewards
- Takes creator and protocol swap fees in the unspecified currency on each swap
- Optionally charges a JIT MEV tax on liquidity additions and removals and burns owed reward claims on removal
- Swap behaviour
- beforeSwap computes the priority-fee MEV tax and the exact-in swap fee and returns them as a delta; afterSwap collects creator and protocol fees, computes the LP compensation from the tick path, and distributes it as reward growth to ticks.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity update per-position reward growth accounting, optionally charge a JIT MEV tax to the factory via return deltas, and on removal burn ERC-6909 reward claims owed in native currency to the position owner.
- Fee behaviour
- Each pool has a creator and protocol swap fee (creator capped at 20% of swap input, combined fee at most 100%) taken in the unspecified currency on swaps, plus a native-currency MEV tax on swaps equal to swapMEVTaxFactor * 120000 * (priorityFee - priorityFeeTaxFloor) for priority fees above the floor. The tax is split between LP compensation, creator tax share (max 50%) and protocol tax share. An optional JIT tax is charged on liquidity add/remove when enabled. Pools are required to use a static fee.
- Owner & admin controls
- Owner (Solady Ownable with two-step handover) can withdraw accrued creator revenue via withdrawCreatorRevenue, and transfer or renounce ownership. The FACTORY contract (msg.sender at deployment) can set swapMEVTaxFactor (capped at 9999), priorityFeeTaxFloor (capped at 100 gwei), jitTaxEnabled, per-pool protocol swap and tax fees, and initialize pools; the owner can also initialize pools. Withdraw-only mode is read from the factory.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize reverts to force native-ETH currency0 pools. afterAddLiquidity and afterRemoveLiquidity (with return deltas) charge the JIT MEV tax and track LP reward growth. beforeSwap (with return delta) charges the priority-fee MEV tax and computes the exact-in swap fee. afterSwap (with return delta) collects the protocol and creator swap fees, mints ERC-6909 native claims for LP compensation and distributes it across ticks as reward growth.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The factory and owner hold parameter control: they can raise the MEV tax factor up to 9999x, raise the priority-fee floor, and set protocol/tax fee splits (bounded by the 100% total checks). The owner can withdraw accrued creator revenue to any address. Pools can be initialized by the owner or factory, so a privileged key can effectively extract creator-side revenue and reconfigure tax levels for future swaps.
Risk to user funds: The hook can take fees and MEV tax in the swap currency and native ETH from swaps and liquidity modifications, and mint ERC-6909 native claims for LPs. Withdraw-only mode can block swaps and liquidity additions. Users' funds are not stored by the hook beyond accrued fee and reward balances, which the owner can withdraw.
Security findings
- [medium] Admin-adjustable MEV tax applied to all swaps: swapMEVTaxFactor, priorityFeeTaxFloor and jitTaxEnabled are set by the factory with caps (9999 and 100 gwei) but no timelock is visible in this contract; a sudden increase raises the tax on every swap and liquidity change.
- [low] Protocol and tax fee shares are mutable: Creator and protocol swap fees are taken from the pool's swap flow via return deltas; the protocol fee and tax fee are set by the factory and can be changed at any time within the 100% total cap.
- [medium] Owner can withdraw creator revenue: withdrawCreatorRevenue lets the owner transfer any currency the contract holds to any address; the contract holds ERC-6909 native claims and creator revenue balances.
- [info] Return deltas let the hook take value from swaps and liquidity changes: The hook has the beforeSwapReturnDelta and afterSwapReturnDelta permissions and takes tokens from the PoolManager via take and mint, so it can extract fee and tax amounts from every swap and liquidity change.
- [low] Factory withdraw-only mode can block swaps and adds: pullWithdrawOnly reads a withdrawOnly flag from the factory; when set, swaps and liquidity additions revert with WithdrawOnlyMode, which can halt trading for the pool.
Contract details
- Verified source
- Yes (AngstromL2)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 23,240 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, mev-protection, moves-currency, ownable, return-delta, rewards, tax
Pools using AngstromL2
- ETH / cbBTC (0.016% fee) — 24h volume $0, TVL $2.48, 0 swaps today