Skip to main content
This page is the authoritative technical reference for Microset’s on-chain footprint — a single Anchor program, prediction_market, implementing a sport-agnostic, parimutuel, multi-outcome market. For a plain-language version, see How Markets Work.

Program identity

FieldValue
Program nameprediction_market (Anchor)
Program IDB6nzqfZfxJ2UyAGD7ko3zSa2QLF8aWNjHqjkDqh1dzsC
ClusterSolana devnet
Used byFrontend (app.microset.io) and backend API
ExplorerView on Solana Explorer
Treasury (fee recipient)3AzAex6froVqKX4EknPHsccZK8YjmFtqkzR3dWDxn9Cz
Upgrade authorityA single key held by Microset

Instructions

Core

InstructionPurposeWho can call
initialize_configCreate the global Config (treasury, fee, resolution authority); unpauseOne-time setup by the deployer
update_configUpdate treasury, fee, resolution authority, or pause stateconfig.authority only
create_marketCreate a market (market_id, outcomes, name, close/resolve times) and its vaultMicroset’s backend authority (markets are created authority-only in practice)
place_betStake SOL on an outcomeAny user
resolveSet the winning outcome; send the protocol fee to the treasuryconfig.resolution_authority only
void_marketVoid a market so users can claim full refundsconfig.resolution_authority only
claimPay a winner’s proportional share, or refund a voided marketThe staking user

Quick-prediction delegate session

To let users make repeated predictions without re-prompting their wallet, the program supports an explicit, user-funded delegate session:
InstructionPurpose
create_delegate_sessionUser signs once to create a session for a delegate key, funding an escrow with a spend cap (max_lamports) and expiry (expires_at)
fund_delegate_sessionAdd SOL to an existing session (raises escrow and cap)
place_bet_with_delegateMake a prediction signed by the delegate key, drawn from the capped escrow
withdraw_delegate_fundsWithdraw unused escrow back to the owner
revoke_delegate_sessionRevoke the session at any time

Access control

RoleHolderPowers
authorityA single key held by MicrosetUpdate config, treasury, fee, resolution authority, pause
resolution_authorityMicroset’s backend keyResolve and void markets
Market creationAuthority-only in practiceMarkets are created by Microset’s backend
The protocol fee (protocol_fee_bps) and resolution authority are stored in the on-chain Config and can be changed only by config.authority. The fee is capped on-chain (InvalidFeeBps if it exceeds 100%).

Accounts

AccountRole
Config (PDA ["config"])Global config: authority, treasury, protocol_fee_bps, resolution_authority, paused
Market (PDA ["market", market_id])One market: outcomes, per-outcome stake totals, close/resolve times, resolved state
UserStake (PDA ["stake", user, market])A user’s per-outcome stake and claim status
Vault (PDA ["vault", market])Program-owned account holding all of a market’s staked SOL
DelegateSessionA quick-prediction session: owner, delegate, max_lamports, spent_lamports, expires_at, revoked
DelegateEscrowHolds the SOL funding a delegate session

Funds & settlement

  • All stakes for a market sit in one vault PDA, with per-outcome accounting.
  • On resolve, the protocol fee is taken from the pool and sent to the treasury (3AzAex6f…xn9Cz); the remainder is locked in for winners. If there are no winners, the pool goes to the treasury.
  • claim pays each winner their proportional share of the post-fee pool; a voided market refunds stakes in full with no fee.
  • Quick-prediction escrow is bounded by the user-set max_lamports cap and is revocable and withdrawable at any time.

Resolution data

Microset does not set outcomes itself. Resolution is triggered by third-party data APIs: when a recognized sports data provider (the Roanuz Sports API for cricket) reports a final result, that result drives the resolve instruction, which the resolution authority submits on-chain. This keeps outcomes tied to real-world events rather than to Microset’s discretion.

Events

EventEmitted by
CreateMarketcreate_market
BetPlacedplace_bet / place_bet_with_delegate
MarketResolvedresolve
Claimedclaim
MarketVoidedvoid_market

Source & verification

  • The Microset web app at app.microset.io and its backend both reference this program ID and IDL, which match the deployed program.
  • Security review: internal security audits and vulnerability testing completed.