(05)Technology

The hook and the launchpad

Every Ostra token trades in a Uniswap v4 pool run by one hook, from its first block onwards. The hook places the whole supply as locked liquidity, takes the fees, enforces the launch rules and lets a creator change a rule only in traders' favour. Every number on this page is a constant in the contracts.

Chain Robinhood Chain · 4663Code 64c3213

5.1The problems it solves#

Token launches fail traders in the same few ways. Each row is a rule the contracts enforce, not a promise; the sections below give the exact numbers and lines.

ProblemWhat the hook does
Liquidity pulled after launchThe whole supply goes into positions held by a locker that has no function to remove liquidity. 100% of the supply is in the pool; there is no team allocation.
Snipers in the first blocksAn anti-snipe tax of up to 80% on buys, falling linearly to zero within at most an hour.
A few wallets taking the supply earlyA maximum per buy, enforced by the hook, and a maximum per wallet, enforced in the token, until graduation.
Sandwiches and same-second reversalsAn LP fee surcharge on an actor reversing its own swap in the same second, up to 5%, and a cap on how far one transaction may move the price.
A creator raising taxes after people boughtAfter launch, a rule can only move towards traders: lower taxes, looser limits. The hook refuses anything else.
Farming the token in other pools during launchUntil the anti-farmer period ends, the token refuses transfers into other v2, v3 and v4 pools.
A dev buy dumped on buyersAt most 5% of supply, bought at market in the launch transaction, and vested to the creator with a cliff of at least 7 days.
Stock-paired pools trading while the stock market is closedA higher LP fee while the NYSE is closed, for pools quoted in a Robinhood stock token.
A migration that can be front-run or failNone: the pool is a v4 pool from the first block, and graduation is a change of state in the hook.

5.2One launch, one transaction#

OstraLaunchpad.launch does all of this in one transaction OstraLaunchpad.sol:159-183:

  1. takes the launch fee of exactly 0.0002 ETH;
  2. checks every parameter against the contract's bounds;
  3. deploys the token with CREATE2, at an address that depends on the creator, its salt and the launch parameters, never on the block;
  4. mints the whole supply, 1,000,000,000 tokens with 18 decimals, to the locker; the token has no other mint function OstraToken.sol:94-108;
  5. registers the pool's rules in the hook and initializes the Uniswap v4 pool with the dynamic fee and tick spacing 200;
  6. has the locker add one single-sided position per tier, from the start price upwards; rounding dust goes to the dead address.

Only the launchpad can create a pool with the Ostra hook OstraHook.sol:446-456, and poolOf(token) proves a token is an Ostra launch. A launch has one to eight tiers; the last one is open to the maximum price OstraLaunchpad.sol:326-361.

40% of supply40,000 ticks40,000 ticksopen to the maximum price30%30%start price
The SDK's default tiers. Each tier is a one-sided position of the token only, above the start price, so buyers take the token in order and nothing has to migrate anywhere when the pool graduates.

The quote can be ETH, USDG, a Robinhood stock token or any ERC-20. A stock token is recognised on chain: it must answer with Robinhood's stock registry OstraLaunchpad.sol:312-320.

5.3Fees on every swap#

A swap in an Ostra pool pays two independent charges.

The hook fee: 1% of the quote side#

On every buy and sell, exact input or exact output, the hook charges 1% of the quote leg, plus any tax and anti-snipe tax, as one rateOstraHook.sol:627-641. It is split at the moment of the swap OstraHook.sol:657-674:

ShareOf the hook feeOf the swap
Creator (the pool’s creator vault, or its split)70%0.70%
$OSTRA buyback15%0.15%
Operator15%0.15%
With a referrer: the referrer takes half of the 30%15%0.15%
… and buyback and operator then take7.5% each0.075% each

A swap names a referrer by passing an address as its hook data; the referrer claims its share in the quote, or WETH for an ETH poolOstraHook.sol:541-546. Every charge emits Charged with the fee, tax and anti-snipe parts.

The LP fee: set by the hook on every swap#

