Documentation Index
Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt
Use this file to discover all available pages before exploring further.
Resolution Types
How much must the world move before it counts as having moved? That is the question each resolution type answers.
Each market has a resolution type that defines the threshold a price must cross for UP to win. Fourteen types — fourteen definitions of “enough.”
Type Reference
Standard Types (0-7)
| Value | Name | Threshold | UP Wins When | DOWN Wins When |
|---|
| 0 | UP_0 | 0% | Price increases by any amount (> 0%) | Price stays flat or decreases |
| 1 | UP_30 | 0.30% | Price increases by > 30 bps | Price does not exceed +30 bps |
| 2 | UP_X | Custom | Price increases by > X bps | Price does not exceed +X bps |
| 3 | DOWN_0 | 0% | Price decreases by any amount (< 0%) | Price stays flat or increases |
| 4 | DOWN_30 | 0.30% | Price decreases by > 30 bps | Price does not exceed -30 bps |
| 5 | DOWN_X | Custom | Price decreases by > X bps | Price does not exceed -X bps |
| 6 | FLAT_0 | 0% | Price does not change (exactly 0%) | Price changes by any amount |
| 7 | FLAT_X | Custom | Price stays within X bps | Price moves more than X bps |
Extended Types (8-13)
These are hardcoded convenience presets for common volatility bands. They don’t use the customThresholds array.
| Value | Name | Threshold | UP Wins When | DOWN Wins When | FLAT When |
|---|
| 8 | UP_300 | 3% | Price increases by > 300 bps (3%) | Otherwise | — |
| 9 | UP_3000 | 30% | Price increases by > 3000 bps (30%) | Otherwise | — |
| 10 | DOWN_300 | 3% | Otherwise | Price decreases by > 300 bps (3%) | — |
| 11 | DOWN_3000 | 30% | Otherwise | Price decreases by > 3000 bps (30%) | — |
| 12 | FLAT_300 | 3% | Price > +3% | Price < -3% | abs(change) < 3% |
| 13 | FLAT_3000 | 30% | Price > +30% | Price < -30% | abs(change) < 30% |
Custom Thresholds
Resolution types ending in _X (UP_X, DOWN_X, FLAT_X) accept a custom threshold in basis points. The threshold is set per market when creating the batch via the customThresholds array in createBatch().
1 basis point = 0.01%
Examples:
- Threshold of 10 = 0.10%
- Threshold of 30 = 0.30%
- Threshold of 50 = 0.50%
- Threshold of 100 = 1.00%
- Threshold of 500 = 5.00%
For non-custom types (UP_0, UP_30, DOWN_0, DOWN_30, FLAT_0), the threshold value in customThresholds is ignored (pass 0).
Resolution Logic
At the end of each tick, the oracle network computes the price change percentage for each market:
priceChange = (closePrice - openPrice) / openPrice * 10000 // in basis points
The outcome for each market is then determined by the resolution type:
| Resolution Type | UP Outcome (bitmap bit = 1) | DOWN Outcome (bitmap bit = 0) |
|---|
| UP_0 | priceChange > 0 | priceChange <= 0 |
| UP_30 | priceChange > 30 | priceChange <= 30 |
| UP_X | priceChange > X | priceChange <= X |
| DOWN_0 | priceChange < 0 | priceChange >= 0 |
| DOWN_30 | priceChange < -30 | priceChange >= -30 |
| DOWN_X | priceChange < -X | priceChange >= -X |
| FLAT_0 | priceChange == 0 | priceChange != 0 |
| FLAT_X | abs(priceChange) < X | abs(priceChange) >= X |
| UP_300 | priceChange > 300 | priceChange <= 300 |
| UP_3000 | priceChange > 3000 | priceChange <= 3000 |
| DOWN_300 | priceChange < -300 | priceChange >= -300 |
| DOWN_3000 | priceChange < -3000 | priceChange >= -3000 |
| FLAT_300 | abs(priceChange) < 300 | abs(priceChange) >= 300 |
| FLAT_3000 | abs(priceChange) < 3000 | abs(priceChange) >= 3000 |
Storage
Resolution types are stored as raw uint8 values in the off-chain batch config (never stored on-chain). The oracle resolver interprets them at tick resolution time. The Solidity enum in IVision.sol defines the first 8 types for reference; types 8-13 are oracle-level extensions.
Choosing a Resolution Type
| Use Case | Recommended Type | Why |
|---|
| Bet on any price increase | UP_0 | Lowest threshold — any upward movement wins |
| Filter out noise | UP_30 or DOWN_30 | 30 bps threshold filters micro-movements |
| High-conviction directional bets | UP_X or DOWN_X with large threshold | Only large moves win — higher risk, higher reward concentration |
| Range-bound markets | FLAT_X | Bet that the price stays within a band |
| Exact stagnation bets | FLAT_0 | Extremely rare — price must not move at all |
Example Batch Configuration
A batch with 3 markets using different resolution types:
{
"marketIds": ["BTC", "ETH", "DOGE"],
"resolutionTypes": [1, 0, 2],
"tickDuration": 3600,
"customThresholds": [0, 0, 100]
}
- BTC uses UP_30 (enum 1): UP wins if BTC price increases by at least 0.30%
- ETH uses UP_0 (enum 0): UP wins if ETH price increases by any amount
- DOGE uses UP_X (enum 2) with threshold 100: UP wins if DOGE price increases by at least 1.00%
Tick Duration and Threshold Pairing
Higher thresholds mean more FLAT outcomes and fewer winning/losing rounds. Choose based on the expected volatility of your markets and the tick duration:
- Short ticks (5-10 min): Use
UP_0 or DOWN_0 for maximum action. Small price movements still produce winners.
- Medium ticks (1 hour): Use
UP_30 or DOWN_30 to filter out noise. Only meaningful moves count.
- Long ticks (1 day): Use custom thresholds (
UP_X) to require substantial moves, since daily volatility is higher.
- Flat markets: Use
FLAT_0 or FLAT_X when you want the game to reward stability detection.
The customThresholds array must be parallel to marketIds. Each entry corresponds to the market at the same index. For non-custom resolution types (like UP_0 or UP_30), the threshold value is ignored but a placeholder (e.g., 0) must still be provided to maintain array alignment, or the transaction reverts with ArrayLengthMismatch.