Technical Architecture
Last updated
Last updated
Extended operates as a hybrid Central Limit Order Book (CLOB) exchange. While order processing, matching, position risk assessment, and transaction sequencing are handled off-chain, trade settlement occurs on-chain through the StarkEx Layer 2 engine.
StarkEx, built by Starkware, is a battle-tested scalability solution that brings lightning-fast transaction processing, guaranteeing an unparalleled trading experience. This is achieved while preserving complete trustlessness and transparency through three key mechanisms embedded into StarkEx:
On-chain validations of the trading logic ensure that fraudulent or incorrect transactions, including liquidations, contrary to the on-chain trading logic are never permitted.
The mark prices, which determine the liquidability of positions, are obtained from multiple independent oracle providers to prevent potential price manipulation and ensure fair and accurate asset valuation within our ecosystem. Extended utilizes 5 Stork nodes to define the median mark price.
Publication of zero-knowledge (ZK) proofs on the Ethereum Layer 1 blockchain validates Layer 2 transactions, ensuring both their integrity and security.
For deeper insights, explore Starkware's comprehensive documentation.
The decision to adopt a hybrid model for Extended is a strategic design choice aiming to overcome the limitations of both fully centralized and decentralized on-chain order book models:
Challenges with Centralized Exchanges: Custodial control over user funds ('not your keys - not your coins'), lack of transparency over assets and liabilities, and susceptibility to trading manipulation.
Challenges with On-chain Order Books: Risk of front-running and higher latency due to transaction validation by multiple parties. Fully decentralized exchanges will always struggle to match the performance of centralized venues, which is crucial for liquidity.
Extended hybrid model leverages the strengths of both centralized and decentralized components:
Self-Custody, On-chain Settlement and Oracle Prices: Users retain full custody over their funds. All trades are settled on the blockchain with smart contract validations to prevent fraudulent transactions. Additionally, mark prices from independent oracle providers mitigate the risk of manipulation
Off-chain Trading Infrastructure: Off-chain order matching and risk engines, combined with a unique settlement architecture, deliver remarkable performance in terms of throughput, end-to-end latency, and trade finality. This performance is comparable to centralized exchanges and superior to other hybrid exchanges or decentralized exchanges.
For more details on Extended Technical Architecture and Safety, please read our blog posts: 'Extended Architecture' and 'Why Safe?'.