Ethercoin Technical Yellowpaper
Decentralized AI Compute & Distillation Protocol
1. Introduction
This yellowpaper defines the technical architecture of the Ethercoin decentralized AI compute network. The network provides a decentralized, censorship-resistant, verifiable execution environment for general AI inference, model optimization, and knowledge distillation.
Core challenge: how to precisely measure heterogeneous "useful computation" without trusting any single party, while systematically preventing cheating. This document details the EtherFLOP measurement standard, layered verification framework, anti-cheat algorithms, and the complete distillation protocol specification.
2. System Overview
Ethercoin uses a layered architecture:
+---------------------------------------------------+ | Application Layer | | +-----------+ +------------+ +----------------+ | | | Inference | |Optimization| | Distillation | | | +-----------+ +------------+ +----------------+ | +---------------------------------------------------+ | Market & Consensus Layer | | +--------------------------------------------+ | | |Task Matching|Verification|Settlement/Slashing| | | +--------------------------------------------+ | +---------------------------------------------------+ | Execution Layer | | +----------+ +----------+ +------------------+ | | |GPU Nodes | |Proxies | | Verifiers | | | +----------+ +----------+ +------------------+ | +---------------------------------------------------+ | DA & Storage Layer | | IPFS / Filecoin / On-chain Events | +---------------------------------------------------+
On-chain: Smart contracts on the Ethercoin native chain (EVM-compatible).
Off-chain: Node clients, scheduling services, distributed proxy network, GPU execution environments communicating via P2P.
3. EtherFLOP: Measurement System
3.1 Unit Definition
EtherFLOP (EFLOP) = 1015 floating-point operations. Baseline model: a standardized, frozen LLaMA-7B executing one forward pass (input = 1 token, output logits = vocabulary size). Theoretical FLOPs = 2 × parameters × sequence length, publicly computed and independently auditable.
3.2 Task Workload Estimation
For any submitted model M (identified by IPFS CID) and input shape (batch, seq_len), the off-chain scheduler parses the computation graph and calculates the theoretical FLOPs value Ftheoretical. This value is signed by the oracle committee (multiple independent nodes staking ETHER, BFT consensus) and written to the task contract's expectedEFLOPS field. Estimation error must stay within ±5%, calibrated by community governance.
3.3 Supply-Side Proofs
Nodes submit a WorkProof:
WorkProof {
outputCID: bytes32,
anchorHashes: bytes32[], // Optimistic mode: random layer activations
zkProof: bytes, // ZK mode: zk-SNARK proof
teeAttestation: bytes // TEE mode: remote attestation report
}
3.3.1 Optimistic Verification
Random anchor generation: On-chain VRF generates k random layer indices (l1, ..., lk) and corresponding random input seeds at task creation. Nodes provide activation hashes for these layers.
Verifier spot check: Randomly selected verifiers download model and input from IPFS, re-execute specified layers, and compare hashes. If all k anchors match, the computation is accepted. A cheater skipping fraction f of computation has detection probability 1 - (1-f)k, converging to 1 exponentially with k.
Binary challenge: If a verifier detects an anchor mismatch, they initiate an on-chain interactive binary game. Both parties iteratively narrow the dispute to a single operation. The contract executes that single step for a constant gas cost, determining the winner.
3.3.2 Zero-Knowledge Proofs
Nodes use ZK compilers (e.g., zkLLVM or custom circuits) to transform model inference into R1CS/AIR constraint systems and generate zk-SNARK proofs. The contract verifies proof validity. Circuit size C has a fixed proportional relationship to theoretical FLOPs (coefficient α set by governance). Verified EFLOPs = C × α.
3.3.3 TEE Attestation
Nodes run inference inside Intel SGX / AMD SEV enclaves, generating remote attestation reports containing code hash, input hash, output hash, and hardware-trusted execution time. The contract verifies report signatures against Intel/AMD on-chain public keys and converts execution time to equivalent EFLOPs using the GPU-in-TEE performance model.
3.4 Demand-Side Measurement
User payment = expectedEFLOPS × current market EFLOP price (discovered via on-chain order book). Challenge stake is proportional to task value. If arbitration finds the challenge invalid, the stake is forfeited to the node.
4. Compute Market Protocol
4.1 Node Registration
Call NodeRegistry.register(nodeType, hardwareProof, stakeAmount). Hardware proof submitted via TEE self-attestation report or third-party benchmark results; perjury is slashable. On-chain Reputation is computed from task completion rate, correctness ratio, and average response time, affecting task assignment weight.
4.2 Task Lifecycle (Inference)
- Submit: User calls
TaskMarket.createTask(modelCID, inputCID, expectedEFLOPS, verificationMode, reward), locking ETHER. - Match: Off-chain matching engine listens for events, nominates node sets based on reputation and pricing. Contract uses VRF to select nodes, preventing targeted collusion.
- Execute & submit: Node generates
WorkProofand submits it. - Verify: Verification follows the selected mode. In optimistic mode, verifiers may submit challenges during the challenge period.
- Settle: After challenge period (or immediate for ZK/TEE), rewards are distributed and penalties triggered for cheating.
4.3 Anti-Cheat Matrix
| Attack | Defense | Implementation |
|---|---|---|
| Sybil | Stake + reputation | New node task limit = f(stake, historical reputation) |
| Fake compute | Layered verification | Optimistic anchors / ZK proofs / TEE attestations |
| Model spoofing | Weight hash whitelist + anchor checks | modelCID must be on-chain; different model architectures produce distinct activation distributions |
| Buyer-seller collusion | Random verifier selection + verifier staking | VRF selects verifiers; verifier stakes match miner stakes |
| Gradient fraud | Checkpoint evaluation + optimizer state hashes | Verifiers run test-set inference; no metric improvement = slash |
| Distillation forgery | Independent path reproduction + proxy signatures | Verifiers get responses through different proxy paths; semantic similarity comparison |
| Proxy tampering | Path signatures + anomaly detection | Each hop signs the payload hash chain; divergence penalizes intermediate hops |
5. Inference & Optimization Technical Spec
5.1 Inference ABI
Standard EIABI:
{
"model_cid": "bafy...",
"input": {"prompt": "...", "max_tokens": 256, "temperature": 0.7},
"expectedEFLOPS": 1500,
"verificationMode": "optimistic" | "zk" | "tee"
}
5.2 Optimization Tasks
Tasks output the optimized model CID plus work proof (including quantization error report or fine-tuned weight delta hashes). Verifiers reproduce the optimization and compare results.
6. Distillation Protocol
6.1 Design Goals
Extract knowledge from closed-source APIs with verifiable, anti-censorship processes. Workload measured in "valid data points."
6.2 Core Contract: DistillationMarket
createTask(targetModel, reward, promptTreeRoot): Creator locks ETHER.claimBatch(taskID, stake): Miner stakes ETHER, claims a prompt batch.submitBatch(taskID, batchID, dataCID, responseHash, proxyPathSigs): Submits results and proxy route signatures.challengeBatch(taskID, batchID, proof): Verifier submits challenge.finalizeBatch(taskID, batchID): Settlement.
6.3 Prompt Distribution
The DAO maintains a topic tree with its root stored in the contract. Miners receive leaf hashes and Merkle paths via VRF, retrieving plaintext prompts from IPFS off-chain.
6.4 Proxy Network & Path Signatures
Proxy nodes register public keys and stake ETHER. Miners build onion-encrypted multi-hop paths; each hop decrypts the next address and forwards. Responses carry a path signature chain: SignNk(...SignN2(SignN1(responseHash))). The contract verifies path integrity.
6.5 Verification & Measurement
Semantic verification: Verifiers retrieve responses for the same prompt through completely different proxy paths and compute cosine similarity using a public embedding model. Similarity above threshold θ (e.g., 0.92) counts as a valid data point.
Measurement: Miner reward = verified data points × unit data point price. Invalid data points yield zero reward and reduce reputation.
6.6 Arbitration
Disputes handled by the arbitration contract. Multiple arbitrators (high-stake verifiers) independently judge and vote. Majority decision prevails.
7. Distributed Training Integration
Training tasks are incorporated into the EtherFLOP framework. Users specify base model CID, dataset CID, and training configuration. expectedEFLOPS is calculated from total optimization steps × step FLOPs.
Nodes submit periodic checkpoint hashes and gradient norm intermediates. Verifiers re-run random checkpoints to confirm real execution. After training, verifiers evaluate model performance on a public test set. Failure to meet improvement targets results in partial stake slashing.
8. Security & Privacy
- Measurement security: Anchor models and oracle committees make EFLOPs non-manipulable. ZK proofs provide trustless measurement.
- Sybil defense: High staking and task limits that scale with reputation.
- Privacy: Inference inputs decrypted inside TEE. Distillation prompts onion-encrypted through the proxy network.
- Censorship resistance: All contracts are non-upgradable or DAO-controlled. Proxy network is decentralized with libp2p noise encryption.
9. Economic Parameters
| Parameter | Initial Value | Description |
|---|---|---|
EFLOP_BASELINE_MODEL | Qm... (LLaMA-7B) | Baseline model CID |
OPTIMISTIC_ANCHORS_DEFAULT | 5 | Default spot-check anchors |
ZK_PROOF_ALPHA | 1.2 | FLOPs-to-circuit-size coefficient |
MIN_STAKE_MINING | 1000 ETHER | Minimum miner stake |
MIN_STAKE_DISTILL | 100 ETHER | Minimum distillation miner stake |
CHALLENGE_PERIOD | 604800 s | Challenge period (7 days) |
VALIDATOR_FEE_RATIO | 5% | Verifier fee percentage |
SLASH_RATIO | 50% | Cheating penalty ratio |
SIMILARITY_THRESHOLD | 0.92 | Distillation quality threshold |
All parameters are hardcoded in system contracts. The DAO may modify them through proposals (with scope limits and timelocks).
10. Conclusion
Ethercoin's technical architecture centers on verifiable measurement of useful computation. Through the EtherFLOP unit, layered proofs, random anchors, ZK/TEE verification, and a comprehensive anti-cheat matrix, the network enables fair and secure trading of AI compute in an untrusted environment. The distillation protocol extends this compute market into a tool for knowledge liberation.
Website: https://ethercoin.org · Code: github.com/EtherCoinorg/ethercoin
