WispHook on Robinhood Chain
Uniswap v4 Hook Contract 0xae593fe48935fe18afd9b3f757af160f95ebaacc on Robinhood Chain · Fee sharing · Verified contract
- Volume (24h)
- $8.10K
- Value locked (TVL)
- $3.58K
- All-time volume
- $93.95K
- Pools using this hook
- 1
- Swaps (24h)
- 72 (42 traders)
- Total swaps
- 740
What it does
A TOKEN/USDG pool hook that charges a project fee on each trade and distributes it to NFT holders, buybacks, burns, protocol liquidity and the treasury.
How it works step by step
- Takes a project fee of up to 5% of the USDG side of each buy and sell as a hook delta
- Splits the fee into holder rewards, stack buybacks, burn/liquidity and treasury according to feeConfig
- Tilts the burn versus liquidity split using a mood report signed by an owner-set signer
- Executes buybacks and adds protocol liquidity through a permissionless flush guarded by a TWAP price limit
- Maintains a time-weighted tick accumulator used for price observations and market cap
- Swap behaviour
- beforeSwap charges the fee on the quote side for exact-input or exact-output trades in the quote currency and applies a dynamic LP fee override; afterSwap charges the fee on other swaps, records volume and trades, emits a Trade event, and updates the price accumulator.
- Liquidity behaviour
- On add and remove liquidity, beforeAddLiquidity and beforeRemoveLiquidity only check that the pool matches; no fees or state changes. When the protocol-owned liquidity bucket reaches liquidityBatchThreshold, flush() swaps half into tokens and deposits the pair into a locker via deepen().
- Fee behaviour
- Charges a project fee of up to 5% (MAX_FEE_BPS 500) of the quote (USDG) value of each trade, taken as a hook delta in beforeSwap or afterSwap depending on direction. The fee is split by feeConfig into holders (vault rewards), stack buybacks, burn/liquidity (shared, tilted by a signed mood report) and treasury remainder, with inactive modules rerouted to treasury at flush. The LP fee is set via dynamic fee override, capped at 1%.
- Owner & admin controls
- Owner (Ownable2Step, owner set at initialize) can set fee config (setFeeConfig, capped at 5% total fee and 1% LP fee), set treasury/stack/vault/locker/mood signer addresses (setAddresses), set trusted routers, set flush parameters, enable or disable optional modules (setEnabledModules, enableModules), and upgrade the implementation via UUPS (_authorizeUpgrade onlyOwner, upgradeToAndCall). Mood reports are relayed by anyone but must carry a signature from moodSigner, which the owner can change. No pause function found.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool creation to the launcher and validates the pool key; beforeAddLiquidity and beforeRemoveLiquidity validate pool identity; beforeSwap and afterSwap charge and record the project fee and update a TWAP tick accumulator; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take the fee as a delta; the hook also calls unlock in flush to execute buybacks and liquidity.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can raise fee parameters up to the hard caps, redirect treasury, stack, vault and locker destinations, change the mood signer, add trusted routers, and upgrade the implementation to arbitrary logic, which could change swap behaviour or drain pending balances.
Risk to user funds: The hook takes up to 5% of each quote-side trade and holds pending fee claims until flush. Owner upgrade or address changes could redirect or alter these funds. The hook does not hold user principal in the pool itself beyond fee claims.
Security findings
- [high] Upgradeable by a single owner: The owner can upgrade the implementation at any time through UUPS with no timelock visible in the source, so the entire hook logic and fund handling can be replaced.
- [medium] Owner can redirect fee destinations: The owner can repoint treasury, stackRecipient, vault and locker addresses, so accrued fees and protocol-owned liquidity can be redirected at flush.
- [medium] Fee caps depend on implementation integrity: Fees are capped at 5% total and 1% LP in the code, but these caps can only be respected by the current implementation; an upgrade could remove them.
- [low] Mood signer controls burn/liquidity split: Mood reports are signed by a single moodSigner address that the owner can replace, which tilts the burn versus liquidity split.
- [info] Permissionless flush with price guard: Permissionless flush executes buybacks guarded by a TWAP price limit; buyback and liquidity execution could be sandwiched only within the impact limit.
Contract details
- Verified source
- Yes (WispHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 89 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- dynamic-fee, erc20, launchpad, liquidity-management, moves-currency, oracle, ownable, return-delta, rewards, self-unlock, upgradeable
Pools using WispHook
- USDG / WISP (Dynamic fee) — 24h volume $8.10K, TVL $3.58K, 72 swaps today