PrimerPadDocs

System

Architecture

PrimerPad is an application layer around native Meteora programs. It decides which quote assets are allowed, compiles and owns the configs, watches markets through their lifecycle, and accounts for what PrimerPad earns.

System layers

User experience

PrimerPad websiteCreateExplorePrimitive Registry viewTrading

Primer application

Launch serviceCertification engineConfig FactoryIndexerMigration watcherTreasury accounting

Solana infrastructure

Helius RPCHelius WebSocketSolana

Liquidity engine

Meteora DBCMeteora DAMM v2

Financial Primitives

USDXEWJonVNQonTLTonHYGonfuture quote mints
transactionsdata readsmonitoring
ComponentCodeRole
Primitive Registrysrc/primitivesPrimitive to quote mint mapping, statuses.
Certification enginesrc/certificationMint inspection, live DBC simulation, proof linkage, routing and supply checks.
Config Factorysrc/config-factory, src/policyCompiles Primer Standard v1 per quote; graduation-gated; persists config addresses and history.
Launch servicesrc/engineThin facade over the Meteora DBC and DAMM v2 SDKs. Every transaction goes through one safety-checked sender.
Indexersrc/indexerEvent stream and market state per PrimerPad market.
Migration watchersrc/services/migration-watcher.tsGraduates PrimerPad markets; idempotent state machine.
Treasury accountingsrc/treasuryRead-only accrued, claimable, claimed per quote mint; manual buyback ledger.
Network layersrc/lib/network.tsThe only place cluster endpoints resolve; cluster identity checks; secret redaction.

Transaction safety

  1. 01Verify clustergenesis hash must match
  2. 02Fresh blockhash
  3. 03Expected accountsquote mint, config, pool present
  4. 04Simulateabort on error
  5. 05Payer balance
  6. 06Send + confirmrecord slot, time, accounts
userPrimerPadMeteoraquote assetSolana

Mainnet sends additionally require that execution was armed by an interactive confirmation (and --execute-mainnet). An environment change cannot point a devnet run at mainnet: the genesis hash check fails first.

Helius infrastructure

Helius provides infrastructure, not market logic. Meteora remains the launch and liquidity engine.

  1. 01User
  2. 02PrimerPad app
  3. 03Primer backendlaunch service, indexer, watcher, accounting
  4. 04Helius RPC / WebSocketreads, simulation, transaction submission, log subscriptions
  5. 05Solana
  6. 06Meteora DBC / DAMM v2
userPrimerPadMeteoraquote assetSolana
  • Endpoints come from HELIUS_MAINNET_RPC_URL, HELIUS_DEVNET_RPC_URL and the matching WSS variables in server-side environment files. They are never bundled into the browser, and logs redact the API key.
  • primer rpc-check verifies reachability, cluster identity, blockhash, slot, latency, WebSocket and both Meteora program accounts. LIVE CHAIN READ

Indexer

Browsers read PrimerPad's index instead of polling Solana. RPC reconciliation is the source of truth: the indexer backfills every transaction touching a market's DBC pool (and, after graduation, its DAMM v2 pool) from a persisted cursor, so it recovers after downtime. WebSocket log subscriptions only trigger reconciliation early.

EventDetected from
TOKEN_CREATED, PAIR_LAUNCHEDInitializeVirtualPool instruction
SWAPSwap / Swap2 instruction; amount = exact quote-vault balance change
CURVE_PROGRESSgraduation crossing a 10% step between reconciliations
FEE_ACCRUALpool fee metrics increasing
PARTNER_FEE_CLAIM, CREATOR_FEE_CLAIMClaimTradingFee / ClaimCreatorTradingFee; amount = vault outflow
MIGRATION_READYquoteReserve reaching the threshold
MIGRATEDMigrationDammV2 instruction
DAMM_SWAP, LP_FEE_CLAIMDAMM v2 Swap / ClaimPositionFee on the graduated pool

Per market it maintains: mint, quote mint, Primitive, config, DBC pool, DAMM v2 pool, creator, created time, status, price, market cap (quote and USD where priced), quote reserve, graduation %, volume, trade count, PrimerPad fees and creator fees (claimed, claimable, accrued), and the migration transaction.

PUBLIC DEVNET Indexed devnet markets: 3. Events recorded: TOKEN_CREATED 3, PAIR_LAUNCHED 3, SWAP 9, PARTNER_FEE_CLAIM 3, CREATOR_FEE_CLAIM 3, MIGRATED 3, DAMM_SWAP 2, LP_FEE_CLAIM 2, MIGRATION_READY 1, FEE_ACCRUAL 1. Claim amounts match the proof logs to the unit.

What PrimerPad builds vs what Meteora builds

Meteora (on-chain programs)PrimerPad
Bonding curve math and virtual reservesFinancial Primitive registry
Quote vault and base vault behaviourPrimitive certification (including TokenBadge verification)
Swap executionQuote selection: Primitive to quote mint
Fee mechanics and the protocol feeConfig management (Primer Standard v1, per-quote normalisation)
Migration instructionCreator launch experience
DAMM v2 pools and feesOperational status (engine compatibility vs launch availability)
Liquidity positions and permanent lockGraduation feasibility
TokenBadge issuanceMigration monitoring and submission
Market indexing, treasury accounting, discovery (Explore), analytics
Routing abstraction (planned)

Why this is not a reskinned frontend

A frontend cannot decide which financial assets are safe quote mints, compile per-asset configs, refuse launches an asset cannot support, graduate markets an external keeper may skip, or account for multi-asset fee revenue. Those decisions are the PrimerPad layer; Meteora supplies the market primitives they act on.

Routing

The canonical pair is always TOKEN / PRIMITIVE. Routing changes how a buyer pays, not what the market is.

ModeMeaningStatus
DIRECT_QUOTEThe buyer already holds the quote Primitive and swaps on the DBC pool.Live in the engine
AGGREGATED_INPUTA router converts SOL (or USDC) into the quote Primitive, then buys on DBC, in one transaction.Architecture only, not deployed

Aggregated input depends on route depth: today only USDX has a usable SOL route; the Ondo tokens have none or very thin ones, which certification reports.

See also: Evidence, Security model, TokenBadges