# l402-train > Decentralized AI training and autoresearch bounties coordinated by Lightning micropayments — no tokens, no blockchain bloat, just sats for compute. l402-train is an open protocol for permissionless compute coordination using Bitcoin's Lightning Network as the payment and incentive layer. Two modes: (1) Training — peers contribute GPU compute, compress gradients with SparseLoCo (146x compression), submit through L402-gated endpoints, get validated via loss scoring, and earn sats proportional to quality. (2) Autoresearch bounties — AI agents compete to optimize any quantifiable metric, paid per validated improvement via hold invoice escrow. No GPU required for bounties. No staking, no identity, no custom tokens. ## Core Documents - [Whitepaper](https://l402-train.ai/whitepaper.html): Full protocol design — architecture, gradient exchange, payment mechanics, coordinator trust model, economics, and security analysis. - [Roadmap](https://l402-train.ai/roadmap.html): Implementation plan with parallel tracks — training (Phases 0-3) and autoresearch bounties (Phases B0-B2). Shared L402 infrastructure. ## Explainers - [Hold Invoices: How Your Funds Stay Safe](https://l402-train.ai/hold-invoices.html): Plain-language explanation of Lightning hold invoices — what they are, how l402-train uses them for escrow, why your funds are secure, and worst-case scenarios. ## Supporting Research - [Covenant-72B Analysis](https://l402-train.ai/research/covenant-72b.html): Deep technical analysis of the largest decentralized training run — SparseLoCo algorithm, Gauntlet validator, benchmarks, critical assessment of model quality vs. frontier. - [Incentive Mechanisms](https://l402-train.ai/research/incentive-mechanisms.html): Game theory foundations — Shapley values, mechanism design, validation without trust, Bitcoin/Lightning conditional payments, Bittensor critique. - [Lightning ML Coordination](https://l402-train.ai/research/lightning-ml-coordination.html): L402 protocol deep dive, channel capacity math for 70 peers, streaming payments, agent tooling, comparison with Ethereum L2/Solana/Bittensor alternatives. - [Federated vs. Decentralized](https://l402-train.ai/research/federated-vs-decentralized.html): Federated learning vs. decentralized training comparison, DiLoCo explained, gradient privacy and leakage attacks, how SparseLoCo compression protects participants, where l402-train sits on the trust spectrum. - [Compute Economics](https://l402-train.ai/research/compute-economics.html): Cloud GPU pricing, consumer hardware operating costs, Bittensor miner economics, break-even analysis (5-103 sats/hr electricity-only), Bitcoin mining comparison, target payment rates. - [Decentralized AI Landscape](https://l402-train.ai/research/decentralized-ai-landscape.html): Critical survey of 12 projects — Bittensor, Prime Intellect, Gensyn, Together AI, Hivemind/Petals, Nous/Psyche, io.net, Akash, Ritual, Morpheus — what shipped vs. vaporware. - [Consumer Hardware Guide](https://l402-train.ai/research/consumer-hardware.html): Hardware tiers (MacBook Air to RTX 4090), training benchmarks, MLX vs PyTorch vs CUDA, model size memory requirements, power/heat/noise, background training. - [L402 Ecosystem Survey](https://l402-train.ai/research/l402-ecosystem.html): L402 protocol deep dive, Aperture reverse proxy, Lightning Agent Tools, Fewsats, client libraries, x402 (Coinbase) comparison, bidirectional L402 extension for l402-train. - [Lightning Inference Payments](https://l402-train.ai/research/lightning-inference-payments.html): L402 for AI inference — live services (10+), unit economics (99%+ margin at 5 sats/query), credit card fee breakdown, case for/against, autoresearch compute market viability, inference vs training complexity comparison. ## Protocol Overview ### Training Mode 1. Peers train a shared model locally on their own GPUs using local SGD 2. Pseudo-gradients are compressed 146x via SparseLoCo (top-k sparsification + 2-bit quantization) 3. Compressed gradients submitted through L402-gated HTTP endpoint (hold invoice locks payment) 4. Coordinator validates via forward pass loss scoring on held-out batch 5. If gradient improves model: hold invoice settles, peer earns sats proportional to quality 6. If gradient is harmful/useless: payment auto-refunds via Lightning timeout ### Autoresearch Bounty Mode 1. Sponsor publishes bounty: target files, eval command, sats available, held-out eval set hash 2. AI agents download baseline via L402, run autonomous experiments locally 3. Agents submit improvements (code diff + claimed score), hold invoice locks payment 4. Coordinator validates improvement against held-out eval set (not the public one) 5. If improvement passes: hold invoice settles proportional to improvement magnitude 6. Anti-gaming: canary probes, temporal stability check, diff size limits, 80/20 eval split ## Key Technical Properties - Settlement: <500ms via Lightning (vs ~12s blockchain consensus) - Entry barrier: ~$10 channel open (vs thousands in staking) - Reward correlation: direct quality-to-reward (vs stake-weighted) - Validation: deterministic and replayable (vs opaque scoring) - Identity: none required - Denomination: BTC (Taproot Assets USDT planned) - Gradient compression: 146x (290 GB → ~2 GB per round) - Compute utilization: 94.5% (70s compute, 4s communication per round) ## Status Research and protocol design complete. Implementation in progress (Phase 0).