dYdX logo
dYdX logodYdX icon
English
中文
日本語
한국어
русский
Türkçe
Français
Português
Español

Announcing dYdX Chain

Product
Product
v4-full-decentralization
Product
Product

dYdX v4 - The dYdX Chain

tldr;

🔗 dYdX v4 will be developed as a standalone open-source blockchain software based on the Cosmos SDK and Tendermint Proof-of-stake consensus protocol (“dYdX Chain”)

🚀 dYdX v4 will feature a fully decentralized, off-chain, orderbook and matching engine capable of scaling to orders of magnitude more throughput than any blockchain can support

We’re excited to announce that dYdX v4 will be developed as a standalone blockchain based on Tendermint consensus and built using Cosmos SDK!

dYdX v4 marks the full decentralization of the dYdX protocol, and we’re excited about the unique combination of decentralization, scalability, and customizability that Cosmos offers.

What is Cosmos?

Cosmos is a technology that makes it relatively easy to create a standalone blockchain with strong cross-chain capabilities. Cosmos chains are based on the Tendermint proof-of-stake consensus system. Cosmos offers high throughput, decentralization, and customizability. Each Cosmos chain traditionally has its own validators and Layer 1 staking token.

Why a standalone Cosmos blockchain?

At dYdX we embrace radical changes in technology that have the potential to dramatically improve the protocol. After exploring the landscape of current and upcoming blockchain technologies, we decided that Cosmos would allow us to build the best fully decentralized protocol.

The main requirement for the v4 protocol is full decentralization. The decentralization of a system is equal to the decentralization of its least decentralized component. This means that every part of v4 needs to be decentralized while also remaining performant.

Off-chain, decentralized, orderbook + matching

The fundamental problem with every L1 or L2 we could develop on is that none can handle even close to the throughput needed to run a first class orderbook and matching engine. For reference, the existing dYdX product processes about 10 trades per second and 1,000 order places/cancellations per second, with the goal to scale up orders of magnitude higher.

We considered pivoting to developing another trading model, such as an AMM or RFQ system, but ultimately decided that an orderbook based protocol was critical to the trading experience pro traders and institutions demand. We also were not satisfied with existing off-chain orderbook systems that either did not include matching (huge problems with frontrunning and trade collisions) or were based on centralized matching (there can be no central systems in dYdX v4). This left us with the realization that we needed to build a decentralized off-chain network to run the orderbook.

This is where Cosmos comes in. A massive benefit of developing a blockchain dedicated to dYdX v4 is that it offers full customizability over how the blockchain itself works, as well as the jobs that validators perform.

In dYdX v4, each validator will run an in-memory orderbook that is never committed to consensus (i.e., off-chain). Orders placed and cancellations will be propagated through the network similar to normal blockchain transactions, ensuring that orders placed and cancellations will always make their way through the network. The orderbook that each validator stores is eventually consistent with one another. On a real time basis, orders will be matched together by the network. The resulting trades are then committed on-chain each block. 

This allows dYdX v4 to have extremely high throughput for the orderbook (which remember requires 100x the throughput of trades!) while remaining decentralized.

No trading gas fees

As mentioned, a major benefit of Cosmos is that the chain can be developed to suit the exact needs of the dYdX Chain. One application of this is that traders would not pay gas fees to trade, but rather pay fees based on trades executed similar to dYdX v3 and centralized exchanges. These fees would accrue to validators and their stakers.

Ideal platform to build on

dYdX v4 is a fully sovereign open-source blockchain software, meaning the chain (if deployed) is not reliant on any external blockchain or system. This could be a great platform for the dYdX community to continue to build in a vertically integrated way with the protocol token holders fully controlling the system. The dYdX community could control every aspect of the stack and can build the best possible product experience.

DYDX

The v4 protocol is designed with a need for a layer 1 protocol token. This protocol token will be used for staking to validators, as well as ongoing governance of the chain.

What are we building?

All dYdX v4 code will be open source. Everything will run on permissionless networks, and no services will be run by dYdX Trading Inc.

Our goal is to build open source code that can power a first class product and trading experience. There are a few major technical components of this:

Core node

The core node is the core software that validators and node providers will run. This is built on top of the Cosmos SDK - the standard framework for building Tendermint blockchains. The core node will run: consensus, off-chain orderbook & matching, all transaction types (deposit, transfer, withdraw, etc), price oracles, and other core systems.

Indexer

The indexer is open source software that powers the APIs and websockets, which would serve web, mobile, and programmatic traders. The indexer would take the data that exists on the core blockchain and store it in a much more efficient format, allowing dYdX v4 to serve performant REST & WebSocket APIs. The indexer software could also be run by a distributed network, ensuring that the data will always be available to traders.

Clients

