Skip to content

cyl19970726/Code3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

59 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Code3 Logo

Turn your idle Claude Code quota into earnings, or hire someone else's for $0.02/task

๐ŸŽฅ Demo Video โ€ข Use Cases โ€ข Features โ€ข Documentation

็ฎ€ไฝ“ไธญๆ–‡

Ethereum Sepolia TypeScript Solidity License


๐ŸŽฏ Vision

Code3 is a decentralized bounty marketplace built on Ethereum, where non-subscribers can pay $0.02 per task instead of $20/month subscriptions, and subscribers can monetize their idle AI coding agent quotas.

Core Values:

  • ๐Ÿ’ธ Pay-Per-Task: Pay $0.02 per task, not $20/month โ€” eliminate subscription waste
  • ๐Ÿ”„ Quota Sharing: Subscribers monetize idle quotas (refreshes every 5 hours)
  • ๐Ÿค– AI Agent First: MCP toolchain designed for Claude Code and other AI coding agents
  • ๐Ÿ”— On-Chain Authority: All state changes recorded on Ethereum Sepolia testnet

๐Ÿ’ก Use Cases

Scenario 1: Non-Subscribers - Pay-Per-Task Instead of Monthly Subscription

Problem: You need Claude Code to help with a specific task, but don't have a subscription. Upgrading to a $20/month subscription for just one task doesn't make sense.

Code3 Solution: Publish a bounty, let Workers with subscriptions help you complete it

sequenceDiagram
    participant R as ๐Ÿ‘ค Requester<br/>(No Subscription)
    participant C3 as ๐Ÿ›๏ธ Code3 Platform
    participant W as ๐Ÿค– Worker<br/>(Has Claude Code)
    participant CC as ๐Ÿ’ฌ Claude Code

    Note over R: Need: User Auth System<br/>No Claude Code subscription

    R->>C3: Publish bounty<br/>๐Ÿ’ฐ $0.02
    Note over C3: Task available

    Note over W: Idle time detected<br/>(Quota unused)
    W->>C3: Accept bounty
    C3->>W: Task spec

    W->>CC: specify() โ†’ spec.md
    W->>CC: plan() โ†’ plan.md
    W->>CC: implement() โ†’ code + tests
    W->>CC: analyze() โ†’ quality check

    W->>C3: Submit deliverable
    C3->>R: Complete project<br/>๐Ÿ“ฆ Code + Tests + Docs
    R->>C3: Confirm & Pay
    C3->>W: Receive payment

    Note over R,W: Requester: $0.02 paid<br/>Worker: Monetized idle quota<br/>Win-Win! โœ…
Loading

Cost Comparison:

Your Need Claude Code Subscription Code3 Bounty
1 task/month $20/month (wasteful) $0.02/task โœ…
5 tasks/month $20/month $0.10 total
20+ tasks/month $20/month (makes sense) $0.40 total

Why This Works:

  • โœ… For you (Requester): Pay only for what you need ($0.02 per task vs $20-200/month subscription)
  • โœ… For Workers: Claude Code subscriptions have quotas that refresh every 5 hours. When they have idle time, they can monetize unused quotas by accepting tasks
  • โœ… Win-Win: You get tasks done at lower cost, Workers monetize their idle computing resources

Scenario 2: Subscribers - Avoid Waiting or Upgrading When Quota Runs Out

Problem: You're a $20/month Claude Code subscriber, but you've used up your quota in 1-3 hours. You still have tasks to complete, but now you face two bad options:

  • โฐ Wait: Until quota refreshes (maybe 7pm or 12am) - wasted time
  • ๐Ÿ’ธ Upgrade: To $200/month plan - expensive and wasteful if you don't need it regularly

Code3 Solution: Publish your remaining tasks as bounties instead

flowchart TD
    Start["โฐ 3pm: Quota Used Up<br/>๐Ÿ“‹ 3 tasks remaining<br/>โณ Refresh at 7pm (4 hours)"]

    Start --> Choice{What to do?}

    Choice -->|Option 1| Wait["โฐ Wait 4 hours<br/>๐Ÿ’ฐ Cost: $0<br/>โฑ๏ธ Time: 4 hours"]
    Choice -->|Option 2| Upgrade["๐Ÿ’ธ Upgrade to $200/month<br/>๐Ÿ’ฐ Cost: +$180/month<br/>โฑ๏ธ Time: Immediate"]
    Choice -->|Option 3| Bounty["๐Ÿ›๏ธ Publish 3 bounties on Code3<br/>๐Ÿ’ฐ Cost: $0.06 total<br/>โฑ๏ธ Time: Immediate"]

    Wait --> WaitResult["โŒ Wasted time<br/>โœ… No extra cost<br/>โš ๏ธ Only if not urgent"]
    Upgrade --> UpgradeResult["โŒ Expensive for occasional use<br/>โœ… High quota daily<br/>โš ๏ธ Only if heavy user"]
    Bounty --> BountyResult["โœ… Immediate results<br/>โœ… Cost-effective ($0.06 vs $180)<br/>โœ… Pay only when needed<br/>๐ŸŽฏ Best for occasional bursts!"]

    style BountyResult fill:#90EE90
    style WaitResult fill:#FFB6C1
    style UpgradeResult fill:#FFB6C1
    style Bounty fill:#87CEEB
