DOCS
On this page13 sections

Verify & Integrate

Developer API and contract reference

The stable integration surfaces, finalized read policy, and manifest-driven address book.

Source API exists · public base URL pending release

Machine-readable OpenAPI

The OpenAPI 3.1 document is generated from the implemented health/readiness and V3 route surface. It covers path/query inputs, the signed settlement request body, successful response boundaries, and public 400/404/409/429/503 semantics. It intentionally excludes legacy V1/V2 product routes.

  • All exact integers are decimal strings. Do not round through JavaScript Number before signing, comparing, or displaying raw units.
  • A 503 is unavailable evidence/readiness, never a zero balance, no entitlement, no liability, or permission to send a transaction.
  • Launchpad list/trade/candle responses carry chain ID and receipt provenance, but the current asset-detail response does not carry the common release/finalized envelope. Bind it to /v3/status and require provenance.blockNumber <= status.freshness.finalized.
  • The OpenAPI document publishes no servers entry while Testnet lacks an accepted HTTPS publicApiBaseUrl; clients must not substitute the docs origin or invent api.flipnow.fun.

Canonical and Community price authority

MarketIdentityAuthoritative state at block NExecution price
Canonical FLIP/USDGAccepted manifest canonicalPoolKey + canonicalPoolId; side pools are not canonicalPoolManager slot0 for sqrtPrice/tick/fees and the pool-state liquidity word, both read at one finalized blockAccepted V4Quoter against the exact PoolKey and amount; gross USDG buy probes include the 3% Hook treatment and 0.30% LP fee
Community Token/USDGFinalized Factory launch + Controller registeredPool(token) + indexed launch/pool/token identitiesPoolManager state for the registered hookless PoolKey; API last price is the latest indexed swap or initial price when initialized-no-tradesAccepted V4Quoter against the registered PoolKey; fixed 0.30% LP fee and no canonical FLIP Hook fee
Exact rational spot-price boundary
rawRatio = sqrtPriceX96² / 2¹⁹²   // currency1Raw per currency0Raw

if token == currency0:
  quotePerToken = rawRatio × 10^tokenDecimals / 10^quoteDecimals
else:
  quotePerToken = (1 / rawRatio) × 10^tokenDecimals / 10^quoteDecimals

What liquidity does—and does not—mean

PoolManager active liquidity `L`
The current in-range Uniswap V4 liquidity scalar. It is not USD, TVL, market cap, or a token balance.
Launch `initialLiquidity` / `actualLiquidity`
The position liquidity minted at launch. It proves launch accounting and locked principal identity, not current dollar depth.
Launch `tokenSpentRaw` / `quoteSpentRaw`
Historical assets consumed to mint the position; refunds and later price movement mean they are not current reserves.
Executable depth
A same-block Quoter curve across disclosed notionals (for example 1/10/100 USDG), including fees and price impact.
  • Do not use the ERC-20 balance of PoolManager as this pool’s reserves; PoolManager accounts across many pools and currencies.
  • Do not label one Quoter result as total liquidity. Publish a curve, direction, block/hash, and failure point.
  • Do not add FLIP’s 3% Hook fee to Community markets. Community pools are hookless and charge the fixed V4 LP fee 3000 = 0.30% only.
  • Community LP fees are not creator proceeds by default. Anyone can call PermanentPositionLockerV4.collectFees(tokenId), but both currencies go only to constructor-fixed lpFeeRecipient(); the caller cannot choose it or remove principal.
  • Canonical LP fees similarly go only to FlipFairLaunchV4.lpFeeRecipient(). The separate 3% USDG Hook revenue is atomically routed through HookRevenueRouter under the release’s Reserve/Holder policy.
  • The accepted release publishes canonicalLpFeeRecipient and communityLpFeeRecipient. A verifier must read both immutable getters at the same selected finalized block and fail if either differs from its accepted projection.

FDV, market cap, and RWA value are separate

