SketchHook on Robinhood Chain
Uniswap v4 Hook Contract 0x3c4a0541624e3f9a69481408637be60152e9c4cc on Robinhood Chain · Fee sharing · Verified contract
- Volume (24h)
- $1.03K
- Value locked (TVL)
- $16.49K
- All-time volume
- $851.26K
- Pools using this hook
- 1
- Swaps (24h)
- 2 (2 traders)
- Total swaps
- 11,967
What it does
A Sketch token pool hook that charges a fee (launching at 30% and only decreasing) on ETH-side swap flow and queues newly minted NFT trait seeds for randomized reveal.
How it works step by step
- Takes a fee in ETH on every Sketch token swap, starting at 30% and ratcheting down only
- Blocks sell exact-output swaps so that every sell is taxed
- Registers the Sketch pool with the token on first liquidity add, allowing ETH pairs only
- Queues freshly minted NFT IDs and assigns trait seeds either inline or via a Chainlink-style VRF request
- Auto-fires reveal batches when the queue reaches its size limit or becomes stale, capped at 30 IDs per request
- Lets anyone claim accumulated ETH fees to the immutable fee recipient and retry stuck VRF requests
- Swap behaviour
- On BUY exact-input (ETH in) a fee of feeBps of the ETH input is taken in beforeSwap. On BUY exact-output and SELL exact-input the fee of feeBps of the ETH side is taken in afterSwap. SELL exact-output swaps revert. After each swap the hook checks whether the mint reveal queue is due and may request randomness.
- Liquidity behaviour
- afterAddLiquidity only checks whether the pool is an ETH/Sketch pair and registers the pool with the Sketch token if not yet paired. No removal callbacks and no custom liquidity accounting.
- Fee behaviour
- Charges a hook fee of feeBps (starts at 3000 bps = 30%, owner can only lower it) on ETH-side amounts for BUY exact-input (taken in beforeSwap), BUY exact-output and SELL exact-input (taken in afterSwap). Collected ETH accumulates on the hook and is withdrawable by anyone via claimFees(), which sends it to the immutable feeRecipient. SELL exact-output swaps are rejected.
- Owner & admin controls
- Owner (set to the artist at deploy, transferable via two-step transferOwnership/acceptOwnership) can call setSketch once, setFee (only downward, from 3000 bps), setUseVrf, setRevealQueueParams (queue limit 1-200, max age), and propose/accept a new linkRandomizer after a ~2 day timelock. There is no pause function and no proxy or upgrade mechanism. feeRecipient is immutable.
Enabled Uniswap v4 callbacks
afterAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterAddLiquidity: registers the Sketch pool with the token on first liquidity addition, reverting for non-ETH pairs. beforeSwap: takes the BUY exact-input fee in ETH and blocks SELL exact-output. afterSwap: takes the BUY exact-output and SELL exact-input fees and triggers the reveal queue check. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to return the fee as a delta, so it is taken from the swap's specified or unspecified currency.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The owner cannot withdraw pooled funds or seize collected fees, since claimFees is permissionless and pays only feeRecipient. The owner can set the fee to 0 (lowering only) and change the VRF randomizer after a timelock, and can toggle inline vs VRF seed mode. Switching the randomizer or mode changes how NFT trait seeds are generated, which could affect the token's rarity outcomes. Changing the fee is limited to decreases, so the owner cannot raise it above its current level.
Risk to user funds: The hook takes ETH fees via return deltas and holds them until claimFees is called, which sends them to the immutable feeRecipient. It cannot move pooled liquidity or block swaps through a pause. Users can still be affected by the fee level and by owner-influenced randomness for NFT traits.
Security findings
- [medium] Owner-controlled randomness source for NFT traits: Owner can switch seed generation between inline block-entropy mode (useVrf=false, which block producers can influence) and VRF mode, and can change linkRandomizer after a 2-day timelock. This affects trait rarity fairness but not pooled funds.
- [info] High launch fee: The hook takes 30% fee on ETH flow at launch (MAX_FEE_BPS cap). Fee can only ratchet down, so users face at most the launch fee, but it is a substantial tax on trades.
- [medium] Inline seeds are not prediction-resistant: Inline seed mode derives seeds from block.prevrandao and block.number, which proposers can partially influence. The contract documents this as not prediction-resistant.
- [info] Hook custodies accrued fee ETH: Hook holds ETH from fees until claimFees is called; the balance is only sent to the immutable feeRecipient.
- [info] Reentrancy and access guards present: Uses a transient-storage reentrancy guard on the token callback and VRF callback, and the pool manager is immutable.
Contract details
- Verified source
- Yes (SketchHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 10,514 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, ownable, return-delta
Pools using SketchHook
- ETH / FUNI (0.05% fee) — 24h volume $1.03K, TVL $16.49K, 2 swaps today