dYdX Chain Technical Docs
  • 👋dYdX Chain Technical Documentation
  • Getting Started
    • 💡Developer Tools
      • dYdX Chain Client for Javascript
        • Example #1: Accessing Subaccount Data
        • Example #2: Faucet Endpoints
        • Additional Javascript Client Examples
      • dYdX Chain Client for Python
        • Example #1: Placing, Replacing, and Canceling Orders
        • Exmaple #2: Trading with HRN
        • Additional Python Client Examples
      • dYdX CLI
        • Setup the dYdX CLI
        • EOA Wallets
        • Multisig wallet
        • Submit a governance proposal
    • ✨Developer Guides
    • 🦊User Guides
      • How to use Squid UI for cross-chain deposits to dYdX V4
      • How to use CCTP UI for cross-chain deposits to dYdX V4
      • How to withdraw and transfer funds from a subaccount using Command Line
    • ❓FAQ & Resources
    • 🖥️Open Source Repositories
  • Validators
    • 🛠️Getting set up
      • Hardware Requirements
      • Required Node Configs
      • Running a Validator
      • Running a Full Node
      • Snapshots
      • Validator Upgrades
    • ❓FAQ & Resources
    • 🧑Active Validator Slack
  • Front End & Wallets
    • 📚Architecture Overview
    • 🌎Web Front End
    • ❓FAQ & Resources
  • Data Dashboards & Open APIs
    • 📊Public Dashboards
    • ❓FAQ & Resources
  • Disclaimers
    • 📄Disclaimer
    • 🔓Privacy Policy
Powered by GitBook
On this page
  • V4 Architecture (High-Level)
  • Front-ends
  • Lifecycle of an Order
  1. Front End & Wallets

Architecture Overview

PreviousActive Validator SlackNextWeb Front End

Last updated 1 year ago

V4 Architecture (High-Level)

Front-ends

Web Application: The website has been developed using Javascript and React, facilitating interaction with the Indexer via an API for accessing off-chain orderbook data and enabling direct blockchain trade executions. The front-end codebase, along with the deployment scripts, will be made available as open-source, simplifying the process for anyone to deploy the dYdX front end on their own domain or hosting solution through IPFS/Cloudflare gateway.

Mobile Development: The iOS and Android applications have been created in native Swift and Kotlin, mirroring the web application's interaction with the Indexer and direct trade executions on the blockchain. These mobile applications will also be open-sourced, providing the opportunity for anyone to publish the mobile app on the App Store or Play Store. For App Store publication, the deployer must possess a developer account and a Bitrise account to complete the app submission process.

Lifecycle of an Order

  1. User places a trade on a decentralized front-end (e.g., website) or via API

  2. The order is routed to a validator. That validator gossips that transaction to other validators and full nodes to update their orderbooks with the new order.

  3. The consensus process picks one validator to be the proposer. The selected validator matches the order and adds it to its next proposed block.

  4. The proposed block continues through the consensus process.

    1. If ⅔ of validator nodes vote to confirm the block, then the block is committed and saved to the on-chain databases of all validators and full nodes.

    2. If the proposed block does not successfully hit the ⅔ threshold, then the block is rejected.

  5. After the block is committed, the updated on-chain (and off-chain) data is streamed from full nodes to Indexers. The Indexer then makes this data available via API and Websockets back to the front end and/or any other outside services querying for this data.

📚