Skip to main content
Orica consists of two Solana programs built with the Anchor framework. These programs handle all state mutations and fund movements.

Program IDs


Orica Program Instructions

One-time setup to create the global state account.Accounts:
  • authority: Protocol authority (signer)
  • globalState: PDA for protocol config
  • feeVault: PDA for protocol fee collection
  • usdcMint: USDC token mint
Access: Authority only
Creates a new prediction market.Arguments:
  • creatorWallet: Wallet to receive creator fees
  • question: Market question text
  • metadataUri: IPFS URI for metadata
  • closeTime: Unix timestamp when trading ends
  • outcomeCount: Number of outcomes
  • optionNames: Array of outcome names
Accounts:
  • admin: Authorized admin (signer)
  • market: New market PDA
  • marketVault: New market vault PDA
Access: Admin only
Purchase outcome shares.Arguments:
  • amount: USDC amount to spend
  • outcomeIndex: Index of outcome to buy
Accounts:
  • user: Buyer (signer)
  • userUsdc: Buyer’s USDC token account
  • market: Market being traded
  • position: User’s position PDA (created if needed)
  • marketVault: Market’s USDC vault
  • feeVault: Protocol fee vault
  • creatorUsdc: Creator’s fee account
Access: Public (market must be open)
Sell outcome shares back to the pool.Arguments:
  • shares: Number of shares to sell
  • outcomeIndex: Index of outcome to sell
Accounts: Same as buyAccess: Public (market must be open, user must have shares)
Report the winning outcome.Arguments:
  • outcomeIndex: Winning outcome (0-254) or 255 for unresolvable
  • resolutionMetadataUri: IPFS URI for resolution evidence
Accounts:
  • admin: Authorized admin (signer)
  • market: Market being resolved
Access: Admin only (market must be closed)
Claim winnings from a resolved market.Accounts:
  • user: Position holder (signer)
  • position: User’s position PDA
  • market: Resolved market
  • marketVault: Market’s USDC vault
Access: Public (market must be resolved, user must have winning shares)

Disputes Program Instructions

Cast a vote in a dispute.Accounts:
  • user: Voter (signer)
  • dispute: Dispute PDA
  • disputeVote: User’s vote PDA
  • position: User’s market position (for weight)
Access: Public (must have position in market)
Post a message to dispute discussion.Arguments:
  • messageHash: SHA-256 hash of content
  • content: Message text
  • parentMessage: Optional parent for threading
Accounts:
  • author: Message author (signer)
  • dispute: Dispute PDA
  • message: New message PDA
  • position: Author’s market position
Access: Public (must have position in market)
Boost another user’s message.Accounts:
  • booster: User boosting (signer)
  • message: Message being boosted
  • boostRecord: PDA tracking the boost
  • boosterPosition: Booster’s market position
Access: Public (must have position, one boost per message)
Finalize a disputed market.Arguments:
  • outcomeIndex: Final outcome
  • resolutionMetadataUri: IPFS URI for resolution
Accounts:
  • resolver: Authorized resolver (signer)
  • dispute: Dispute PDA
  • market: Market being resolved
Access: Admin/Resolver only

Program Derived Addresses

All accounts are PDAs derived deterministically from seeds:

Next Steps

Indexer

Learn how data is indexed off-chain.

SDK PDA

Use the SDK to derive PDAs.