TypeScript and potentially other language clients to simplify interacting with the network. Clients connect to both indexers and core nodes, and could be used by programmatic traders as well as the website.

Web App

A full-featured, open source version of the dYdX web front end.

Mobile apps

iOS and Android mobile apps for dYdX v4. We’re still researching the best way to develop these for them to be available in an open source, decentralized way. If you have ideas, we’d love to hear from you!

Thinking 10x bigger

One of dYdX’s core values is to think 10x bigger. dYdX should focus on what it could achieve, rather than protecting what has been built so far.

Our goal is to see dYdX open-source software power one of the largest exchanges in all of crypto. We realize this is an extremely difficult and ambitious goal, but believe dYdX should make choices to maximize the chance of achieving that goal, rather than settling for a lower definition of success.

We were not satisfied with any of the existing approaches to developing open-source software for a fully decentralized exchange. While we have confidence we could develop open-source software to power a leading protocol using any of these tested approaches, we did not believe they could support an experience that would get us close to seeing the goal be achieved.

Developing software for a decentralized, off-chain orderbook and matching engine and moving from Ethereum to developing an open-sourced dYdX-specific chain software to power a major DeFi protocol is very much untested, but we believe this gives dYdX the best shot at developing software that could offer a long term competitive product experience with centralized exchanges. There is a huge amount to develop and many question marks, but we are excited for dYdX to continue to be leaders in adopting new technologies that give the opportunity to develop the best possible product experience.

We’re excited about the opportunity of what can be built, and the chance to ultimately hit our goal.

Our next year

We’re still planning to open source dYdX v4 by the end of 2022. dYdX v4 represents a large and critical improvement to the dYdX protocol, so will require months of heads down development. We are excited to continue to release more information about dYdX v4 over the next year.

In the meantime:

If you’re excited about helping us build the future of DeFi with dYdX v4, check out our open roles!

FAQs

Isn’t bridging assets across chains a challenge? Will this limit the number of markets available to trade on dYdX?

Yes, bridging assets across blockchains has proved to be challenging. Most existing bridges suffer issues with user experience and/or security. One benefit of dYdX focusing on synthetic trading is that only one collateral asset (e.g. a stablecoin) must exist to enable synthetic trading of any asset.

The top priorities (ordered) are to support the best experience for:

  1. Transfers from/to CEXs

  2. Transfers from/to Ethereum

  3. Transfers from/to other chains / rollups

Cosmos also supports IBC, a protocol for decentralized and secure bridging of assets between two IBC (cosmos) enabled chains. This means that dYdX v4 only needs one stablecoin to exist on any secure Cosmos chain, which can then be easily bridged to the dYdX Chain using IBC.

We’re in conversations with several bridges and stablecoins to build the best collateral and deposit/withdrawal experience for the dYdX Chain.

Will multi-collateral be supported?

Yes, though probably not at the initial release of the open source software. We’re focused on developing the best experience for the main collateral asset.

I thought Ethereum & Ethereum based L2s are more decentralized than Cosmos. Do you not care about decentralization?

We do care about decentralization! It’s the entire purpose of dYdX v4. We believe the dYdX Chain to be the best and most decentralized possible option for the dYdX protocol.

The goal for v4 is to enable the *entire product* maximally decentralized and performant. The decentralization of a system is defined by its least decentralized component.

Ethereum L1 likely is more decentralized than Cosmos (at least for the time being), but not even close to performant enough to power a decentralized exchange. Ethereum based L2s have two issues: both they are not close to performant enough to power a decentralized exchange (see “Off-chain, decentralized, orderbook + matching”), and also currently they operate through central sequencers* which have the ability to censor transactions**.

* There are solid plans for many L2s to decentralize their sequencer network, but likely they would only be decentralized to a point more comparable to what could be achieved with the dYdX Chain than to Ethereum L1. ** Censorship normally can be avoided by bypassing the sequencer and going directly to L1, but this does not satisfy the entire product experience being decentralized because L1 is way too expensive/slow to power the core product experience.

So is Cosmos better than Starknet, Solana, Optimism, and everything else?

No, not in all cases!

Developing our own Cosmos based open-source chain software just happened to be the best fit based on the unique product trade offs for dYdX and the mission to build the best professional trading product experience.

While we are thrilled for dYdX to be a leader in the Cosmos ecosystem, we continue to be excited about what could be possible in the future with other chains or L2s! We will continue to keep an open mind about always building on the best technology at each given time.

Terms

This post is subject to the dYdX Terms of Use. The dYdX interface and products are not available to persons or entities who reside in, are located in, are incorporated in, or have registered offices in the United States or Canada ("Blocked Persons"), or other Restricted Persons (as defined in the dYdX Terms of Use).  dYdX products and services are not intended for, and should not be used by, Blocked Persons or Restricted Persons. Terms of Use specific to v4 software can be found here.