To release an insurance escrow automatically, someone must prove a drought happened. But:
A corrupt oracle or a compromised server means a farmer in a drought gets nothing. Or a fraudster triggers a payout in a good season.
We run the weather aggregation computation inside RISC Zero's Boundless zkVM. The result is a cryptographic proof — not a claim, a mathematical guarantee.
Proof Receipt Structure
{
"proofId": "0x3f8a2c1d9e…", // Short handle for the proof
"imageId": "a4f2…", // SHA256 of the zkVM guest program ELF
// Identifies WHAT computation was run
"journalHash": "8b3c…", // SHA256 of the public outputs
// Commits to the oracle readings + verdict
"seal": "f91d…", // ZK proof bytes (STARK/SNARK)
// Mathematical guarantee of honest execution
"journal": {
"oracle1_source": "Open-Meteo Forecast (ECMWF IFS)",
"oracle1_mm": 12.4,
"oracle2_source": "Open-Meteo ERA5 Archive (ECMWF ERA5)",
"oracle2_mm": 10.8,
"oracle3_source": "NASA POWER PRECTOTCORR",
"oracle3_mm": 9.3,
"consensus_mm": 10.8,
"threshold_mm": 40,
"is_drought": true,
"timestamp": 1744560000
}
}zkVM Guest Program (Rust)
// Reads oracle JSON from host, computes drought consensus, commits to journal
fn main() {
let input_bytes: Vec<u8> = env::read();
let input: GuestInput = serde_json::from_slice(&input_bytes).unwrap();
// Filter available oracles (value >= 0), compute average
let readings: Vec<f64> = [o1, o2, o3, o4, o5]
.iter().filter(|&&v| v >= 0.0).cloned().collect();
let consensus_mm = readings.iter().sum::<f64>() / readings.len() as f64;
let is_drought = consensus_mm < input.threshold_mm; // 40mm threshold
// Commit public outputs — what the ZK proof guarantees
env::commit(&GuestOutput {
farm_id, consensus_mm, oracles_used: readings.len() as u32,
is_drought, threshold_mm, timestamp,
oracle1_mm, oracle2_mm, oracle3_mm, oracle4_mm, oracle5_mm,
});
}In this demo: the 3 oracle fetches are real. The journal is real. The proof is a cryptographic HMAC commitment (HMAC-SHA256 of journalHash keyed by imageId) — not a full Boundless STARK proof.
In production: the guest program compiles to RISC Zero RISC-V ELF, runs on Boundless prover nodes, and returns a verifiable STARK proof. The XRPL memo stores the same journalHash and seal — the on-chain flow is identical.
The architecture is production-ready. Swapping the HMAC seal for a real Boundless proof is one environment variable and one SDK call.