Vertex Docs
  • Getting Started
    • 📋Overview
    • 📜Table of Contents
    • 🚀Mission
    • ⚔️Vertex Edge
      • 1️⃣Vertex on Arbitrum
      • 2️⃣Blitz on Blast
        • Blitz Documentation
      • 3️⃣Vertex on Mantle
        • 🎆Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • 🖥️Open-Source Contracts
        • 🔌API
      • 4️⃣Vertex on Sei
        • 💰Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • 🖥️On-Chain Contracts
        • 🔌API
      • 5️⃣Vertex on Base
        • 💰Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • 💻Onchain Contracts
        • 🔌API
        • ✍️Create a Coinbase Smart Wallet
      • 6️⃣Vertex on Sonic
        • 💰Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • ⛓️On-Chain Contracts
        • 🔌API
      • 7️⃣Vertex on Abstract
        • 📊Market Specifications
        • ⛓️On-Chain Contracts
        • 🔌API
      • 8️⃣Bro.Trade on Berachain
        • ⛓️On-Chain Contracts
        • 🔌API
      • 9️⃣Vertex on Avalanche
        • 💰Trading Rewards
        • 📊Market Specifications
        • ⛓️On-Chain Contracts
        • 🔌API
  • Basics
    • 📽️Products
    • ⚡Technical Architecture
    • 🧵Universal Cross Margin
    • ✂️Isolated Margin
    • ℹ️Subaccounts & Health
    • ⏰Liquidations & Insurance Fund
    • 💵PnL Settlements
    • 📊Pricing (Oracles)
    • 💰Fees
    • 📈Funding Rates
    • 📅Market Specifications
    • ⚡One-Click Trading
    • 🔫Trigger Orders
    • 🗂️GMCI 30 & MEME Indices
    • 💰Trade & Earn
      • 🤝Maker Program
      • 🔁Cross-Chain VRTX Rewards
      • ❓Trading Rewards - FAQs
    • 🧑‍🤝‍🧑Referral Program
    • ⚒️Resources & Links
    • ❔FAQs
  • VRTX Token
    • 🎓VRTX Tokenomics
    • 📊Token Supply Distribution
  • More
    • 🌐Glossary
    • 🔬Contracts & Code Audits
    • 🦋Bug Bounties
    • 💽Data & Research
    • 🪟Maintenance Windows
    • 🏁Terms of Use
    • ✍️Statement of Risk
    • 🌍Restricted Territories
    • 📸Brand Assets
  • Tutorials
    • 🏁Quick Start
    • 🖱️One-Click Trading
    • ⚙️Trading Basics
    • ♾️Perpetuals
    • 🔮Spot
    • 🧑‍🤝‍🧑Multiple Accounts
    • 🔫TP/SL & Stop-Market
    • 💰Withdrawals
    • ⚡Fast Withdrawals
    • 🌉Cross-Chain Deposits
    • 🔄Lend, Borrow & Repay
    • ❤️Margin Health
    • 💧Pools
    • 💫VRTX Staking
    • ↔️Switching Chains
    • 🪙Trading Rewards
    • ✂️Shortcuts
  • Developer Resources
    • API
      • 🔌Endpoints
      • Gateway
        • Executes
          • Place Order
          • Place Isolated Order
          • Cancel Orders
          • Cancel Product Orders
          • Cancel And Place
          • Withdraw Collateral
          • Transfer Quote
          • Liquidate Subaccount
          • Mint LP
          • Burn LP
          • Link Signer
        • Queries
          • Status
          • Contracts
          • Nonces
          • Order
          • Orders
          • Subaccount Info
          • Isolated Positions
          • Market Liquidity
          • Symbols
          • All Products
          • Edge All Products
          • Market Prices
          • Max Order Size
          • Max Withdrawable
          • Max LP Mintable
          • Fee Rates
          • Health Groups
          • Linked Signer
          • Insurance
          • Min Deposit Rates
        • Signing
          • Examples
          • Q&A
      • Subscriptions
        • Authentication
        • Streams
        • Events
        • Rate limits
      • Archive (indexer)
        • Orders
        • Matches
        • Events
        • Summary
        • Candlesticks
        • Edge Candlesticks
        • Funding Rate
        • Interest & funding payments
        • Oracle Price
        • Perp Prices
        • Product Snapshots
        • Market Snapshots
        • Edge Market Snapshots
        • Maker Statistics
        • Merkle Proofs
        • Rewards
        • Referral Code
        • Liquidation Feed
        • Linked Signer Rate Limit
        • Subaccounts
        • Signatures
        • USDC Price
      • Trigger
        • Executes
          • Place Order
          • Cancel Orders
          • Cancel Product Orders
        • Queries
          • List Trigger Orders
      • V2
        • Assets
        • Pairs
        • APR
        • Orderbook
        • Tickers
        • Contracts
        • Trades
        • VRTX Token
      • Rate limits
      • Errors
      • Symbols
      • Depositing
      • Withdrawing (on-chain)
      • Integrate via Smart Contracts
      • Definitions / Formulas
    • Vertex Typescript SDK
      • Getting Started
      • How To
        • Create a Vertex client
        • Useful Common Functions
        • Query Markets & Products
        • Deposit Funds
        • Withdraw Funds
        • Manage Orders
      • User Guide
        • Client
          • Market
            • Place Order
            • Cancel Orders
            • Cancel Product Orders
            • Mint LP
            • Burn LP
            • Get All Markets
            • Get Latest Market Price
            • Get Market Liquidity
            • Get Open Subaccount orders
            • Get Historical Orders
            • Get Max Order Size
            • Get Max Mint LP
            • Get Candlesticks
            • Get Funding Rate
            • Get Product Snapshots
          • Spot
            • Approve Allowance
            • Deposit
            • Withdraw
            • Get Max Withdrawable
            • Get Token Contract for Product
            • Get Token Wallet Balance
            • Get Token Allowance
          • Perp
            • Get prices
          • Subaccount
            • Link Signer
            • Get Subaccount Linked Signer with Rate limits
            • Get Subaccount Summary
            • Get Subaccount Fee Rates
            • Get Subaccount Token Rewards
        • Engine Client
          • Executes
          • Queries
        • Indexer Client
          • Base Queries
          • Paginated Queries
        • Websocket
          • Executes
          • Queries
          • Subscriptions
        • Utilities
          • Contracts
          • Utils
      • API Reference
    • Vertex Python SDK
    • Vertex Rust SDK
    • Contracts
    • API/SDK Terms of Use
