A Central Limit Order Book (CLOB) custom ETF trading system for binary markets
This project allows users to create custom ETFs (miniETF) for prediction markets by combining different cryptocurrencies to create and price a bundle. The user chooses from a list of available price feeds, sets the weight for each currency and decides on the range bound to determine payouts at settlement time. Other users may participate in this market by buying or selling YES/NO position until trading close time. Payouts are made to winners at settlement time.
The ETF pricer leverages Chainlink price feeds to create the bundle. Bundles can only be formed with available chainlink price feeds. The backend CLOB is built in Rust and manages trading allowing users to buy or sell YES/NO bets until trading close time. The smart contracts handle bundle pricing and market creation. Each market contract has an associated vault contract to manage collateral and claim tokens. Claim tokens are ERC-1155 tokens matched with a unique ID for each market and outcome (within range or outside range). At settlement time winners can redeem their claim tokens 1:1 with collateral.