How unstonk works

Everything under the hood: the pairing engine, the pools, the hook, and the registry.

Introduction

unstonk is a launchpad for inverse stock memecoins: tokens whose reference instrument is the daily inverse of a popular stock. When Tesla has a red day, the index value of unTSLA has a green one. That is the whole idea. Every token on unstonk lives and dies opposite to its underlying.

Each launch is one transaction. You pick a stock, and unstonk deploys a fixed-supply ERC20, births a Uniswap v4 pool for it against ETH, seeds the entire supply as single-sided liquidity on a bonding curve, and binds the token to its inverse pairing in the unstonk registry. From that moment the token trades like any other memecoin, while the pairing engine tracks the stock and renders the token's inverse index, tick for (inverse) tick.

The lifecycle of every unstonk token:

  1. Launch. One transaction deploys the token and its pool. No ETH liquidity is required; the curve is seeded entirely with the token supply.
  2. Pairing. The token is bound to its underlying in the registry. The pairing is permanent and cannot be changed after launch.
  3. Tracking. The pairing engine consumes equity price oracle feeds and computes the token's inverse index: the daily-rebalanced inverse of the underlying, normalized to 100 at launch.
  4. Trading. The token trades against ETH in its Uniswap v4 pool, guarded and attested by the unstonk hook.
  5. Resolution. Anyone can paste the contract address into unstonk and see the exact pairing the token was launched with.

Core concepts

The pairing

A unstonk token is paired by reference, not by custody. The pool never holds the stock, a stock derivative, or any claim on one. Instead, the token carries a declared, platform-anchored pairing: the pairing engine tracks the underlying stock and publishes the token's inverse index value next to its live pool price. Settlement always happens in ETH, on-chain. The pairing lives in the reference layer, where it is computed, displayed, and resolved for every CA lookup.

This separation is what makes inverse stock memecoins possible at all. No stock inventory, no custodied synthetics, no funded derivative pools. The memecoin trades freely in its own ETH pool while the pairing engine does the mirroring.

The inverse instrument

Every pairing is an inverse −1x instrument, rebalanced daily. If rt is the underlying's return on day t (close-to-close), the inverse index V compounds like this:

V₀     = 100                     (normalized at launch)
Vₜ     = Vₜ₋₁ · (1 − rₜ)           (daily rebalance)
rₜ     = Sₜ / Sₜ₋₁ − 1             (underlying daily return, close-to-close)

Daily rebalancing means the inverse applies to each day's move rather than the cumulative move since launch. Over multiple days the index is path-dependent: a stock that goes +10% then −10% does not return the inverse index to 100.

DayTSLA closeTSLA return rInverse index V
0 (launch)$250.00100.00
1$255.00+2.0%98.00
2$242.25−5.0%102.90
3$244.67+1.0%101.87

Over those three days the stock is down 2.13% cumulatively, while the inverse index is up 1.87%. That is the daily-rebalanced inverse, not −1 × the cumulative return.

The pairing engine

The pairing engine is unstonk's reference layer. It turns equity market data into the inverse index every token is paired to.

Oracle layer

Underlying prices come from multiple independent equity market-data providers. Feeds are medianized and sanity-bounded, so an outlier print beyond the deviation band is discarded before aggregation. The engine consumes official session closes for the daily return rt and streams intraday reference prints for the live chart on each token page.

Market hours

Memecoins trade 24/7. Equities do not. The engine is market-hours aware:

  • During the session, intraday reference prints update the live index value shown on token pages.
  • At the close, the official close fixes rt for that session and the daily-rebalanced index compounds once.
  • Overnight, weekends, holidays, the index holds its last close-to-close value. A token's pool keeps trading regardless; the inverse index simply waits for the next session.

Corporate actions

Underlyings are adjusted for splits and dividends before returns are computed: a 5:1 split does not register as a −80% day (which would otherwise 5x the inverse index). Delistings and ticker changes finalize the index at the last authoritative print. The token and its pool are unaffected and keep trading.

Supported underlyings

TickerNameTickerName
TSLATeslaGOOGLAlphabet
NVDANVIDIAAMDAMD
AAPLAppleCOINCoinbase
MSFTMicrosoftMSTRMicroStrategy
AMZNAmazonSPYS&P 500 ETF
METAMetaGMEGameStop

Launching a token

Launching is a single call to the Launchpad contract. You pick an underlying and confirm the suggested name and ticker. By convention the inverse of TSLA is named “Inverse Tesla” with ticker unTSLA. Both are editable. The pairing, once recorded, is not.

The launch transaction does five things atomically:

  1. Deploys the token. A minimal ERC20, 18 decimals, fixed supply of 1,000,000,000 (1B) minted in full to the Launchpad. No mint function exists after construction; supply can never change.
  2. Builds the pool key. currency0 = native ETH, currency1 = the new token, 1% fee tier, tick spacing 200, and the unstonk hook.
  3. Initializes the pool at tick 200000, the top of the launch curve.
  4. Seeds single-sided liquidity. The entire 1B supply is deposited into the tick range [180000, 200000]. Because the pool price starts exactly at the top of the range, the position holds only the token. No ETH is needed to launch.
  5. Registers the pairing. The token address is bound to its underlying in the unstonk registry, permanently.