The pool uses Uniswap's dynamic fee, which the hook sets per swap from OstraFees OstraFees.sol:71-100. It goes to the liquidity in range: the locked positions, the floor bid, and outside LPs after graduation.

ComponentValueWhen
Base0.25%Every swap
Market closed0.50%Pools quoted in a Robinhood stock token, while the NYSE is closed
Volatility0.25% up to 1%Pools that opt in at launch: grows with the distance between the price and its moving average (60-second half-life), reaching 1% at 300 ticks
MEV surcharge0.01% per tick, at most 5%An actor that reverses its own swap in the same pool within the same second

The session and volatility fees are not added: the larger applies, never above 1%. The MEV surcharge comes on top, so the LP fee is at most 6% OstraHook.sol:510-525.

  • Market hours on chain. A trading day runs from 20:00 New York time to 20:00 the next day; it is closed on weekends and NYSE holidays. US daylight time is computed on chain, and the holidays for 2026 to 2028 are a bitmap checked against the NYSE's published list Fees.t.sol:26-35. From 2029 only weekends count until a new table is deployed.
  • Who pays the MEV surcharge. The actor is tx.origin with the swap's sender. The first swap of a pool in a second records its actor, direction and starting tick; only the same actor swapping back in the same second pays 100 pips per tick movedOstraFees.sol:28-33. A stranger's swap in between does not trigger it Fees.t.sol:127-154.

5.4Launch protections#

Each protection is chosen by the creator at launch, within the contract's bounds OstraLaunchpad.sol:198-229.

ProtectionBoundsWhere it is enforced
Anti-snipe tax on buysUp to 80%, falling linearly to 0 over up to 1 hourOstraHook.sol:368-373
Max buyTokens one buy swap may receive; until graduation or the end of the limits periodOstraHook.sol:690-714
Max walletTokens any holder may hold; system contracts exceptedOstraToken.sol:177-197
Anti-farmerUp to 365 days: no transfers into other pools of the tokenOstraToken.sol:177-197
Circuit breakerOne transaction may move the price at most 1,000 to 6,932 ticks (from about ±10% to a doubling or halving); the SDK default is 2,231 (−20% / +25%)OstraHook.sol:582-587
Outside liquidityOnly after graduation and the end of the anti-farmer periodOstraHook.sol:458-469
  • The anti-snipe tax has one exemption: the dev buy made in the launch transaction itself, which is capped and vested (below).
  • Max wallet and anti-farmer live in the token, because a v4 hook only sees the router, never the wallet OstraToken.sol:9-25.
  • The circuit breaker measures from the price before the transaction's first swap, so a bundle of swaps shares one band. It also refuses a swap that leaves no liquidity at the new price, so the price cannot be walked through empty ticks Launchpad.fork.t.sol:1806-1827.

5.5Graduation#

A pool graduates once, for good, in the swap that reaches its threshold: a share of the supply sold (80% by default) or an amount of quote raised, both counted net of sells OstraHook.sol:690-714. Then:

  • the anti-snipe tax is zero;
  • taxes switch to their after-graduation rates, which can only be equal or lower;
  • max buy and max wallet are lifted;
  • outside liquidity opens, once the anti-farmer period is also over.

The circuit breaker, the LP fee rules and the tax buckets do not change. What graduation lifts is tested on a mainnet fork Launchpad.fork.t.sol:486-514.

5.6Taxes and where they go#

A creator may set separate buy and sell taxes, up to 10% each, for a set duration OstraLaunchpad.sol:42-52. Tax and anti-snipe revenue is split into buckets fixed at launch: creator, dividends, burn, liquidity and floor bid. Anyone may call dispatch for a pool, which turns its booked amounts into payouts OstraDispatcher.sol:191-255:

  • Creator: paid to the creator vault, or shared through the creator split.
  • Dividends: paid to holders above a minimum balance, in the token itself, the quote, or another token such as a stock token, bought in its own pool.
  • Burn: the token is bought and burned, so the supply falls.
  • Liquidity: half buys the token, and both halves are added to a locked full-range position.
  • Floor bid: a quote-only position just below the price, which follows a rising price at most one tick spacing a minute and burns every token it buys when it moves Launchpad.fork.t.sol:1415-1444.