Loading

Real Example:

๐Ÿ•’ 3pm - Your situation:
โ”œโ”€ Claude Code quota: 0% remaining (used up in 2 hours)
โ”œโ”€ Tasks completed: 8 tasks โœ…
โ”œโ”€ Tasks remaining: 3 tasks โณ
โ””โ”€ Quota refresh: 7pm (4 hours away)

๐Ÿ’ก Your choice: Publish 3 bounties on Code3
โ”œโ”€ Cost: $0.02 ร— 3 = $0.06 total
โ”œโ”€ Time: Results in ~30 minutes (Workers accept & complete)
โ””โ”€ Result: All 11 tasks done by 3:30pm! ๐ŸŽ‰

๐Ÿ“Š Cost comparison:
โ”œโ”€ Wait 4 hours: $0 (but time wasted)
โ”œโ”€ Upgrade to $200/month: $180 extra (wasteful if occasional)
โ””โ”€ Code3 bounties: $0.06 (optimal for occasional bursts) โœ…

Cost Comparison:

Option Cost Time When It Makes Sense
โฐ Wait for quota refresh $0 4-8 hours Not urgent tasks
๐Ÿ’ธ Upgrade to $200/month +$180/month Immediate Need high quota daily
๐Ÿ›๏ธ Publish bounties $0.06 (3 tasks) Immediate Occasional bursts โœ…

Why This Works:

  • โœ… Immediate results: No waiting for quota refresh
  • โœ… Cost-effective: $0.06 for 3 tasks vs $180/month upgrade
  • โœ… Flexible: Pay only when you need extra capacity
  • โœ… Help other subscribers: Your bounties help other Workers monetize their idle quotas

Scenario 3: Future Expansion to Other AI Services

Current Focus: Coding tasks (easiest to review and validate)

Future Expansion (same economic model):

  • ๐Ÿ“Š ChatGPT Deep Research: Need one-time deep research but don't have subscription
  • ๐ŸŽจ Design Generation: Need UI design or image generation occasionally
  • ๐Ÿ“ Content Creation: Need article writing or translation once
  • ๐Ÿ”ฌ Data Analysis: Need one-time data processing or visualization

Core Philosophy: Transform idle AI subscription quotas into a shared resource marketplace where:

  • Non-subscribers: Pay per task instead of full subscription
  • Subscribers: Monetize unused quotas during idle time
  • Everyone wins: Better resource utilization, lower costs, faster results

โœจ Features

๐Ÿ› ๏ธ Three Major MCP Services

MCP Server Tool Count Core Functions
spec-kit-mcp 7 Requirement specification (specify), technical solution (plan), task breakdown (tasks), requirement clarification (clarify), quality detection (analyze), auto-implementation (implement)
spect-kit-adapter-mcp 6 Create bounty, accept bounty , submit bounty, confirm bounty, claim bounty, cancel bounty

๐Ÿ” Security Guarantees

  • โœ… On-Chain Authority: Core state stored in Ethereum smart contracts
  • โœ… Transparent & Verifiable: All bounty states recorded on-chain
  • โœ… Zero Key Storage: Dashboard doesn't save any private keys
  • โœ… Idempotency Guarantee: Based on taskHash, bountyId, submissionUrl idempotency keys

๐Ÿ“š Documentation

Complete documentation in Code3/docs/ directory:

Document Description
01-Data Model Core data structures, type mapping, state machine (single source of truth)
02-Interfaces MCP tools, contract functions, API endpoints
03-Architecture Tech stack, system layers, module responsibilities
04-Datastream Complete data flow from requirement publishing to bounty settlement
05-Package Structure Monorepo structure, build order, environment variables
06-Quick Start 5-minute local startup, contract deployment, end-to-end testing
07-UI/UX Design Dashboard interface, interaction flow, visual specifications
08-Workflow Guide Complete operation steps for Requester/Worker/Reviewer
09-Security Key management, permission boundaries, audit mechanisms
99-Glossary All technical terms and abbreviations

๐Ÿค Contributing

Contributions welcome! See CLAUDE.md for development workflow specifications.

Modifying Data Structures

โญ Mandatory: Any data structure modifications must first update docs/01-data-model.md, then update code.

Adding MCP Tools

  1. Define interface in docs/02-interfaces.md
  2. Implement in corresponding MCP package (spec-mcp/*)
  3. Update tool inventory in docs/03-architecture.md
  4. Update usage examples in docs/08-workflow.md

๐Ÿ“„ License

MIT License - See LICENSE


๐Ÿ”— Links


Built with โค๏ธ by the Code3 Team

Powered by Ethereum โ€ข Designed for AI Agents

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •