# WIA-FIN-025: Carbon Trading Standard v2.0

**Status:** Current
**Release Date:** December 10, 2024
**Replaces:** v1.2

---

## 1. Introduction

WIA-FIN-025 v2.0 represents a significant evolution of the carbon trading standard, incorporating lessons from 18 months of implementation, emerging technologies (AI, blockchain, IoT), and alignment with Paris Agreement Article 6 final rulebook adopted at COP28.

### 1.1 What's New in v2.0

- **AI-Powered Verification:** Automated monitoring and verification using ML
- **Real-Time Tracking:** IoT sensor integration for continuous monitoring
- **Blockchain Native:** Full blockchain support with smart contracts
- **Removal Credits:** Dedicated framework for carbon removal vs. avoidance
- **Article 6 Compliance:** Full compatibility with international transfer mechanisms
- **Quality Scoring:** Automated credit quality assessment (1-100 scale)
- **WebSocket API:** Real-time market data streaming
- **Carbon Derivatives:** Support for futures, options, swaps

### 1.2 Scope

This standard covers:
- Carbon credit lifecycle management
- Verification and validation protocols
- Trading infrastructure (spot, futures, options)
- Quality assessment and rating
- Regulatory compliance and reporting
- Technology integration (AI, IoT, blockchain)
- Carbon removal certification
- International credit transfers (Article 6)

## 2. Enhanced Architecture

### 2.1 Four-Layer Architecture

```
┌──────────────────────────────────────────────────────┐
│ Layer 4: Application Layer                          │
│ - Web Interface  - Mobile Apps  - APIs              │
├──────────────────────────────────────────────────────┤
│ Layer 3: Business Logic                             │
│ - Project Mgmt   - Trading Engine  - Compliance     │
│ - Verification   - Quality Scoring - Analytics      │
├──────────────────────────────────────────────────────┤
│ Layer 2: Data & Integration                         │
│ - Database       - Blockchain     - Message Queue   │
│ - AI/ML Services - IoT Platform   - File Storage    │
├──────────────────────────────────────────────────────┤
│ Layer 1: Infrastructure                             │
│ - Cloud Services - CDN           - Security/Auth    │
└──────────────────────────────────────────────────────┘
```

### 2.2 Microservices Architecture

- **Project Service:** Project registration and management
- **Credit Service:** Credit issuance, transfer, retirement
- **Verification Service:** Automated and manual verification
- **Trading Service:** Order matching, settlement
- **Analytics Service:** Market analytics, reporting
- **Blockchain Service:** Smart contracts, DLT integration
- **AI Service:** ML models for verification and quality
- **Notification Service:** Real-time alerts and updates

## 3. Enhanced Data Structures

### 3.1 Carbon Credit v2.0

```typescript
interface CarbonCreditV2 {
  // Core Identity
  id: string;
  serialNumber: string;
  projectId: string;

  // Credit Details
  vintage: number;
  quantity: number;
  creditType: 'avoidance' | 'reduction' | 'removal';

  // Verification
  methodology: string;
  standard: 'VCS' | 'GS' | 'CAR' | 'ACR' | 'CDM' | 'Article6';
  verificationBody: string;
  verificationDate: string;
  qualityScore: number;              // NEW: 1-100 quality rating

  // Metadata
  issuanceDate: string;
  expiryDate?: string;
  status: 'issued' | 'traded' | 'retired' | 'cancelled';
  currentOwner: string;

  // Removal-Specific (if creditType === 'removal')
  removalMethod?: 'dac' | 'beccs' | 'biochar' | 'weathering' | 'ocean' | 'forestry';
  permanence?: number;                // Years of guaranteed storage
  reversalRisk?: number;              // Risk score 0-100

  // Blockchain
  tokenAddress?: string;              // NEW: Blockchain token address
  chainId?: number;                   // NEW: Blockchain network ID

  // Article 6
  correspondingAdjustment?: {         // NEW: For international transfers
    hostCountry: string;
    acquiringCountry: string;
    adjustmentApplied: boolean;
    itmoId: string;
  };

  // Tracking
  transactions: TransactionRecord[];
  retirementInfo?: RetirementInfo;
}
```

### 3.2 Project v2.0

```typescript
interface CarbonProjectV2 {
  id: string;
  name: string;
  description: string;

  // Classification
  type: ProjectType;
  subType?: string;
  sector: 'energy' | 'forestry' | 'agriculture' | 'waste' | 'industrial' | 'other';

  // Location
  location: {
    country: string;
    region: string;
    coordinates?: GeoJSON;
    boundary?: GeoJSON;              // NEW: Project boundary polygon
  };

  // Participants
  developer: Organization;
  verifier?: Organization;
  financiers?: Organization[];

  // Technical
  methodology: string;
  baselineScenario: string;
  monitoringPlan: MonitoringPlan;

  // Monitoring (NEW: IoT Integration)
  sensors?: {
    type: string;
    count: number;
    dataFrequency: string;
    endpoint: string;
  }[];

  // Performance
  estimatedAnnualReduction: number;
  creditsIssued: number;
  creditsRetired: number;

  // Dates
  startDate: string;
  validationDate?: string;
  verificationDates: string[];

  // Quality & Co-Benefits (NEW)
  qualityIndicators: {
    additionality: number;           // Score 1-100
    permanence: number;
    leakage: number;
    verification: number;
  };

  coBenefits?: {
    biodiversity: boolean;
    communityDevelopment: boolean;
    waterQuality: boolean;
    airQuality: boolean;
    sustainableDevelopment: boolean;
  };

  // Financial
  budget?: number;
  carbonRevenue?: number;

  // Status
  status: 'registered' | 'validated' | 'operational' | 'completed' | 'suspended' | 'cancelled';

  // AI Insights (NEW)
  aiInsights?: {
    performancePrediction: number;
    riskAssessment: string;
    recommendations: string[];
  };
}
```

