Insightra Docs
How Insightra markets, factories, and the Predikt Oracle fit together.
Insightra is a prediction-market protocol powered by factory-deployed markets and a lightweight, on-chain oracle called Predikt. Users can create markets, trade outcome tokens, and redeem after resolution from the oracle.
- Factories:
BinaryFactory,CategoricalFactory,ScalarFactorycreate market instances and handle listing controls (remove/restore, redeem fee bps). - Markets:
BinaryMarket,CategoricalMarket,ScalarMarketextendMarketBase; mint outcome tokens, take/add liquidity, and settle viafinalizeFromOracle(). - Oracle:
KasOracle(Predikt) exposescreateQuestionPublic(with fee),commit/recommit,reveal,finalize,escalate, andreceiveArbitratorRuling. Questions are keyed by abytes32id. - Arbitration:
SimpleArbitratorcan be plugged in for escalations and final rulings.
- Create: Anyone can create a market. The app calls
createQuestionPublicon the oracle (pays the currentquestionFeein the oracle’sbondToken), then calls the relevant factorysubmit*to deploy the market linked to thatquestionId. - Trade: Liquidity is added and outcome tokens trade; LPs earn fees on volume.
- Report: Reporters first commit a hashed answer, then later reveal the answer and post a bond. Each round’s minimum bond is either
minBaseBondor the previous best bond ×bondMultiplier, up tomaxRounds. - Finalize: If unchallenged and liveness expires, anyone can
finalize(id). The market then callsfinalizeFromOracle()to settle. - Dispute & Escalate: If challenged repeatedly, the question can escalate to the on-chain arbitrator for a final ruling (consumed by
receiveArbitratorRuling).
Predikt (KasOracle) is a commitment-based optimistic oracle with bond escalation and optional arbitration.
- Public creation:
createQuestionPublic(paysquestionFeeinbondToken). - Commit → Reveal: Reporters submit
hashCommit = keccak256(abi.encode(id, encodedOutcome, salt, msg.sender)), then reveal withencodedOutcome+saltand a bond that meets the round’s minimum. - Bonds: Start with
minBaseBond, then escalate geometrically usingbondMultiplierup tomaxRounds. - Fees: On
finalize(id), the bond pool is distributed to the winner minusfeeBpssent tofeeSink. - Arbitration: If escalation reaches the limit, a final on-chain decision is provided and consumed by
receiveArbitratorRuling.
UMA’s Optimistic Oracle (OO) popularized proposer/disputer with liveness and a fallback to the DVM. Predikt keeps the same spirit but adapts for lean, chain-local markets:
- Commit–Reveal: Predikt uses
commit/reveal(andrecommit) to prevent copycats during liveness; UMA’s default flow doesn’t require this step. - Local Arbitration: Final escalations go to a pluggable on-chain arbitrator, keeping policy and finality on your chain rather than routing to UMA’s DVM.
- Security knobs: Per-question
minBaseBond,bondMultiplier, andmaxRoundsfor stronger spam/grief resistance.
// Oracle (selected, user-visible surface) function createQuestionPublic(QuestionParams p, bytes32 salt) payable returns (bytes32); function commit(bytes32 id, bytes32 hashCommit); function recommit(bytes32 id, bytes32 hashCommit); function reveal(bytes32 id, bytes encodedOutcome, bytes32 salt, uint256 bond); function finalize(bytes32 id); function escalate(bytes32 id); function receiveArbitratorRuling(bytes32 id, bytes encodedOutcome, address payee); // Market function finalizeFromOracle(); // pulls oracle result and settles
How do I create a market? Use the Create page. You’ll pay the oracle’s questionFee in its bondToken, then the app deploys the market via a factory.
What’s the commit hash? keccak256(abi.encode(id, encodedOutcome, salt, msg.sender)).
What triggers arbitration? Reaching maxRounds of escalation routes the question to the on-chain arbitrator for a final ruling.