A resolution type defines the win condition for a market within a batch. Each market in a batch has its own resolution type, stored as aDocumentation Index
Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt
Use this file to discover all available pages before exploring further.
uint8 in the resolutionTypes array. The resolution type determines how much the price must move for a market to resolve as UP, DOWN, or FLAT.
Resolution Type Table
| Value | Name | Threshold | UP Wins When | DOWN Wins When | FLAT When |
|---|---|---|---|---|---|
| 0 | UP_0 | 0% | price > 0% | price < 0% | price = 0% |
| 1 | UP_30 | 0.30% | price > +0.30% | price < -0.30% | -0.30% to +0.30% |
| 2 | UP_X | Custom | price > +X% | price < -X% | -X% to +X% |
| 3 | DOWN_0 | 0% | price > 0% | price < 0% | price = 0% |
| 4 | DOWN_30 | 0.30% | price > +0.30% | price < -0.30% | -0.30% to +0.30% |
| 5 | DOWN_X | Custom | price > +X% | price < -X% | -X% to +X% |
| 6 | FLAT_0 | 0.01% | price > +0.01% | price < -0.01% | abs(price) < 0.01% |
| 7 | FLAT_X | Custom | price > +X% | price < -X% | abs(price) < X% |
UP_0 and DOWN_0 produce identical results. They are separate enum values for semantic clarity — UP_0 is named to suggest “will it go up?” while DOWN_0 suggests “will it go down?”. The resolution logic is the same.Enum Definition
In the Solidity interface:How Resolution Works
At tick resolution, the issuer computes the percentage change for each market:Custom Thresholds
Resolution types ending in_X (UP_X, DOWN_X, FLAT_X) use custom thresholds. These are passed in the customThresholds array when creating a batch, stored as basis points (1/100th of a percent).
| Basis Points | Percentage |
|---|---|
| 10 | 0.10% |
| 30 | 0.30% |
| 50 | 0.50% |
| 100 | 1.00% |
| 500 | 5.00% |
Examples with Real Price Movements
Example 1: UP_0 (Any Movement)
BTC-USD moves from 60,050 (+0.083%):- Resolution type:
UP_0(value 0) - Percentage change: +0.083%
- Outcome: UP (any positive movement counts)
- Players who predicted UP win; DOWN loses.
Example 2: UP_30 (0.30% Threshold)
ETH-USD moves from 3,005 (+0.167%):- Resolution type:
UP_30(value 1) - Percentage change: +0.167%
- Outcome: FLAT (did not exceed +0.30% or -0.30%)
- All players are refunded.
Example 3: UP_X with 1% Threshold
SOL-USD moves from 98.50 (-1.5%):- Resolution type:
UP_X(value 2), threshold = 100 bps (1%) - Percentage change: -1.5%
- Outcome: DOWN (exceeded -1% threshold)
- Players who predicted DOWN win; UP loses.
Example 4: FLAT_0 (Near Zero)
AVAX-USD moves from 25.002 (+0.008%):- Resolution type:
FLAT_0(value 6) - Percentage change: +0.008%
- Outcome: FLAT (absolute change < 0.01%)
- All players are refunded.
Example 5: FLAT_X with 0.5% Threshold
BTC-USD moves from 60,200 (+0.333%):- Resolution type:
FLAT_X(value 7), threshold = 50 bps (0.5%) - Percentage change: +0.333%
- Outcome: FLAT (absolute change < 0.5%)
- All players are refunded.