Block-bound valuation labels
FDV_quote(N) = price_quote_per_token(N) × totalSupply(N)
MarketCap_quote(N) = price_quote_per_token(N) × acceptedCirculatingSupply(N)
MetricMinimum evidenceCurrent fail-closed rule
FDVNamed price method (spot, last trade, or executable probe), one block/hash, token/quote decimals, and onchain totalSupplyMay be shown only as a method-labeled estimate; never call it Treasury assets, Reserve, or liquidity
Market capEverything required for FDV plus a versioned circulating-supply policy and block-bound excluded-address/position accountingReturn null / unavailable until that policy/artifact is accepted; do not relabel FDV as market cap
Physical/RWA object valueCustody, title, redemption, appraisal, issuer, provenance, and legal-right evidence appropriate to the assetCommunity token price is not the value of a sandal, pet, collectible, or other referenced object

Creator allocation, Treasury custody, a permanent LP NFT, vesting, dead addresses, and protocol balances need explicit classification. FLIP embedded in an LP position cannot be excluded by subtracting the Locker’s wallet balance. Official Stock Token identity also does not make a Community token an official stock or prove a one-for-one claim on an underlying share.

Runnable read-only verification

The example performs only eth_chainId, finalized block reads, eth_call, accepted public API GETs, and V4Quoter simulation. It has no send/write/broadcast path. It fails before output when the accepted release, chain, PoolKey, role address, public API identity, Community registration, fee, total supply, or finality binding differs. Community mode requires /v3/status and /v3/accounting to agree on release/manifest/finalized block, requires the RPC block hash to equal accounting finalizedHash, and re-reads the asset provenance block/hash, registered token+USDG currencies, onchain decimals, hookless fee, Locker, and fee recipient.

Canonical FLIP/USDG metrics after Testnet acceptance
RELEASE_ID="${FLIP_ACCEPTED_RELEASE_ID:?copy the accepted release ID from this docs site}"
node apps/docs/examples/read-only-market-metrics.mjs \
  --accepted-release "docs/releases/46630/${RELEASE_ID}/accepted-release.json"
Add one registered Community market
RELEASE_ID="${FLIP_ACCEPTED_RELEASE_ID:?copy the accepted release ID from this docs site}"
COMMUNITY_TOKEN="${FLIP_COMMUNITY_TOKEN:?use a token returned by the accepted Launchpad API}"
node apps/docs/examples/read-only-market-metrics.mjs \
  --accepted-release "docs/releases/46630/${RELEASE_ID}/accepted-release.json" \
  --community-token "$COMMUNITY_TOKEN"

Derived Evidence-B reference transactions

The machine-readable endpoint currently returns status=unavailable and references=[]. This is an explicit fail-closed result: the configured registry-bound inputs are absent or do not contain every required Coin/VRF, Parity, JIT, Holder and RWA reference family.

  1. 01

    Accept one immutable Evidence B

    The release, manifest, acceptance plan, finalized Health, strict-verifier receipts, and all scenario artifacts must be registry-bound to one Evidence B commit.

  2. 02

    Derive—not enter—each reference

    A generator reads only those immutable artifacts, loads the canonical receipt, decodes emitted IDs, and reconciles role address, chain/release/manifest, finalized block/hash, uniqueness, and terminal state.

  3. 03

    Hash the derived response

    The docs build computes projectionHash over the complete derived payload so consumers can compare exact responses. The derived JSON and hash are not separate Evidence B registry records; authority remains the registry-bound source artifacts and accepted Evidence B commit.

  4. 04

    Publish atomically

    Only after every scenario family passes may status=available and non-empty references appear. Partial success keeps the whole shortcut projection unavailable; raw accepted evidence remains the authority.

Network identity

EnvironmentChain IDStatus
Robinhood Chain Testnet46630V3 release in progress
Robinhood Chain Mainnet4663Not deployed / NO-GO

