How a market opens
Own-pool market
Anyone calls PerpMarkets.openMarket(coin, sqrtPriceX96). It creates the coin's own coin/HYPE Uniswap v4-style pool with the ElyPerps hook (fee 0.30%, tick spacing 60) and deploys its engine. LPs add HYPE and the coin with addLiquidity; positions are plain full-range positions keyed to the LP's address.
The market opens once the pool has held at least 100 HYPE on its HYPE side for 24 hours. Anyone can call poke() to start or reset the clock; the keeper does it every pass.
Launch-pool market (default)
Coins launch on Ascend, and their liquidity stays in that pool. openSampled(coin) deploys an engine priced by PerpSampler, and bindVenue(coin, adapter, poolId) points it at the coin's pool: anyone can bind a pool with at least 100 HYPE on its HYPE side, and anyone can rebind to a pool twice as deep. After that, anyone calls sample(coin), at most once every 5 seconds: the sampler reads price and depth from the pool in the same transaction, moves at most 1% from the last sample, and the mark is the median of the last 12. Every cap is halved and leverage is 2x. A sample older than five minutes stops new opens.
Adapters: VenueV4Price reads any Uniswap v4 PoolManager (Ascend runs one; the pool id includes the launchpad hook and the dynamic-fee flag) with native HYPE or WHYPE on either side; V2PairPrice reads a v2-style pair through getReserves.
Why LPs come
An own pool's LPs earn 20% of every perp fee and 10% of every funding payment, donated into the pool in HYPE through donate(), on top of their swap fees.