Extended Logo

Extended Architecture

8 min

What's Extended's architecture?

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, transaction validation and trade settlement occur on-chain via Starknet.

schema of architecture

Extended is designed to operate in a completely trustless manner, enabled by two core principles:

  • Users retain self-custody of their funds, with all assets held in smart contracts on Starknet. This means Extended has no custodial access to user assets under any circumstances.
  • On-chain validation of the trading logic ensures that fraudulent or incorrect transactions, including liquidations that are contrary to the on-chain rules, are never permitted.

All transactions that happen on Extended are settled on Starknet. While Starknet does not rely on Ethereum Layer 1 for every individual transaction, it inherits Ethereum’s security by publishing zero-knowledge proofs every few hours. These proofs validate state transitions on Starknet, ensuring the integrity and correctness of the entire system.

For a deeper breakdown of the core principles that make Extended trustless, see our blog post.

Why CLOB? 

In simple terms, while the Central Limit Order Book (CLOB) stands out as the most efficient model, offering liquidity, capital efficiency, and an exceptional trading experience across all market conditions and assets, all alternative designs for a perpetuals exchange discussed below come with fundamental drawbacks.

Pool-based model

In the pool-based model, exemplified by platforms like GMX, liquidity providers (LPs) contribute assets to a liquidity pool, which serves as a counterparty to traders. When a trader on such an exchange takes a long position on a given asset, all LPs automatically take on a short position corresponding to their stake. Consequently, if a trader makes a profit, LPs experience losses proportionate to their stake, and vice versa.

If the mechanics of the liquidity pool fail to appropriately value the liquidity offered to traders, it can result in a scenario where profitable trading depletes the pool's assets, leading to negative APR for liquidity providers and less liquid trading conditions. This, in turn, results in fewer traders choosing the exchange, further decreasing APR and prompting unstaking from liquidity providers. This cycle then repeats, perpetuating the liquidity challenge.

Virtual AMM (vAMM)

The vAMM model operates similarly to regular AMMs, using the constant product formula x*y=k. However, instead of trading actual assets, users trade a virtual exposure to assets with leverage. In this model, users trade against a vAMM pool. When a user opens a position, the price in the virtual AMM pool changes according to the formula x*y=k.

Unlike CLOB models where short and long open interest always balance out, in the vAMM model, the difference between short and long open interest determines the deviation from the pool opening price. In bullish market conditions, where the market price of the asset is expected to increase, the pool price can only rise if more users take long positions and keep them open. The farther the asset price moves from the pool opening price, the more long open interest is needed to sustain it there.

In the vAMM model, the funding payment aligns the pool price with the mark price. The higher the required open interest, the higher the payment needs to be to attract more capital. Given the imbalance between short and long open interest (long-short skew), the insurance fund steps in to pay the funding.

The fundamental issue with this model was highlighted in the example of Perpetual Protocol v1 during the market downturn of spring 2022. The protocol faced a drain on the insurance fund due to a long-short skew and abnormally large funding payments, ultimately leading the team to move away from this model.

Dynamic AMM (vAMM)

Dynamic AMM, an extension of the vAMM model, operates on pools with concentrated liquidity, such as Uniswap V3. While this model effectively addresses the vAMM's concerns regarding long-short skew and insurance fund drainage, it brings about new challenges. These challenges include impermanent loss, heightened complexity, and elevated costs associated with providing liquidity. Particularly in highly volatile or one-sided market conditions, these challenges become more pronounced. As a result, market liquidity is limited, resulting in a suboptimal trading experience.

Why Hybrid?

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: Traditional centralized exchanges pose risks due to custodial control over user funds, lack of real-time transparency, and susceptibility to trading manipulation. The principle of 'not your keys - not your coins' emphasizes the vulnerability of funds held on centralized platforms.
  • Challenges with On-chain Order Books: On-chain order books face issues like the risk of front-running and inherent latency from blockchain transaction validation by multiple parties. Fully decentralized exchanges struggle to match the performance of centralized exchanges, which is crucial for liquidity and price stability.

Extended's hybrid model leverages the strengths of both centralized and decentralized components:

  • On-chain Settlement with Validations and Oracle Prices: Extended settles each trade on the blockchain and on-chain validations of trading logic ensure the prevention of fraudulent or incorrect transactions. Additionally, mark prices sourced from multiple independent oracle providers mitigate the risk of price 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 order settlement. This performance is comparable to centralized exchanges and superior to other hybrid exchanges or decentralized exchanges (DEXs).

Extended's hybrid model strikes a balance by offering the security and transparency of decentralization without compromising on speed and efficiency.

Why Starknet?

When selecting the optimal settlement layer for Extended, we focused on four key criteria:

  • Security: Starknet stands out as one of the most secure Layer 2 solutions. Recognized as a Stage 1 rollup, it meets critical decentralization and security requirements — as highlighted by Vitalik Buterin.
  • Performance: With ~2 seconds transaction confirmation time and an average cost user operation as low as $0.000057, Starknet is currently among the most cost-efficient rollups on Ethereum — enabling high throughput at a low cost essential for processing tens of thousands of trades.
  • Longevity: StarkWare, the inventors of STARKs and the team behind Starknet, has been building cryptographic infrastructure for over seven years. Through multiple market cycles, they’ve demonstrated technical resilience and strategic continuity.
  • Vision Alignment: Starknet's ambition to become the first Layer 2 to settle on both Bitcoin and Ethereum aligns with Extended's roadmap to build a global unified margin. This will enable Extended to natively support BTC and its yield-bearing wrappers as collateral, marking a significant step toward broader capital efficiency and deeper liquidity.

Share article

© 2025 Extended. All rights reserved.