FlayHooks on Base

Uniswap v4 Hook Contract 0xdbac778f974681e013cf8716f6b77e2f9d73e0cc on Base · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

Takes a 1% fee on FLAY/FLETH swaps, fills some swaps from accumulated fee tokens before the Uniswap pool, and sends collected FLETH to a BidWall or a burner address.

How it works step by step

  • Charges a fixed 1% fee on swap output in the FLETH/FLAY pool and accumulates it per pool
  • Fills part of incoming swaps from accumulated FLAY fee tokens via an internal swap in beforeSwap
  • Reduces the Uniswap swap leg using beforeSwap and afterSwap return deltas
  • Distributes accumulated FLETH to flayBurner when set, otherwise deposits it into the BidWall, once 0.001 ether is reached
  • Blocks external initialization of pools that use this hook
Swap behaviour
On each swap, beforeSwap may fill part of the trade from the hook's accumulated FLAY fee balance and returns a delta to reduce the Uniswap leg; afterSwap captures a 1% fee on the output and triggers distribution of accumulated FLETH once the threshold is met.
Liquidity behaviour
No liquidity callbacks. The hook does not gate or modify add/remove liquidity; the BidWall is a separate contract that manages its own single-sided position.
Fee behaviour
Charges a fixed 1% (BASE_SWAP_FEE = 1_00 of 100_00) on swaps that touch the internal swap pool or the Uniswap pool. Collected fees are taken from the PoolManager and accumulated per pool; once 0.001 ether of FLETH accumulates they are either transferred to flayBurner or deposited into the BidWall. The pool itself uses a static fee of 0.
Owner & admin controls
Owner (set at construction via _protocolOwner, Solady Ownable with two-step handover) can call setFlayBurner to redirect distributed FLETH fees to an arbitrary address; ownership can be transferred or renounced. No pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize blocks external pool initialization; beforeSwap runs an internal swap against accumulated FLAY fee tokens and returns a delta; afterSwap captures the 1% fee, distributes accumulated FLETH and returns the fee as an unspecified delta; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take and reallocate swap amounts.

Security & trust assessment

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

Who controls it: The owner can point flayBurner at any address, redirecting all future accumulated FLETH fees away from the BidWall to an address it controls. The owner also controls the BidWall ownership indirectly via the constructor-supplied protocol owner.

Risk to user funds: The hook can hold FLAY and FLETH fee tokens and can take 1% of swaps through return deltas. It cannot block swaps via a pause. Owner action is limited to changing where FLETH fee distributions go.

Security findings

  • [medium] Owner can redirect fee distributions: setFlayBurner is onlyOwner with no timelock or cap, so the owner can divert all future FLETH fee distributions to any address.
  • [low] Hook alters swap amounts via return deltas: The hook takes 1% of swap amounts through return deltas and can fill swaps from its own FLAY balance before the Uniswap pool, which alters the amounts users receive.
  • [info] Hook custodies fee balances: The contract holds accumulated FLAY and FLETH fee balances in the PoolManager and approves the BidWall for unlimited FLETH; these balances are only released through the internal swap or distribution paths.
  • [info] Standard ownership controls: Ownership uses a two-step handover mechanism and the owner can renounce, which is a neutral observation.

Contract details

Verified source
Yes (FlayHooks)
Compiler
solc 0.8.27+commit.40a35a09
Bytecode size
9,818 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, ownable, return-delta

Pools using FlayHooks