BrownieHook on Ethereum
Uniswap v4 Hook Contract 0x40eb8c2eca9bc0b62c800714d48e8feab0aa3fff on Ethereum · Launchpad · Verified contract
- Volume (24h)
- $124
- Value locked (TVL)
- $288
- All-time volume
- $338.14K
- Pools using this hook
- 1
- Swaps (24h)
- 3 (2 traders)
- Total swaps
- 1,588
What it does
A launch hook for the BROWNIE token that charges an ETH fee on every buy and sell (base or module-set rate up to fixed ceilings, documented at 3.3% total, with a launch tax of up to 30% for the first few blocks), enforces per-wallet buy caps during launch, and restricts liquidity to the launcher and owner.
How it works step by step
- Charges a fee in ETH on every buy and sell of the BROWNIE token: a project fee (capped by deployment ceilings, at most 20%) plus a platform fee (0.30% per the code comments) for Programmable.
- Applies a fixed launch tax for the first few blocks after the pool opens (up to 30%, for at most 50 blocks); one designated launch wallet buys at the base fee during that time.
- During a launch window, limits each wallet to a set share of supply and requires buys to go through approved routers.
- Lets an owner-installed, replaceable module pick the fee inside the hard ceilings, take a capped share of it, and react to pool events.
- Only the launcher and, after the launch window, the owner can add liquidity; fees are paid out to the harvester, platform and launch tax wallet by anyone calling the claim functions.
- Swap behaviour
- Each swap pays a fee on its ETH leg, taken from ETH input on buys or ETH output on sells, at the base rate, the module's rate (clamped to the max), or the launch tax rate in the first blocks. During the launch window buys must come through approved routers and are capped per wallet, and partially filled ETH-named swaps are refused.
- Liquidity behaviour
- Only the launcher can add liquidity, plus the owner through Uniswap's PositionManager after the launch window; everyone else is blocked. Withdrawals call the module before removal and a module that reverts there can block the withdrawal, though in practice the only LPs are the launcher and owner.
- Fee behaviour
- Total fee is the project rate plus the platform rate: project rate between the base and the fixed max (configurable at deploy up to 20%; documented as 3% for a 3.3% total), or the launch tax (up to 30%) for at most 50 blocks. The project fee goes to the harvester, the module (up to its cap), and during launch the excess above base to the launch tax wallet; the platform share goes to Programmable.
- Owner & admin controls
- The owner can propose, apply (delay set to zero for BROWNIE) or clear the fee module, which sets fees only within the immutable ceilings and a capped fee share, and can transfer ownership in two steps. Fee caps, recipients, launch tax and cap window are all immutable.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize binds the single pool to the launcher; afterInitialize notifies the module; beforeAddLiquidity restricts who can add liquidity; afterAddLiquidity returns zero delta; beforeRemoveLiquidity calls the module and can revert; afterRemoveLiquidity notifies the module; beforeSwap sets the fee, checks wallet caps and takes ETH-named fees; afterSwap takes coin-named fees, records splits and notifies the module; beforeDonate and afterDonate call the module; return deltas are used to collect the swap fee.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner chooses the fee module, which can move fees between base and immutable ceilings and could block liquidity removal or donations by reverting. The owner cannot change ceilings, recipients or the launch tax, and cannot withdraw pool reserves.
Risk to user funds: The hook only takes the ETH fee from each swap: up to the configured max (at most 20% plus platform fee, 3.3% per the docs) normally, and up to 30% plus platform during the first at most 50 blocks. Pool liquidity belongs only to the launcher and owner, and their withdrawals could be blocked by a reverting module.
Security findings
- [medium] Module can block withdrawals and donations: The beforeRemoveLiquidity and beforeDonate module calls revert the action if the owner-installed module reverts, so a hostile module could block liquidity removal; only launcher and owner positions exist, limiting impact on outside users.
- [medium] Launch tax up to 30%: For the first up to 50 blocks the project fee can be as high as 30% (set at deployment), then it can never return.
- [info] Hard-capped fees afterward: After launch, module-chosen fees are clamped to immutable maximums (at most 20% per leg by code, 3% documented) plus the platform fee; the hook is not a proxy.
- [low] Instant module swaps: Module delay may be zero, so the owner can change fee logic immediately, but only within the fixed ceilings.
Contract details
- Verified source
- Yes (BrownieHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 18,672 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, ownable, return-delta, self-unlock, tax
Pools using BrownieHook
- ETH / brownies (0.00% fee) — 24h volume $124, TVL $288, 3 swaps today