Skip to main content
Standard Gnosis / Polymarket conditional token framework. Unchanged from upstream — PredictStreet uses it as the settlement substrate.

Key concepts

  • Condition — an (oracle, questionId, outcomeSlotCount) tuple.
  • Position — an ERC-1155 balance of a specific outcome slot within a condition.
  • Redemption — once the oracle reports payouts, holders call redeemPositions to exchange winning tokens for USDC.

Prepare a condition

function prepareCondition(
    address oracle,
    bytes32 questionId,
    uint256 outcomeSlotCount
) external;
Called by oracle-service as part of market deployment.

Redeem winning positions

function redeemPositions(
    IERC20 collateralToken,
    bytes32 parentCollectionId,
    bytes32 conditionId,
    uint256[] calldata indexSets
) external;

Helper via API

POST /api/me/redemptions
{
  "marketId": "UAE-CUP-FINAL-20260425",
  "outcome": "0"
}

Events

event ConditionPreparation(bytes32 indexed conditionId, address indexed oracle, ...);
event ConditionResolution(bytes32 indexed conditionId, ...);
event PositionSplit(address indexed stakeholder, ...);
event PositionsMerge(address indexed stakeholder, ...);
event PayoutRedemption(address indexed redeemer, bytes32 indexed conditionId, ...);

Source

0x47D8F1f0D6958Bd3Ef07519B344880846f7F1958 on Blockscout (testnet). Tracks upstream Gnosis ConditionalTokens v1.0.1 with only build-system changes.