Coinbase Logo

Language and region

Don’t invest unless you’re prepared to lose all the money you invest. This is a high-risk investment and you should not expect to be protected if something goes wrong. Take 2 mins to learn more

Guide to dYdX

November 1, 2023

Introduction to dYdX

dYdX is a decentralized exchange (DEX) that empowers users to efficiently trade perpetual contracts while maintaining complete control over their assets. Live since 2021, dYdX V3 implemented its exchange with a unique non-custodial layer-2 scaling solution, however, its orderbook and matching engine were centrally managed. Now, with dYdX V4, the protocol is evolving into its own chain and reworking the entire protocol to be fully decentralized while increasing throughput.

What is dYdX V4 solving?

The genesis of dYdX V4 signals a complete transition from a semi-decentralized protocol to a fully decentralized exchange. This transformation is not just an upgrade but a migration to a new foundation, the dYdX Chain, which is a standalone Cosmos blockchain.

Fully decentralized

V4 is the first instantiation of the dYdX exchange that is fully decentralized. This not only strengthens security and transparency of the network but also aligns with the broader ethos of decentralized finance (DeFi) by ensuring no single points of failure. V3, while fully non-custodial, operated as a hybrid protocol with certain aspects managed off-chain by the dYdX Trading team. With V4, every component from the order book to the front end is decentralized. 

Increased throughput

The dYdX V4 Chain can handle up to 2,000 transactions (or trades) per second, a remarkable achievement compared to swaps per second on other L1s. Increased throughput is vital for providing a better trading experience, especially if DeFi protocols are expected to compete with centralized exchanges.

Full stack control 

dYdX V4’s migration allows for tailored protocol development, enabling the dYdX community to implement specific features and adjustments to optimize the platform. For example, it allows the protocol to directly address issues related to Maximal Extractable Value (MEV) and to customize key properties, ensuring the platform remains competitive and responsive to evolving user needs.

Controlling the full stack extends beyond technical autonomy; it's about community empowerment. By having the ability to shape the protocol directly through governance, the community can steer development in a way that aligns with collective interests, fostering a more secure, efficient, and user-centric platform.

How does dYdX V4 work?

Order book and matching engine

dYdX V4 features a decentralized order book and matching engine. Orders are stored in-memory which means they are stored off-chain by validator nodes and not committed to consensus. Users submit orders, validators gossip orders to other validators and facilitate order matching as the proposer, and then propose new blocks with matched trades to the rest of the network.

This setup significantly improves throughput by handling orders off-chain while only transactions that alter the blockchain's state (e.g., a trade) are processed onchain. This design ensures the efficient use of blockspace.

Fee structure

Since orders are managed off-chain and do not immediately become transactions, dYdX V4 has no gas fees for submitting or canceling orders. Trading fees only apply when orders are matched and assets are exchanged. This structure is an ideal experience for heavy traders. For example, market makers who tend to update their orders frequently no longer need to consider the added transaction cost of managing their books on a DEX.

Trading fees are a percentage of the total order size. If a user submits an order to buy $10 worth of a particular asset and the trading fee is 0.1%, they will pay $0.01 in trading fees. The collected fees are distributed among the chain’s validators and stakers based on the validators’ commission rates and the stakers’ proportion of the chain’s overall stake. Notably, these trading fees are paid in the collateral asset, which as of now is USDC.

Markets and governance

dYdX V4 leverages Cosmos governance modules such that market listings, closings, and parameter updates are managed via governance proposals. This empowers the dYdX community to maintain market parameters in alignment with market trends and liquidity, including through a dedicated subDAO or specialized service providers.

Notably, dYdX governance has the authority to adjust the fee schedule. This process has dependencies and takes into account various factors including: market conditions, competitive fees on other exchanges, and the operational demands of validators. As an exchange, it’s important that fees are well structured and optimized, otherwise the protocol, its users, and its validators can suffer. 

Launch of dYdX V4

Transition from V3 on Ethereum

