Fee sharing hook on Robinhood Chain

Uniswap v4 Hook Contract 0xecc3947936f07c0b7630c4d2aaad892b31f1a0cc on Robinhood Chain · Fee sharing

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

What it does

A Uniswap v4 hook that charges a time-decaying tax on swaps after trading is started, taking the tax as a return delta from each trade.

How it works step by step

  • Records a start timestamp when startTrading() is called and marks the hook as initialized.
  • Computes a tax in basis points that depends on elapsed time since the start, bounded by START_TAX_BPS and BASE_TAX_BPS.
  • Takes the tax from swaps in beforeSwap via the pool manager take function and returns a delta to the pool.
  • Applies a second adjustment in afterSwap using the swap's resulting amounts.
  • Exposes read-only getters for the tax parameters, pool id, token, tick spacing and LP fee.
Swap behaviour
beforeSwap and afterSwap compute the current tax in basis points and adjust the swap through return deltas, with the taxed amount taken via the pool manager.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Applies a time-decaying tax in basis points via currentTaxBps(), which is read from the start timestamp and the constant START_TAX_BPS and BASE_TAX_BPS values, and is returned as a return delta in beforeSwap or afterSwap. Exact decay formula and the destination of the taken amount cannot be determined from the bytecode alone. Pool lpFee is exposed as a pure getter.
Owner & admin controls
No owner or admin functions were identified in the dispatch table. startTrading() can be called once to set the start timestamp and the initialized flag; the selector is unguarded in the decoded dispatch, so whether it is restricted cannot be confirmed without source. Tax parameters (START_TAX_BPS, BASE_TAX_BPS, BPS) are exposed as pure getters, indicating they are constants rather than adjustable settings.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize records pool initialization state and is used to set the pool id and token configuration. beforeSwap computes the current tax and returns a before-swap delta that takes currency via the pool manager take call. afterSwap reads the tax state and returns an after-swap delta, so the hook can settle an additional amount on each swap. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to alter swap amounts.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: startTrading() appears to be a one-time owner-or-anyone switch that starts the tax clock; if unrestricted, anyone could start the schedule at a time of their choosing, though it can only be called once. No pause or upgrade mechanism was found.

Risk to user funds: The hook can take a share of swap currency through the pool manager during beforeSwap and afterSwap, so swappers pay the tax on their trades. It does not appear to hold a standing balance of user funds, and no withdrawal function was identified.

Security findings

  • [medium] Hook takes swap currency via return deltas: The hook has beforeSwapReturnDelta and afterSwapReturnDelta enabled and calls take on the pool manager, so it can extract a portion of each swap's input or output.
  • [medium] Unclear access control on startTrading: startTrading() sets the start timestamp and initialized flag; the dispatched function has no visible access check in the decoded output, so the first caller determines the launch time.
  • [info] Tax parameters are constant: Tax is a time-based function of the start timestamp; tax values are constants (START_TAX_BPS, BASE_TAX_BPS), so the maximum tax is fixed at deployment.
  • [info] No upgrade or pause path observed: The contract has no upgrade proxy pattern, owner withdrawal, or pause function among the decoded selectors.

Contract details

Verified source
No
Bytecode size
4,432 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Fee sharing hook