How It Works

The Commit-Reveal-Resolve Lifecycle

A prediction in Notch passes through four discrete states. The lifecycle is enforced entirely by smart contracts — no human moderation, no appeals process.

Phase 1: Commit

The predictor constructs a prediction tuple P = (a, d, τ, c, t_exp) where:

  • a — asset identifier (e.g., ETH/USD)
  • d — directional call (ABOVE or BELOW)
  • τ — target price
  • c — stated confidence (0, 1)
  • t_exp — expiry timestamp

The predictor generates a random salt s and computes:

h = keccak256(abi.encodePacked(a, d, τ, c, t_exp, s))

The hash h is submitted to the PredictionEngine contract. Nobody can see the prediction content. The contract enforces:

  • t_exp - t_commit ≥ Δ_min (minimum prediction horizon, initially 15 minutes)
  • t_exp - t_commit ≤ Δ_max (maximum prediction horizon, initially 30 days)
  • The predictor has staked a minimum amount of $NOTCH tokens

Phase 2: Reveal

After the commit and before expiry, the predictor submits the full prediction tuple (a, d, τ, c, t_exp, s) in plaintext. The contract verifies:

keccak256(abi.encodePacked(a, d, τ, c, t_exp, s)) == h

If the hash matches, the prediction transitions to REVEALED and the plaintext parameters are stored on-chain. A mandatory delay δ_reveal is enforced between commit and reveal to prevent front-running strategies.

If the predictor fails to reveal before t_exp, the prediction is marked EXPIRED and treated as a maximally incorrect prediction in the scoring function (o = 0 with confidence 99%).

Phase 3: Resolve

At or after t_exp, any address may call the resolve() function. The contract queries the oracle price feed for asset a at timestamp t_exp and obtains the settlement price p*. The binary outcome is computed:

  • o = 1 if d = ABOVE and p* > τ
  • o = 1 if d = BELOW and p* < τ
  • o = 0 otherwise

The outcome o is recorded permanently on-chain.

Phase 4: Score

Upon resolution, the predictor's score is updated according to the scoring function defined in the Scoring section. The updated score is written to the ScoreRegistry contract. The prediction lifecycle is complete.

Security Properties

Hiding

The commitment hash h reveals no information about the prediction P. Since keccak256 is a cryptographic hash function with pre-image resistance, an observer who sees h in the mempool or on-chain cannot determine a, d, τ, c, or t_exp. The salt s prevents dictionary attacks against common prediction values.

Binding

A predictor who has committed h cannot produce a different prediction P' ≠ P that hashes to the same value. This follows from the collision resistance of keccak256.

Non-repudiation

A predictor cannot escape accountability for a committed prediction. If the prediction is revealed, it resolves and scores. If it is not revealed, it is scored as a failure. There is no third option. The "delete message" strategy that plagues unverified signal channels is structurally impossible.

Notch Protocol is experimental software. Predictions are not financial advice. Use at your own risk. Read full disclaimer