Skip to content

notch-protocol/contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notch Protocol

Where predictions are permanent.

Notch is a permissionless protocol for verifiable on-chain predictions. Predictors commit cryptographic predictions about asset prices, build verifiable accuracy scores, and sell tokenized access to their future predictions.

No one can lie about their track record.


How It Works

1. COMMIT    →  Hash your prediction + salt, submit on-chain. Nobody can see it.
2. REVEAL    →  After a delay, publish the prediction. Contract verifies the hash.
3. RESOLVE   →  Oracle delivers the price. Contract compares to prediction.
4. SCORE     →  Your Notch Score updates: accuracy + calibration + consistency + volume.
5. TRADE     →  Sell access to your future predictions as tokenized Notch Passes (ERC-1155).

The Notch Score

Not just accuracy. Calibration. When you say 78% confident and you're right 78% of the time, that's a perfect Brier score.

NotchScore = 0.40 × Accuracy + 0.25 × Calibration + 0.20 × Consistency + 0.15 × Volume

Accuracy    = EMA of correct predictions (decay 0.95)
Calibration = 1 - BrierScore (how well confidence matches reality)
Consistency = 1 / (1 + variance of rolling accuracy)
Volume      = log(predictions) / log(max) (statistical significance)

Contracts

Contract Description
PredictionEngine.sol Commit-reveal-resolve cycle with oracle integration
NotchScore.sol Immutable on-chain scoring (EMA + Brier + Welford)
NotchPassMarket.sol ERC-1155 prediction access passes with marketplace
ChainlinkAdapter.sol Chainlink AggregatorV3 oracle adapter
PythAdapter.sol Pyth Network oracle adapter
DualOracle.sol Primary + fallback oracle with staleness detection
NotchToken.sol $NOTCH ERC-20 (1B fixed supply, burnable)
StakingModule.sol Stake $NOTCH to predict (anti-sybil, slashing)
Treasury.sol Fee collection with 60/25/15 split (buyback/rewards/reserve)
NotchIndex.sol Bundled top-N predictor indices
AssetScoreTracker.sol Per-asset accuracy and calibration tracking
TokenVesting.sol Linear vesting with cliff for team allocation
MerkleAirdrop.sol Merkle proof-based token claim for early users

Security

  • ReentrancyGuard on all contracts that transfer ETH
  • Pausable on core contracts (emergency stop)
  • 180 tests including fuzz tests for scoring math
  • Audit pending

Build

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup

# Build
cd contracts
forge build

# Test
forge test

# Test with verbosity
forge test -vvv

Architecture

PredictionEngine ──→ IOracle (ChainlinkAdapter / PythAdapter / DualOracle)
       │
       ├──→ NotchScore (immutable scoring)
       ├──→ StakingModule (stake $NOTCH to predict)
       │
NotchPassMarket ──→ ERC-1155 passes + marketplace
       │
       └──→ Treasury (fee distribution: 60% buyback, 25% rewards, 15% reserve)

Chain

Arbitrum One (mainnet) / Arbitrum Sepolia (testnet). Chain-agnostic contracts — no Arbitrum-specific precompiles.

SDK

The TypeScript SDK provides read/write helpers for all protocol contracts:

import { NotchClient } from "@notch-protocol/sdk";

const client = new NotchClient({
  addresses: { predictionEngine, notchScore, notchPassMarket },
  chainId: 42161,
  rpcUrl: "https://arb1.arbitrum.io/rpc",
});

// Read a predictor's score
const score = await client.getScore("0x...");
const breakdown = await client.getScoreBreakdown("0x...");

// Prepare a commitment
const salt = NotchClient.generateSalt();
const hash = NotchClient.computeCommitHash(predictor, input, salt);

License

Business Source License 1.1 (BUSL-1.1). See LICENSE.

After 2 years from initial deployment, the license converts to MIT.


Built on Arbitrum. Powered by Chainlink. Every notch counts.

notch.finance

About

Smart contracts for Notch Protocol — permissionless on-chain prediction scoring and alpha marketplace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors