HeggV4TaxHook on Robinhood Chain

Uniswap v4 Hook Contract 0xab1463582af21d843e2425fc0e5b5cee190a40cc on Robinhood Chain · Custom pricing · Verified contract

Volume (24h)
$13.55K
Value locked (TVL)
$26.20K
All-time volume
$291.42K
Pools using this hook
1
Swaps (24h)
94 (64 traders)
Total swaps
1,814

What it does

A Uniswap v4 hook for the native-ETH/HEGG pool that automatically takes a fixed 1% tax on HEGG buys and 2% on HEGG sells and sends it to a fixed fee collector address.

How it works step by step

  • Restricts itself to one pool: native ETH as currency0, HEGG as currency1, with the configured fee and tick spacing.
  • Applies a 1% tax on HEGG buys and a 2% tax on HEGG sells, computed in basis points of the HEGG amount.
  • Uses beforeSwap for exact-output buys and exact-input sells, and afterSwap for exact-input buys and exact-output sells, depending on which currency carries the tax.
  • Takes the tax via poolManager.take and transfers it to the immutable feeCollector address.
  • Emits TradeTaxCollected(buy, exactInput, heggAmount) for each taxed swap.
  • Reverts every liquidity and donate callback with HookNotImplemented.
Swap behaviour
On each swap in the matching pool, the hook takes a fixed percentage of the HEGG amount (1% for buys, 2% for sells) through the pool manager and transfers it to feeCollector, adjusting the swap's deltas so the trader receives the reduced amount. Swaps in other pools revert.
Liquidity behaviour
No liquidity callbacks. Liquidity add, remove and donate hooks all revert with HookNotImplemented, so liquidity cannot be added or removed through this hook's pool.
Fee behaviour
Charges a fixed tax of 100 bps (1%) on buys and 200 bps (2%) on sells of the HEGG token, taken via the pool manager and sent to the immutable feeCollector address. The tax is applied to the HEGG side of the swap only when HEGG is the specified or unspecified currency as determined by swap direction and exact-input/exact-output mode. The pool's own LP fee is separate.
Owner & admin controls
No admin controls found. All configuration (poolManager, hegg token, feeCollector, poolFee, tickSpacing) and tax rates (1% buy, 2% sell) are immutable constants or immutables set at construction; there is no owner, pause, upgrade or parameter-change function.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: validates the pool and, for exact-output buys or exact-input sells, takes the HEGG tax and returns it as a before-swap delta. afterSwap: validates the pool and, for exact-input buys or exact-output sells, computes the tax from the HEGG output delta, takes it and returns it as an after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to adjust the swap's balance deltas so the tax is paid out of the swap flow.

Security & trust assessment

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

Who controls it: No privileged role exists in the contract, so no key can change fees, pause swaps or move funds. The fee collector address is fixed at deployment and receives all collected HEGG tax; its holder is the only party that benefits from the tax and it cannot be rotated.

Risk to user funds: The hook can take up to 2% of the HEGG amount of each taxed swap in the pool and route it to feeCollector through the pool manager. It cannot hold user funds at rest, cannot block swaps other than by reverting on invalid pool configuration, and cannot touch liquidity positions.

Security findings

  • [info] Hook moves pool currency via return deltas: The hook calls poolManager.take to move HEGG tokens from the pool manager to feeCollector on every taxed swap. This is the intended tax mechanism, but it means the hook holds return-delta authority over the HEGG leg of swaps.
  • [info] Immutable tax and collector: Tax rates are hardcoded at 100 and 200 bps and the fee collector is immutable, so users cannot avoid the tax on this pool and the owner of the collector address cannot be changed by the contract.
  • [info] Pool-locked hook: Swaps are restricted to the single pool matching the immutable currency0 (native ETH), currency1 (HEGG), fee, tick spacing and hook address; any other pool reverts with InvalidPool.
  • [low] Bounded amount conversions: _absolute and _toInt128 revert on int256.min or amounts exceeding int128 max, preventing overflow when converting swap amounts into tax deltas.

Contract details

Verified source
Yes (HeggV4TaxHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
2,667 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using HeggV4TaxHook