MEV protection hook on Base
Uniswap v4 Hook Contract 0x1e549354366c480cc298919e014fb95ec0a370c0 on Base · MEV protection
- Volume (24h)
- $434
- Value locked (TVL)
- $1.38K
- All-time volume
- $7.69K
- Pools using this hook
- 2
- Swaps (24h)
- 108 (27 traders)
- Total swaps
- 1,636
What it does
A dynamic-fee hook with MEV-related arbitrage and profit distribution logic that sets swap fees per tick and routes profit to a configurable distributor, deployed behind an upgradeable proxy.
How it works step by step
- beforeSwap looks up a dynamic fee by tick, falling back to a default fee
- afterSwap performs post-swap accounting and profit handling
- runArbitrage executes arbitrage through a configured MEV router and executor
- distributeProfit and donate send value to a profit distributor and back into the pool
- owner-set LP tax wallet and profit distributor receive a share of flows
- owner can tune gas limits and fee parameters
- Swap behaviour
- beforeSwap returns or looks up a per-tick dynamic fee, and afterSwap runs accounting that may trigger arbitrage execution, donations and profit distribution.
- Liquidity behaviour
- No liquidity callbacks enabled in the hook permissions (beforeAddLiquidity and beforeRemoveLiquidity selectors exist but are not among the enabled permission flags).
- Fee behaviour
- Fee is looked up per tick via getFee(int24) using a per-tick mapping, falling back to a stored default fee (defaultFee, settable by the owner). The hook returns a dynamic fee from beforeSwap, so the effective swap fee can differ from the pool's static fee; the exact fee formula cannot be confirmed from the decoded bytecode.
- Owner & admin controls
- Owner (two-step ownership via transferOwnership/acceptOwnership, renounceOwnership) can set the default fee (setDefaultFee), the MEV executor address (setMevxExecutor), the MEV router (setMevxRouter), the profit distributor (setProfitDistributor), the min gas left and call gas budget (setMinGasLeft, setCallGasBudget), the LP tax wallet (updateLpTaxWallet), and per-tick fee overrides (c2b7698c). The proxy implementation is upgradeable and controlled by whoever holds the implementation-upgrade authority, which is not visible from the decoded input.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeSwap, afterSwap
beforeInitialize and afterInitialize are used to register pool keys and initial state; beforeSwap sets or returns the dynamic fee for swaps; afterSwap performs post-swap accounting, including profit and LP tax handling and calls to donate/distributeProfit.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can change the default fee, per-tick fees, the MEV executor and router, and the profit distributor, and can potentially redirect value flows. Upgradeability means the implementation logic can be replaced, so users are trusting the upgrade key holder.
Risk to user funds: The hook takes part in swap accounting and can donate, transfer tokens and distribute profit through external contracts that the owner can reconfigure, so pool and swap-related funds may be routed or affected by owner-driven parameter and address changes. Exact exposure cannot be confirmed without source.
Security findings
- [high] Upgradeable proxy: Hook is a proxy to implementation 0x4a5bf61b03bd31dca9720d6509379b52107bcf55 that can be changed, so the code users interact with is not fixed.
- [medium] Owner-controlled fees: Owner can set the default fee and per-tick fees, and an arbitrary fee could be set via setDefaultFee or tick mapping, affecting swap prices for traders.
- [medium] Hook moves funds via external contracts: The hook calls donate and distributeProfit and transfers tokens (transfer/balanceOf selectors present), so it can move pool and hook-held funds through an external profit distributor or MEV executor the owner can reassign.
- [medium] Reassignable profit and executor addresses: Owner can swap the MEV executor, router and profit distributor, which directs where arbitrage profit and tax flows go.
- [info] Unverified source: Source is not verified, so behaviour is inferred from selectors and storage only; exact logic and any hidden restrictions are unknown.
Contract details
- Verified source
- No
- Bytecode size
- 2,739 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- donates, dynamic-fee, erc20, mev-protection, ownable, tax, upgradeable
Pools using MEV protection hook
- ETH / VVV (Dynamic fee) — 24h volume $226, TVL $689, 56 swaps today
- ETH / VVV (Dynamic fee) — 24h volume $208, TVL $689, 52 swaps today