# Autonomous Interplanetary FX Zone (AIFX)

## Overview

AIFX is DBIS' unified FX layer for Earth sovereign currencies, Lunar and Martian local currencies, interplanetary SSUs (iSSU), temporal currencies (TCUs), and synthetic resonance currencies (QMU, HMU).

## FX-Matching Engine

Executed by:
- DBIS Neural Consensus Engine (NCE)
- CASO (Cross-Border Algorithmic Settlement Optimizer)

## Pricing Function

```
fx_price = liquidity_weight + gravity_factor + latency_cost + time_dilation_index + SSU_stability
```

## Interplanetary FX Corridors

- Earth ↔ Luna corridor
- Earth ↔ Mars corridor
- Mars ↔ Luna corridor
- Interplanetary SSU corridor

Each corridor has:
- Lag-adjusted pricing
- Radiation-risk volatility spreads
- Planetary-velocity normalization

## Services

### AifxCorridorService
- `createCorridor()` - Create an interplanetary FX corridor
- `getAllCorridors()` - Get all corridors
- `getCorridorByPlanets()` - Get corridor by planets
- `initializeDefaultCorridors()` - Initialize default corridors

### AifxPricingService
- `calculateFxPrice()` - Calculate FX price for interplanetary trade
- `getLatestPricing()` - Get latest pricing state for a corridor

### AifxEngineService
- `executeTrade()` - Execute an interplanetary FX trade
- `getTrade()` - Get trade by ID
- `getTradesBySovereign()` - Get trades for a sovereign bank
- `settleTrade()` - Settle trade

## Database Models

- `AifxCorridor` - Interplanetary FX corridors
- `AifxTrade` - Interplanetary FX trades
- `AifxPricingState` - FX pricing states
- `InterplanetarySsu` - Interplanetary SSU definitions
- `InterplanetarySsuTransaction` - iSSU transactions

