FrogHook on Ethereum
Uniswap v4 Hook Contract 0x21258f2ac4be47498e644c2725de1d100a1a20cc on Ethereum · Dynamic fee · Verified contract
- Volume (24h)
- $18.28K
- Value locked (TVL)
- $230
- All-time volume
- $18.28K
- Pools using this hook
- 2
- Swaps (24h)
- 165 (71 traders)
- Total swaps
- 165
What it does
FrogHook charges every swap in a Frogfam pool a fixed 1% to 5% tax paid in PEPE, which is split between the platform flywheel and treasury, the token's holders and the creator, so both buyers and sellers pay the same tax rate on PEPE-side swaps.
How it works step by step
- Charges a creator-chosen trading tax between 1% and 5% on every swap in each registered Frogfam pool, always denominated in the quote asset PEPE, never in the pool's token.
- Takes the tax out of the pool manager via poolManager.take in beforeSwap for the quote-currency side of the swap, using return deltas so the swap output is adjusted.
- Splits each collected tax: 20% to the platform flywheel (buy and burn), 10% to the platform treasury, and of the remaining 70% a permanent creator-chosen share is streamed to token holders (transferred to the token contract, which is notified) with the rest accruing to the creator.
- Accumulates platform, treasury and creator balances in storage; anyone can call claimCreator, claimPlatform or claimTreasury to push accrued PEPE to the respective recipient.
- Lets the creator reassign their payout address with setCreator and restricts pool registration to the factory, which may only register each token once with a valid tax and holder share.
- Validates in beforeInitialize that only the factory can initialize pools and that the pool contains a registered Frogfam token paired with PEPE.
- Swap behaviour
- On each swap of a registered pool, when PEPE is the specified currency (beforeSwap path) or the unspecified currency (afterSwap path) the hook takes the tax in PEPE: for exact-in swaps tax = amount times taxBps/10000, for exact-out swaps tax is computed on the gross so the seller still receives the requested amount. The tax is taken from the pool manager and distributed; swaps that do not involve PEPE on the taxed side pay no tax. Both buys and sells of the token are taxed at the same rate, in PEPE.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- The pool's LP fee is static at 0 and the hook imposes an additional trading tax of 1% to 5% (set per token at registration, immutable afterwards) taken in PEPE on swaps. Of each tax, 20% goes to the flywheel, 10% to the treasury, and the remaining 70% is divided between token holders (creatorHolderBps share) and the creator.
- Owner & admin controls
- The owner can only call one-time setters: setFactory, setFlywheel and setTreasury (each settable once) and renounceOwnership. The owner cannot change tax rates, pause swaps, withdraw funds or upgrade the contract. Creators can reassign their own payout address. Claim functions are permissionless.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: restricts pool initialization to the factory and validates that the pool is a registered Frogfam pool. beforeSwap: takes the PEPE tax on exact-in or exact-out swaps and returns a before-swap delta so the pool accounts for it. afterSwap: takes the PEPE tax when PEPE is the unspecified currency and returns an after-swap delta to offset the swap output.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key can change tax rates, redirect accrued funds or pause trading. The factory is the only account that can register tokens and initialize pools; the owner's one-time setters pick the flywheel and treasury addresses, so a compromised owner before setup could redirect those shares, but cannot touch funds afterward.
Risk to user funds: The hook holds PEPE only transiently during swaps and in accrued balances (platformOwed, treasuryOwed, creatorOwed) until claimed; it takes a bounded tax (1 to 5%) from swap amounts and can transfer holder shares to token contracts. It cannot move pool token balances beyond that tax, and no admin withdrawal path exists for accrued funds.
Security findings
- [info] Hook takes tokens via return deltas: beforeSwap and afterSwap return non-zero deltas and call poolManager.take to remove PEPE from pool accounting on every taxed swap, so the hook is a custody and settlement participant for the tax amount.
- [low] Holder distribution relies on external token callback: Holder share is transferred to the token contract and then IFrogTokenRewards.notify() is called; a malicious or buggy token implementation could revert notify and block swaps for that pool, though the token is registered by the trusted factory.
- [info] Owner setters are one-time, ownership can be renounced: setFactory, setFlywheel and setTreasury can be called only once by the owner, after which the owner is effectively fixed; renounceOwnership leaves the factory, flywheel and treasury addresses permanently set.
- [info] Tax taken on exact-out via gross computation: Exact-out tax uses amt times taxBps divided by (BPS minus taxBps), so the effective percentage on the net amount differs slightly from the stated rate; this is a design choice rather than a defect.
Contract details
- Verified source
- Yes (FrogHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 5,852 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, moves-currency, ownable, return-delta, tax
Pools using FrogHook
- PEPE / FROGFAM (0.00% fee) — 24h volume $18.24K, TVL $230, 163 swaps today
- PEPE / TESTFROG (0.00% fee) — 24h volume $45, TVL $0, 2 swaps today