LeshyClassicQuoteFeeHook on Robinhood Chain
Uniswap v4 Hook Contract 0x1879e765ebe769576ef3e81a59592610fabea0cc on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $1.41K
- Value locked (TVL)
- $1.73K
- All-time volume
- $55.33K
- Pools using this hook
- 5
- Swaps (24h)
- 2 (2 traders)
- Total swaps
- 570
What it does
Adds a small, owner-adjustable quote-asset trading fee on each swap of a Leshy classic token pool and routes the accrued fee to a treasury address, while the LP position stays permanently locked.
How it works step by step
- Registers each Leshy classic pool with the hook and enforces that only the registered initializer can initialize it.
- Reads the effective treasury fee in pips from the trading-fee controller per pattern, falling back to a global default.
- Takes the treasury fee on the quote asset side of each swap through beforeSwap and afterSwap return deltas.
- Mints ERC-6909 claims on PoolManager for the accrued fee and tracks totals per quote asset.
- Lets anyone trigger claimTreasuryFees, which redeems claims to the controller's current treasury address in capped chunks.
- Reverts swaps when partial fills would make the quote amount inconsistent, and optionally enforces a user-supplied maximum fee.
- Swap behaviour
- Before and after swaps, the hook checks the pool is a registered treasury pool, reads the effective treasury fee for its pattern, and when the quote asset is the specified side takes a fee as a positive return delta minted as ERC-6909 claims to the hook. Unspecified-side fees are taken in afterSwap. Users can cap the fee via 32-byte hookData, reverting if the current fee exceeds it.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Charges an additional controller-governed treasury fee of 500 to 2500 pips (0.05% to 0.25%) on the quote-asset side of every swap, on top of the pool's locked LP fee (2500, 5000 or 10000 pips). The fee is taken as a positive hook delta and minted as ERC-6909 claims to the hook, redeemable to the controller's treasury address. Per-pattern overrides fall back to the global fee when unset.
- Owner & admin controls
- Registry owner (via LeshyTradingFeeController owner) can set the global treasury fee between 500 and 2500 pips (0.05% to 0.25%) and per-pattern overrides in the same bounds, change the treasury recipient address, and transfer controller ownership (renouncing is disabled). Hook itself has no owner, pause or upgrade functions found in the ABI; registerPool is restricted to the factory adapter bound in the registry. Fee controller treasury can be changed at any time, redirecting future claimTreasuryFees payouts.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool initialization to the registered initializer and validates pool shape. beforeSwap and afterSwap compute and accrue the quote-side treasury fee and enforce an optional user maximum fee via hookData. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take the fee amount as a return delta.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The controller owner can raise the treasury fee to 0.25% on every pool and redirect all future treasury fee claims by changing the treasury address. A compromised owner cannot change LP positions or the locked liquidity, but can extract accrued quote-side fees through the treasury redirect.
Risk to user funds: The hook holds no user tokens directly; it receives positive return deltas and holds them as PoolManager claims. Those claims are redeemable only to the current controller treasury. Trades can revert on partial fills or when the user's hookData maximum fee is exceeded, but locked LP liquidity is not controlled by the hook.
Security findings
- [info] Additional swap fee taken via return delta: The hook takes a quote-side fee as a return delta on every swap, so users pay the LP fee plus the treasury fee on each trade.
- [medium] Treasury recipient is changeable by owner without delay: setTreasury can point claimTreasuryFees at any address without a timelock, so fees accrued but not yet claimed can be redirected by the controller owner.
- [low] Fee controller changes apply instantly to live pools: Global and per-pattern fee changes take effect immediately on existing pools; the bounded 500 to 2500 pip range limits impact to a maximum 0.25% extra fee.
- [low] Partial-fill swaps revert by design: Swaps that only partially fill the quote side revert with PartialFillUnsupported, and the fee is applied via mint of ERC-6909 claims that depend on PoolManager accounting; a bug in that path could block trading.
Contract details
- Verified source
- Yes (LeshyClassicQuoteFeeHook)
- Compiler
- solc 0.8.36+commit.8a079791
- Bytecode size
- 10,683 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, return-delta, self-unlock, tax
Pools using LeshyClassicQuoteFeeHook
- SPCX / LESHY (0.25% fee) — 24h volume $1.41K, TVL $1.67K, 2 swaps today
- ETH / MOX (0.25% fee) — 24h volume $0, TVL $19, 0 swaps today
- ETH / LE (1.00% fee) — 24h volume $0, TVL $3.29, 0 swaps today
- ETH / LESHRAC (0.50% fee) — 24h volume $0, TVL $26, 0 swaps today
- FLY3 / NVDA (0.25% fee) — 24h volume $0, TVL $14, 0 swaps today