LendsProtocolHook on Robinhood Chain

Uniswap v4 Hook Contract 0x78f535390f5c3ac2ac67d11abb9f6e48043340cc on Robinhood Chain · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$9.12K
All-time volume
$357.98K
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
2,254

What it does

A Uniswap v4 hook that charges an owner-configurable tax of up to 5% on the quote-currency side of swaps in owner-enabled pools and splits the proceeds among weighted recipients.

How it works step by step

  • Charges a tax of taxBps (max 500 bps) on the quote-currency side of swaps in pools explicitly enabled by the owner.
  • Handles exact-input swaps in afterSwap by taking a fee from the unspecified quote amount and returning it as a delta.
  • Handles exact-output swaps in beforeSwap by grossing up the fee and returning it as a specified-amount delta.
  • Splits each collected fee among up to 10 weighted recipients, with the last recipient receiving rounding remainder.
  • Disburses fees immediately to recipients through poolManager.take and emits collection and distribution events.
  • Rejects liquidity and initialization callbacks and any pool not containing the taxed token or with the hook mismatch.
Swap behaviour
On taxed pools, beforeSwap handles exact-output swaps by grossing up and taking the fee as a specified delta, and afterSwap handles exact-input swaps by taking the fee from the unspecified quote-side amount; fees are distributed to recipients immediately via poolManager.take.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges a tax of taxBps (max 500 bps) on the quote-currency side of swaps only in pools the owner has explicitly enabled. For exact-input swaps the fee is taxBps of the specified amount; for exact-output swaps the fee is grossed up in beforeSwap and taken as a specified delta. The collected fee is split among recipients by weight with the last recipient receiving the rounding remainder, and disbursed immediately via poolManager.take.
Owner & admin controls
Owner (Ownable) can enable or disable taxation per pool and set the quote currency via setPoolTaxConfig, change taxBps up to a hard cap of 500 bps (5%) via setTaxBps, replace the fee recipient list and weights via setFeeRecipients (up to 10 recipients), transfer ownership, or renounce ownership. The hook is not upgradeable (no proxy); parameters are the only mutable admin surface.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: charges the quote-currency tax on exact-output swaps by returning a specified-amount delta and taking the fee to recipients; beforeSwapReturnDelta: allows beforeSwap to return a non-zero delta that alters the swap amounts; afterSwap: charges the quote-currency tax on exact-input swaps via an unspecified-amount delta; afterSwapReturnDelta: allows afterSwap to return a delta that adjusts the swap outcome.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner can enable taxation on any pool containing the taxed token, pick the quote currency, and set tax to any value up to 5%. The owner can also redirect all future tax revenue by replacing the recipient list, including to itself, and can transfer or renounce ownership at any time. Owner changes apply immediately to live swaps.

Risk to user funds: The hook does not hold user funds; it takes a tax from the quote-currency side of each taxed swap via poolManager.take and sends it to recipients, and it modifies the swap's balance delta. Traders on enabled pools pay up to 5% of the quote-side amount, and the hook cannot block or freeze swaps.

Security findings

  • [medium] Owner-controlled tax rate and recipients: The owner can set taxBps up to 500 (5%) and redirect fee recipients at any time, so swappers on enabled pools can be charged up to 5% of the quote-side amount, and recipients can be changed to any address.
  • [info] Opt-in per-pool taxation: Tax applies only to pools enabled by the owner and only on the quote-currency side, so the hook is selective per pool rather than per-trade-universal.
  • [medium] Hook moves currency and alters swap deltas: The hook takes tokens from the PoolManager via poolManager.take during beforeSwap and afterSwap, and returns deltas, so it directly moves pool-held funds to recipients on each taxed swap.
  • [info] No swap blocking or pause mechanism: Swaps on an enabled pool revert with PoolNotEnabled or InvalidPool if the pool does not match the configured conditions; the owner can disable a pool, which does not block swaps but removes tax, so no pause or blocking of swaps is present.
  • [low] Single-step ownership transfer: Ownable2Step is not used; transferOwnership is single-step, so a mistaken transfer to a wrong address cannot be recovered.

Contract details

Verified source
Yes (LendsProtocolHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
6,613 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable, return-delta, tax

Pools using LendsProtocolHook