Likely access control hook on Ethereum
Uniswap v4 Hook Contract 0x2d8add4703bf16739bd65971e9d0bc7174968ac0 on Ethereum · Access control
- Volume (24h)
- $18.02K
- Value locked (TVL)
- $4.36K
- All-time volume
- $18.02K
- Pools using this hook
- 1
- Swaps (24h)
- 84 (45 traders)
- Total swaps
- 84
What it does
An anti-bot launch guard that keeps swaps closed until the owner opens trading and blocks owner-flagged bot addresses, while charging no extra fees beyond the pool's static fee.
This read was written for the hook 0xc56a…4ac0 on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Blocks swaps until the owner calls an open-trading function, then lets trading proceed.
- Lets the owner flag addresses as bots, and flagged addresses appear to be blocked from swapping.
- Reads a gas limit value set by the owner during swaps, likely an anti-bot gas-price or gas cap check (exact rule unverified).
- Tracks liquidity positions added through a trusted position manager and checks who owns a position when liquidity is removed.
- Takes no fees and cannot deduct tokens from swaps or LP positions.
- Swap behaviour
- Before each swap the hook checks that trading is open, that the trader is not on the bot list, and likely applies an owner-set gas limit check; failing swaps revert. No tokens are taken from swaps.
- Liquidity behaviour
- Adding liquidity is checked and recorded, apparently requiring positions to come through a trusted position manager. On withdrawal the hook runs a view-only check that can revert, for example on positions it considers invalid, so withdrawals are not guaranteed to be unrestricted.
- Fee behaviour
- Uses the pool's static fee; the hook charges no extra fee.
- Owner & admin controls
- The owner can open trading (one-way), set the gas limit value, add or remove addresses from the bot list, and transfer or renounce ownership. No fee controls exist.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap
beforeAddLiquidity: validates and records new positions; beforeRemoveLiquidity: checks position ownership/recipient before withdrawals and can revert; beforeSwap: enforces trading-open, bot list and gas limit checks; afterSwap: post-swap bookkeeping with no token deduction.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner controls the bot list, the gas limit setting and the trading-open switch. The worst they can do is block specific traders from swapping or keep trading closed.
Risk to user funds: The hook cannot take or move any user or LP tokens and charges 0% extra fees. LP withdrawals pass through a view-only check that can revert for positions it does not accept, which cannot be fully verified from bytecode.
Security findings
- [medium] Owner can block traders: The owner can flag any address as a bot, and swaps from flagged addresses appear to revert. The owner also controls when trading opens.
- [medium] Withdrawal check can revert: beforeRemoveLiquidity runs on every withdrawal and reads tracked positions and owner state; it can revert on positions failing its checks. The exact conditions are unverified, but it has no pause switch writing state.
- [info] No fees or return deltas: Return-delta permissions are disabled, so the hook cannot take tokens from swaps or LP positions.
Contract details
- Verified source
- No
- Bytecode size
- 7,388 bytes
- Upgradeable proxy
- No
- Detected patterns
- ownable
Pools using Likely access control hook
- ETH / WASTE (0.0075% fee) — 24h volume $18.02K, TVL $4.36K, 84 swaps today