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 releaseMachine-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.
- Accepted Testnet release · JSONComplete immutable address/role/policy projection, or explicit unavailable state
- FLIP V3 Public User API · OpenAPI 3.1 JSONMachine-readable source contract; no server URL until accepted release
- Evidence-B reference transactions · JSONExplicit unavailable response until every registry-bound reference family is present
- All exact integers are decimal strings. Do not round through JavaScript Number before signing, comparing, or displaying raw units.
- A
503is 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/statusand requireprovenance.blockNumber <= status.freshness.finalized. - The OpenAPI document publishes no
serversentry while Testnet lacks an accepted HTTPSpublicApiBaseUrl; clients must not substitute the docs origin or inventapi.flipnow.fun.
Canonical and Community price authority
| Market | Identity | Authoritative state at block N | Execution price |
|---|---|---|---|
| Canonical FLIP/USDG | Accepted manifest canonicalPoolKey + canonicalPoolId; side pools are not canonical | PoolManager slot0 for sqrtPrice/tick/fees and the pool-state liquidity word, both read at one finalized block | Accepted V4Quoter against the exact PoolKey and amount; gross USDG buy probes include the 3% Hook treatment and 0.30% LP fee |
| Community Token/USDG | Finalized Factory launch + Controller registeredPool(token) + indexed launch/pool/token identities | PoolManager state for the registered hookless PoolKey; API last price is the latest indexed swap or initial price when initialized-no-trades | Accepted V4Quoter against the registered PoolKey; fixed 0.30% LP fee and no canonical FLIP Hook fee |
rawRatio = sqrtPriceX96² / 2¹⁹² // currency1Raw per currency0Raw
if token == currency0:
quotePerToken = rawRatio × 10^tokenDecimals / 10^quoteDecimals
else:
quotePerToken = (1 / rawRatio) × 10^tokenDecimals / 10^quoteDecimalsWhat 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-fixedlpFeeRecipient(); 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
canonicalLpFeeRecipientandcommunityLpFeeRecipient. 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
FDV_quote(N) = price_quote_per_token(N) × totalSupply(N)
MarketCap_quote(N) = price_quote_per_token(N) × acceptedCirculatingSupply(N)| Metric | Minimum evidence | Current fail-closed rule |
|---|---|---|
| FDV | Named price method (spot, last trade, or executable probe), one block/hash, token/quote decimals, and onchain totalSupply | May be shown only as a method-labeled estimate; never call it Treasury assets, Reserve, or liquidity |
| Market cap | Everything required for FDV plus a versioned circulating-supply policy and block-bound excluded-address/position accounting | Return null / unavailable until that policy/artifact is accepted; do not relabel FDV as market cap |
| Physical/RWA object value | Custody, title, redemption, appraisal, issuer, provenance, and legal-right evidence appropriate to the asset | Community 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.
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"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.
- 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.
- 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.
- 03
Hash the derived response
The docs build computes
projectionHashover 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. - 04
Publish atomically
Only after every scenario family passes may
status=availableand non-empty references appear. Partial success keeps the whole shortcut projection unavailable; raw accepted evidence remains the authority.
Network identity
| Environment | Chain ID | Status |
|---|---|---|
| Robinhood Chain Testnet | 46630 | V3 release in progress |
| Robinhood Chain Mainnet | 4663 | Not 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 path | Inputs | Successful result | Failure boundary |
|---|---|---|---|
GET /health | None | Liveness, finalized cursor, services, external health, and readiness booleans | May return 200 while a readiness layer is false |
GET /ready | None | Operational Health with HTTP 200 | 503 unless operationalReady |
GET /ready/mystery | None | Mystery Health with HTTP 200 | 503 unless mysteryReady |
GET /ready/full-acceptance | None | Full acceptance Health with HTTP 200 | 503 unless fullAcceptanceReady |
GET /v3/status | None | Release/rules/source/manifest/config identity, freshness, readiness, checks and evidence links | 503 when protocol-v3 or Health evidence is unavailable |
GET /v3/accounting | None | Finalized replay hash, invariant state and unknown-event count | 503 before replay or when invariant/unknown-event checks fail |
POST /v3/settlement-quotes | Authorized gameKind, player, allInUsdRaw, nonce, ≤60s deadline and signature | 201 signed one-time exact-output quote | 400 invalid/unauthorized request, 409 replay conflict, 429 rate limit, 503 signer/runtime/quote evidence unavailable |
GET /v3/capacity | game, mode, positive raw all-in; manual also requires asset | Finalized quote plus advisory blockers and atomic-admission warning | 400 shape/range; 503 finalized contract evidence mismatch |
GET /v3/rewards/catalog | None | Configured/active version, ordered assets, identity and eligibility | 503 if finalized Catalog and journal cannot be reconciled |
GET /v3/players/:player/mystery-access | EVM player | Current/TWAB/effective holding, tier/use ledger, pending slot and report evidence | 400 address; 503 chain, report or worker evidence mismatch |
GET /v3/players/:player/holding-evidence/:nonce | EVM player, positive nonce | Verified evidence and submission envelope | 404 not found; 503 invalid artifact/finality binding |
GET /v3/holder/epochs/current | None | Latest published Funded/Active/Exhausted epoch | 404 when none; 503 evidence mismatch |
GET /v3/holder/epochs/:epochId | Positive epoch; optional account | Epoch, proof/claim state, and entitled | 400 invalid; 404 absent; 503 proof/journal/chain mismatch |
GET /v3/holder/epochs/:epochId/evidence | Positive epoch | Complete artifact, chain projection, and event journal | 404 absent; 503 any conservation or identity mismatch |
GET /v3/players/:player/holder-rewards | EVM player; limit=1..100 | Player entitlements ordered by epoch | 400 input; 503 published epoch/proof state mismatch |
GET /v3/players/:player/history | EVM player; optional limit/beforeBlock | Receipt-derived accepted Tickets | 400 input; 503 finalized projection unavailable |
GET /v3/tickets/:game/:ticketId | Game address and unsigned ID | One accepted Ticket with receipt identity | 404 absent; 503 finalized projection unavailable |
GET /v3/liabilities/:liabilityKey | bytes32 key | Complete liability event state and current terminal status | 404 absent; 503 incomplete liability journal |
GET /v3/evidence/events | Optional txHash/betId/liabilityKey/eventName/beforeBlock/limit≤500 | Raw finalized event journal ordered newest first | 400 malformed filter; 503 protocol-v3 unavailable |
GET /v3/evidence/parity/:game/:ticketId | Game address and unsigned ID | Verified Parity worker artifact | 404 unavailable; 503 protocol-v3 unavailable |
GET /v3/evidence/jit/:liabilityKey | bytes32 key | Latest JIT quote artifact | 404 unavailable; 503 protocol-v3 unavailable |
GET /v3/launchpad/assets | Optional limit≤200/beforeBlock | Indexed Community launches | 400 pagination; 503 market index disabled |
GET /v3/launchpad/assets/:token | Community token address | Launch, identity, metadata and market summary | 404 not indexed |
GET /v3/launchpad/assets/:token/trades | Optional limit≤500/beforeBlock | Sides, order shapes, raw volumes, prices and receipt/log coordinates | 404 asset; 400 pagination |
GET /v3/launchpad/assets/:token/candles | interval=1m|5m|1h|1d, limit≤500, optional epoch before | Raw OHLC/volume buckets | 404 asset; 400 interval/range |
GET /v1/markets and /v1/markets/:symbol/quote | Supported Binance display symbol | Non-decisive live market display | Never substitutes for a signed V3 Parity report |
Sign, quote, simulate, submit, and decode
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…"
}
}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.
- 01
Bind immutable and live identity
Load
/release/accepted-testnet.json; require status=accepted and a safepublicApiBaseUrl. Require/v3/statusto 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/statusdoes not publishaddressSetHash; take that immutable value only from the accepted-release JSON. - 02
Check Catalog and capacity
Use only an active eligible reward returned by
/v3/rewards/catalog. Requirecapacity.admission.ready == trueand no blockers, while remembering this read is advisory. - 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. - 04
Verify the issued quote
Recompute its EIP-712 quoteId and recover the accepted settlementQuoteSigner. Require
quote.runtimechain, release, Source A commit and manifest hash to agree with both the accepted-release JSON and live/v3/status; independently requirequote.runtime.addressSetHash == acceptedRelease.manifest.addressSetHash. Then compare Router, Gateway, payer, exact USDG output, exact FLIP input, policy, expiry and one-time nonce. - 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.
- 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.
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.
| Contract | User or permissionless functions | Purpose |
|---|---|---|
| TestnetTokenFaucetV3 | assetConfigs, lastClaimAt, claim(token) | Read and claim enabled inventory-only synthetic ERC-20 drips; no native gas and no mint |
| CanonicalV4SwapRouter | canonicalPoolKey, swapExactInput(params), swapExactOutput(params) | Four canonical FLIP/USDG buy/sell order shapes with deadline and slippage bounds |
| StockFlipGameGatewayV3 | placeManualBet, placeMysteryBet, placeBetFor, cancelAuthorization | Atomically consume signed settlement, fund Coin, lock risk, and request randomness |
| PriceParityGatewayV3 | placeTicket, placeTicketFor, cancelAuthorization | Fund a Manual future-price Ticket |
| PriceParityMysteryGatewayV3 | placeTicket, placeTicketFor, cancelAuthorization | Fund a Mystery Ticket and its shared access slot |
| StockFlipGameV3 | settle(betId), refundExpired(betId), flushFee(betId), retryMysteryAccess(betId) | Permissionless Coin completion, timeout recovery, fee finalization and access repair |
| PriceParityGameV3 / MysteryGameV3 | settle, voidExpired, flushFee; Mystery also retryMysteryAccess | Permissionless Parity completion and frozen-deadline recovery |
| UnifiedUsdReserveV3 | attemptJitPurchase, makeCashClaimable, claimCash, retryJitCapacityClose, getLiability | Winner delivery/retry/fallback; only claimCash is winner-only |
| HolderRewardsV3 | getEpoch, leafHash, isClaimed, claim | Verify and permissionlessly relay an entitlement; transfer recipient is leaf account |
| RwaEverythingFactoryV3 | computeLaunchId, predictTokenAddress, create, getLaunch | Create one fixed-supply Community identity/token/pool/locked-LP launch |
| CommunityRwaV4SwapRouter | registeredPool, swapExactInput, swapExactOutput | Trade only Factory-registered Community/USDG pools in four order shapes |
// 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
| Lifecycle | Primary events | What to derive |
|---|---|---|
| Canonical trade | CanonicalSwapExecuted, CanonicalSwapFeeRouted, HookRevenueRouted | Payer/recipient, direction, order shape, raw in/out, USDG reference/fee, 65/35 routing |
| Coin | BetAccepted, BetEconomicsFrozen, BetCatalogFrozen, RandomnessReady, BetSettled, BetRefunded, FeeFlushed | Receipt-derived ID, frozen economics/source, outcome, liability or refund+Bond compensation |
| Parity | TicketAccepted, TicketEconomicsFrozen, TicketTargetFrozen, ReporterSetFrozen, PriceReported, TicketSettled, TicketVoided; corresponding Mystery* events | Frozen target and source, price evidence, outcome, terminal refund and responsible Bond namespace |
| JIT liability | LiabilityCreated, JitQuoteAttempted, JitPurchaseFailed, StockDelivered, CashFallbackAvailable, CashFallbackClaimed | Exactly one PurchasePending→StockDelivered or CashClaimed path |
| Holder | StockPurchased, EpochFunded, EpochActivated, RewardClaimed, EpochExhausted | Actual inventory, snapshot/root, total/dust, claimed bitmap and conservation |
| Community | CommunityAssetLaunched, LaunchEconomicsFrozen, LaunchLiquiditySettled, IdentityRegistered, CommunityPoolLaunched, CommunitySwapExecuted | CA/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 family | Representative custom errors | Client action |
|---|---|---|
| Quote/signature/replay | InvalidSettlementQuote, SettlementQuoteMismatch, QuoteExpired, UnauthorizedSigner, QuoteAlreadyUsed, NonceAlreadyUsed | Discard the quote; refresh release identity and request a new authorized quote/nonce |
| Price/slippage/deadline | DeadlineExpired, MaxFlipInExceeded, TooLittleOutput, InvalidInput, InvalidOutput | Requote and ask the user to approve a new explicit limit; never widen silently |
| Catalog/provider drift | AssetSetChanged, CatalogChanged, AssetsHashChanged, UnsupportedReward, ProviderChanged | Reload finalized Catalog/Provider and rebuild the Ticket |
| Admission/solvency | InsufficientGeneralReserve, InsufficientMysteryBonus, ExposureCapExceeded, ReservationCapExceeded, JIT capacity errors | Do not retry unchanged; wait for capacity/funding or lower amount within published bounds |
| Lifecycle timing | InvalidBetStatus, InvalidTicketStatus, RefundNotReady, VoidNotReady, CashFallbackNotReady, JitWindowClosed | Read finalized state/deadline and choose only the currently legal transition |
| Claims | UnauthorizedClaimant, EpochNotActive, AlreadyClaimed, InvalidProof, ClaimExceedsRemaining | Verify account, root, proof, bitmap and epoch against one finalized block |
| Community launch/trade | InvalidSupplySplit, LaunchAlreadyExists, PoolLaunchFailed, InvalidPoolAccounting, InvalidRegisteredPool | Verify 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.
