FarmHook on Robinhood Chain

Uniswap v4 Hook Contract 0x6d538d0f067bcf7046b61a1de997e65c994fe0cc on Robinhood Chain · Dynamic fee · Verified contract

Volume (24h)
$9.60
Value locked (TVL)
$0.01
All-time volume
$9.60
Pools using this hook
1
Swaps (24h)
4 (2 traders)
Total swaps
4

What it does

Every buy and sell in this ETH/FARM pool pays a hook tax in ETH, starting at 85% when trading opens and falling linearly to 1% over 20 minutes, with the 0.3% pool fee added on top.

How it works step by step

  • Adds a time-decaying buy and sell tax to the ETH/FARM pool: 85% when ignite() is called, falling linearly to 1% over 20 minutes, then 1% permanently.
  • Takes the tax in ETH on whichever side holds ETH: inside beforeSwap for exact-in buys and exact-out sells, otherwise inside afterSwap via return deltas.
  • Collects the tax as ERC-6909 claims on the PoolManager owned by the hook, so it is not transferred out during the swap.
  • Restricts pool creation to the hook itself: beforeInitialize reverts for any outside caller, so only openPool() can create the pool, once.
  • Gates trading until ignite() is called: beforeSwap reverts with NotIgnitedYet before the trading start time is set.
  • Lets the deployer withdraw collected ETH tax, and anyone call sendTax() to forward it to a taxSink address that was fixed before ignite().
Swap behaviour
Buys (ETH to FARM, zeroForOne) and sells (FARM to ETH) both pay the current tax, which is 85% at ignite and decays linearly to 1% over 20 minutes, then stays at 1%. On exact-in buys the tax is taken before the swap as a share of the input ETH (amount times bps over 10,000). On exact-out buys the tax is added on top of the output-side ETH computed in afterSwap. Sells with exact-out ETH take the share in beforeSwap; exact-in sells take it in afterSwap as a share of the received ETH. The LP fee of 0.3% is charged by the pool in addition to the hook tax.
Liquidity behaviour
No liquidity callbacks. The deployer's single-sided FARM position is minted in openPool() through the PositionManager. The deployer owns the position NFT and can collect fees or remove liquidity at any time; the position is not locked.
Fee behaviour
The pool's static LP fee is 0.3%. On top of it the hook applies a directional tax on all swaps, with the rate set by currentTax(), which is derived from block timestamp and ignitedAt. The tax is always denominated in ETH and is minted as PoolManager claims to the hook. The tax is not shared with LPs; it accrues to the hook and is withdrawable by the deployer or forwarded to taxSink via the public sendTax().
Owner & admin controls
Only the deployer (an immutable address) can call openPool(), ignite(), setTaxSink() before ignite(), and withdraw(). The deployer cannot change the tax rates, pause trading, blacklist addresses or upgrade the contract. The deployer does own the LP position NFT and can remove liquidity. The source states there is no proxy, and the tax constants are fixed.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: reverts for all external pool creation, forcing use of openPool(). beforeSwap: enforces the trading gate and computes and collects the ETH tax on exact-in buys and exact-out sells, returning a before-swap delta. afterSwap: computes and collects the ETH tax on exact-in sells and exact-out buys, returning an after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take the tax from the swap amounts.

Security & trust assessment

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

Who controls it: The deployer key controls openPool(), ignite(), the taxSink setting and withdraw(). It can drain the hook's accrued ETH tax to any address at any time and can remove the LP position. It cannot change tax rates, pause swaps or upgrade the code.

Risk to user funds: The hook holds no user funds other than the ETH tax it mints as PoolManager claims. Swaps can be blocked only before ignite(). Traders' funds are not held by the hook beyond the tax taken in the same swap.

Security findings

  • [info] Hook-taken ETH tax via return deltas: beforeSwap and afterSwap return deltas take up to 85% of the traded ETH at launch, decaying to 1%. This is intended by the design, but early traders face a very high cost.
  • [medium] Deployer can withdraw all collected tax: withdraw() lets the deployer send the entire ETH balance the hook holds in the PoolManager to any address. The tax funds are controlled by one key until sendTax() is used to move them to the fixed taxSink.
  • [medium] Deployer owns and can remove the LP position: The position NFT for the FARM liquidity is owned by the deployer, who can remove it. This is a rug vector for the pool's trading liquidity, not for the hook's ETH tax balance.
  • [low] Trading gate depends on a single ignite call: Trading is blocked until the deployer calls ignite(). If the deployer never calls it, the pool stays closed. Once called, it cannot be undone.
  • [info] Unusual 0.3% pool fee under 1% tax floor: Trades pay the 0.3% pool fee plus the hook tax. Rounding on _onTopOf is truncated; no exploitable path was identified in the decoded logic.

Contract details

Verified source
Yes (FarmHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,743 bytes
Upgradeable proxy
No
Detected patterns
return-delta, self-unlock, tax

Pools using FarmHook