MorphogenHook on Robinhood Chain
Uniswap v4 Hook Contract 0xd27596add474e5f645cc1d2141e8ff2a3fd33aec on Robinhood Chain · Launchpad · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $6.34K
- All-time volume
- $2.02M
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 3,160
What it does
Implements a scheduled bonding-curve launch for the MGEN token against WETH: formation trades follow an exact curve with custom accounting, then at 75M MGEN the market transitions to native concentrated liquidity.
How it works step by step
- Enforces a scheduled launch gate; swaps revert until the immutable opening time.
- During formation, prices follow a fixed bonding curve over 75M MGEN, settled with ERC6909 claim burn and mint and returned via BeforeSwapDelta.
- Routes creator fees (primary creator at 1/9 of formation principal, ordinary creator at 0.15%) to a creatorRevenue address as WETH claims.
- At the 75M boundary, arms a transition that moves the vault into permanent phase and seeds concentrated liquidity at a terminal price.
- Maintains a 30-minute time-weighted tick oracle with checkpoints and uses it to gate permissionless automatic compounding.
- Blocks donations and restricts liquidity adds and removals to vault-controlled phases.
- Swap behaviour
- During the Formation phase, swaps bypass the AMM and use the immutable curve: buys require exact output and charge WETH principal plus fees, and sells require exact input and return WETH net of a 0.30% fee. After transition, normal v4 swaps run with the fixed 0.30% LP fee, and afterSwap updates oracle state and may trigger automatic compounding.
- Liquidity behaviour
- Liquidity add is blocked during Formation and TransitionPending phases (FormationLiquidityForbidden). Only the vault may add liquidity during Transitioning or Permanent phases. Removal is only permitted as a zero-delta poke by the vault during Transitioning or Permanent phases; any other removal reverts (PermanentPrincipal). Donations are always forbidden.
- Fee behaviour
- Pool LP fee is a fixed 3000 pips (0.30%). During formation, a buy adds a principal-based curve price plus base LP fee of 0.30% and a creator fee (primary creator at 1/9 of formation principal, ordinary creator at 0.15% of the ordinary pool gross) minted as WETH ERC6909 claims to creatorRevenue. Sells deduct a 0.30% seller fee retained by the formation reserve. In permanent phase, the fixed 0.30% LP fee applies, and ordinary buys accrue a 0.15% creator fee on WETH input via return delta; fresh buys pay a cumulative primary creator target.
- Owner & admin controls
- No owner or admin role in the hook. The vault is the only privileged caller: it alone can call activateFormation, beginTransition, completeTransition, notifyCompound, and it is the sole authorized sender for pool initialization and liquidity add/remove. The vault grants the hook ERC6909 allowances over MGEN and WETH claims. Constructor addresses (poolManager, mgen, weth, creatorRevenue, vault, launchGate) are immutable, so no upgrade path or parameter changes exist. Phase advancement is driven by swap-triggered boundary logic and vault calls rather than an owner key.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize and afterInitialize: restrict pool initialization to the vault at the single terminal sqrt price and set the initialized flag. beforeAddLiquidity and beforeRemoveLiquidity: gate liquidity to vault-controlled phases and lock permanent principal. beforeSwap: replaces AMM pricing during formation with custom curve accounting and returns a BeforeSwapDelta that offsets the reserves via ERC6909 claim burn and mint; in permanent phase it validates swap direction and bounds. afterSwap: arms and triggers the formation-to-permanent transition at the 75M boundary, updates the oracle, tracks circulating supply and creator fees through afterSwapReturnDelta, and attempts automatic compounding through the vault. beforeDonate: reverts. beforeSwapReturnDelta and afterSwapReturnDelta: used to take exact-offset custom accounting during formation and to collect ordinary creator fees in permanent phase.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No owner key exists in the hook. The vault has broad control over the lifecycle (activation, transition, compounding trigger, liquidity adds). The vault is immutable and set at construction, so its own governance and key security determine whether it can call these functions. The vault can also be the source of the claim allowances the hook spends.
Risk to user funds: The hook holds no tokens directly. Formation reserves exist as PoolManager ERC6909 claims owned by the vault, which the hook can burn and mint within its allowance. Users trade against this custom accounting curve; buys and sells are bounded by invariant checks. Liquidity positions are held by the vault. Buyers and sellers are exposed to the curve pricing and oracle-gated compounding but not to admin discretion.
Security findings
- [medium] Custom accounting via return deltas holds reserves: During formation the hook takes and returns tokens through BeforeSwapDelta and ERC6909 burn/mint. Correct accounting depends on the vault granting exact MGEN and WETH claim allowances and holding sufficient balances; deviations revert rather than leak funds, as checked by activateFormation and completeTransition.
- [medium] Oracle-gated automatic compounding: Automatic compounding is triggered from afterSwap through a try/catch call to the vault and depends on the oracle; the price guard rejects compounding when spot and 30-minute TWAP differ by more than 20 ticks, which reduces but does not eliminate manipulation risk on a thin market.
- [info] Immutable scheduled launch gate: The launch gate is immutable and can only open at a fixed time; it blocks swaps until opensAt, and no party can change it, so there is no admin pause.
- [info] One-way phase machine: Phases move only forward (Setup to Formation to TransitionPending to Transitioning to Permanent) and transitions are guarded by invariant checks, so no reversal path exists.
- [info] Principal locked by design: Donations are reverted and liquidity removal is restricted, so principal cannot be extracted through hook pathways beyond the vault's own controlled flows.
Contract details
- Verified source
- Yes (MorphogenHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 18,732 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, liquidity-management, oracle, return-delta
Pools using MorphogenHook
- WETH / MGEN (0.30% fee) — 24h volume $0, TVL $6.34K, 0 swaps today