VerifiedPoolsBasicHook on Base
Uniswap v4 Hook Contract 0x5cd525c621afca515bf58631d4733fba7b72aae4 on Base · Access control · Verified contract
- Volume (24h)
- $13.33K
- Value locked (TVL)
- $941.22K
- All-time volume
- $23.31M
- Pools using this hook
- 5
- Swaps (24h)
- 182 (5 traders)
- Total swaps
- 152,118
What it does
A permissioned Uniswap v4 hook that gates pool initialization, swaps, liquidity changes and donations to allowlisted routers and KYC-style policy checks, and can take a capped hook fee on swaps.
How it works step by step
- Restricts pool initialization to allowlisted initializer addresses
- Requires trusted position managers for adding and removing liquidity
- Requires trusted swap routers or quoters for swaps
- Verifies the end user against a configurable per-pool policy contract on each action
- Takes an optional hook fee of up to 1% on swaps via afterSwapReturnDelta, minted as ERC-6909 claims
- Allows the donate router only to donate, subject to the same policy checks
- Swap behaviour
- beforeSwap requires the caller to be an allowlisted swap router or quoter (quoters skip policy checks), then verifies the original user against the pool's policy; afterSwap optionally takes a fee of up to 1% of the unspecified-side amount if enabled, minting it as claims to the hook.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity only proceed if the sender is an allowed position manager (ALLOWED for add, non-FORBIDDEN for remove) and the original user passes the configured policy contract; the hook does not hold or move liquidity itself.
- Fee behaviour
- After swaps, if hook fees are enabled for the pool, a fee of up to 1% (HOOK_FEE_CAP=100 bips) of the unspecified-side amount is minted to the hook as ERC-6909 claims via afterSwap return delta; the fee is later withdrawable by the fee manager. Otherwise the pool's static fee applies.
- Owner & admin controls
- Three roles: DEFAULT_ADMIN_ROLE can grant/revoke roles, allow or remove initializers, set beforeAdd/Remove/Swap/Donate policy contracts per pool, set quoters, the donate router, position managers and swap routers. FEE_MANAGER_ROLE can set per-pool hook fees (capped at 100 bips, i.e. 1%), toggle them, and withdraw accrued fees. PAUSER_ROLE can pause and unpause all hook entry points. No upgradeability proxy is indicated; the hook itself is not upgradeable.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterSwapReturnDelta
beforeInitialize: restricts pool initialization to allowlisted initializer addresses. beforeAddLiquidity: restricts liquidity additions to trusted position managers and checks the user against a policy. beforeRemoveLiquidity: allows removals from non-forbidden position managers and checks the user against a policy. beforeSwap: restricts swaps to trusted swap routers or quoters and checks the user against a policy. afterSwap: takes a hook fee via afterSwapReturnDelta and mints it as claims to the hook. beforeDonate: restricts donations to the designated donate router and checks the user against a policy.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: A fee manager can set the hook fee up to 1% on enabled pools and withdraw all accrued hook fee balances to any recipient. An admin can swap in arbitrary policy contracts, add or remove routers, position managers and initializers, which can allow or block users from swapping and providing liquidity. A pauser can halt swaps, liquidity operations, donations and pool initialization for the whole hook at once. Since policy and router sets are admin-controlled, KYC-style gating can be changed at will.
Risk to user funds: The hook does not custody pool liquidity, but it does receive hook fees as ERC-6909 claims (up to 1% of swap output on enabled pools), which the fee manager can withdraw. It can also block swaps, liquidity changes and donations via policies, routers allowlists and pause, so users cannot be guaranteed access.
Security findings
- [medium] Replaceable policy contracts control access: Admin can set beforeSwap, beforeAddLiquidity, beforeRemoveLiquidity and beforeDonate policies to arbitrary contracts, so a malicious or misconfigured policy can block all users (verify always false) or allow all users.
- [medium] Pausable hook can freeze pool activity: PAUSER_ROLE can pause the hook, which makes beforeSwap, liquidity, donate and initialize callbacks revert, freezing trading and liquidity for pools using it, though unpause and withdrawal of fees by the fee manager are gated separately.
- [low] Quoter allowlist bypasses policy checks: Swaps are gated to allowlisted routers and quoters; quoter bypass skips policy checks entirely, so the quoter list must only contain contracts that always revert on quote paths.
- [info] Hook takes a fee via return delta: afterSwap uses afterSwapReturnDelta to take up to 1% of the unspecified swap amount for the hook, so traders pay the hook fee on top of the pool fee when the fee manager enables it.
- [info] Fee manager can withdraw collected fees: The fee manager can withdraw all accumulated hook fee claims for any currency to any recipient address.
Contract details
- Verified source
- Yes (VerifiedPoolsBasicHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 12,265 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, pausable, return-delta, self-unlock
Pools using VerifiedPoolsBasicHook
- USDC / cbBTC (0.30% fee) — 24h volume $7.12K, TVL $643.47K, 85 swaps today
- ETH / USDC (0.15% fee) — 24h volume $2.54K, TVL $58.94K, 51 swaps today
- EURC / USDC (0.02% fee) — 24h volume $2.03K, TVL $74.11K, 22 swaps today
- ETH / cbBTC (0.30% fee) — 24h volume $1.63K, TVL $127.21K, 24 swaps today
- ETH / cbETH (0.05% fee) — 24h volume $0, TVL $37.48K, 0 swaps today