Technical Overview

Predict operates on a hybrid model that combines decentralized and centralized components to offer a secure and seamless trading platform. This setup involves an off-chain Central Limit Order Book (CLOB) responsible for tasks like matching and ordering trades, while an on-chain settlement layer, managed via smart contracts, handles the final execution and settlement of orders.

At the core of this system are smart contracts such as the ConditionalTokens contract, which is based on the Gnosis Conditional Tokens standard. This contract manages the creation, interaction, and resolution of conditions linked to specific outcomes in a decentralized manner. It allows tokens to be split into new conditional tokens (also known as positions) and merged back into the original backing token. Once a condition is resolved, the contract adjusts the conditional tokens to reflect the final outcome, enabling users to redeem them according to the results. This ensures accurate distribution of payouts, allowing token holders to claim their corresponding assets or returns.

Another key component is the CTFExchange contract, which facilitates the on-chain execution and settlement of off-chain orders. When two orders are matched, the contract handles swaps between binary outcome tokens (ERC1155) and a collateral asset (ERC20). The CTFExchange also interacts with the ConditionalTokens contract to manage the splitting of collateral into different positions and their eventual merging back into collateral based on pairs of buy/sell orders.

Orders in this system are represented as signed, typed structured data (EIP712), providing the users with additional security and transparency. When an order is matched, the order book designates one party as the maker and the other as the taker. These orders are executed on-chain through an operator that interfaces with the CTFExchange. This setup allows users to place and cancel orders off-chain while ensuring that settlement occurs securely and transparently on-chain.

For mutually exclusive binary markets, the system functions in as descried above, by using slightly adapted versions of those contracts designed to unify the mutually exclusive binary markets into a single multi-outcome structure. These specialized contracts, prefixed with NegRisk, such as the NegRiskCtfExchange and NegRiskConditionalTokens, allowing the creating of a set of binary YES/NO markets of which one and only one will resolve true.

For market resolution, Predict relies on UMA's Optimistic Oracle, which leverages economic incentives to maintain integrity and provide a reliable system for resolving events.

Last updated