ErotemeEroteme

Polymarket Integration

How Eroteme connects to Polymarket for market data and resolution.

Eroteme uses Polymarket as the source of truth for all prediction markets. Every prediction must link to a real, active Polymarket market.

Market Data

When a creator selects a market, the following data is fetched from Polymarket's API:

FieldDescription
conditionIdUnique market identifier
slugURL-friendly market name
questionMarket title/question
outcomesPossible outcomes and current prices
endDateWhen the market closes
volumeTotal trading volume
categoryMarket category tag

The market search filters out:

  • Resolved markets — Already settled, can't predict on
  • Closed markets — No longer accepting trades
  • Markets you've already predicted on — One prediction per user per market

Resolution Process

Polymarket resolution is fully automated:

Polymarket resolves market

Cron job polls Polymarket API (runs periodically)

Detects resolved market

Updates all linked predictions

Settles betting pools (database + on-chain)

Winners can withdraw USDC

Resolution Service

The resolution service periodically:

  1. Checks all active predictions grouped by market
  2. Fetches current market status from Polymarket
  3. If resolved: settles all linked predictions and betting pools
  4. If closed but not resolved: marks predictions as "pending"
  5. Retries any previously failed on-chain settlements

Timing

Resolution timing depends entirely on Polymarket — it could be hours or days after the event. Eroteme checks periodically and resolves as soon as Polymarket does.

Outcome Mapping

Polymarket markets provide outcome labels that may differ from simple "Yes"/"No":

Market TypeYES LabelNO Label
Standard binaryYesNo
Price marketUpDown
CustomHeadsTails

Eroteme maps these display labels to internal YES/NO values for betting logic.

On this page