Powered by GitBook
On this page
  • Protocol Level – Constant Product AMM & Risk Engine
  • Off-Chain – Sequencer Orderbook
Export as PDF
  1. Basics

⚡Technical Architecture

Examining Vertex's unique technical stack.

Learn About CLOB's and Vertex's Unique DEX Architecture

Vertex’s exchange model fuses a fully on-chain trading venue and risk engine at the protocol level with an off-chain sequencer layered on top to form a Hybrid Orderbook-AMM DEX. The on-chain trading and risk engine contains Vertex’s core products, including spot, perpetuals, and money market – controlled by the Vertex protocol smart contracts on the Arbitrum layer.

The sequencer functions as a high-performance orderbook for matching inbound orders fed into the protocol layer with extremely low latency. Vertex’s on-chain clearinghouse operates as the hub combining perpetual and spot markets, collateral, and risk calculations into a single integrated system.

Converging an AMM and orderbook forms the basis of a unified trading stack with vertically integrated DeFi primitives as its core products on-chain.

Each component of Vertex’s trading stack coalesces into a powerful on-chain trading platform. Limitations of siloed DEX models popular among incumbent DeFi protocols are minimized while their strengths amplify one another within a single exchange venue.

The resulting hybrid orderbook-AMM DEX maximizes advantages across performance, flexible liquidity expression, and a diverse product suite. Rendering an accurate display of the specific design considerations and subsequent benefits of the Vertex DEX requires dividing the hybrid orderbook-AMM model into three core pillars:

  • A fully on-chain trading venue (constant product AMM) – protocol level.

  • A fully on-chain risk engine – protocol level.

  • An off-chain sequencer for order matching.

Individually, each pillar reflects a core element of any DeFi exchange venue.

Threaded together with an EVM-compatible clearinghouse (i.e., on-chain risk engine), the core pillars produce a default cross-margined DEX on Arbitrum where users don’t have to sacrifice the control of self-custody for the performance and vibrant product features of CEXs.

Protocol Level – Constant Product AMM & Risk Engine

Vertex’s integrated AMM utilizes a xy=k algorithm at the outset and will eventually implement leveraged LPs, further enhancing liquidity alongside the vAMM for perpetuals.

The integrated AMM is located on-chain – housed within the protocol layer. The on-chain AMM functions as the default state of the protocol controlled at the smart contract level, known as “Slo-Mo Mode.”

The pooled liquidity of the AMM sits alongside the bids and asks on the Vertex orderbook, effectively another market maker contributing to liquidity via smart contracts rather than API.

The AMM liquidity is combined with liquidity from automated traders via the sequencer, and users trade against this unified source of liquidity.

Trades are always executed at the best available price, meaning a trade could fill against limit orders and LP positions concurrently as the sequencer automatically sources the best liquidity available.

As a result, Vertex maintains several unique liquidity advantages, including:

  • There will always be some liquidity to clear trades.

  • Markets can be seeded with more passive liquidity but also have more flexibility with limit orders – this benefits both illiquid and liquid assets.

  • Traders can always trade directly on-chain without using the sequencer if they wish.

The existence of the on-chain AMM also empowers users with two of the core value propositions of AMMs. Namely:

  • The ability to passive LP asset pools and earn trading fees.

  • Long-tail DeFi asset support for less liquid tokens.

