Depredict Protocol Overview
Depredict is THE decentralized prediction market protocol on Solana.
We empower anyone to create, trade, and resolve prediction markets on any event, all on-chain, with unmatched speed and transparency. Built with NFT-powered positions and MPL Core, Depredict offers a truly decentralized and composable prediction market experience.
What is Depredict?
Depredict is a fully on-chain protocol that enables users to:
- Create markets on real-world or crypto events
- Trade YES/NO positions in open markets
- Resolve outcomes in a trustless, transparent way
All market logic, settlement, and payouts are enforced by smart contracts—no intermediaries, no custodians, no limits.
Why Depredict?
- Truly Decentralized: All market operations are on-chain, censorship-resistant, and permissionless.
- Solana Speed & Scale: Built on Solana for lightning-fast transactions and low fees, even at high volume.
- Open & Composable: Integrate prediction markets into any app, bot, or dApp using our open SDK.
- Transparent & Fair: Outcomes, trades, and liquidity are visible and verifiable by anyone.
- Community-Driven: Anyone can create new markets, propose outcomes, and participate in governance.
Core Features
- Market Creation: Launch new markets on any topic, from sports to crypto to world events.
- NFT-Powered Positions: Positions are represented as NFTs using MPL Core and compressed primitives for scale.
- Scalable Position Pages: Paged storage for positions enables high throughput markets with pre-warming for next pages.
- Trading: Buy and sell YES/NO positions instantly; pay using the market mint (no auto-swap yet).
- Resolution: Settle markets based on real outcomes with manual or Switchboard oracle-based resolution.
- SDK & API: Typed TypeScript SDK with modules for trade, position, config, and market creator operations.
- Open Data: All market and trade data is public and queryable.
What's New in the SDK
The latest SDK unlocks better ergonomics, scalability, and admin tooling.
-
Modules
- trade: create/update/resolve/close markets; open positions; payouts
- position: page management (ensure, prune, close), auto-find available slot/page
- config: protocol config lifecycle and updates
- marketCreator: create/verify/update market creators (name, fees, merkle tree)
-
Highlights
getMarketsByAuthority(authority)to query your platform's marketscreateMarket({...})supportsLIVEandFUTUREmarkets with optionalbettingStartTime- Position pagination via
position.findAvailablePageForMarket(...)with automatic page creation - Admin flows:
updateMarket(...),closeMarket(...),resolveMarket(...)
-
Payout flow with NFT proof verification:
payoutPosition({ marketId, payer, assetId, rpcEndpoint, returnMode? })- Market creator lifecycle:
createMarketCreator,verifyMarketCreator,updateCreatorFee,updateCreatorFeeVault,updateMerkleTree
- Market creator lifecycle:
Quick SDK Glance
import { Connection, PublicKey } from '@solana/web3.js';
import DepredictClient, { MarketType, OracleType } from '@endcorp/depredict';
const connection = new Connection('https://api.devnet.solana.com');
const adminKey = new PublicKey('...');
const feeVault = new PublicKey('...');
const client = new DepredictClient(connection, adminKey, feeVault);
// Query your markets
const myMarkets = await client.trade.getMarketsByAuthority(adminKey);
// Create a LIVE market
const { tx, marketId } = await client.trade.createMarket({
startTime: Math.floor(Date.now()/1000),
endTime: Math.floor(Date.now()/1000) + 86400,
question: 'Will SOL close above $200 today?',
oracleType: OracleType.MANUAL,
marketType: MarketType.LIVE,
metadataUri: 'https://example.com/metadata.json',
payer: adminKey,
});
// Open a YES position
await client.trade.openPosition({
marketId,
amount: 25,
direction: { yes: {} },
token: 'USDC_MINT',
payer: adminKey,
metadataUri: 'https://example.com/nft.json',
});How to Get Started
- Developers:
-
Users:
- Use any Depredict-powered app or interface to explore and trade markets
- Join the community to propose new markets and help resolve outcomes
-
Bots:
- Coming soon...
Depredict is the foundation for a new era of open, decentralized forecasting. Build with us, trade with us, and help shape the future of prediction markets on Solana.