Every conversion moves the price by at most about 1% and never past the circuit breaker's band. A payout that a token refuses, a paused stock token for instance, waits for the next dispatch without stopping the rest Launchpad.fork.t.sol:1475-1507.

5.7Rules only soften#

After launch, only the pool's creator vault may change a rule, through configure, and only in traders' favour. Anything else reverts with NotInTradersFavour OstraHook.sol:379-430. From an OstraVault, this is a ConfigurePool spend signed by the creator's one-time key.

SettingAllowed change
Buy tax, sell taxLower only; the after-graduation tax follows it down
After-graduation taxesLower only
End of taxesEarlier only
Anti-snipeLower only
Max buyHigher, or removed
LimitsReleased now
Volatility feeTurned off
Circuit breakerWider, or off

Buckets, dividend token, graduation rule, max wallet (except releasing it), the creator vault and the tiers can never change. The owner of the hook cannot change any of it.

5.8Dev buy, vesting, airdrops, splits#

Dev buy#

A creator may buy at launch, in the same transaction, at most 5% of the supply. It is an ordinary swap without a price limit: it pays the hook fee, the tax and the LP fee, and respects max buy, max wallet and the circuit breaker; only the anti-snipe tax does not apply. The tokens go to a vesting contract with a cliff of 7 to 365 days and a linear release of up to 365 days OstraDevBuy.sol:53-58. From a creator vault, the dev buy is paid by a DevBuy spend bound to the hash of the launch, so whoever sends it pays only the 0.0002 ETH launch feeLaunchpad.fork.t.sol:2064-2101.

Airdrops#

Nothing is set aside at launch. The creator buys tokens through the pool into the airdrop contract, then starts a merkle round of at most 10% of the supply. Claims stay open for 7 days; anyone may then close the round, which burns what was not claimed Launchpad.fork.t.sol:2247-2259.

Creator split#

The creator vault may share its payouts with up to 100 recipients and change the shares at any time; this is a payout arrangement, not a trading rule, so it is not limited to traders' favour. A change applies to later payouts only Launchpad.fork.t.sol:1224-1292.

5.9What the owner can do#

The hook, the launchpad and the dispatcher have one owner. It has no pause, no fee setter, no rate setter, no blacklist and no upgrade: none of these contracts is a proxy. Besides transferring or renouncing its ownership, and the one-time wiring done at deployment, its only functions collect the protocol's money OstraLaunchpad.sol:186-192 OstraDispatcher.sol:138-147:

  • the launch fees, as WETH;
  • the operator's share of hook fees and locked LP fees;
  • the buyback share.

It cannot touch a creator's payouts, a referral, the dividends, the locked liquidity or a pool's rules, and it cannot mint. The hook's one-time wiring is done and cannot be repeated OstraHook.sol:251-262. The owner is an ordinary secp256k1 account today; see security.

5.10Limits#

  • On a buy in the launch second with every option at its maximum, the hook can charge 1% + 10% tax + 80% anti-snipe: 91% of the quote leg. An agent reads a pool's current taxes with pool_info and the expected output with quote_swap before it signs.
  • With a tax duration of 0, no tax is ever charged, whatever the rates. Tax and limit durations have no upper bound beyond uint32.
  • Max buy counts tokens per swap, not per wallet or per transaction.
  • The default circuit breaker of 2,231 ticks is the SDK's; a launch made directly on chain may turn it off.
  • The launchpad checks only that the creator vault has code and holds the quote; it does not require an OstraVault. Every launch made with the Ostra MCP uses one.
  • NYSE holidays are known up to the end of 2028.
  • Paying the launch fee in $OSTRA at a discount is planned, not built.

The hook is 0x63A7…68cC; every launchpad contract is listed on the contracts page.