Skip to main content

Events and Pools

Intotes organizes predictions into a two-level hierarchy: Events contain one or more Pools, and each Pool contains binary markets. This page explains both concepts and how they relate.


Events​

An Event is the top-level container. It represents a real-world occurrence that users can predict on β€” a football match, a crypto price target, a political election, etc.

Key fields​

FieldTypeDescription
idintegerUnique identifier.
namestringDisplay name (English).
name_rustringDisplay name (Russian).
tagsstring[]Categorization tags (e.g. ["football", "premier-league"]).
image_urlstring | nullCover image for the event card.
versus_imagesstring[]Two participant icon URLs (sport events).
versus_namesstring[]Two participant names (sport events).
has_drawbooleanWhether a draw outcome exists (sport events with three-way markets).
statusstringComputed lifecycle state β€” see below.
is_activebooleanWhen false, the event is hidden from feeds, search, and direct links. The creator can still see it in "my events".
is_loop_eventbooleanWhether the event recreates itself on a recurring schedule (e.g., crypto price cycles).
main_pool_idinteger | nullThe pool displayed in the event feed card β€” see below.
created_attimestampWhen the event was created.
closed_attimestamp | nullWhen the event was closed. Null while still active.

Event status​

Status is a computed field derived from the event's pools:

StatusMeaning
"new"The event has not started yet. All pools are still before their live_at time.
"started"At least one pool has started but the event has not been closed.
"paid"The event is closed and all payouts have been settled (closed_at is set).

Loop events​

A loop event is an event that automatically recreates itself on a fixed interval. This is used for recurring crypto price predictions (e.g., "Will ETH be above $3,500 in 1 hour?").

Loop-specific fields:

FieldDescription
loop_interval_minutesTime between cycle recreations (e.g., 60 for hourly).
next_recreate_atWhen the current cycle ends and a new one is created.
loop_template_event_idID of the original template event that stores the configuration.

When a loop cycle closes, the system resolves all positions, then creates a fresh event from the template with updated parameters (base price, probabilities, token IDs).

Additional fields​

  • fixture_id / fixture_sport β€” Link to an external sports data provider (API-Sports) for live score updates.
  • polymarket_event_url β€” URL/slug used to fetch and sync odds from Polymarket.
  • pinned_until / pin_order β€” Controls pinning the event to the top of the feed.

Pools​

A Pool is a question within an event. Each pool contains one or more binary markets (YES/NO outcomes).

For example, a football match event might have three pools:

  1. "Match winner" (with markets for Team A, Draw, Team B)
  2. "Total goals over 2.5"
  3. "Both teams to score"

Key fields​

FieldTypeDescription
idintegerUnique identifier.
namestringThe question text (English).
name_rustringThe question text (Russian).
rulesstringDescription of how the winning outcome is determined.
won_sideinteger | nullIndex of the winning market after resolution. Null while unresolved.
finish_attimestamp | nullDeadline after which no more orders can be placed. If null, the pool closes only via manual action.
live_attimestamp | nullWhen the pool goes live and trading opens.
marginintegerTotal margin for the pool (in cents).
scorestring | nullCurrent score for live sport events (e.g., "2-1").

Computed fields (not stored in DB)​

  • sides / sides_ru β€” Market names extracted from the pool's markets.
  • volumes β€” Trading volume per market.
  • totalPool β€” Sum of all market volumes.

The main_pool_id concept​

Every event has an optional main_pool_id that points to one of its pools. This is the pool whose markets are displayed on the event card in the feed. When a user sees an event in the list, the probabilities, prices, and volumes shown come from this main pool.

If main_pool_id is not set, the frontend typically uses the first pool.


Pool metadata​

Each pool can carry a metadata JSON object with additional configuration. This is especially important for event creation and loop events.

Core metadata fields​

FieldDescription
market_namesCustom names for each market (e.g., ["Will PSG win?", "Will match end in a draw?"]).
market_names_ruRussian versions of market names.
market_probabilitiesInitial probabilities (0-1) for each market, used instead of volumes.
market_imagesImage URL for each market.
market_yes_names / market_no_namesCustom YES/NO outcome labels per market (e.g., "Above $100k" / "Below $100k").

LMSR configuration​

FieldDescription
lmsr_b_kopecksPer-pool LMSR liquidity parameter b in cents. Determines how much prices move per trade. If not set, the global default is used.

Polymarket sync​

FieldDescription
polymarket_token_idsArray of Polymarket CLOB token IDs mapped to each market, used for real-time price syncing via WebSocket.

Crypto asset tracking​

FieldDescription
asset_symbolTracked asset symbol (e.g., "BTCUSDT").
asset_base_priceThe "price to beat" set at event creation.
asset_close_priceThe asset price at the moment the cycle was closed.

Loop cycle fields​

When closing a loop cycle, the system writes next_* fields onto the template pool to configure the upcoming cycle:

  • next_asset_base_price β€” Base price for the new cycle.
  • next_market_probabilities β€” Initial probabilities for the new cycle's markets.
  • next_market_names, next_market_names_ru, next_market_images β€” Structure of the next cycle's markets.
  • next_polymarket_token_ids β€” Token IDs for the next cycle.

These are read by the recreation worker and applied to the newly created pool.


Relationships​

Event (1)
β”œβ”€β”€ Pool (1..N)
β”‚ β”œβ”€β”€ Market (1..N) ← binary YES/NO outcomes
β”‚ └── metadata ← configuration, probabilities, asset tracking
└── main_pool_id ────────→ one of the Pools above

An event always has at least one pool, and each pool always has at least one market. The typical structure for a sport event with a draw option is one pool with three markets (Team A wins, Draw, Team B wins).