Skip to the content.

Trust surface

What VAR asks you to trust, what it doesn’t, and what happens when something goes wrong. Written against programs/var-settlement/src/lib.rs and crates/rulebook/src/lib.rs as they exist today.

The honest claim

VAR does not claim to know the truth about a football match independent of any data source — that would be a different, much harder product (and not what a settlement engine is for). The claim is narrower and, we think, honest:

Given Tx LINE’s signed on-chain feed, settlement is correct, deterministic, and independently re-checkable. No human, token holder, or arbiter can override it, and anyone can re-run the proof from scratch and get the same answer.

That’s strictly more than “trust the oracle and take the receipt on faith.” It’s also strictly less than “VAR knows who really won” — it can’t, and doesn’t pretend to. If Tx LINE’s feed is wrong, VAR settles wrong, in the same way a scoreboard settles wrong if someone changes the actual scoreline before it’s recorded. The engineering problem VAR solves is: assuming the feed is right, remove every other point of failure between “the match ended” and “the money moved.”

Trusted

TxODDS as the source of truth for match facts. This is unavoidable — Tx LINE is the hackathon’s data sponsor and the only source of an on-chain, Merkle-committed football feed VAR integrates against. VAR does not second-guess daily_scores_roots; it authenticates against it.

That’s the entire trusted set. Everything downstream of the feed — the mapping from facts to money — is proven, not trusted.

Untrusted (and why it can’t hurt you)

The resolution caller. Settlement is two permissionless instructions — attest_home (home goals) then resolve (away goals + status) — both requiring only resolver: Signer<'info>, no allowlist, no admin key. Anyone can call them. That’s fine because a malicious or careless caller cannot:

The depositor. Depositors can only stake into one of the three defined outcome buckets (InvalidOutcome guards anything outside Home/Draw/Away), and stakes are non-negative amounts transferred via SPL token — there’s no way to under-fund the vault relative to recorded pool totals.

The market creator. create_market is also permissionless, but a creator can’t set an unreasonable fee (FeeTooHigh rejects fee_bps > MAX_FEE_BPS, capped at 10%) or a deadline in the past (DeadlineInPast). A creator picks which fixture/stat keys a market tracks, not what the outcome will be.

Fail-closed behavior — the default is “give the money back,” never “guess”

Every degenerate or ambiguous path in rulebook::resolve_outcome / rulebook::settle resolves to Outcome::Refund, proven by Kani’s INV-1 and INV-3:

The rulebook never panics on any reachable input (Kani proves totality over the full swept range), and there is no code path where an ambiguous fact pattern produces a confident-looking wrong answer instead of a refund.

What’s outside this trust surface entirely