### 3.3 Trade Order v2.0

```typescript
interface TradeOrder {
  id: string;

  // Order Details
  type: 'market' | 'limit' | 'stop';
  side: 'buy' | 'sell';
  quantity: number;

  // Credit Specifications
  creditType?: 'avoidance' | 'reduction' | 'removal';
  vintage?: number;
  minQualityScore?: number;
  standard?: string[];
  projectType?: string[];

  // Pricing
  limitPrice?: number;               // For limit orders
  stopPrice?: number;                // For stop orders

  // Execution
  status: 'pending' | 'partial' | 'filled' | 'cancelled' | 'rejected';
  filledQuantity: number;
  averagePrice: number;

  // Timing
  timeInForce: 'GTC' | 'IOC' | 'FOK' | 'GTD';
  goodTillDate?: string;

  // Participant
  userId: string;
  organizationId: string;

  // Settlement
  settlement: 'immediate' | 't+1' | 't+2';

  // Timestamps
  createdAt: string;
  updatedAt: string;
  executedAt?: string;
}
```

## 4. API v2.0 Endpoints

### 4.1 Project Management

#### Register Project with AI Assessment
```
POST /api/v2/projects
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Amazon Rainforest REDD+",
  "type": "redd+",
  "location": {
    "country": "Brazil",
    "region": "Acre",
    "boundary": {...}  // GeoJSON
  },
  "methodology": "VM0006",
  "estimatedAnnualReduction": 500000,
  "sensors": [
    {
      "type": "satellite",
      "provider": "Planet Labs",
      "frequency": "daily"
    }
  ]
}

Response: 201 Created
{
  "projectId": "PROJ-2024-5001",
  "status": "registered",
  "aiAssessment": {
    "additionality": 87,
    "feasibility": 92,
    "risks": ["Deforestation pressure", "Political stability"],
    "recommendations": ["Strengthen community engagement", "Diversify monitoring methods"]
  }
}
```

#### Get Real-Time Project Metrics
```
GET /api/v2/projects/{projectId}/metrics/realtime
Authorization: Bearer {token}

Response: 200 OK
{
  "projectId": "PROJ-2024-5001",
  "timestamp": "2024-12-10T15:30:00Z",
  "metrics": {
    "deforestationRate": 0.012,
    "biomassCarbon": 125000,
    "sensorStatus": {
      "active": 45,
      "inactive": 0,
      "lastUpdate": "2024-12-10T15:25:00Z"
    }
  },
  "aiPrediction": {
    "nextQuarterReduction": 32500,
    "confidence": 0.89
  }
}
```

### 4.2 Credit Management

#### Issue Credits with Quality Score
```
POST /api/v2/credits/issue
Authorization: Bearer {token}

{
  "projectId": "PROJ-2024-5001",
  "quantity": 500000,
  "vintage": 2024,
  "creditType": "avoidance",
  "verificationReport": "...",
  "calculateQuality": true
}

Response: 201 Created
{
  "credits": [{
    "id": "CRD-2024-5001-00001",
    "quantity": 500000,
    "qualityScore": 92,
    "qualityBreakdown": {
      "additionality": 95,
      "permanence": 88,
      "verification": 94,
      "coBenefits": 91
    },
    "tokenAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "chainId": 1
  }]
}
```

#### Search Credits with Filters
```
GET /api/v2/credits/search?type=removal&minQuality=80&vintage=2024&limit=100
Authorization: Bearer {token}

Response: 200 OK
{
  "total": 1247,
  "credits": [
    {
      "id": "CRD-2024-1001",
      "quantity": 10000,
      "qualityScore": 95,
      "creditType": "removal",
      "removalMethod": "dac",
      "price": 450.00,
      "available": true
    },
    ...
  ],
  "filters": {
    "applied": ["type", "minQuality", "vintage"],
    "available": ["standard", "projectType", "location"]
  }
}
```

### 4.3 Trading

#### Create Market Order
```
POST /api/v2/trading/orders
Authorization: Bearer {token}

{
  "type": "market",
  "side": "buy",
  "quantity": 50000,
  "minQualityScore": 85,
  "creditType": "removal"
}

Response: 201 Created
{
  "orderId": "ORD-2024-98765",
  "status": "filled",
  "filledQuantity": 50000,
  "averagePrice": 425.50,
  "totalCost": 21275000,
  "credits": [...]
}
```

