Lux Prediction Markets enable trading on the outcome of real-world events. Markets are binary (yes/no) or scalar (numeric range). Market creation is permissionless. Resolution uses an optimistic oracle: a proposer asserts the outcome, and it is accepted after a challenge period unless disputed. Disputed outcomes are resolved by K-chain oracle data (LP-038) or governance vote.
Binary market: trades outcome tokens YES and NO, each redeemable for 1 USDC if the outcome matches.
Scalar market: trades LONG and SHORT tokens over a numeric range [low, high]. Payout is linear interpolation based on the resolved value.
struct MarketParams {
string question; // human-readable question
uint256 resolutionTime; // Unix timestamp when market resolves
address collateral; // settlement token (USDC)
uint8 marketType; // 0=binary, 1=scalar
uint256 scalarLow; // scalar lower bound (0 for binary)
uint256 scalarHigh; // scalar upper bound (0 for binary)
bytes32 oracleFeed; // K-chain feed for auto-resolution (optional)
}
Creator deposits 100 USDC as a market creation bond (returned after resolution).
Outcome tokens are minted/burned via a CPMM (constant product):
Auto-resolution: if oracleFeed is set, the market auto-resolves using K-chain price at resolutionTime.
Optimistic resolution:
1. After resolutionTime, anyone can propose an outcome with a 500 USDC bond
2. 48-hour challenge period
3. If unchallenged, outcome is finalized; proposer bond returned
4. If challenged, dispute goes to governance vote (LP-058)
After resolution:
(resolvedValue - low) / (high - low) USDC per token; SHORT redeems the remainder1. Oracle manipulation: auto-resolution uses K-chain TWAP over 1 hour before resolutionTime to resist manipulation.
2. Ambiguous questions: poorly worded questions can lead to disputes. Market creators are incentivized to write clear questions to recover their bond.
3. Low-liquidity manipulation: thin AMMs can be manipulated to show misleading probabilities. UI should display liquidity depth alongside prices.
github.com/luxfi/standard/contracts/prediction/ |PredictionFactory.sol |OptimisticOracle.sol |Copyright (C) 2024-2026, Lux Partners Limited. All rights reserved.
Licensed under the MIT License.