RPC, explorer, deployment block, contract addresses, ABI hashes, and public API base URL must be emitted from the accepted release manifest. This page will not guess them.

V3 endpoint reference

Method and pathInputsSuccessful resultFailure boundary
GET /healthNoneLiveness, finalized cursor, services, external health, and readiness booleansMay return 200 while a readiness layer is false
GET /readyNoneOperational Health with HTTP 200503 unless operationalReady
GET /ready/mysteryNoneMystery Health with HTTP 200503 unless mysteryReady
GET /ready/full-acceptanceNoneFull acceptance Health with HTTP 200503 unless fullAcceptanceReady
GET /v3/statusNoneRelease/rules/source/manifest/config identity, freshness, readiness, checks and evidence links503 when protocol-v3 or Health evidence is unavailable
GET /v3/accountingNoneFinalized replay hash, invariant state and unknown-event count503 before replay or when invariant/unknown-event checks fail
POST /v3/settlement-quotesAuthorized gameKind, player, allInUsdRaw, nonce, ≤60s deadline and signature201 signed one-time exact-output quote400 invalid/unauthorized request, 409 replay conflict, 429 rate limit, 503 signer/runtime/quote evidence unavailable
GET /v3/capacitygame, mode, positive raw all-in; manual also requires assetFinalized quote plus advisory blockers and atomic-admission warning400 shape/range; 503 finalized contract evidence mismatch
GET /v3/rewards/catalogNoneConfigured/active version, ordered assets, identity and eligibility503 if finalized Catalog and journal cannot be reconciled
GET /v3/players/:player/mystery-accessEVM playerCurrent/TWAB/effective holding, tier/use ledger, pending slot and report evidence400 address; 503 chain, report or worker evidence mismatch
GET /v3/players/:player/holding-evidence/:nonceEVM player, positive nonceVerified evidence and submission envelope404 not found; 503 invalid artifact/finality binding
GET /v3/holder/epochs/currentNoneLatest published Funded/Active/Exhausted epoch404 when none; 503 evidence mismatch
GET /v3/holder/epochs/:epochIdPositive epoch; optional accountEpoch, proof/claim state, and entitled400 invalid; 404 absent; 503 proof/journal/chain mismatch
GET /v3/holder/epochs/:epochId/evidencePositive epochComplete artifact, chain projection, and event journal404 absent; 503 any conservation or identity mismatch
GET /v3/players/:player/holder-rewardsEVM player; limit=1..100Player entitlements ordered by epoch400 input; 503 published epoch/proof state mismatch
GET /v3/players/:player/historyEVM player; optional limit/beforeBlockReceipt-derived accepted Tickets400 input; 503 finalized projection unavailable
GET /v3/tickets/:game/:ticketIdGame address and unsigned IDOne accepted Ticket with receipt identity404 absent; 503 finalized projection unavailable
GET /v3/liabilities/:liabilityKeybytes32 keyComplete liability event state and current terminal status404 absent; 503 incomplete liability journal
GET /v3/evidence/eventsOptional txHash/betId/liabilityKey/eventName/beforeBlock/limit≤500Raw finalized event journal ordered newest first400 malformed filter; 503 protocol-v3 unavailable
GET /v3/evidence/parity/:game/:ticketIdGame address and unsigned IDVerified Parity worker artifact404 unavailable; 503 protocol-v3 unavailable
GET /v3/evidence/jit/:liabilityKeybytes32 keyLatest JIT quote artifact404 unavailable; 503 protocol-v3 unavailable
GET /v3/launchpad/assetsOptional limit≤200/beforeBlockIndexed Community launches400 pagination; 503 market index disabled
GET /v3/launchpad/assets/:tokenCommunity token addressLaunch, identity, metadata and market summary404 not indexed
GET /v3/launchpad/assets/:token/tradesOptional limit≤500/beforeBlockSides, order shapes, raw volumes, prices and receipt/log coordinates404 asset; 400 pagination
GET /v3/launchpad/assets/:token/candlesinterval=1m|5m|1h|1d, limit≤500, optional epoch beforeRaw OHLC/volume buckets404 asset; 400 interval/range
GET /v1/markets and /v1/markets/:symbol/quoteSupported Binance display symbolNon-decisive live market displayNever substitutes for a signed V3 Parity report

