FWATokenHook on Ethereum

Uniswap v4 Hook Contract 0x2c67eba8a50af0db5fba55f725247a75cbda6444 on Ethereum · Fee sharing · Verified contract

Volume (24h)
$182.86K
Value locked (TVL)
$911.65K
All-time volume
$101.91M
Pools using this hook
1
Swaps (24h)
1,300 (206 traders)
Total swaps
361,311

What it does

A Uniswap v4 hook for the ETH/FWAToken pool that charges a flat 1% fee on every swap, paid to an owner-set wallet, and restricts buying to protocol modules until the owner opens external buys.

How it works step by step

  • Restricts pool initialization to the single canonical FWAToken pair during the token's one-shot launch, and latches the launch block.
  • Takes a flat 1% fee on both buys and sells and routes it to an owner-set fee address.
  • On buys, swaps the FWAToken fee into ETH inside the hook and forwards the ETH to the fee address.
  • Gates buys so that only whitelisted protocol buyer modules can purchase until the owner enables external buys.
  • Grants FWAToken transfer allowances during launch seeding and during swaps so the pool can settle token legs through the token's transfer guard.
  • Emits a Trade event with post-swap sqrt price and currency deltas so indexers can track price and volume from the hook alone.
Swap behaviour
Every swap is charged a flat 1% fee. Buys (ETH in, FWAToken out) are gated while externalBuysEnabled is false: only registered pool modules currently in an isBuying() window may buy. Sells are always allowed. Exact-output swaps revert.
Liquidity behaviour
After liquidity is added, the hook raises the FWAToken transfer allowance by the deposited token amount so the pool can pull tokens, but only while the token's launching() flag is true. No callbacks on removal.
Fee behaviour
Flat 1% fee (100 bips of the swap output) charged on both buys and sells. On buys the fee is taken in FWAToken, swapped to ETH through the pool, and sent to feeAddress. On sells the fee is taken in ETH and sent to feeAddress. Internal hook and token-originated swaps are exempt. Exact-output swaps are rejected.
Owner & admin controls
Owner (Solady Ownable, two-step handover) can: set the canonical token once via setToken (before launch), change the fee recipient via setFeeAddress, toggle externalBuysEnabled to open or close buys to non-registered buyers, and register or deregister protocol buyer modules via setPool. Owner can renounce or transfer ownership. No pause, upgrade proxy, or fee-rate parameter found; the 1% fee rate is a constant.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize: restricts pool creation to the canonical FWAToken pair during its one-shot launch and latches deploymentBlock. afterAddLiquidity: grants transfer allowance for the FWAToken deposited during the launch seed. afterSwap: applies the 1% fee, gates buys, bumps transfer allowances, and emits Trade. afterSwapReturnDelta: lets the hook return a fee delta that is taken from the swap.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner can set the fee recipient to any address, including one that reverts on ETH receipt, which would block sells and buys that send fees. The owner can keep external buys disabled indefinitely so only whitelisted protocol modules can buy. The owner can also whitelist any address as a buyer module, and the buy gate trusts that module's isBuying() return value.

Risk to user funds: The hook takes a fixed 1% fee from each swap and can revert trades if the fee recipient rejects ETH. It does not custody user funds across transactions, and the owner cannot directly move funds out of the pool or from user balances. The owner can prevent non-whitelisted buys indefinitely.

Security findings

  • [medium] Fee recipient can block trading: Owner can set feeAddress to a contract that reverts on ETH receipt, causing every sell and every buy to revert because fees are sent with forceSafeTransferETH.
  • [medium] Owner-controlled buy gate: With externalBuysEnabled false, buys are restricted to addresses flagged in isPool that report isBuying() true. The owner controls both the isPool list and the toggle, so the owner can keep the market closed to outside buyers.
  • [low] Dependence on token transfer-guard allowances: The hook's afterSwap calls poolManager.swap and settles internally to convert FWAToken fees to ETH. Settlement relies on transfer allowances granted by the token, so correctness depends on the FWAToken contract honoring increaseTransferAllowance.
  • [low] Synchronous ETH transfer to fee recipient: Fees are sent to feeAddress via a direct ETH transfer during the swap callback, so a recipient contract can run arbitrary code inside the pool callback. The forceSafeTransferETH call mitigates the revert case, but reentrancy into the pool is not separately guarded.
  • [info] Fee take on all swaps: The hook can take up to 1% of every swap output and holds the custody mechanics for both legs, but it never holds user principal beyond transient balances within a single swap.

Contract details

Verified source
Yes (FWATokenHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
7,072 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, moves-currency, ownable, return-delta

Pools using FWATokenHook