On-chain smart contract for Silica's Proof of Useful Work system. This contract receives verified work proofs from off-chain oracles and handles submissions, reward payments, dispute resolution, and miner reputation tracking.
┌─────────────────────────────────────────────────────────────────────┐
│ Off-Chain Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ BOINC │ │ Folding │ │ Einstein │ │ Other │ │
│ │ Projects │ │ @Home │ │ @Home │ │ Compute │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ └─────────────┴──────┬──────┴─────────────┘ │
│ ▼ │
│ ┌───────────────┐ │
│ │ PoUW Oracle │ (Rust service - see ZZ_chert) │
│ │ Service │ │
│ └───────┬───────┘ │
└────────────────────────────┼────────────────────────────────────────┘
│ Signed Work Proofs
▼
┌─────────────────────────────────────────────────────────────────────┐
│ On-Chain Layer │
│ ┌───────────────┐ │
│ │ THIS CONTRACT │ │
│ │ (PoUW Oracle) │ │
│ └───────┬───────┘ │
│ │ │
│ ┌────────────────────┼────────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Rewards │ │ Disputes │ │ Miner │ │
│ │ Payout │ │ Resolution │ │ Registry │ │
│ └─────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
- ✅ Work Submissions - Receive and track verified computational work from BOINC, Folding@Home, etc.
- ✅ Reward Payments - 70% provisional payout, 30% after dispute window
- ✅ Dispute Resolution - Challenge fraudulent submissions with bond
- ✅ Miner Registry - Track reputation, completions, and earnings
- ✅ Oracle Management - Authorized oracles submit verified proofs
- ✅ Multi-Oracle Consensus - High-value rewards require multiple confirmations
- ✅ Rate Limiting - Max 1000 submissions/miner/day
- ✅ Clawback Mechanism - Recover funds from fraudulent submissions
| Project | Multiplier | Description |
|---|---|---|
| WorldCommunityGrid | 1.2x | Medical & environmental research |
| Rosetta@Home | 1.1x | Protein folding research |
| Einstein@Home | 1.1x | Gravitational wave detection |
| Folding@Home | 1.0x | Disease research |
| BOINC (generic) | 1.0x | Other BOINC projects |
Register as a PoUW miner with stake.
- Minimum Stake: 100 CHERT
- Initial Reputation: 50%
Add additional stake to increase security deposit.
Withdraw stake (only if no pending submissions in dispute window).
Submit verified work proof for a miner.
- Validates miner registration
- Checks daily submission limit
- Calculates rewards with project multiplier
- Sends 70% provisional payout immediately
- Records submission for dispute window
Additional oracle confirmation for high-value submissions.
- Required for rewards ≥ 1000 CHERT
- Minimum 2 oracle confirmations needed
Finalize payout after 24-hour dispute window.
- Anyone can call (permissionless)
- Sends remaining 30% to miner
- Updates miner reputation (+10 points)
Challenge a potentially fraudulent submission.
- Bond Required: 50 CHERT
- Must be within 24-hour dispute window
Resolve a dispute (admin/governance only).
- Fraud: Slash miner stake, reward challenger
- Valid: Challenger loses bond to treasury
- Inconclusive: Refund both parties
PoUWInitialized { admin, dispute_window, min_miner_stake, min_oracle_stake }
MinerRegistered { miner, stake, initial_reputation }
MinerStakeAdded { miner, added, total_stake }
MinerStakeWithdrawn { miner, amount }
OracleRegistered { oracle, initial_reputation }
OracleDeactivated { oracle }
WorkSubmitted { submission_id, miner, oracle, project, reward_points, provisional_paid, dispute_deadline }
SubmissionConfirmed { submission_id, confirming_oracle, total_confirmations }
PayoutFinalized { submission_id, miner, final_amount, total_amount }
DisputeOpened { dispute_id, submission_id, challenger, miner, reason, bond }
DisputeResolved { dispute_id, submission_id, ruling, challenger, miner }
MinerSlashed { miner, slash_amount, challenger_reward }
ProjectConfigured { name, reward_multiplier, enabled }
TreasuryUpdated { treasury }
ContractPaused { paused }| Parameter | Value | Description |
|---|---|---|
MIN_MINER_STAKE |
100 CHERT | Minimum stake to register as miner |
MIN_ORACLE_STAKE |
10,000 CHERT | Minimum stake for oracle registration |
DISPUTE_BOND |
50 CHERT | Bond required to open dispute |
DISPUTE_WINDOW |
24 hours | Time window for challenging submissions |
MAX_DAILY_SUBMISSIONS |
1000 | Rate limit per miner per day |
PROVISIONAL_PAYOUT |
70% | Immediate payout percentage |
FINAL_PAYOUT |
30% | Payout after dispute window |
HIGH_VALUE_THRESHOLD |
1000 CHERT | Requires multi-oracle confirmation |
FRAUD_SLASH |
100% | Stake slashed on confirmed fraud |
CHALLENGER_REWARD |
10% | Portion of slash given to challenger |
- Economic Security: Miners stake tokens; slashed for fraud
- Multi-Oracle: High-value submissions require 2+ oracle confirmations
- Dispute Window: 24-hour window to challenge submissions
- Rate Limiting: Prevents gaming and DoS attacks
- Clawback: Provisional payouts recovered on fraud detection
cargo build --target wasm32-unknown-unknown --releasecargo test- Off-Chain Oracle Service:
ZZ_chert/oracle/- Rust service that verifies BOINC work and submits proofs - Miner:
miner/- Mining software with BOINC integration - Wallet:
wallet/- User interface for PoUW participation
MIT OR Apache-2.0