Network: Mainnet▼
Platform Architecture
The o2 Exchange is composed of:
- Sway Contracts: OnChain components that deliver all main functionality, from user access to order matching, most components work in a permissionless way.
- Data Layer: OffChain indexer, that indexes the pre-confirmation receipts, from the transactions executed on the contracts, and distributes rich data via REST and Websocket APIs.
- Executor Layer: This component forwards user actions to the Fuel Network, sponsoring gas for on-demand transactions. It does not apply any logic for batching or prioritizing transactions.
- User Interface Layer: The set of tools / UIs that facilitates the interaction with the other components.
mermaid
graph TB
subgraph "User Interface Layer"
Web[Web Trading Interface]
API[HTTP/WebSocket APIs]
CLI[Developer CLI]
end
subgraph "Service Layer"
subgraph "Read-Only"
REST[REST]
WS[WebSocket Service]
end
subgraph "Executor"
Sponsor[Gas Sponsor]
Upgrade[Order Book create/upgrade]
end
subgraph "Data Indexer"
Indexer[Event Indexer]
end
end
subgraph "Blockchain Layer"
subgraph "Discovery logic"
REG[Order Book Registry]
TREG[Trading Account Registry]
end
subgraph "Proxy Contracts"
TAP[Trading Account Proxy]
OBP[Order Book Proxy]
end
subgraph "Core Logic"
TA[Trading Accounts]
OB[Order Books]
Oracle[Upgrade Oracle]
end
end