Markets & resolution
A market is a single binary bet on a single Bags token over a fixed window.
Lifecycle
A market is in exactly one of three states: Active, Resolved, or Cancelled. Once resolved, that's permanent.
Duration
Market duration is adaptive, picked from the token's 1-hour price action on DexScreener at the moment of creation:
- 15 min — hot mover (
|Δ1h| > 25%), tight window so the bet resolves before the move dies down. - 30 min — normal activity (
5% ≤ |Δ1h| ≤ 25%). - 60 min — stale (
|Δ1h| < 5%), give it room to actually move.
The on-chain program accepts any duration between 5 minutes and 24 hours — the buckets above are what the scheduled auto-creator picks. Manually seeded markets currently default to 30 min.
Initial price
When a market is created, the oracle records the token's USD price from DexScreener and locks it on-chain as initial_price. There's no separate "lock phase" — trading starts immediately.
Resolution
At expiry, the oracle reads the live DexScreener price one more time and writes it on-chain as final_price. Then:
- RUG wins if
final_price ≤ 20% of initial_price(an 80%+ drop). - RUN wins otherwise.
Resolution is one-shot and idempotent — it can never be re-run, and there's no admin override.
Cancelled markets
In rare cases (e.g. the source token's pool is unrecoverable), an admin can call cancel_market. Existing positions and LP shares can then be refunded via cancel_redeem_* instructions, using prices snapshotted at the moment of cancel.
Status badges in the UI
You'll see one of these on every card:
- Active — market is live, trade and LP open (LP locks in the last 5 minutes).
- Resolved — the outcome is set; redeem your winning side or LP share.
- Cancelled — refund flows are enabled.