Launching costs gas only. Any dust left over from the liquidity computation (at most a wei) is swept to the launcher. The Launchpad emits Launched(token, poolId, creator, name, symbol), and the token page is live immediately.

Pool architecture

Every unstonk token trades in a Uniswap v4 pool against native ETH. The pool carries no stock exposure; that lives in the reference layer. Keeping the settlement layer plain and standard is what keeps it deep and safe.

The single-sided curve

The launch position is a single-sided range order: the full supply sits in the tick range [180000, 200000], and the pool opens at tick 200000, the top of that range. In the pool's raw price terms P (token-wei per ETH-wei), buys move the price down through the range, which means the token's price denominated in ETH (1/P) moves up:

raw price        P = (sqrtPriceX96)² / 2¹⁹²      (token per ETH)
token in ETH     price = 1 / P
buy  (ETH → token):  tick decreases  →  1/P increases  →  token appreciates
sell (token → ETH):  tick increases  →  1/P decreases  →  token depreciates
ParameterValueMeaning
Total supply1,000,000,000Fixed at construction; 100% seeded to the curve
Fee tier1% (10000)LP fee on every swap, accrues to the launch position
Tick spacing200Standard spacing for the 1% tier
Launch range[180000, 200000]Single-sided token position
Initial price≈ 2.06 × 10⁻⁹ ETHPer token, at tick 200000
Curve depth≈ 78 ETHCost to buy the entire supply through the range
Range upside≈ 7.4×Token ETH-price multiple from bottom to top of the curve

Liquidity math

With the pool initialized at the top of the range, the position requires exactly zero ETH and an amount of token given by the standard concentrated-liquidity identity:

L        = S · 2⁹⁶ / (√Pb − √Pa)
amount₁  = L · (√Pb − √Pa) / 2⁹⁶ = S     (entire supply)
amount₀  = 0                              (no ETH required)

S   = 1e9 · 10¹⁸ (total supply)
√Pa = √price at tick 180000,  √Pb = √price at tick 200000

The position is owned by the Launchpad contract itself, so every token trades against the same canonical curve and the 1% LP fees accrue to the protocol position.

Native ETH, not WETH

Pools pair against v4's native ETH currency (address(0)). Buyers send plain ETH and sellers receive plain ETH. No wrapping step anywhere in the flow.

The unstonk hook

Every unstonk pool carries the unstonk hook. In Uniswap v4 a hook's permissions are encoded in the low bits of its contract address. The unstonk hook is CREATE2-mined to an address ending in 0x1040: bits 12 and 6 set, exactly afterInitialize | afterSwap and nothing else.

afterInitialize: provenance guard

When a pool carrying the hook is initialized, the hook requires the initializer to be the Launchpad contract. Pools bearing the unstonk hook cannot be created by hand or by another factory. If it wears the hook, it came from the launchpad. On success the hook records the pool and emits PoolRegistered(poolId).

afterSwap: trade attestation

On every swap the hook emits PoolSwap(poolId, zeroForOne, amountSpecified, delta0, delta1), a compact attestation consumed by unstonk's indexer to build each token's trade feed. The hook takes no fee itself and never touches swap proceeds. It observes, and it guarantees provenance.

Trading

Swaps route through the unstonk swap router, a minimal exact-input router that talks directly to the v4 PoolManager. No approvals to third-party routers, no permit2 intermediary.

swapExactInputSingle(
  key,          // (ETH, token, 1%, spacing 200, unstonk hook)
  zeroForOne,   // true = buy (ETH in, token out); false = sell
  amountIn,
  minAmountOut, // slippage bound: reverts SlippageExceeded below it
  to            // output recipient
)
  • Buying. Call with zeroForOne = true and msg.value = amountIn. ETH is settled natively; tokens are taken directly to the recipient.
  • Selling. Approve the router for the token amount, then call with zeroForOne = false. ETH is paid out to the recipient.
  • Slippage. minAmountOut bounds execution, and the UI quotes off the live curve so the bound reflects real depth.

Price impact follows the concentrated-liquidity invariant over the launch range: larger buys walk further down the tick range, and the curve's ≈78 ETH total depth bounds how far any single trade can move the market.

Fees & economics

FeeRateAccrues to
LP fee (every swap)1.00%The protocol-owned launch position
Hook fee0%None. The hook attests; it does not skim.
Launch fee0 ETHNone. Launching costs gas only.

LP fees accumulate inside the launch position on every buy and sell, and are collected by the protocol via claimFees: a zero-delta liquidity call that sweeps the accrued amounts of both currencies. Fee revenue funds the oracle layer and the operations of the pairing engine.