dYdX V3 was built as an L2 solution on Ethereum and the DYDX token was launched on Ethereum. A transition needs to occur now to facilitate the launch of dYdX V4. Considering V3’s success, achieving daily trading volumes of $1B+, this transition will be no small feat.

It's crucial to maintain the operability of dYdX V3 during the transition period to ensure a smooth migration process for users and assets. Governance proposals continue to play a role during this phase and ensure the protocol's evolution considers community input and maintains its secure, uninterrupted service for its users. When bridging tokens from Ethereum to dYdX Chain, in addition to receiving DYDX on the new chain, users will also receive a new token on Ethereum, wethDYDX, which allows them to continue governing dYdX V3.

A phased V4 launch

The rollout of dYdX V4 is strategically phased by the dYdX Trading team, ensuring stability and security at each step. The first stage post-genesis involves users bridging their tokens to dYdX Chain, spinning up validators, and staking to them. Once the network has a sufficient amount of stake operating across a stable set of validators, trading activity on V4 can be safely ramped up. This phased approach is critical to safeguarding user assets and trust in the platform.

Incentives to encourage the migration to V4 are manifested through mechanisms like airdrops, liquidity mining, and fee rebates designed to bootstrap user adoption and transition volume from V3 to V4 to ensure a successful launch

Expectations for V4

Expectations are high for a new chain that fully decentralizes the protocol while promising improvements in scalability and customizability. The community anticipates a more resilient platform, capable of higher transaction throughput and an enhanced user experience that removes operational hassles like gas fees on submitted or canceled orders.

Furthermore, the transition to a fully decentralized governance model places considerable responsibility on the dYdX community. The success of V4 relies on active participation, collaboration, and contribution from its members to steer the protocol forward.

The journey ahead is filled with opportunities for innovation, growth, and establishing a new benchmark for decentralized exchanges.

Participation in dYdX V4

Validators on dYdX Chain will operate similarly to other CometBFT, PoS protocols. Delegates can stake to any number of validators they choose, locking their tokens in the protocol to earn staking rewards.

At genesis, there is an active set of 60 validators. This means in order to participate in consensus and earn rewards for delegates, a validator must be one of the top 60 stake-weighted validators. At launch, slashing penalties are set to zero and there is a 30 day unbonding period for stake. Governance can change these parameters at any time in the future; current parameters can be checked directly.

Why Stake With Coinbase Cloud?

Choose a trusted partner with over a decade of experience serving custodians, exchanges, fintechs, dapps, self custody wallets, and liquid staking protocols with blockchain infrastructure solutions. Our tenure in the industry is a testament to the quality of our products and the prudent perspective we take in regards to risk management.

Coinbase Cloud is happy to support the growing ecosystem of protocols like dYdX and works closely with protocol communities to bring clients deep insights into each of our supported networks. Our reliable infrastructure provides enterprise-grade security and a 99% uptime guarantee, minimizing operational risk so that your assets continue to earn rewards.

Contact our team today to get started.

Disclaimer

This document and the information contained herein is not a recommendation or endorsement of any digital asset, protocol, network, or project. However, Coinbase may have, or may in the future have, a significant financial interest in, and may receive compensation for services related to one or more of the digital assets, protocols, networks, entities, projects, and/or ventures discussed herein. The risk of loss in cryptocurrency, including staking, can be substantial and nothing herein is intended to be a guarantee against the possibility of loss. Reward rates listed herein are estimates, are not guaranteed and are set by the protocol and remain subject to change. Actual rate of rewards earned may vary significantly and may be zero. This document and the content contained herein are based on information which is believed to be reliable and has been obtained from sources believed to be reliable, but Coinbase makes no representation or warranty, express, or implied, as to the fairness, accuracy, adequacy, reasonableness, or completeness of such information, and, without limiting the foregoing or anything else in this disclaimer, all information provided herein is subject to modification by the underlying protocol network. Any use of Coinbase’s services may be contingent on completion of Coinbase’s onboarding process and is Coinbase’s sole discretion, including entrance into applicable legal documentation and will be, at all times, subject to and governed by Coinbase’s policies, including without limitation, its terms of service and privacy policy, as may be amended from time to time.