Sign, quote, simulate, submit, and decode

Representative request
POST /v3/settlement-quotes
{
  "gameKind": "coin-manual",
  "player": "0x…",
  "allInUsdRaw": "10000000",
  "authorization": {
    "requestNonce": "0x<32 random bytes>",
    "deadline": "<unix seconds, no more than 60s ahead>",
    "signature": "0x…"
  }
}
Exact request-authorization EIP-712 schema
domain = {
  name: "FLIP Settlement Quote Request",
  version: "1",
  chainId: 46630,
  verifyingContract: <accepted Gateway for gameKind>
}
primaryType = "SettlementQuoteRequestAuthorization"
types = {
  SettlementQuoteRequestAuthorization: [
    { name: "player",         type: "address" },
    { name: "gameKindHash",   type: "bytes32" },
    { name: "allInUsdRaw",    type: "uint256" },
    { name: "manifestHash",   type: "bytes32" },
    { name: "addressSetHash", type: "bytes32" },
    { name: "requestNonce",   type: "bytes32" },
    { name: "deadline",       type: "uint64" }
  ]
}
gameKindHash = keccak256(toBytes(gameKind))

The message values come only from the machine-readable accepted release, the connected wallet, and the user’s exact choice. Generate a fresh nonzero random requestNonce; never reuse it. The service never accepts a private key and never submits the player’s Bet.

  1. 01

    Bind immutable and live identity

    Load /release/accepted-testnet.json; require status=accepted and a safe publicApiBaseUrl. Require /v3/status to be healthy and to match the accepted chain ID, release, Source A commit, manifest hash, config hash, rules version and deployment block, with fresh finalized state. /v3/status does not publish addressSetHash; take that immutable value only from the accepted-release JSON.

  2. 02

    Check Catalog and capacity

    Use only an active eligible reward returned by /v3/rewards/catalog. Require capacity.admission.ready == true and no blockers, while remembering this read is advisory.

  3. 03

    Authorize the quote request

    Sign the exact schema above with the player wallet, using acceptedRelease.manifest.addressSetHash. The verifying contract is the accepted Gateway for gameKind—not the core Game, settlement Router, docs origin, or API host.

  4. 04

    Verify the issued quote

    Recompute its EIP-712 quoteId and recover the accepted settlementQuoteSigner. Require quote.runtime chain, release, Source A commit and manifest hash to agree with both the accepted-release JSON and live /v3/status; independently require quote.runtime.addressSetHash == acceptedRelease.manifest.addressSetHash. Then compare Router, Gateway, payer, exact USDG output, exact FLIP input, policy, expiry and one-time nonce.

  5. 05

    Authorize FLIP and simulate

    Require the caller to supply a positive bigint maxFlipInRaw and reject quote.exactFlipIn > maxFlipInRaw before signing any permit. An EOA may sign FLIP EIP-2612 for the exact input in the same Gateway call. A contract wallet must pre-approve the accepted settlement Router for at least maxFlipInRaw before requesting its short-lived quote; pass permitData.enabled=false and never make the integration silently send an approval transaction. Preserve the user ceiling in the Gateway request, then simulate the exact calldata at current state.

  6. 06

    Send once and decode the receipt

    Broadcast only the successful simulation request. Decode BetForwarded/TicketForwarded from that receipt for the Bet/Ticket ID, then read the finalized event journal for the VRF Request ID or report/liability identifiers. Never predict counters and never replace an unknown broadcast.

Representative finalized capacity read
GET /v3/capacity?game=coin&mode=manual&allInRaw=10000000&asset=<reward-token-from-manifest>

