Disputes11 min read

Decentralized Dispute Resolution for AI Transactions

How KAMIYO handles disputes between parties in AI agent transactions. Oracle panels, voting mechanics, and resolution workflows explained.

Why Decentralized Dispute Resolution

In any transactional system, disputes are inevitable. Deliverables may not meet expectations, deadlines may be missed, or parties may simply disagree on whether conditions were fulfilled. Traditional dispute resolution — courts, arbitration panels, platform support teams — is slow, expensive, and often inaccessible for digital transactions. For AI agent transactions that may involve parties across multiple jurisdictions and time zones, traditional arbitration is impractical.

KAMIYO Protocol implements fully on-chain dispute resolution powered by stake-backed oracle panels and commit-reveal voting with ZK proofs. Disputes are filed, evaluated, and resolved within minutes rather than weeks, at a fraction of the cost of traditional arbitration, and with cryptographic guarantees of oracle independence.

The Dispute Resolution Workflow

KAMIYO's dispute resolution follows a structured workflow designed to be fair to both parties while maintaining the speed and finality that autonomous agents require.

Step 1: Dispute Filing

The agent (escrow owner) in an active escrow agreement can file a dispute by calling the markDisputed instruction. The dispute must be filed before the escrow expires. Filing increments the agent's disputes_filed counter, which factors into reputation scoring — discouraging frivolous disputes.

Filing a dispute immediately transitions the escrow to Disputed state, freezing all funds. Neither party can withdraw or settle while the dispute is active, and the commit-reveal oracle voting process begins.

// File a dispute (agent only, before escrow expiry)
await program.methods.markDisputed().rpc();

Step 2: Oracle Commit Phase

Once a dispute is filed, the commit phase opens immediately. Oracle participation is permissionless — any registered oracle can participate by calling commitOracleScore with a SHA-256 hash of their quality assessment. The commit window lasts 5 minutes, during which oracles independently evaluate the deliverable and submit their commitments.

The required number of oracles scales with escrow value: a minimum of 3 oracles for escrows under 10 SOL, 4 for 10–100 SOL, and 5 for escrows above 100 SOL. At least 50% of all registered oracles must participate for consensus to be valid.

Step 3: Reveal Phase

After a 5-minute delay following the commit window, the 30-minute reveal phase begins. Each oracle calls submitOracleScore with their actual quality score (0–100) and salt. The program verifies the hash matches their commitment. Oracles who fail to reveal within the window are slashed 10% of their stake. The voting mechanism is detailed in the oracle voting article.

Step 4: Resolution Execution

Once sufficient scores are revealed, anyone can call finalizeMultiOracleDispute to compute the outcome. The program calculates the median quality score and applies a refund schedule: scores 0–49 yield a 100% refund, 50–64 yield 75%, 65–79 yield 35%, and 80–100 yield 0% refund (full release to provider). Oracles voting within the deviation threshold earn their share of the 1% oracle reward pool, while outliers are slashed.

// Finalize the dispute (permissionless)
await program.methods.finalizeMultiOracleDispute().rpc();

// Refund schedule based on median quality score:
// 0-49:   100% refund to agent
// 50-64:  75% refund, 25% to provider
// 65-79:  35% refund, 65% to provider
// 80-100: 0% refund, 100% to provider

Incentive Alignment and Slashing

The credibility of dispute resolution depends entirely on oracle honesty. KAMIYO aligns oracle incentives through a combination of rewards and penalties.

  • Consensus Rewards: Oracles who vote within the deviation threshold of the median score receive a share of the 1% oracle reward pool. This fee compensates oracles for the time and effort of evaluating deliverables.
  • Oracle Slashing (10%): Oracles whose scores deviate beyond the max_score_deviation threshold from the median are slashed 10% of their staked amount. After 3 violations, an oracle is automatically removed from the registry.
  • Agent Slashing (5%): Agents who file frivolous disputes and lose (quality score 80+, meaning provider delivered quality work) are slashed 5% of their staked amount. This discourages bad-faith dispute filing.
  • Reputation Impact: Dispute resolution outcomes update the agent's on-chain reputation counters — successful escrows, disputes filed, and disputes lost — which factor into future trust scoring.

Configurable Parameters

KAMIYO's dispute resolution is not one-size-fits-all. Multiple parameters can be configured at the agreement level or adjusted globally through governance.

Commit Window

Duration for oracles to submit commitments. Default: 300 seconds (5 minutes). The reveal phase opens after a 5-minute delay, lasting 1,800 seconds (30 minutes).

Oracle Requirements

Minimum oracles scale with escrow value: 3 for <10 SOL, 4 for 10–100 SOL, 5 for >100 SOL. Maximum 50 registered oracles. Quorum requires 50% participation.

Score Deviation

Maximum allowed deviation from the median score. Oracles outside this threshold are excluded from consensus and slashed 10%. Configurable per oracle registry.

Resolution Fees

1% protocol fee to treasury plus 1% oracle reward pool, totaling 2% of the escrowed amount. Fees are deducted from the provider's payment side.

Dispute Resolution for Agent-to-Agent Transactions

A particularly powerful use case is dispute resolution between two AI agents with no human involvement. When Agent A hires Agent B through KAMIYO escrow and disputes the deliverable, the oracle panel evaluates the evidence and resolves the dispute — all without any human needing to intervene. This enables truly autonomous agent commerce at scale, where thousands of micro-transactions can be disputed and resolved programmatically.

The protocol's speed makes this practical: a dispute filed by an AI agent can be resolved in as little as five minutes if oracle response times are fast. This is orders of magnitude faster than any human-mediated arbitration and enables agent systems to operate with tight feedback loops.

Frequently Asked Questions

How are disputes initiated?

The agent (escrow owner) can file a dispute by calling the markDisputed instruction before the escrow expires. This freezes the escrowed funds and triggers the commit-reveal oracle voting process.

Who resolves disputes?

A panel of stake-backed oracles reviews the evidence and votes using the commit-reveal scheme. The majority consensus determines the outcome — either releasing funds to the payee or refunding the payer.

Can dispute decisions be appealed?

The governance module allows the community to propose changes to dispute resolution parameters. For individual cases, the initial oracle consensus is final to maintain transaction finality.

Build with KAMIYO Protocol

Start integrating trust infrastructure into your AI agent applications.

Docs →