#### WebSocket Real-Time Prices
```
WS /api/v2/stream/prices
Authorization: Bearer {token}

// Subscribe
{
  "action": "subscribe",
  "channels": ["prices.all", "trades.VCS", "orderbook.removal"]
}

// Receive updates
{
  "channel": "prices.all",
  "timestamp": "2024-12-10T15:30:05Z",
  "data": {
    "VCS_avoidance_2024": 12.50,
    "GS_reduction_2024": 15.75,
    "removal_dac_2024": 450.00
  }
}
```

### 4.4 Verification & Monitoring

#### Submit Monitoring Data
```
POST /api/v2/verification/monitoring-data
Authorization: Bearer {token}

{
  "projectId": "PROJ-2024-5001",
  "period": "2024-Q1",
  "data": {
    "emissionReductions": 125000,
    "sensorReadings": [...],
    "satelliteAnalysis": {...}
  }
}

Response: 202 Accepted
{
  "submissionId": "MON-2024-001",
  "aiValidation": {
    "status": "passed",
    "anomalies": [],
    "confidence": 0.94
  },
  "nextSteps": ["Verification body review", "Credit issuance"]
}
```

#### AI-Powered Verification
```
POST /api/v2/verification/ai-verify
Authorization: Bearer {token}

{
  "projectId": "PROJ-2024-5001",
  "monitoringDataId": "MON-2024-001"
}

Response: 200 OK
{
  "verificationId": "VER-AI-2024-001",
  "result": "approved",
  "confidence": 0.91,
  "analysis": {
    "dataQuality": 0.95,
    "consistencyCheck": "passed",
    "anomalyDetection": "none",
    "calculationVerification": "correct"
  },
  "humanReviewRequired": false
}
```

## 5. Quality Scoring Framework

### 5.1 Quality Score Calculation

Credits receive a quality score (1-100) based on:

```
Quality Score = (
  Additionality × 0.30 +
  Permanence × 0.25 +
  Verification × 0.20 +
  Co-Benefits × 0.15 +
  Transparency × 0.10
)
```

### 5.2 Quality Tiers

- **Premium (90-100):** Highest quality, permanent removal, strong co-benefits
- **High (75-89):** Strong additionality, verified, good permanence
- **Standard (60-74):** Acceptable quality, meets basic requirements
- **Basic (40-59):** Lower confidence, higher risk, limited verification
- **Unrated (<40):** Insufficient data or quality concerns

## 6. Blockchain Integration

### 6.1 Smart Contract Interface

```solidity
interface ICarbonCredit {
    function mintCredit(
        string memory projectId,
        uint256 quantity,
        uint256 vintage,
        bytes32 verificationHash
    ) external returns (uint256 tokenId);

    function transfer(
        uint256 tokenId,
        address to,
        uint256 quantity
    ) external;

    function retire(
        uint256 tokenId,
        uint256 quantity,
        string memory beneficiary
    ) external;

    function getQualityScore(uint256 tokenId) external view returns (uint8);
}
```

### 6.2 Supported Blockchains

- Ethereum (mainnet)
- Polygon
- Celo
- Algorand
- Hedera Hashgraph

## 7. Article 6 Compliance

### 7.1 Corresponding Adjustments

When credits are transferred internationally:

1. Host country adds reduction to emissions inventory
2. Acquiring country subtracts from inventory
3. Both recorded in Article 6 database
4. Credit tagged with adjustment metadata

### 7.2 ITMO Format

```typescript
interface ITMO {
  itmoId: string;
  hostCountry: string;
  acquiringCountry: string;
  quantity: number;
  vintage: number;
  transferDate: string;
  correspondingAdjustment: {
    hostAdjustment: number;
    acquiringAdjustment: number;
    verificationHash: string;
  };
}
```

## 8. Security

### 8.1 Authentication

- OAuth 2.0 / OpenID Connect
- API key authentication for services
- Multi-factor authentication for sensitive operations
- Role-based access control (RBAC)

### 8.2 Data Protection

- End-to-end encryption for sensitive data
- At-rest encryption (AES-256)
- In-transit encryption (TLS 1.3)
- Regular security audits
- GDPR/CCPA compliance

## 9. Performance Requirements

- API response time: <200ms (p95)
- WebSocket latency: <50ms
- Trading engine: >10,000 orders/second
- Uptime: 99.95%
- Data retention: 10 years minimum

## 10. Migration from v1.x

### 10.1 Breaking Changes

- API endpoints changed from `/api/v1/*` to `/api/v2/*`
- Quality score field required for all credits
- Enhanced authentication required

### 10.2 Migration Path

1. Review v2.0 changes
2. Update API integrations
3. Backfill quality scores for existing credits
4. Test in staging environment
5. Deploy with backward compatibility period
6. Deprecate v1.x endpoints (6 month notice)

---

© 2024 WIA (World Certification Industry Association)
弘益人間 (홍익인간) · Benefit All Humanity
