FoundationHookV2 on Ethereum
Uniswap v4 Hook Contract 0x1acfd0dca570653d0928a34d8f1a70c42e5660cc on Ethereum · Custom pricing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $5.90K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 36
What it does
Every swap through this pool pays a fixed 0.30% platform fee plus a direction-specific creator fee (buys pay creatorBuyFeeBps, sells pay creatorSellFeeBps), taken in the quote token, with the pool's own LP fee set to zero.
How it works step by step
- Charges a fixed platform fee of 0.30% (30 bps) on every swap, denominated in the quote token, and a separate per-direction creator fee set immutably at deployment (creatorBuyFeeBps and creatorSellFeeBps, capped at 10%).
- Takes the fee through beforeSwap return delta on the unspecified/quote side, so the pool's LP fee is 0 and all trading cost comes from this hook.
- Mints the collected fee as ERC6909 claims in the pool manager to a fee ledger contract, which tracks platform and creator balances separately and pays them out through unlock/burn/take.
- Carries rounding remainders per direction in feeCarry so fractional fee dust accumulates instead of being lost.
- Dispatches to optional, reviewed modules bound at construction (before/after swap observers and a gated action hook), with a span guard covering both Core callbacks.
- Restricts initialization to a fixed initializer address and a fixed initial tick, and enforces that the pool key matches the single configured pool.
- Swap behaviour
- Every swap in the pool pays the hook fee: buys (quote in, token out) pay the platform fee plus the creator buy fee, and sells (token in, quote out) pay the platform fee plus the creator sell fee; the fee is taken on the quote-denominated amount via beforeSwap return delta and checked in afterSwap. Because creatorBuyFeeBps and creatorSellFeeBps are independent immutables, one direction can cost more than the other. Modules may also run before/after swap, which can alter behaviour per the module's own logic.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- The pool's LP fee is fixed at 0. The hook charges a fee on each swap as platform (30 bps) plus creator fee (creatorBuyFeeBps for buys, creatorSellFeeBps for sells, both immutable and at most 1000 bps, multiples of 100). Fees are denominated in quote and accrued to the ledger, with fractional carry tracked per direction.
- Owner & admin controls
- No owner, pause, upgrade or parameter-change functions were found in the ABI or source. Fee parameters, initializer, token, quote and creator are immutable. Module set is fixed at construction and cannot be changed afterward; module actions are callable by anyone but are routed through modules that were bound at deployment and gated by hook phase. The platform fee recipient is a hardcoded constant and has no setter.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates the initializer address, pool id and initial sqrt price. beforeSwap: enforces reentrancy phase rules, validates the pool, dispatches to modules, and returns the fee as a beforeSwap delta for the swap. afterSwap: settles the actual fill, commits fee carry, mints fee claims to the ledger, dispatches to modules and returns the fee delta as an afterSwap adjustment. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take fee amounts from swap flows.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: No owner or upgrade key was identified, so fees and module wiring cannot be altered after deployment. The main trust assumption is in the bound modules and the initializer, which only gates pool initialization.
Risk to user funds: The hook holds no user principal directly; fees are taken from swap flows and minted into the ledger. Platform and creator claims are withdrawn only via ledger functions, and modules can withdraw only their own credited quote budget during an action. Trades can be reverted by before-swap module failures.
Security findings
- [info] Return-delta fee taking: The hook takes up to the full swap fee through beforeSwap and afterSwap return deltas, so it directly controls the net amount traders receive; fee caps are enforced in code (creator max 10%, platform 0.30%).
- [medium] Bound module callbacks can influence swaps: Before and after swap modules run inside the swap and can revert the entire swap (ModuleFailure) for before-callbacks; modules are fixed at deployment but their own code, not visible in this source, determines whether they can block trades or consume gas.
- [info] Immutable fee and mint accounting: Fees are minted as ERC6909 claims to the ledger and paid out via unlock/burn/take; the ledger enforces backing checks on every accrual and withdrawal, limiting misaccounting risk.
- [info] No admin path to change fees or pause: Because fee constants and modules are immutable, no privileged key can change swap costs after deployment, reducing rug-style fee risk, though the design also means no emergency pause.
Contract details
- Verified source
- Yes (FoundationHookV2)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 10,028 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta
Pools using FoundationHookV2
- Veyl / WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today