Program IDs
Orica Program Instructions
initialize
initialize
One-time setup to create the global state account.Accounts:
authority: Protocol authority (signer)globalState: PDA for protocol configfeeVault: PDA for protocol fee collectionusdcMint: USDC token mint
createMarket
createMarket
Creates a new prediction market.Arguments:
creatorWallet: Wallet to receive creator feesquestion: Market question textmetadataUri: IPFS URI for metadatacloseTime: Unix timestamp when trading endsoutcomeCount: Number of outcomesoptionNames: Array of outcome names
admin: Authorized admin (signer)market: New market PDAmarketVault: New market vault PDA
buy
buy
Purchase outcome shares.Arguments:
amount: USDC amount to spendoutcomeIndex: Index of outcome to buy
user: Buyer (signer)userUsdc: Buyer’s USDC token accountmarket: Market being tradedposition: User’s position PDA (created if needed)marketVault: Market’s USDC vaultfeeVault: Protocol fee vaultcreatorUsdc: Creator’s fee account
sell
sell
Sell outcome shares back to the pool.Arguments:
shares: Number of shares to selloutcomeIndex: Index of outcome to sell
buyAccess: Public (market must be open, user must have shares)resolveMarket
resolveMarket
Report the winning outcome.Arguments:
outcomeIndex: Winning outcome (0-254) or 255 for unresolvableresolutionMetadataUri: IPFS URI for resolution evidence
admin: Authorized admin (signer)market: Market being resolved
redeem
redeem
Claim winnings from a resolved market.Accounts:
user: Position holder (signer)position: User’s position PDAmarket: Resolved marketmarketVault: Market’s USDC vault
Disputes Program Instructions
voteForDispute
voteForDispute
Cast a vote in a dispute.Accounts:
user: Voter (signer)dispute: Dispute PDAdisputeVote: User’s vote PDAposition: User’s market position (for weight)
postMessage
postMessage
Post a message to dispute discussion.Arguments:
messageHash: SHA-256 hash of contentcontent: Message textparentMessage: Optional parent for threading
author: Message author (signer)dispute: Dispute PDAmessage: New message PDAposition: Author’s market position
boostMessage
boostMessage
Boost another user’s message.Accounts:
booster: User boosting (signer)message: Message being boostedboostRecord: PDA tracking the boostboosterPosition: Booster’s market position
resolveDispute
resolveDispute
Finalize a disputed market.Arguments:
outcomeIndex: Final outcomeresolutionMetadataUri: IPFS URI for resolution
resolver: Authorized resolver (signer)dispute: Dispute PDAmarket: Market being resolved
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.