What is dYdX Exchange and How Does It Work?

5.0 | by Regiena Regunathan

dYdX is a decentralized crypto exchange, suitable for advanced traders, offering services such as borrowing, lending, margin, and leverage trading. The platform operates through smart contracts on the Ethereum blockchain, and a Starkware Layer 2 scaling protocol, where users are free to trade directly on the exchange without intermediaries. 

dYdX operates on a hybrid, partially decentralized infrastructure. This means that any user can easily access and perform trades on the exchange, as long as he or she has access to the internet. 


All You Need To Know About Perpetual Trading On dYdX

Unlike a traditional futures contract where there is always a fixed period, a perpetual is a cryptocurrency exchange-traded contract that has no end date and allows you to purchase or sell a cryptocurrency at any time in the future. Perpetuals are designed to mimic closely the spot value of the base cryptocurrency. When a party agrees to end a contract, settlement takes place in the predetermined cryptocurrency.

On dYdX, Perpetual Contract Markets are offered on the StarkWare Layer 2 solution with up to 25x leverage on synthetic assets. 

(a) What is a Layer 2?

A Layer 2 solution is a network that operates on top of an underlying blockchain protocol. Most Layer 2 solutions were built to provide greater scalability for the underlying blockchain, where transactions are aggregated and “rolled up” onto a smart contract on the underlying protocol.

In the case of dYdX’s StarkWare Layer 2 solution, it was designed specifically to provide greater scalability for dYdX’s cross-margined perpetual contracts. Through this Layer 2 solution, dYdX claims to be able to provide significantly lower gas costs, and in turn, much lower trading fees and minimum trade sizes for users. 

dYdX perpetuals are settled within the Layer 2 network itself, and Zero-Knowledge Proofs are periodically published to an Ethereum smart contract to establish the validity of state changes inside the Layer 2 network.

However, dYdX is slightly different from other fully decentralized exchanges in the sense that it operates on a hybrid infrastructure. In addition to the StarkWare Layer 2 solution, it also utilizes a low-latency off-chain system in order to construct and maintain the order book. The off-chain logic handles trades, liquidations, transfers, and deleverages, as well as updating oracle prices. It also periodically submits proofs attesting to the validity of the change in balances, given the users’ transactions.

(b) Perpetuals On dYdX

Given the considerable market interest in DeFi from customers, dYdX is currently focused on perpetual contracts. These are the currently supported pairs on the site:






























(c) Perpetual Order Types

There are currently four order types on dYdX. 

  1. Market Order - An order to buy or sell a specific asset that will be executed at the current market price established by the order book at the moment the order is processed by the system.

  2. Limit Order - a purchase or sale order for a certain item at a specific price. A limit order to purchase will only take place if the price is lower than the limit, and a limit order to sell will only take place if the price is greater than the limit.

  3. Trailing Stop Order - a modification on the Standard Stop-Market Order. The stop price will adjust to follow the index price depending on your trailing percent if the index price changes in your favor.

  4. Take Profit Limit Order - when the profit price is achieved, a limit order is triggered.

  5. Stop Limit Order - this order will only take place when the index price bypass a certain stop price.

(d) Fees On Perpetuals

The maker-taker fee system is implemented on dYdX and there are two different orders:

  1. Maker orders are orders that do not fill right away and sit on the order book for a while.

  2. Taker orders cross current Maker orders and they deplete the order book's liquidity.


The calculation of taker fees depends on the total trading volume (USD) across all Perpetual order books during the preceding 30-day period. Users will not be charged a fee if they cancel an order. 


What is the dYdX token?

The dYdX token is the dYdX derivative platform's ERC20 governance token, which can be utilized in the governance process as well as for receiving discounts on trading fees. There is a maximum supply of 1,000,000,000 DYDX with a current circulating supply of 56,980,222.

There are two ways to earn dYdX tokens. The first one would be through staking USDC to a pool and being entitled to a daily reward. The staked USDC is used to contribute to dYdX’s liquidity and safety. The second way would be through trading rewards. By trading on the dYdX platform, users are able to earn a rebate in the form of dYdX tokens.



Is dYdX Exchange Legit?

Since dYdX is decentralized, users' cash is locked inside smart contracts rather than being kept by an exchange, making it safe from centralized counterparty risk.

While trading on dYdX, you always have complete control over your money. Your private keys are not held by any central middlemen. When your money is on dYdX, they are always protected by smart contracts.

In regards to being thorough with the security of their smart contracts, top security firms are called in to perform a thorough audit of their systems. The smart contracts for the perpetual protocol layer 2 are audited by Peck Shield, whereas smart contracts for the perpetual protocol layer 1 are audited by Zeppelin Solutions.

Since 2018, dYdX has reported that it has not received a bug report indicating that user money is in danger. Independent auditors have also to date not reported any substantial concerns. Thus far there have been no reported cases of users having lost money due to a security breach involving dYdX’s smart contracts.


Wrapping It Up

Developed by a team in San Francisco, this platform has successfully raised a couple of rounds of funding from the top investors of Silicon Valley. While the project used to offer other features such as margin trading and lending, it has pivoted to fully focus on perpetuals given the strong interest in DeFi.

More recently in September 2021, dYdX has logged certain trading days where it has exceeded USD 18.6 billion in transactions. This has put it on even footing with some of the largest exchanges in the world, whether trading crypto spot or futures. 

Curious to learn more about exchanges? Read this article to find out which type of crypto exchange is best for you.

Tell us how much you like this article!
Vote count: 1
Regiena Regunathan

Regiena Regunathan

Regiena is a banker, an avid reader, and part-time freelance writer, currently exploring the realm of blockchain technologies.

Related Articles

coingecko (thumbnail mini)
Continue in app
Track prices in real-time
Open App
coingecko (thumbnail mini)
Continue in app
Track prices in real-time
Open App