MaxWinHook on Robinhood Chain

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

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

What it does

Charges a per-swap fee on trades in the MAX WIN token pool and forwards the proceeds in ETH to the token contract, which distributes them as hook fees.

How it works step by step

  • Restricts pools to native ETH as currency0 and allows one pool per currency1 token
  • Calculates a fee on every swap as a basis-point share of the output amount using the token's HOOK_FEE_TIER
  • Takes the fee from the pool via poolManager.take and returns it as an afterSwap delta
  • Swaps non-ETH fee amounts into ETH through the same pool when needed
  • Forwards ETH and the swapper address to the token's processHookFee function, tagged with buy or sell direction
Swap behaviour
After each swap not initiated by the token itself, the hook takes a fee of swap amount times HOOK_FEE_TIER out of 1,000,000, converts non-ETH fees to ETH via the pool, and forwards ETH to processHookFee on the token.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
After each swap that does not originate from the paired token itself, the hook takes a fee equal to the swap amount times the token's HOOK_FEE_TIER divided by 1,000,000 from the pool's output currency via poolManager.take. If the fee currency is not native ETH, it is swapped to ETH through the same pool. The ETH is forwarded to the token contract via processHookFee together with the swapper address and buy/sell flag. The hook returns the fee as an afterSwap delta so the pool accounting is adjusted.
Owner & admin controls
No admin controls found in the hook. Pool initialization is permissionless but restricted to one pool per token (currency1), and the hook does not expose owner, pause or upgrade functions. The external token contract referenced via HOOK_FEE_TIER and processHookFee is not controlled by this hook and its admin powers are unknown.

Enabled Uniswap v4 callbacks

beforeInitialize, afterSwap, afterSwapReturnDelta

beforeInitialize: enforces that currency0 is native ETH and that each currency1 token can only be used to initialize one pool. afterSwap: charges the hook fee on swaps, converts non-ETH fees to ETH, and forwards them to the token. afterSwapReturnDelta: returns the fee amount so the pool manager debits it from the swapper's delta.

Security & trust assessment

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

Who controls it: The hook itself has no privileged key. Fee tier and fee recipient logic live in the external token contract referenced by currency1; a privileged role there could change HOOK_FEE_TIER or processHookFee behaviour, affecting every swap through the pool.

Risk to user funds: The hook takes a fee from swap output and holds the tokens briefly during conversion. It cannot block swaps or move LP principal beyond the fee, but the fee amount and destination depend on the external token contract.

Security findings

  • [medium] Fee rate controlled by external token: The hook's fee rate is read from an external token via HOOK_FEE_TIER on every swap, so the token's owner or admin can change the fee charged to swappers without any change in the hook.
  • [medium] Trust in external token for fee handling: The hook forwards ETH and swapper data to processHookFee on the token contract. A malicious or upgradeable token could redirect or misuse these fees.
  • [medium] No slippage protection on fee conversion swap: The swap used to convert non-ETH fees to ETH is executed with a price limit of MAX_SQRT_PRICE - 1 and no slippage protection, so the conversion can be sandwiched or receive poor execution.
  • [low] Permissionless pool initialization with uniqueness check: beforeInitialize only checks that currency0 is native ETH and currency1 has not been used before; any caller may initialize a pool, but only one pool per token is possible.
  • [low] Swapper attribution falls back to tx.origin: The hook calls msgSender() on the sender with a try/catch and falls back to tx.origin, which can attribute fees to an unexpected address when the sender is a contract.

Contract details

Verified source
Yes (MaxWinHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
5,982 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, return-delta

Pools using MaxWinHook