MapHook on Robinhood Chain

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

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

What it does

MapHook opens a MAP/ether pool and, from then on, takes a 50% fee on ether swaps that decays to 5% over 10 minutes and stays at 5% after, then uses the collected ether to buy and burn MAP, so every trader pays the same fee in each direction after launch, with the largest fees on early trades.

How it works step by step

  • Holds the Uniswap v4 pool for MAP against native ether and opens it once, after the map's first sale plus OPENING_DELAY, by minting genesis MAP into a single one-sided liquidity position from parity upward
  • Takes a dynamic fee on every swap's ether side, starting at LAUNCH_FEE_BPS and decaying linearly to FEE_BPS over LAUNCH, charged as a claim on the pool manager via beforeSwap or afterSwap return deltas
  • Uses ether waiting from mints (20% of price) and fees to buy MAP on each swap and on pay(), within a per-block allowance and a STEP_BPS cap above the previous block's close, then burns the bought MAP
  • Shares fees and royalties: TO_RENT_BPS sent to the Map as rent, TO_WAITING_BPS back into the buy pool, TO_WORLD_BPS to the Map world treasury, and the remainder to the protocol, which pay() forwards to the Map owner
  • Refuses liquidity from anyone but itself, refuses donations, refuses liquidity removal, and reverts sells that would push the price above the opening start
Swap behaviour
Buys of MAP with ether (zeroForOne) trigger a buy of waiting ether before or after the swap. Ether-denominated swaps pay the dynamic fee (starting at 50% and decaying to 5% over 10 minutes, then fixed at 5%) on their ether side, taken as a claim and later shared. Sells of MAP that would push the price above the start revert. Net effect: fees are highest in the first 10 minutes after opening and identical for buyers and sellers thereafter, while the pool's own buy-and-burn pressure supports the MAP price.
Liquidity behaviour
Only the hook can add liquidity (beforeAddLiquidity reverts for any other sender), and only at opening. Removal is always reverted, so the genesis position is locked permanently. Donations are reverted.
Fee behaviour
Dynamic fee applied through return deltas: LAUNCH_FEE_BPS (50%) at opening, falling linearly to FEE_BPS (5%) over LAUNCH (10 minutes), then 5% thereafter. Fee on exact-input ether swaps is taken from the input; on exact-output it is added to the requested amount. Collected fees are split 37.5% rent, 37.5% back to waiting ether for MAP buys, 10% to the world treasury, and 15% to the protocol.
Owner & admin controls
No pause, upgrade, or fee-setting function is exposed. The map address is immutable and its owner() receives the protocol share on pay(); if the map has no owner, the protocol share returns to the buy pool. Constants (fee, delay, splits, buy caps) are immutable. Whoever controls the Map contract's owner() therefore controls where protocol revenue is sent.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool initialization to the hook itself. beforeAddLiquidity restricts liquidity to the hook. beforeRemoveLiquidity always reverts, locking liquidity. beforeDonate always reverts. beforeSwap runs pre-swap buys and takes the ether-side fee via beforeSwapReturnDelta. afterSwap enforces the price ceiling, takes MAP-side fees and runs post-swap buys via afterSwapReturnDelta. afterInitialize, afterAddLiquidity, afterRemoveLiquidity and afterDonate are present but revert with HookNotImplemented.

Security & trust assessment

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

Who controls it: No single key can alter pool parameters or pause trading. Control over protocol revenue lies with whoever owns the Map contract, since pay() forwards to its owner().

Risk to user funds: The hook holds pooled ether and MAP balances, the genesis liquidity, and pending or claimed fees. It can move pool funds via buys and burns, and it sends the protocol share and rent to external Map contract addresses. It cannot be paused or drained by an admin directly, but funds are routed through external Map logic.

Security findings

  • [info] Irreversible locked liquidity: beforeRemoveLiquidity always reverts, so the genesis position can never be withdrawn; this is the stated design but means LPs cannot exit.
  • [medium] Protocol share routed to external owner: pay() sends the protocol's accumulated share to IMap(map).owner(), an external contract whose owner() logic is not in scope, so the destination depends on the Map contract's governance.
  • [medium] Return-delta fee and buy logic in swap hooks: beforeSwap and afterSwap take fees through return deltas and perform buys inside the swap path, which couples swap execution to the buy logic and the price limit; a bug here could affect every swap.
  • [low] Price ceiling reverts sells: afterSwap reverts any zeroForOne=false swap that leaves the price above startPrice, so sells are blocked in that case by design.
  • [low] Reentrancy-sensitive ether handling: receive() and pay() move native ether and call external Map contracts (shareRent, payBurnt) while guarded only by a _collecting flag; no reentrancy guard is applied.

Contract details

Verified source
Yes (MapHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
17,250 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, launchpad, moves-currency, ownable, return-delta, self-unlock

Pools using MapHook