# Bridge Integration Guide

This guide explains how the trustless bridge integrates with the ReserveSystem for peg maintenance and asset backing.

## Architecture Overview

The integration layer consists of four main contracts:

1. **BridgeReserveCoordinator** - Orchestrates bridge operations with ReserveSystem
2. **StablecoinPegManager** - Maintains USD/ETH pegs
3. **CommodityPegManager** - Manages commodity pegging via XAU
4. **ISOCurrencyManager** - Handles ISO-4217 currency support

## Integration Flow

1. User deposits on ChainID 138
2. Relayer submits claim on Ethereum
3. BridgeSwapCoordinator executes bridge and swap
4. BridgeReserveCoordinator verifies reserve backing
5. Peg managers monitor and maintain pegs
6. Market reporting service reports metrics to external APIs

## Contract Deployment

Deploy contracts in this order:

1. ReserveSystem
2. StablecoinPegManager
3. CommodityPegManager
4. ISOCurrencyManager
5. BridgeReserveCoordinator

## Configuration

- Reserve verification threshold: 100% (10000 bps)
- USD peg threshold: ±0.5% (50 bps)
- ETH peg threshold: ±0.1% (10 bps)
- Commodity peg threshold: ±1.0% (100 bps)

## Usage

See individual contract documentation for detailed usage instructions.