The pairing registry

The registry is unstonk's resolution layer: it maps a token contract address to the pairing it was launched with. Paste any CA into unstonk and the registry answers with the exact inverse pairing (underlying, instrument type, name, ticker, creator, launch transaction), or with no_pairing if the address was never launched on unstonk.

Lookups are case-insensitive, so checksummed and lowercase CAs resolve identically. Records are keyed by {chainId}:{address} and immutable: a duplicate registration returns 409 already_registered with the original record.

API

EndpointDescription
GET /api/tokensAll registered pairings, newest first: { tokens: TokenRecord[] }
POST /api/tokensRegister a pairing at launch. 201 on success, 400 invalid_body, 409 if the address is already registered.
GET /api/tokens/{address}Resolve a CA to its pairing record, or 404 { error: "no_pairing" }.

TokenRecord

{
  "address":    "0x…",            // token contract (the CA)
  "chainId":    46630,
  "underlying": "TSLA",           // one of the supported underlyings
  "type":       "inverse",        // unstonk pairings are inverse −1x
  "name":       "Inverse Tesla",
  "symbol":     "unTSLA",
  "creator":    "0x…",
  "txHash":     "0x…",            // the launch transaction
  "launchedAt": 1788719195612
}

Trust & transparency model

unstonk is explicit about which guarantees are enforced by the chain and which are provided by the reference layer.

Enforced on-chain

  • Provenance. The hook guarantees every unstonk pool was created by the Launchpad. Look-alike pools cannot wear the hook.
  • Supply and liquidity. 1B fixed supply, 100% on the curve at launch, no mint function, no hidden allocation.
  • Settlement. Every trade settles in ETH via Uniswap v4 with atomic settlement semantics.
  • Fees. The 1% LP fee is a property of the pool, not of the platform UI.

Provided by the reference layer

  • The pairing. The binding of a CA to its inverse underlying is declared in the registry at launch and is immutable thereafter.
  • The inverse index. Computed by the pairing engine from oracle closes and rendered on each token page, next to the live pool price.
A unstonk token is not a claim on the underlying stock, and it never settles in anything but ETH. The inverse pairing is the token's identity and reference instrument, the thing the memecoin is. It is tracked and displayed by the pairing engine, and anyone can resolve it from the CA alone.

Contract reference

ContractRole
LaunchpadFactory: deploys the token, initializes the pool, seeds the curve, owns the launch position.
LaunchpadHookProvenance guard (afterInitialize) and swap attestation (afterSwap).
LaunchpadTokenMinimal fixed-supply ERC20: 18 decimals, 1B supply, no mint or burn.
SwapRouterExact-input single-pool swaps against the PoolManager; native ETH support.
PoolManagerUniswap v4 core. Holds all pool state and funds; lock-based settlement.
StateViewRead lens over PoolManager storage (slot0, liquidity, ticks).

Launchpad

launch(string name, string symbol) → (address token, bytes32 poolId)
setHook(address hook)                    // owner, once
claimFees(PoolKey key, address to)       // owner; sweeps accrued LP fees
getLaunchedTokens() → address[]
allTokensLength() → uint256

constants: TOTAL_SUPPLY = 1e9·10¹⁸ · FEE = 10000 · TICK_SPACING = 200
           TICK_LOWER = 180000   · TICK_UPPER = 200000

SwapRouter

swapExactInputSingle(PoolKey key, bool zeroForOne, uint128 amountIn,
                     uint128 minAmountOut, address to)
                   payable → (uint256 amountOut)

Events

EventEmitted byMeaning
LaunchedLaunchpadToken and pool created. Carries token, poolId, creator, name, symbol.
PoolRegisteredHookPool provenance established at initialization.
PoolSwapHookSwap attestation: direction, specified amount, and both deltas.

Pool identity

poolId = keccak256(abi.encode(
  currency0  = 0x0000…0000   (native ETH)
  currency1  = token
  fee        = 10000
  spacing    = 200
  hooks      = unstonk hook   (address ends 0x1040)
))

FAQ

Is a unstonk token backed by the stock?

No. It is paired by reference. The token's identity is the daily inverse of its underlying, computed and displayed by the pairing engine, while the token itself trades and settles in ETH in its Uniswap v4 pool.

What happens when the market is closed?

The pool keeps trading around the clock. The inverse index holds its last close-to-close value until the next session, then compounds the new daily return at the official close.

Can a pairing be changed after launch?

No. The registry record is written once at launch and duplicates are rejected. A token launched as unTSLA is the inverse of Tesla forever.

What happens if the underlying is delisted?

The pairing engine finalizes the index at the last authoritative close. The token and its pool are unaffected and keep trading.

Does the hook take a fee?

No. The hook enforces provenance and attests swaps. The only swap fee is the pool's 1% LP fee, which accrues to the protocol-owned launch position.

Who can launch?

Anyone, gas only. One transaction deploys the token, births the pool, seeds the curve, and registers the pairing.