# Require in the response:
chainId == 46630
manifestHash == status.manifestHash
advisoryOnly == true
atomicAdmissionRequired == true
capacity.admission.ready == true
capacity.admission.blockers.length == 0

# This remains advisory; simulate the exact Gateway call before broadcast.

Contract families and user functions

Token and V4
FlipToken, canonical Hook, public router/Quoter, exact-output settlement, Fair Launch, permanent LP.
Games
Coin Game/Gateway, Parity Manual/Mystery Games/Gateways/Coordinator, Market/Reward registries.
Solvency
Unified Reserve, Game Fee Treasury, JIT Capacity/Quote/Executor, Oracle Bond Vault.
Access and rewards
Holding Oracle, Mystery Access, Holder Rewards and purchase venue.
RWA Everything
Identity Registry, Factory, Eligibility, Catalog, Community Controller/Router/Locker.
Governance
Timelock-owned managed contracts plus a pause-only EmergencyPauser.
ContractUser or permissionless functionsPurpose
TestnetTokenFaucetV3assetConfigs, lastClaimAt, claim(token)Read and claim enabled inventory-only synthetic ERC-20 drips; no native gas and no mint
CanonicalV4SwapRoutercanonicalPoolKey, swapExactInput(params), swapExactOutput(params)Four canonical FLIP/USDG buy/sell order shapes with deadline and slippage bounds
StockFlipGameGatewayV3placeManualBet, placeMysteryBet, placeBetFor, cancelAuthorizationAtomically consume signed settlement, fund Coin, lock risk, and request randomness
PriceParityGatewayV3placeTicket, placeTicketFor, cancelAuthorizationFund a Manual future-price Ticket
PriceParityMysteryGatewayV3placeTicket, placeTicketFor, cancelAuthorizationFund a Mystery Ticket and its shared access slot
StockFlipGameV3settle(betId), refundExpired(betId), flushFee(betId), retryMysteryAccess(betId)Permissionless Coin completion, timeout recovery, fee finalization and access repair
PriceParityGameV3 / MysteryGameV3settle, voidExpired, flushFee; Mystery also retryMysteryAccessPermissionless Parity completion and frozen-deadline recovery
UnifiedUsdReserveV3attemptJitPurchase, makeCashClaimable, claimCash, retryJitCapacityClose, getLiabilityWinner delivery/retry/fallback; only claimCash is winner-only
HolderRewardsV3getEpoch, leafHash, isClaimed, claimVerify and permissionlessly relay an entitlement; transfer recipient is leaf account
RwaEverythingFactoryV3computeLaunchId, predictTokenAddress, create, getLaunchCreate one fixed-supply Community identity/token/pool/locked-LP launch
CommunityRwaV4SwapRouterregisteredPool, swapExactInput, swapExactOutputTrade only Factory-registered Community/USDG pools in four order shapes
Source-level call shapes (resolve every address and tuple ABI from the manifest)
// Winner recovery
UnifiedUsdReserveV3.makeCashClaimable(game, ticketId) // anyone, after SLA
UnifiedUsdReserveV3.claimCash(game, ticketId)         // winner only

// Holder proof relay
HolderRewardsV3.claim(epochId, index, account, amountRaw, merkleProof)

// Community launch
RwaEverythingFactoryV3.create({
  name, symbol, itemId, schemaHash, dataHash, provenanceHash, metadataUri, userSalt,
  totalSupplyRaw, creatorAllocationRaw, liquidityTokenRaw, liquidityQuoteRaw
})

Events to index

