Dispute System

TOC implements a two-round dispute mechanism that ensures incorrect resolutions can always be challenged. Round 1 goes to a TruthKeeper (domain expert). If needed, Round 2 escalates to admin arbitration.

Two-Round Architecture

Dispute Flow
Resolution Answer proposed
Round 1 TruthKeeper review
Round 2 Admin escalation
Final Result locked

Round 1: TruthKeeper Adjudication

When someone disputes a resolution, the assigned TruthKeeper reviews and decides:

Filing a Dispute

// Filing a dispute
registry.disputePOP{value: disputeBondAmount}(
    popId,
    "Price data was incorrect",  // reason
    "ipfs://Qm...",               // evidence URI
    correctedResult                // optional: proposed correction
);

TruthKeeper Decision

The TruthKeeper has truthKeeperWindow time to decide. Four possible outcomes:

Decision Effect
UPHOLD_DISPUTE Disputer wins. Result changes (flipped for BOOLEAN, corrected for others). Proposer bond slashed.
REJECT_DISPUTE Proposer wins. Original result stands. Disputer bond slashed.
CANCEL_POP POP voided entirely. Both bonds returned.
TOO_EARLY Not enough information yet. POP returns to ACTIVE state for re-resolution.

TruthKeeper timeout: If the TruthKeeper doesn't respond within their window, the dispute auto-escalates to Round 2.

Round 2: Admin Escalation

Either party can challenge the TruthKeeper's Round 1 decision:

Filing an Escalation

// Challenging TruthKeeper's decision
registry.challengeTruthKeeperDecision{value: escalationBond}(
    popId,
    "TK decision was incorrect",  // reason
    "ipfs://Qm...",                // additional evidence
    correctedResult                 // optional correction
);

Admin Resolution

Protocol admin makes the final decision. Same four outcomes as Round 1, but this decision is final.

Bond Economics

Bonds create financial incentives for honest participation. See Bond Economics for full details.

Slash Distribution (50/50)

Bond Flow Examples

Dispute upheld (disputer wins):

  • Proposer bond: 50% to disputer, 50% to protocol
  • Disputer bond: returned in full

Dispute rejected (proposer wins):

  • Proposer bond: returned in full
  • Disputer bond: 50% to proposer, 50% to protocol

Evidence System

Disputes include an evidenceURI field for linking to supporting evidence:

Evidence should include:

Post-Resolution Disputes

If a POP has a postResolutionWindow > 0, disputes can be filed even after initial finalization:

// Check for corrections
if (registry.hasCorrectedResult(popId)) {
    bytes memory corrected = registry.getCorrectedResult(popId);
    // Use corrected result
} else {
    bytes memory original = registry.getResult(popId);
    // Use original result
}

Dispute States

POPs track dispute status through dedicated states:

Use isContested(popId) to check if a POP has an active dispute.

TruthKeeper Requirements

To be a TruthKeeper:

TruthKeepers can also guarantee resolvers - declare that they stand behind a specific resolver's accuracy. This enables TK_GUARANTEED tier for POPs using that resolver.

Becoming a TruthKeeper: Contact the protocol team to apply for whitelisting. TruthKeepers stake their reputation on accurate adjudication.