ML Oracles: Can a Contract Trust an AI Answer?
An AI says a crop is damaged. Should a smart contract release the payment? Two existing mechanisms answer different questions: a zero-knowledge proof (zkML) shows the model was computed correctly, and an optimistic challenge window lets anyone dispute a claim before it settles. Neither shows that the answer is right. My open question is what a contract can accept about a model's output when correct computation is not a correct answer.
on-chain boundary off-chain compute cryptographic proof (zkSNARK) optimistic challenge / slash
🧠 What did you just learn?
The Blockchain is a closed system. A smart contract cannot make an API call to OpenAI or run a PyTorch script. It only knows what is posted to it. When an agreement requires complex pattern recognition (e.g., "Is this crop damage real?"), the classification y = F_θ(x) must happen off-chain.
The Verification Trilemma. We can trust an oracle implicitly (centralized, cheap), we can run the model on-chain (currently impractical for large θ), or we can use cryptographic or economic verification. Each choice moves the trust assumption rather than removing it.
Zero-Knowledge Inference (zkML). A prover generates a proof of an encoded computation; a verifier checks it. This verifies execution, not the truth of the input or the quality of the model. EZKL's documentation describes a concrete model-to-circuit workflow. Proof construction, verification cost, and security depend on the system used. The moving proof in the film is a schematic, not a trace of a specific proving system.
Optimistic Challenges. A proposer posts a claim and a bond. Others may dispute it during a challenge window. Disputes require a resolution mechanism; they do not universally reduce to a single machine instruction. UMA's oracle, for example, resolves disputes through its Data Verification Mechanism. Unchallenged claims settle, but this depends on effective monitoring and credible disputes. The animation's claims and timings are illustrative, not measured rates.
📐 The math, precisely
Rendered on load. If equations appear as raw text, reload the page.
