SlvrHook on Robinhood Chain
Uniswap v4 Hook Contract 0x64c6103255ccc638febe3619aeb52d2b59d6a0cc on Robinhood Chain · Rewards · Verified contract
- Volume (24h)
- $36.34K
- Value locked (TVL)
- $12.28K
- All-time volume
- $11.44M
- Pools using this hook
- 1
- Swaps (24h)
- 460 (132 traders)
- Total swaps
- 69,967
What it does
A Uniswap v4 hook for the native-ETH/SLVR pool that taxes each exact-input swap up to 2%, routing buy taxes into a lottery jackpot with buy-weighted tickets and sell taxes to LP stakers.
How it works step by step
- Binds the single native-ETH/SLVR pool on first owner-initiated initialize and ignores all other pools
- Takes the input-side tax in beforeSwap via PoolManager.take and returns it as a specified-currency delta so pool accounting nets out
- Routes buy tax (ETH) to the lottery pot and mints a buy-weighted ticket to the declared buyer, with tiered boost multipliers from hookData
- Routes sell tax (SLVR) to an LP rewards sink called before the swap
- Rejects exact-output swaps and partial fills to keep the full-fill tax sizing correct
- Buffers failed sink deliveries in pendingEth and pendingSlvr and lets anyone flush them later
- Swap behaviour
- Applies a tax of taxBps (up to 2%) to the input currency in beforeSwap. On buys (ETH in) the tax is sent to the lottery and a ticket is minted to the declared buyer in afterSwap; on sells (SLVR in) the tax is sent to the LP rewards sink. Exact-output swaps and partial fills revert. Swaps in any pool other than the bound one are passed through untaxed.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Charges a tax of taxBps (max 2%) on the exact-input specified currency in beforeSwap; buys (ETH to SLVR) pay the tax in ETH which funds the lottery jackpot pot, and buyers who declare a boost in hookData (2x, 3x, 5x) pay a multiplied tax. Sells (SLVR to ETH) pay the tax in SLVR which is forwarded to the LP staker sink. Exact-output swaps revert. The pool fee itself is pinned to 0 at bind time.
- Owner & admin controls
- Owner (Ownable2Step, two-step transfer) can: setTaxBps (decrease-only, capped at 2%), setLottery and setLpRewards (repoint the sinks; SLVR allowance moved accordingly), rebindPool (re-point the single bound pool before launch recovery), rescueForeignToken (any token except SLVR), sweepStrayEth (ETH above pendingEth), transferOwnership and renounceOwnership. Owner is also the only address allowed to initialize the pool through beforeInitialize. flush() is permissionless.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: restricts pool initialization to the owner and binds the single game pool. beforeSwap: takes the tax from the input currency via PoolManager.take and returns it as a positive specified delta, and on sells calls the LP rewards sink before the swap. afterSwap: rejects exact-output and partial fills, reads the consumed input, mints buy-weighted lottery tickets and forwards buy tax to the lottery. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take the specified-side tax and to return the zero delta.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can lower the tax to zero, repoint the lottery or LP rewards sink to any contract with code (including a malicious one that could front-run or block sells, since the sink is called before the swap), rebind the pool before launch, and sweep any non-SLVR token and ETH above the buffered pot balance. A compromised owner could thus redirect future tax flows or disrupt trading, though it cannot directly seize buffered pot or SLVR game funds through the documented functions.
Risk to user funds: The hook holds ETH and SLVR transiently and as buffered pot and staker funds (pendingEth and pendingSlvr). It takes up to 2% of each swap's input and can buffer funds if sinks fail. Users can lose funds only through the tax itself, the JIT capture of sell rewards by LP stakers rather than by the swapper, or a malicious sink swapped in by the owner. Pool liquidity and user balances are not directly custodied by the hook.
Security findings
- [medium] Owner-replaceable sink called pre-swap: lpRewards.fund is called inside beforeSwap before the swap executes. A malicious sink installed by the owner could front-run the seller or revert every sell. The hook has a try/catch but the call site requires code at the target, so a codeless sink reverts sells.
- [medium] Sell tax is JIT-capturable: The LP staker credits whoever is in range at the moment fund() is called and has no minimum stake age, so a searcher can stake a narrow position just before a sell and unstake after, capturing most of the sell tax. The source acknowledges this as unfixed in the hook.
- [low] Large trades can revert on thin concentrated liquidity: Partial fills revert with PartialFillNotSupported. Because the pool uses concentrated liquidity, a swap that walks out of initialized ranges reverts even without a user price limit, so a liquidity change can make a previously valid large trade fail.
- [info] Exact-output not supported: Exact-output swaps are rejected outright rather than passed through, so integrators using exact-output routes will have swaps revert on this pool.
- [info] Boost requires declared buyer: Boost multipliers and ticket weight are computed from hookData the caller supplies; an undeclared buyer that is a contract gets no ticket and forfeits weight, but the tax is still charged.
Contract details
- Verified source
- Yes (SlvrHook)
- Compiler
- solc 0.8.33+commit.64118f21
- Bytecode size
- 8,400 bytes
- Upgradeable proxy
- No
- Detected patterns
- auction, moves-currency, ownable, return-delta, rewards, tax
Pools using SlvrHook
- ETH / SLVR (0.00% fee) — 24h volume $36.34K, TVL $12.28K, 460 swaps today