Skip to content

S0hamJosh1/Cogproof

Repository files navigation

CogProof

Proof of fair participation — behavioral reputation for Bitcoin-native agent economies.
Commit-reveal ordering, verifiable credentials, Shapley-fair rewards, and trust analysis — anchored on Bitcoin via CogCoin / OP_RETURN.

Live demo → cogproof.vercel.app

MIT Bitcoin Expo Hackathon · 2026


Why CogProof

Most decentralized work systems reward whoever ships first or whoever is loudest. CogProof is built for fair participation:

  • Commit-reveal batches so agents cannot copy each other’s work during mining windows
  • W3C-style behavioral credentials — reputation from actions, not identity or KYC
  • Shapley-style reward logic with a Lawson floor so marginal contributors are not zeroed out
  • Behavioral trust analysis for sybil patterns, selective reveal, and collusion signals
  • Compression mining as verifiable cognitive work, complementary to CogCoin’s Coglex layer
  • Bitcoin-native — no new chain; maps to existing CogCoin transaction types and indexer semantics

Core Features

  • Dashboard & protocol UI — batch lifecycle, mining, reputation, Shapley, trust, and Bitcoin flows in one place
  • Full batch pipeline — create → commit → close → reveal → settle with deterministic fair ordering
  • Credential registry — lifecycle events mint positive/negative reputation signals automatically
  • Shapley DAG + incentives — fair distribution with logarithmic scoring and dependency modeling
  • Trust report — per-user and batch-level anomaly detection with severity tiers
  • Demo APIPOST /api/demo/full-pipeline runs the story end-to-end for judges and integrators

Tech stack

Next.js TypeScript React Tailwind CSS Node.js Bitcoin


Demo

CogProof product walkthrough

Full demo (MP4, with audio)

GitHub renders GIFs as normal images, so an animated demo.gif autoplays inline in the README—same pattern as projects that use demo.gif instead of <video>. The full-quality recording (longer run, sound) is still cogproof-demo.mp4 (Git LFS). On that file page use Download for a local copy; clones need git lfs install and git lfs pull.

What you’ll see in the demo

  1. Landing & narrative — how CogProof fits into Bitcoin-native agent economies
  2. Dashboard — reputation tiers, trust signals, and module navigation
  3. Batch & mining flows — commit-reveal lifecycle and settlement concepts in the UI
  4. End-to-end story — how credentials, Shapley logic, and trust analysis tie together

Team

Name Focus
Will Glynn Protocol design, backend
Soham Joshi Credential system design, frontend
Bianca Statistical analysis
Amelia TBD

Presentation & docs

Pitch and judge-ready material lives in docs/:


Architecture

┌─────────────────────────────────────────────────┐
│               Bitcoin Network                    │
│            (OP_RETURN transactions)              │
├─────────────────────────────────────────────────┤
│               CogCoin Protocol                   │
│    Coglex Encoding │ Proof of Language Mining     │
│    Domains/DID     │ Reputation-by-Burn           │
├─────────────────────────────────────────────────┤
│               CogProof Layer                     │
├────────────┬────────────┬────────────┬──────────┤
│ Commit-    │ Credential │ Shapley    │ Trust    │
│ Reveal     │ Registry   │ DAG        │ Analyzer │
├────────────┴────────────┴────────────┴──────────┤
│       Next.js API routes (Vercel deploy)        │
├─────────────────────────────────────────────────┤
│           Next.js Dashboard (Vercel)            │
└─────────────────────────────────────────────────┘
Core modules (expand)

Commit-reveal fair ordering

  • Commit: hash(output || secret) on-chain — zero information leakage
  • Reveal: output + secret after the window closes
  • Settle: XOR secrets + block entropy → Fisher-Yates shuffle → deterministic validation order

Credential registry (proof of fair participation)

Every protocol lifecycle event can yield a verifiable credential (honest reveal, failed reveal, high contributor, compression miner, etc.). Reputation tiers: NEWCOMER → BRONZE → SILVER → GOLD → DIAMOND.

Shapley distribution + Lawson floor

Marginal contribution across coalition orderings, Lawson λ minimum floor, DAG dependencies, logarithmic scoring to limit burst dominance.

Behavioral trust analyzer

Detectors include selective reveal, sybil clusters, compression plagiarism, reputation churn, collusion rings, and velocity spikes. Trust tiers: FLAGGED → SUSPICIOUS → CAUTIOUS → NORMAL → TRUSTED.

Compression mining

Symbolic compression as proof-of-work; lossless decompression verifies honest work.

API reference (expand)
# Batch lifecycle (commit-reveal)
POST /api/batch/create           — Create mining batch
POST /api/batch/:id/commit       — Commit to batch
POST /api/batch/:id/close-commit — Close commit phase
POST /api/batch/:id/reveal       — Reveal commitment
POST /api/batch/:id/settle       — Settle (shuffle + validate)
GET  /api/batch/:id              — Batch summary

# Credentials
POST /api/event                  — Record event → auto-issue credential
POST /api/credential             — Issue credential directly
GET  /api/reputation/:userId     — User reputation + credential history

# Shapley distribution
POST /api/shapley/compute        — Compute fair distribution

# Compression mining
POST /api/mine                   — Submit compression mining job
POST /api/mine/verify            — Verify mining result

# Trust analysis
GET  /api/trust/:userId          — Analyze user trustworthiness
POST /api/trust/batch            — Analyze batch for anomalies
GET  /api/trust/report           — Full trust report (all users)

# Demo
POST /api/demo/full-pipeline     — Run full lifecycle in one call
GET  /api/health                 — Health check
Running locally (expand)

API & Node demos (repo root):

npm install
npm start                # API server on port 3001
npm run demo             # Interactive demo
npm run mine             # Compression mining demo
npm run shapley          # Shapley DAG demo
npm run commit-reveal    # Commit-reveal demo
npm run credentials      # Credential registry demo

Frontend (frontend/):

cd frontend
npm install
npm run dev
Bitcoin-native design (expand)

Everything is designed to map onto CogCoin’s existing transaction vocabulary: commits/reveals as validated TX pairs, credentials as DATA_UPDATE / FIELD_REG, reputation via REP_COMMIT and REP_REVOKE, Shapley outputs anchored by hash on-chain, trust derived from indexer-visible history. No new consensus. No sidechain. Just Bitcoin + an indexer.


References


MIT License · Built on CogCoin and VibeSwap ideas.

About

MIT bitcoin hackathon repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors