X Layer overview#
X Layer is an Ethereum Layer 2 (L2) network, built by OKX on an enhanced Optimism Stack, designed to provide developers with a superior environment for scaling applications.
Key Developer Advantages
- Full EVM Equivalence: Deploy your existing Ethereum applications without any code modifications.
- Exceptional Performance: Achieve massive scalability with support for up to 5,000 TPS and negligible gas fees.
- Battle-Tested Security: X Layer leverages the robust optimistic rollup architecture, inheriting the security guarantees of Ethereum, but with a simpler, more efficient operational model than ZK rollups.
- Enterprise-Grade Reliability: Features like the Conductor high-availability cluster ensure sequencer redundancy, offering 99.9% uptime for your production-ready dapps.
X Layer architecture#
The major components of X Layer are:
- Virtual Machine: EVM‑equivalent
- Sequencer: Trusted (implemented by op-node in sequencer mode, coordinating with op-geth via Engine API)
- Gas token: OKB (fixed supply at 21M post-burns/upgrades; L1 OKB phased out)
Background#
X Layer has evolved to adopt the Optimism Stack (OP Stack) framework, a battle-tested and widely adopted Layer 2 scaling solution. In this architecture, L2 operates with optimistic assumptions where transactions are considered valid by default, with a 7-day challenge period for fraud proofs. This provides a more efficient and cost-effective solution while maintaining Ethereum's security guarantees through cryptographic fraud proofs when needed.
Architecture flow (OP Stack + AggLayer mode)#
Phase 1: From L1 to L2
Process of bridging assets from ETH to X Layer
| Step | Action | Description |
|---|---|---|
| 1.1 | User Deposit | The user sends assets to the L1 bridge contract. |
| 1.2 | Event Sync | The Bridge Service monitors (ingests) the L1 contract events. |
| 1.3 | L2 Claim/Mint | The Bridge Service sends an L2 transaction (via RPCs) to claim/mint the asset on X Layer. |
| 1.4 | Block Inclusion | The Sequencer includes this transaction in an L2 block. |
| 1.5 | User Update | RPCs expose the updated balance/status to the user. |
Phase 2: Execution and withdrawal back to L1
Standard L2 operations and process of initiating withdrawal back to L1
| Step | Action | Description |
|---|---|---|
| 2.1 | Withdrawal Tx | The user sends an L2 withdrawal transaction via RPCs. |
| 2.2 | Block Generation | The Sequencer continues to generate blocks. |
| 2.3 | Data Persistence | The L2BridgeSyncer and L1InfoTreeSyncer persist chain data and L1 info updates needed for the Pessimistic Proof (PP). |
Phase 3: Cross-Chain Settlement & Proof (AggLayer)
This phase involves proving and finalizing the withdrawal on L1 using the AggLayer.
| Step | Action | Description |
|---|---|---|
| 3.1 | Certificate Prep | The aggsender fetches blocks, stores certificate metadata, and performs double-checks. |
| 3.2 | Certificate Submission | The aggsender submits the certificate to the AggLayer. |
| 3.3 | ZK Proof Generation | The agglayer-prover generates the ZK proof; the AggLayer submits the certificate proof and public inputs to L1. |
| 3.4 | L1 Finality | After L1 verification, withdrawals and messages achieve L1 finality (PP is verified). |
Phase 4: Continuous System Synchronization
| Step | Action | Description |
|---|---|---|
| 4.1 - 4.2 | Continuous Sync | The Bridge Service continuously synchronizes both L2 and L1 contract events to maintain state consistency. |
Outcome: Fast execution happens on L2 with 2-second block times; for withdrawals, users wait for the 7-day challenge period to ensure security. All L2 data is published to L1, ensuring the system is fully trustless and censorship-resistant.
This flow ensures immediate transaction finality on L2 for most operations while providing cryptographic security for cross-chain operations through the optimistic rollup model.
