MikoFeeHook on Robinhood Chain

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

Volume (24h)
$0
Value locked (TVL)
$6.46K
All-time volume
$527.16K
Pools using this hook
5
Swaps (24h)
0 (0 traders)
Total swaps
11,068

What it does

A reusable fee hook that charges a 4% fee on native-side swaps plus an anti-sniping surcharge that decays over the first 12 minutes, sending fees to a treasury that forwards to a reward vault.

How it works step by step

  • Registers each new pool at initialization with a launch clock and per-pool caps, reading policy from the token when it is an official MIKO token, otherwise using generic defaults.
  • Charges a 4% base fee on native-side swaps, taken into the MikoFeeTreasury via poolManager.take.
  • Applies a time-decaying anti-sniping surcharge of up to 60% that falls to zero after 12 minutes.
  • Caps each non-exempt swap at 1% of token supply and cumulative wallet buys at 2% during the launch window, keyed on tx.origin.
  • Rejects all liquidity callbacks and donations via UnsupportedHook.
Swap behaviour
On each swap where native ETH is the specified side, a fee of 4% plus the decaying launch surcharge is taken in beforeSwap; otherwise the fee is taken from the unspecified side in afterSwap. During the first 720 seconds, per-swap and per-wallet token buy caps apply to non-exempt addresses, reverting oversized trades.
Liquidity behaviour
No liquidity callbacks; beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity all revert with UnsupportedHook. Liquidity is provided and removed through the ordinary pool manager path.
Fee behaviour
Every swap that is native-side (currency0 is native ETH) pays a 4% base fee plus a time-decaying launch surcharge of up to 60% (start 6000 bps, decay constant 158 seconds, zero after a 720-second window), taken via poolManager.take into the MikoFeeTreasury. Exact-output fees are grossed up. Token-side-specified swaps pay the fee via afterSwap return delta. Launch surcharge is computed from block.timestamp relative to the pool's launchTimestamp.
Owner & admin controls
The hook itself has no owner, pause, upgrade or parameter setters; all configuration is fixed at pool registration from the token's mikoHookLaunchPolicy() for official pools or generic defaults otherwise. The fee recipient MikoFeeTreasury is Ownable2Step and can point its active RewardVault at a new target (only if that target reports back to the treasury), freeze the target irreversibly, and renounce ownership only after freezing. Owner of the treasury can redirect where forwarded native fees go until frozen.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize registers per-pool launch state and reads the token policy and supply. beforeSwap takes the native-side fee via poolManager.take and returns it as a specified-side delta. afterSwap enforces launch caps during the window and takes the fee on the unspecified side via afterSwap return delta. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take fees in the pool accounting.

Security & trust assessment

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

Who controls it: Hook has no privileged key. The treasury owner can change the reward vault destination of fees until frozen (and can renounce ownership only after freezing). A malicious owner could redirect future fees to a vault that points back to the treasury but has its own withdrawal logic, so trust in the RewardVault contract matters.

Risk to user funds: The hook does not custody user funds beyond transient deltas in the pool manager; it takes native-side fees into the MikoFeeTreasury which then forwards to the RewardVault. It can block swaps for launch cap violations and can revert pool initialization for misconfigured official pools. Launch caps can prevent large buys in the first 12 minutes.

Security findings

  • [info] Launch caps are per-wallet and tx.origin based: Swaps during the launch window are capped at 1% of token supply per swap and wallets at 2% cumulative buys, keyed on tx.origin with a fixed exemption list for official pools; a sniper can bypass by using multiple wallets.
  • [low] Exempt addresses bypass launch caps: Exemption list for official pools is supplied by the token's mikoHookLaunchPolicy() and cannot be changed after registration; any exempt address can trade without caps during the window.
  • [medium] Fee destination controllable by treasury owner until frozen: Treasury owner can change the active RewardVault to a new target that reports feeTreasury() equal to the treasury, and can freeze it irreversibly. Until freeze, fee destination is changeable by owner.
  • [info] Immutable and non-upgradeable hook: The hook and its immutable constructor enforce a specific address-bit pattern for permissions and a live pool manager; no upgrade path exists.

Contract details

Verified source
Yes (MikoFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,494 bytes
Upgradeable proxy
No
Detected patterns
erc20, launchpad, moves-currency, return-delta

Pools using MikoFeeHook