Launchpad hook on BNB Chain

Uniswap v4 Hook Contract 0xd766a2149d727f711a3c4e95ea50602cbcd420cc on BNB Chain · Launchpad

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$1.18K
Pools using this hook
6
Swaps (24h)
0 (0 traders)
Total swaps
14

What it does

A launchpad-style hook that charges a configurable per-pool tax on swaps, accrues platform and project fees, and lets authorized flows withdraw them.

This read was written for the hook 0xb540…a0cc 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

  • Charges a per-pool swap tax bounded between MIN_TAX_PIPS and MAX_TAX_PIPS
  • Takes the tax as a hook delta in beforeSwap via return-delta permissions
  • Records platform and project fee accruals per pool and per fee type
  • Splits accrued fees into treasury and project buckets
  • Allows withdrawal of accrued fees through withdrawFees and withdrawProjectFees
  • Binds a flow executor address once through bindExecutor
Swap behaviour
beforeSwap computes the pool tax and returns a delta taking the fee; afterSwap records accrued fees and applies a further after-swap delta.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors are present and dispatched, but their exact effect cannot be fully determined without source.
Fee behaviour
Hook derives a per-pool tax (poolTax, bounded by MIN_TAX_PIPS and MAX_TAX_PIPS, with TaxOutOfRails error) and accrues platform and project fees per pool, retrievable via pendingFees, platformFeesAccrued, projectFeesAccrued and totalFeePips. Fees are taken through the pool manager's take and returned as hook deltas in beforeSwap/afterSwap.
Owner & admin controls
No verified source. Storage slot 7 (flowExecutor) is written by bindExecutor(address) and the code emits ExecutorAlreadyBound, suggesting a one-time executor binding; a fee withdrawal path (withdrawFees, withdrawProjectFees) and a protocolTreasury/launchpad setup exist. Whether the binder is restricted to a specific owner cannot be confirmed from decoded bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: validates pool initialization. beforeSwap: computes tax and may return a specific delta to take the fee. afterSwap: records accrued fees and applies after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a share of swap amounts as its own delta.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: Bound flow executor and any privileged fee-withdrawal or treasury-setting role could redirect accrued fees; the exact access control on bindExecutor and withdrawal functions is not verifiable from bytecode.

Risk to user funds: The hook can take a share of swap amounts through return deltas and holds accrued fee balances that it can withdraw, so swappers pay the configured tax and pool funds accrued to the hook depend on withdrawal authorization.

Security findings

  • [medium] Hook takes swap value via return deltas: Hook uses return deltas in beforeSwap and afterSwap, so it can take a portion of every swap's input or output.
  • [medium] Self-unlock and currency movement: unlockCallback and self-unlock tags indicate the hook calls the pool manager unlock flow itself to move currency.
  • [medium] Executor binding authority unverified: bindExecutor writes a single executor address that is later read by swap paths; the setter's authorization cannot be confirmed without source.
  • [low] Accrued fee withdrawal paths: Fee withdrawal functions (withdrawFees, withdrawProjectFees) move accrued balances to recipients; recipient logic is not verifiable.

Contract details

Verified source
No
Bytecode size
6,864 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta, self-unlock

Pools using Launchpad hook