LifecyclePrimary eventsWhat to derive
Canonical tradeCanonicalSwapExecuted, CanonicalSwapFeeRouted, HookRevenueRoutedPayer/recipient, direction, order shape, raw in/out, USDG reference/fee, 65/35 routing
CoinBetAccepted, BetEconomicsFrozen, BetCatalogFrozen, RandomnessReady, BetSettled, BetRefunded, FeeFlushedReceipt-derived ID, frozen economics/source, outcome, liability or refund+Bond compensation
ParityTicketAccepted, TicketEconomicsFrozen, TicketTargetFrozen, ReporterSetFrozen, PriceReported, TicketSettled, TicketVoided; corresponding Mystery* eventsFrozen target and source, price evidence, outcome, terminal refund and responsible Bond namespace
JIT liabilityLiabilityCreated, JitQuoteAttempted, JitPurchaseFailed, StockDelivered, CashFallbackAvailable, CashFallbackClaimedExactly one PurchasePending→StockDelivered or CashClaimed path
HolderStockPurchased, EpochFunded, EpochActivated, RewardClaimed, EpochExhaustedActual inventory, snapshot/root, total/dust, claimed bitmap and conservation
CommunityCommunityAssetLaunched, LaunchEconomicsFrozen, LaunchLiquiditySettled, IdentityRegistered, CommunityPoolLaunched, CommunitySwapExecutedCA/identity/pool, supply split, spend/refund, permanent LP and OHLC trades

Use (chainId, transactionHash, logIndex) as event identity, retain block hash and timestamp, and replay from the accepted deployment block after a reorg. Never predict IDs that the receipt emits.

Errors clients must handle

Error familyRepresentative custom errorsClient action
Quote/signature/replayInvalidSettlementQuote, SettlementQuoteMismatch, QuoteExpired, UnauthorizedSigner, QuoteAlreadyUsed, NonceAlreadyUsedDiscard the quote; refresh release identity and request a new authorized quote/nonce
Price/slippage/deadlineDeadlineExpired, MaxFlipInExceeded, TooLittleOutput, InvalidInput, InvalidOutputRequote and ask the user to approve a new explicit limit; never widen silently
Catalog/provider driftAssetSetChanged, CatalogChanged, AssetsHashChanged, UnsupportedReward, ProviderChangedReload finalized Catalog/Provider and rebuild the Ticket
Admission/solvencyInsufficientGeneralReserve, InsufficientMysteryBonus, ExposureCapExceeded, ReservationCapExceeded, JIT capacity errorsDo not retry unchanged; wait for capacity/funding or lower amount within published bounds
Lifecycle timingInvalidBetStatus, InvalidTicketStatus, RefundNotReady, VoidNotReady, CashFallbackNotReady, JitWindowClosedRead finalized state/deadline and choose only the currently legal transition
ClaimsUnauthorizedClaimant, EpochNotActive, AlreadyClaimed, InvalidProof, ClaimExceedsRemainingVerify account, root, proof, bitmap and epoch against one finalized block
Community launch/tradeInvalidSupplySplit, LaunchAlreadyExists, PoolLaunchFailed, InvalidPoolAccounting, InvalidRegisteredPoolVerify create tuple, predicted ID, approvals, Factory binding, PoolKey and finalized launch registration

Decode custom errors with the ABI bound to the manifest runtime. Unknown selector means a release/ABI mismatch and must fail closed; string-matching wallet messages is not sufficient.

Integration rules

  • Index events in bounded block chunks and preserve transaction hash plus log index; replay after reorg.
  • Use raw integer units and token decimals. Never use JavaScript floating point for fees, payouts, cents, or balances.
  • Bind EIP-712 chainId and verifyingContract for every environment; Testnet signatures cannot be moved to Mainnet.
  • Treat capacity reads as advisory and simulate the exact Gateway call before broadcast.
  • Use finalized status and manifest identity on every evidence-sensitive response.

Authority sources

These repository paths were used to derive this page. They link only when an explicitly configured public repository and immutable Source A commit are both available; otherwise they remain plain paths. Release addresses and live status still require an accepted manifest and finalized evidence.

  • docs/FLIP_V3_USER_API.md
  • services/indexer/src/api.ts
  • services/indexer/src/protocol-v3-user-api.ts
  • services/indexer/src/community-market-api.ts
  • deployments/46630/abi/ (generated after release)