Decentralized Market Maker
Protocol Documentation
A complete reference for the Decentralized Market Maker prediction protocol — covering architecture, market mechanics, participant roles, economics, and developer integration.
Introduction
Decentralized Market Maker (DEMMM) is a permissionless prediction market protocol built natively on Solana. It enables anyone to create, trade, and resolve markets around real-world events — from crypto prices and macroeconomic outcomes to politics, sports, and culture.
Traditional prediction markets suffer from slow settlement, high fees, centralized control, and limited market selection. DEMM solves all four: Solana's sub-second finality enables near-instant settlement, network fees average $0.001, market creation is fully permissionless, and a social layer rewards quality forecasters and creators.
DEMM is currently in private development. This documentation describes the intended protocol design and is subject to change before mainnet launch.
Core Properties
- Permissionless — any wallet can create a market, trade, or apply to be a resolver
- Transparent — all rules, positions, and resolutions are onchain and auditable
- Composable — markets and positions are represented as SPL tokens, integrable with any Solana DeFi protocol
- Credibility-aware — an onchain reputation system rewards accurate forecasters and honest resolvers
Quick Start
Get started trading on Decentralized Market Maker in three steps.
1. Install a Solana wallet
You need a Solana-compatible wallet. We recommend Phantom or Solflare.
# Install Phantom browser extension
# https://phantom.app
# Or Solflare
# https://solflare.com2. Fund your wallet
DEMM markets use USDC on Solana for trading. You will also need a small amount of SOL to cover network fees (~$0.001 per transaction).
During testnet: use the in-app faucet to receive free devnet USDC and SOL for testing.
3. Connect and trade
// Using the DEMM SDK (coming soon)
import { DEMMClient } from '@dem-protocol/sdk';
const client = new DEMMClient({ network: 'mainnet-beta' });
// Connect wallet
await client.connect(wallet);
// Browse markets
const markets = await client.getMarkets({ category: 'Crypto' });
// Buy YES shares on a market
const tx = await client.buyShares({
marketId: 'btc-150k-dec-2026',
outcome: 'YES',
amount: 10, // USDC
});How It Works
Every market on DEMM is a binary outcome question. Participants buy YES or NO shares representing their belief about the outcome. Share prices reflect collective probability estimates — a YES price of 67¢ means the market believes there is a 67% chance the event occurs.
When a market resolves, holders of the correct outcome receive $1.00 per share. Holders of the incorrect outcome receive $0.00. This creates a direct financial incentive for accurate prediction.
Market Lifecycle
| Phase | Description | Duration |
|---|---|---|
| Creation | Creator defines question, resolution criteria, and resolution source | Instant |
| Trading | Open to all — buy/sell YES and NO shares freely | Until deadline |
| Pending | Market closed to new trades, awaiting resolution | 0–48 hours |
| Resolution | Resolver submits outcome onchain based on defined criteria | Up to 72 hours |
| Settlement | Winning shares redeemable for $1.00 USDC each | Instant |
| Dispute | Any participant can challenge a resolution within the window | 48 hours |
Architecture
DEMM is built as a set of composable Solana programs. Each market is an independent program account — isolated state, independent liquidity, and standalone resolution logic.
Program Accounts
// Market account structure (simplified)
pub struct Market {
pub id: Pubkey,
pub creator: Pubkey,
pub question: String, // max 256 chars
pub resolution_source: String, // URL or oracle address
pub deadline: i64, // Unix timestamp
pub yes_supply: u64, // Total YES shares minted
pub no_supply: u64, // Total NO shares minted
pub yes_reserve: u64, // USDC in YES pool
pub no_reserve: u64, // USDC in NO pool
pub status: MarketStatus, // Open | Pending | Resolved | Disputed
pub outcome: Option<Outcome>, // None | Yes | No | Invalid
pub resolver: Pubkey,
pub reputation_stake: u64, // Resolver's staked reputation
}Program IDs
Program IDs will be published upon mainnet deployment. Devnet addresses are available to approved testers.
Solana Integration
- Markets settle in USDC (SPL Token) — no wrapped assets or bridges required
- YES and NO shares are standard SPL tokens — tradeable on any Solana DEX
- Resolution uses Pyth Network oracles for price-based markets and a decentralized resolver network for event-based markets
- All instructions are versioned transactions with address lookup tables for low compute costs
Market Creation
Any wallet with a minimum reputation score (or a creation bond) can propose a new market. The creator defines the question, resolution criteria, deadline, and resolution source.
Requirements
| Parameter | Requirement |
|---|---|
| Question | Unambiguous binary outcome, max 256 characters |
| Resolution criteria | Specific, measurable, and tied to a verifiable source |
| Deadline | Minimum 1 hour from creation, maximum 2 years |
| Resolution source | Oracle address, public URL, or governance vote |
| Creation bond | 10 USDC (returned on valid resolution, burned on invalid) |
Creator SDK
const market = await client.createMarket({
question: 'Will BTC exceed $150,000 before Dec 31, 2026?',
resolutionCriteria: 'BTC/USD closing price on Coinbase on Dec 31 2026',
resolutionSource: 'pyth:BTC/USD',
deadline: new Date('2026-12-31'),
category: 'Crypto',
tags: ['bitcoin', 'price', 'crypto'],
});
console.log('Market created:', market.id);Liquidity Model
DEMM uses a hybrid AMM + orderbook model. A constant-product AMM provides baseline liquidity and ensures markets are always tradeable, while a central limit orderbook allows sophisticated traders to place limit orders and tighten spreads.
AMM Pricing
The AMM uses a modified CPMM where YES and NO reserves multiply to a constant. Price is determined by the ratio of reserves:
YES_price = NO_reserve / (YES_reserve + NO_reserve)
NO_price = YES_reserve / (YES_reserve + NO_reserve)
// Prices always sum to 1.00 (ignoring fees)
YES_price + NO_price = 1.00Orderbook Layer
Limit orders are matched against the AMM or other limit orders. The orderbook is fully onchain using the OpenBook v2 program. Liquidity providers earn a share of trading fees proportional to their contribution.
Resolution & Disputes
Market resolution is the most critical — and most trust-sensitive — part of any prediction market. DEMM handles it through a layered system of oracle data, staked resolvers, and community disputes.
Resolution Layers
| Layer | Used For | Trust Model |
|---|---|---|
| Pyth Oracle | Price-based markets (BTC > $X, ETH price, etc.) | Trustless — onchain data feed |
| Staked Resolver | Event markets with public sources (elections, sports) | Staked — slashed on wrong resolution |
| Governance Vote | Ambiguous or disputed markets | Decentralized — token-weighted vote |
Dispute Process
- Any participant can challenge a resolution within 48 hours by posting a dispute bond (50 USDC)
- Disputed markets enter a community review period where DEMM token holders vote on the correct outcome
- If the dispute is upheld, the resolver is slashed and the disputer receives the bond + a reward from the slash
- If the dispute is rejected, the disputer loses their bond to the resolver
Markets resolved as "Invalid" (due to ambiguous criteria or unforeseen events) return all USDC to traders at their average entry price, minus network fees.
Traders
Anyone with a Solana wallet and USDC can trade on DEMM. There are no KYC requirements, no minimum trade size, and no geographic restrictions imposed at the protocol level.
Trading Actions
| Action | Description |
|---|---|
| Buy YES | Purchase shares representing the outcome occurring |
| Buy NO | Purchase shares representing the outcome not occurring |
| Sell | Exit a position before the market deadline at current market price |
| Redeem | After resolution, claim $1.00 USDC per winning share |
Market Creators
Market creators define the questions that drive the protocol. A creator's reputation is built by the quality, engagement, and accurate resolution of their markets.
Creators earn a 0.25% fee on all trades in their markets. High-engagement creators with strong reputation scores are surfaced prominently in the discovery feed and earn additional protocol incentives.
Resolvers
Resolvers are staked participants who commit to resolve specific markets correctly. They must stake a minimum of 100 USDC worth of DEMM tokens per market they resolve, which is at risk of slashing for incorrect resolution.
The resolver network is invite-only during the initial launch phase. Open resolver applications will begin in Q3 2026.
Reputation System
Every wallet on DEMM has an onchain reputation score — a single portable number that reflects their track record as a trader, creator, and resolver. Reputation is stored directly on Solana and visible to all.
Score Components
| Component | Weight | How Earned |
|---|---|---|
| Forecast accuracy | 50% | Percentage of correct predictions, volume-weighted |
| Market quality | 25% | Volume and engagement on created markets |
| Resolution honesty | 15% | Dispute rate and successful resolutions |
| Protocol participation | 10% | Governance votes, liquidity provision |
Fee Structure
| Fee Type | Rate | Recipient |
|---|---|---|
| Protocol fee | 1.00% | DEMM treasury / token stakers |
| Creator fee | 0.25% | Market creator |
| LP fee | 0.25% | Liquidity providers |
| Network fee | ~$0.001 | Solana validators |
| Total per trade | ~1.50% | — |
| Creation bond | 10 USDC | Returned on valid resolution |
Wallets with a reputation score above 5,000 receive a 20% discount on protocol fees.
Tokenomics
The DEMM token powers protocol governance, resolver staking, and fee distribution. Token details have not been finalized. The following represents current design thinking and is subject to change.
No DEMM token exists yet. Any token claiming to be DEMM before our official announcement is fraudulent.
Planned Utility
- Governance — vote on protocol parameters, fee rates, resolver admission
- Staking — resolvers stake DEMM as collateral; stakers earn a share of protocol fees
- Fee discounts — staked DEMM holders receive reduced trading fees
- Reputation boost — DEMM staking contributes to reputation score
Incentive Design
DEMM's incentive structure is designed to reward accuracy, quality, and honest participation — not just volume.
| Participant | Incentive |
|---|---|
| Accurate traders | Profits from correct predictions + reputation score growth |
| Market creators | 0.25% of all trades in their markets + reputation |
| Honest resolvers | Resolution fee + stake returned + reputation growth |
| Liquidity providers | 0.25% of trades in their pool + LP token rewards |
| Early community members | Priority access + potential protocol incentive allocation |
Security Model
DEMM is built with security as a first-class concern. The protocol is designed with defense-in-depth: each component is independently verified and isolated.
Program Security
- All programs use Anchor framework with strict account validation
- Integer arithmetic uses checked operations to prevent overflow
- Markets are isolated accounts — a bug in one market cannot affect others
- Admin upgrade authority will be transferred to governance before mainnet
Economic Security
- Resolver staking creates a direct financial penalty for incorrect resolution
- Dispute bonds prevent spam disputes
- Oracle price feeds use Pyth's confidence intervals — markets pause if confidence is insufficient
Audits
Security audits are scheduled to begin in Q2 2026 ahead of mainnet launch. Audit reports will be published in full upon completion.
DEMM will undergo multiple independent security audits before mainnet deployment. Planned audit scope includes all core programs (market factory, AMM, orderbook, resolver registry) and the oracle integration layer.
SDK Reference
The DEMM TypeScript SDK provides a high-level interface for all protocol interactions.
The SDK is in active development and not yet publicly released. API signatures may change before the stable release.
Installation
npm install @dem-protocol/sdk
# or
yarn add @dem-protocol/sdkClient Initialization
import { DEMMClient } from '@dem-protocol/sdk';
import { Connection, PublicKey } from '@solana/web3.js';
const connection = new Connection('https://api.mainnet-beta.solana.com');
const client = new DEMMClient({
connection,
wallet, // AnchorWallet compatible
network: 'mainnet-beta', // or 'devnet'
});Fetching Markets
// Get all open markets
const markets = await client.getMarkets();
// Filter by category
const cryptoMarkets = await client.getMarkets({
category: 'Crypto',
status: 'Open',
sortBy: 'volume',
});
// Get a specific market
const market = await client.getMarket('btc-150k-dec-2026');
console.log(market.yesPrice); // e.g. 0.67Trading
// Buy YES shares
const buyTx = await client.buyShares({
marketId: market.id,
outcome: 'YES',
amount: 50, // USDC
slippage: 0.02, // 2% max slippage
});
// Sell position
const sellTx = await client.sellShares({
marketId: market.id,
outcome: 'YES',
shares: 100,
});
// Redeem after resolution
const redeemTx = await client.redeem({ marketId: market.id });API Endpoints
DEMM exposes a REST API for read-only data access. Write operations must go through on-chain transactions.
Base URL
https://api.dem.markets/v1Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /markets | List all markets with filters |
| GET | /markets/:id | Get single market detail |
| GET | /markets/:id/trades | Trade history for a market |
| GET | /markets/:id/orderbook | Current orderbook state |
| GET | /users/:wallet | Wallet profile and reputation |
| GET | /users/:wallet/positions | Open and closed positions |
| GET | /leaderboard | Top forecasters by reputation score |
| GET | /categories | Available market categories |
Example Response
// GET /markets/btc-150k-dec-2026
{
"id": "btc-150k-dec-2026",
"question": "Will BTC exceed $150,000 before Dec 31, 2026?",
"category": "Crypto",
"status": "Open",
"yesPrice": 0.67,
"noPrice": 0.33,
"volume": 2400000,
"liquidity": 890000,
"deadline": "2026-12-31T23:59:59Z",
"resolutionSource": "pyth:BTC/USD",
"creator": "8xzT...k9mP",
"createdAt": "2026-01-15T10:00:00Z"
}Roadmap
| Phase | Timeline | Milestones |
|---|---|---|
| Alpha | Q1 2026 | Core protocol development, internal testing, devnet deployment |
| Beta | Q2 2026 | Security audits, closed beta with invited traders, SDK alpha release |
| Launch | Q3 2026 | Mainnet deployment, public trading, creator program opens |
| Growth | Q4 2026 | Token launch, governance, resolver network expansion, mobile app |
| Scale | 2027 | Cross-chain bridging, institutional API, sub-markets, prediction feeds |
Launch App at dem.markets/dashboard and follow our channels for the latest updates.
