MysteryFactory on Robinhood Chain

Uniswap v4 Hook Contract 0x48b51c66e7d1e32fc86e7123cb2e42619d2ea8cc on Robinhood Chain · Launchpad · Verified contract

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

What it does

The hook makes every trade in a launched token pay a fee that is highest in the first two minutes after reveal and then settles to a flat rate, with buys taxed in the token on the input side and sells taxed on the output side, and the proceeds go to the platform and the creator.

How it works step by step

  • Acts as factory and hook for direct Uniswap v4 launches: deploys a MysteryToken with a fixed 1B supply, seeds a single-sided ETH/token pool on the full launch range, and locks the seed liquidity permanently in the hook (no LP removal path is exposed to users).
  • Charges a token-denominated swap fee in beforeSwap on non-zeroForOne swaps and in afterSwap on zeroForOne swaps, then converts the fee token into ETH through an internal swap on the same pool and credits the proceeds to the platform treasury and the creator via a claimable ledger.
  • Decays the base fee from 50% to 1% over the first 120 seconds after the reveal window opens (sniper protection), while optional creator extra fees stay flat.
  • Optionally burns a share of each swap's token-denominated basis when shadow mode is enabled, via the token's burn restricted to the factory.
  • Supports an optional developer buy at launch through a separate immutable buyer contract that swaps ETH for tokens and sends them to the creator, capped at 2% of supply.
  • Lets a permissionless caller reveal the token name, symbol and metadata URI after a 20-minute gate by supplying a preimage matching a commitment; a quoter contract simulates swaps through the hook via reverting unlock callbacks.
Swap behaviour
Swaps that buy the token (ETH in, token out) pay the total fee charged in the token side via beforeSwap, while sells (token in, ETH out) pay the same total fee charged via afterSwap on the token output; the fee is taken in the token, part of it is burned in shadow mode, and the remainder is swapped to ETH inside the hook and split between treasury and creator. Early swaps in the first 120 seconds of the reveal window pay a base fee that starts at 50% and falls linearly to 1%, so trades in that window pay substantially more than later trades; optional extra fees apply uniformly after that. Swaps are reverted if the pool has any protocol or LP fee set, if the fee would round to zero in shadow mode, or if the swap is exact-output.
Liquidity behaviour
Liquidity can only be added by the factory itself during launch through a single seeding modification; beforeAddLiquidity reverts for any other sender, so outside LPs cannot add liquidity. Liquidity is never removed by users; the only removal path is the factory's collectFees, which withdraws accrued pool fee deltas and credits them to the treasury and creator ledgers rather than returning principal.
Fee behaviour
Fees are set dynamically by the hook: total fee equals the decaying base fee (50% to 1% over 120 seconds) plus a fixed extra fee of up to 3% chosen at launch. The fee is taken as a return delta in the token currency, with a portion burned when shadow mode is enabled, and the rest converted to ETH and split between treasury (platform share of 0.65% of basis, with the rest going to the creator). The pool's static LP fee is zero.
Owner & admin controls
No owner, pauser, upgrade proxy or parameter-setting function is present; constants (fees, decay window, reveal window, supply, tick spacing) are immutable and treasury is set once in the constructor. Treasury receives platform fees via the claimable ledger and can withdraw them; the treasury address itself cannot be changed. Creators control their own extra fee at launch and the reveal of the identity; anyone can trigger the reveal after the gate.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: restricts pool creation to the factory during launch with the expected token as currency1. beforeAddLiquidity: allows only factory-originated liquidity so the seed position is locked. beforeSwap: charges the fee on buy-side exact-input swaps via a return delta and enforces exact-input and zero protocol/LP fee. afterSwap: charges the fee on sell-side swaps via a return delta and validates the realized amounts. beforeSwapReturnDelta and afterSwapReturnDelta: enable the hook to take a token-denominated fee and to redirect output amounts.

Security & trust assessment

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

Who controls it: No privileged key can change fees, pause swaps or upgrade the contracts; the treasury address is fixed and only receives accrued platform fees. Centralization risk is limited to the immutable treasury and to the factory deployer's ability to choose the launch parameters at creation.

Risk to user funds: The hook holds fee tokens and ETH transiently during swaps and keeps claimable balances for treasury and creators; user principal in the pool is not held by a removable path, but the hook can take a fee from every swap and any bug in fee accounting could strand value in the claimable ledger.

Security findings

  • [info] Hook takes user funds via return deltas: beforeSwap and afterSwap return token-denominated deltas, so the hook holds fee tokens transiently and converts them to ETH through its own swap; users are charged a fee on every trade by design.
  • [medium] Fee decay and extra fee can make trades expensive: The base fee starts at 50% and the creator can add up to 3% extra at launch, so early buyers and sellers in the decay window pay large fees; this is intended but materially affects execution.
  • [low] Fees converted via internal pool swap: The fee-to-ETH conversion executes a swap on the same pool through manager.swap, which moves the price; the conversion can be sandwiched in principle, though its size is bounded by the fee amount.
  • [info] Factory-only seeding and locked liquidity: Liquidity is only added by the factory and principal is never withdrawn, reducing rug-pull risk from LP removal; however the pool depends on the factory's accounting logic remaining correct since there is no emergency exit.
  • [info] Burn restricted to factory fee path: Token burn is callable only by the factory and only in shadow mode, limited to the factory's own collected fee balance, so holders' balances cannot be burned.

Contract details

Verified source
Yes (MysteryFactory)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
21,229 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc20, fee-sharing, launchpad, mev-protection, moves-currency, return-delta, self-unlock

Pools using MysteryFactory