AMM transactions on Vertex also come with lower gas fees than Ethereum L1 – a product of the AMM functioning at the Arbitrum protocol layer.

As Vertex expands multi-chain in V2, the AMM can list native spot assets of other EVM-compatible chains integrated with Vertex – broadening the scope of asset trading more closely, echoing the CEX experience popular with many retail traders.

The Vertex AMM is supplemented by the sequencer orderbook off-chain, which provides a low-latency alternative central-limit orderbook (CLOB) for traders looking to place limit orders, access faster trading, and execute automated trading strategies. Since the pairwise LPs from the AMM populate the orderbook, the liquidity of trading pairs is mutually enriched.

Off-Chain – Sequencer Orderbook

The Vertex sequencer is a central-limit orderbook (CLOB) located off-chain as an independent node, which will eventually be decentralized via Vertex governance.

The orderbook is Vertex’s primary edge in the context of a performant trading engine. Liquidity is augmented as positions from pairwise LP markets populate the orderbook. An HFT-friendly API enables traders to plug into the orderbook, execute automated trading strategies, and trade against the combination of the orderbook and AMM’s liquidity at lightning-fast speeds.

The on-chain latency of distributed node consensus does not constrain performance. Instead, it’s competitive with CEX-grade trading engine speed – achieving average order-matching execution speeds between 5 - 15 milliseconds (ms).

In the case of maintenance, downtime, or other unforeseen circumstances, the AMM layer on-chain functions as the backstop of the protocol, enabling users to trade solely against the AMM without needing the orderbook.

This functions as an essential pathway for users, where transactions always settle on-chain no matter the state of the sequencer.

For example, if the sequencer goes down, instead of CEX-like order book performance and liquidity, you’d get a Uniswap-style experience but with cross-margined accounts for spot, perps, an integrated money market, and lower fees on Arbitrum.

Initially, the sequencer will operate as an independent node run by the Vertex team, with a TPS of 15K and latency time of 5 - 15 ms.

The Vertex sequencer maintains various properties that are important to define.

  • Sequencer order book operates similarly to a centralized exchange: Traders can place orders with the sequencer’s order book on a scale similar to centralized exchanges, receiving order feedback with comparable latency to centralized exchanges based on accurate optimistic states – analogous to Arbitrum as an ETH L2.

  • Limit on validator's ability to modify trades: Validators on the underlying chain (Arbitrum’s L2 for ETH) cannot reorder or front-run transactions. Traders on Vertex are safe from validator MEV on the underlying blockchain.

  • The sequencer has no custody over user assets: Asset custody is controlled at the smart contract level on the underlying chain Arbitrum (Slo-Mo Mode). The sequencer cannot censor transactions either; users can force their transactions to be included on Arbitrum. Vertex’s default state is always the on-chain AMM – not the sequencer.

  • The sequencer also has no ability to stop trading or withdrawals: Users can still trade (on the AMM) and withdraw by going directly to Arbitrum.

  • Users do not need to trust the sequencer to report accurate optimistic states: Users can wait for confirmations directly on the underlying chain – Arbitrum.

  • MEV Protection: Vertex's sequencer operates on millisecond timescales (<20ms for a response), rendering MEV extraction less valuable. A general trade-off exists between latency & MEV ability.

Arbitrum, as an L2 on Ethereum, also minimizes MEV since it periodically submits batches of transactions to Ethereum L1. As a result, in both contexts where Vertex is either functioning with an off-chain sequencer or in its default on-chain state, MEV is minimized, mitigating one of the key shortcomings of on-chain DEXs.

Risk checks for matching orders are conducted on the sequencer level instead of on the Arbitrum chain to minimize transaction costs for users.

Note that only the sequencer is able to match orders, and all other actions, such as withdrawing collateral, liquidating an account, or swapping against the AMM, require risk checks to happen on-chain.

Orders still require explicit signatures from both parties to be executed on-chain.

At the moment, this is a necessary trade-off for the initial stages of Vertex. In the future, as the Vertex sequencer becomes decentralized, this will no longer be necessary.

During Slo-Mo Mode, users can still swap assets, open and close perp positions, and interact with the rest of the Vertex protocol, just with increased latency and tighter liquidity analogous to trading on Uniswap with more slippage and wider spreads susceptible to larger market-moving orders.

Key Takeaways:

  • The sequencer orders transactions but cannot forge them and does not have custody of user assets. Users can automatically fall back to the decentralized smart contracts on Arbitrum. Funds are never at risk.

  • Vertex’s performance is on par with centralized exchanges.

PreviousProductsNextUniversal Cross Margin

Last updated 4 months ago

Conceptual overview of the Vertex technology stack.
Conceptual graphic displaying how pairwise LPs populate the orderbook.
Example scenario of pairwise LPs populating the orderbook to fill a trade at the best available price.
Page cover image