✅ v0.2 Release Preparation: - Update version to 0.2.0 in pyproject.toml - Create release build script for CLI binaries - Generate comprehensive release notes ✅ OpenClaw DAO Governance: - Implement complete on-chain voting system - Create DAO smart contract with Governor framework - Add comprehensive CLI commands for DAO operations - Support for multiple proposal types and voting mechanisms ✅ GPU Acceleration CI: - Complete GPU benchmark CI workflow - Comprehensive performance testing suite - Automated benchmark reports and comparison - GPU optimization monitoring and alerts ✅ Agent SDK Documentation: - Complete SDK documentation with examples - Computing agent and oracle agent examples - Comprehensive API reference and guides - Security best practices and deployment guides ✅ Production Security Audit: - Comprehensive security audit framework - Detailed security assessment (72.5/100 score) - Critical issues identification and remediation - Security roadmap and improvement plan ✅ Mobile Wallet & One-Click Miner: - Complete mobile wallet architecture design - One-click miner implementation plan - Cross-platform integration strategy - Security and user experience considerations ✅ Documentation Updates: - Add roadmap badge to README - Update project status and achievements - Comprehensive feature documentation - Production readiness indicators 🚀 Ready for v0.2.0 release with agent-first architecture
4.2 KiB
4.2 KiB
AITBC Payment Architecture
Overview
The AITBC platform uses a dual-currency system:
- AITBC Tokens: For job payments and platform operations
- Bitcoin: For purchasing AITBC tokens through the exchange
Payment Flow
1. Job Payments (AITBC Tokens)
Client ──► Creates Job with AITBC Payment ──► Coordinator API
│ │
│ ▼
│ Create Token Escrow
│ │
│ ▼
│ Exchange API (Token)
│ │
▼ ▼
Miner completes job ──► Release AITBC Escrow ──► Miner Wallet
2. Token Purchase (Bitcoin → AITBC)
Client ──► Bitcoin Payment ──► Exchange API
│ │
│ ▼
│ Process Bitcoin
│ │
▼ ▼
Receive AITBC Tokens ◄─── Exchange Rate ◄─── 1 BTC = 100,000 AITBC
Implementation Details
Job Payment Structure
{
"payload": {...},
"ttl_seconds": 900,
"payment_amount": 100, // AITBC tokens
"payment_currency": "AITBC" // Always AITBC for jobs
}
Payment Methods
aitbc_token: Default for all job paymentsbitcoin: Only used for exchange purchases
Escrow System
-
AITBC Token Escrow: Managed by Exchange API
- Endpoint:
/api/v1/token/escrow/create - Timeout: 1 hour default
- Release on job completion
- Endpoint:
-
Bitcoin Escrow: Managed by Wallet Daemon
- Endpoint:
/api/v1/escrow/create - Only for token purchases
- Endpoint:
API Endpoints
Job Payment Endpoints
POST /v1/jobs- Create job with AITBC paymentGET /v1/jobs/{id}/payment- Get job payment statusPOST /v1/payments/{id}/release- Release AITBC paymentPOST /v1/payments/{id}/refund- Refund AITBC tokens
Exchange Endpoints
POST /api/exchange/purchase- Buy AITBC with BTCGET /api/exchange/rate- Get current rate (1 BTC = 100,000 AITBC)
Database Schema
Job Payments Table
CREATE TABLE job_payments (
id VARCHAR(255) PRIMARY KEY,
job_id VARCHAR(255) NOT NULL,
amount DECIMAL(20, 8) NOT NULL,
currency VARCHAR(10) DEFAULT 'AITBC',
payment_method VARCHAR(20) DEFAULT 'aitbc_token',
status VARCHAR(20) DEFAULT 'pending',
...
);
Security Considerations
- Token Validation: All AITBC payments require valid token balance
- Escrow Security: Tokens held in smart contract escrow
- Rate Limiting: Exchange purchases limited per user
- Audit Trail: All transactions recorded on blockchain
Example Flow
1. Client Creates Job
curl -X POST http://localhost:18000/v1/jobs \
-H "X-Api-Key: ${CLIENT_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"job_type": "ai_inference",
"parameters": {"model": "gpt-4"}
},
"payment_amount": 100,
"payment_currency": "AITBC"
}'
2. Response with Payment
{
"job_id": "abc123",
"state": "queued",
"payment_id": "pay456",
"payment_status": "escrowed",
"payment_currency": "AITBC"
}
3. Job Completion & Payment Release
curl -X POST http://localhost:18000/v1/payments/pay456/release \
-H "X-Api-Key: ${CLIENT_API_KEY}" \
-d '{"job_id": "abc123", "reason": "Job completed"}'
Benefits
- Stable Pricing: AITBC tokens provide stable job pricing
- Fast Transactions: Token payments faster than Bitcoin
- Gas Optimization: Batch operations reduce costs
- Platform Control: Token supply managed by platform
Migration Path
- Phase 1: Implement AITBC token payments for new jobs
- Phase 2: Migrate existing Bitcoin job payments to tokens
- Phase 3: Phase out Bitcoin for direct job payments
- Phase 4: Bitcoin only used for token purchases
This architecture ensures efficient job payments while maintaining Bitcoin as the entry point for platform participation.