Scroll to view more →

Join the Layer 2 Alpha
Join the Layer 2 Alpha

We are extremely excited to announce that our new cross-margined Perpetuals are now live on Layer 2. This is a milestone for both dYdX and the broader Ethereum ecosystem. The launch follows seven months of development, which took us from theory to a world-class product experience on mainnet. We are also thrilled to launch a completely redesigned brand, homepage, and exchange – for more on that, read here.

To significantly scale trading, dYdX and StarkWare have built a Layer 2 protocol for cross-margined perpetuals, based on StarkWare’s StarkEx scalability engine and dYdX’s Perpetual smart contracts. Traders can now trade with zero gas costs, and in turn, lower trading fees and reduced minimum trade sizes.

What is Layer 2?

StarkWare zkSTARKS technology is a form of ZK-Rollup technology that significantly increases dYdX’s trade settlement capacity, while still basing its security on the underlying Ethereum blockchain. StarkWare’s dYdX integration combines STARK proofs for data integrity with on-chain data availability to ensure a fully non-custodial protocol. Trades are settled on a Layer 2 system, which publishes Zero-Knowledge Proofs periodically to an Ethereum smart contract in order to prove that state transitions within Layer 2 are valid.

With the transition to Layer 2, we’ve also built an entirely new product and trading system for cross-margined perpetuals from the ground up. The product features a vastly improved UI, truly instant trading, and all the advanced features & order types traders expect while trading perpetuals.

Today, we are launching a closed alpha on mainnet for users, liquidity providers, and strategic partners with limited deposits. A full production launch will be available in a few weeks, once the stability of the system has been thoroughly tested.

You can sign up for the alpha here and will be notified when you can access the alpha. Developers can review our latest API documentation here here and audited smart contracts here.

Perpetuals trading on dYdX is not available in the United States.

Why is dYdX moving to Layer 2?

Ethereum can process around 15 transactions per second (TPS), which is not enough to support the hypergrowth of DeFi. Over the past few months, our traders have experienced extremely high fees due to gas costs on Ethereum. With Layer 2, dYdX trading fees will now be in line with what traders are used to from centralized exchanges.

It’s not all just about fees. With Starkware’s Layer 2, dYdX now offers significant improvements to the trading experience over anything else DeFi has seen thus far.

What does Layer 2 mean for our traders?

Significantly Lower Fees

Due to the significant improvement in scalability that Layer 2 offers, we can pass on the savings to traders in the form of reduced trading fees across the board. Most importantly, users no longer have to pay gas fees while trading!

Our latest Perpetuals fee schedule for Layer 2 can be found here.

Reduced Minimum Trade Sizes

Because it’s now much cheaper to execute trades, we have decreased minimum trade sizes, allowing traders to trade on dYdX with less capital. Our minimum trade sizes can be found here.


Traders can trade on multiple Perpetual Contract markets using a single margin account, allowing for dramatically increased capital efficiency while trading multiple pairs, and a much simpler trading experience. Traders can now simply deposit any asset, which is converted to USDC collateral, and then trade all of the markets dYdX offers in that same account. More details on cross-margining can be found here.

More Trading Pairs

With cross margining and increased scalability, we can launch many more markets on dYdX. During the alpha launch, we will support Perpetuals for BTC-USD, ETH-USD, and LINK-USD, with many more pairs coming soon. We plan to launch 30-50 new Perpetual Contracts over the course of 2021. We are focused on listing DeFi tokens, as well as the most traded cryptocurrency pairs by volume. For a full list of supported Perpetual markets, please visit this link.

Instant Trade Settlement

With Layer 2 + dYdX’s off-chain matching, trades are executed instantly. Trading on dYdX now feels every bit as fast as trading on a centralized exchange.

Faster Price Oracles

Prices are verified by oracles using STARK-compatible signatures, allowing prices to be used by smart contracts as soon as they are signed, rather than waiting for a transaction to be mined. This significantly reduces the latency of oracle price updates from minutes on Ethereum’s Layer 1 chain to fractions of a second on StarkWare’s Layer 2 networks.

For the Alpha launch, we’re using Chainlink’s industry-leading oracle network to power secure price feeds for Layer 2. Chainlink has integrated with Starkware to extend the Chainlink Network’s hyper-reliable oracle functions to high-performance Layer 2 solutions. In a short time, other oracle providers such as MakerDAO may be used for some markets.

Higher Leverage & Lower Liquidation Penalties

Because of the performance improvement in price oracles, liquidations now occur much more quickly & safely. This means we can now offer both higher maximum leverage as well as lower penalties when liquidated. Users can now trade with higher leverage – up to 25× – on dYdX on certain Perpetuals markets. More details on maximum leverage can be found here.

Greater Privacy

With ZK-Rollups, not all transaction details are published on-chain, but rather just the balance changes. Therefore, privacy is greatly enhanced as traders do not need to worry about proprietary trading strategies being replicated or trading activity being monitored.

Why did dYdX pick StarkWare as a Layer 2 solution for cross-margined Perpetuals?

In order to address immediate scaling issues, dYdX's engineering team did extensive due diligence on various Layer 2 solutions and other Layer 1s.

Overall, StarkWare was able to provide by far the best trading experience for our users in the shortest amount of time.

Other Layer 1s do not yet have the collateral base and building blocks such as wallets and developer tools that have made Ethereum successful. While other Layer 2 solutions, such as optimistic rollups, are potentially promising, they are not as battle tested, don’t offer quite the same product experience (very long withdrawal times), and cannot offer the same level of decentralization & cryptographic guarantees as ZK-Rollups.

Ultimately, we wanted a solution that could be live on mainnet within months, rather than an undefined period of time. StarkWare has already been running spot-trading exchanges in production, and has a stellar reputation in the industry around security and expertise.

Who is StarkWare?

StarkWare develops software to improve blockchain scalability by allowing any type of computation to move off-chain, using the Ethereum blockchain as a public immutable commitment layer. Focusing on scalability, StarkWare has the fastest in-class technology for asserting computational integrity via succinct, transparent, and post-quantum-secure proofs.

How do ZK-Rollups work?

ZK-Rollups are a type of Layer 2 scaling solution which bundle or “rollup” transactions into a single batch, which is then posted to the Ethereum blockchain alongside a proof attesting to the validity of the bundled transactions. Further, ZK-Rollups allow user balance data on Layer 2 to be available on Layer 1, allowing anyone to validate the state. Scalability benefits in rollups come from moving the expensive computational work off-chain, and only verifying the proof attesting to the validity of the state transition on-chain.

ZK-Rollups offer high throughput, instant finality (no danger of trade rollbacks), self-custody, and privacy, and are therefore well suited to the high-value exchange use case. Further, in the event the dYdX servers becomes unresponsive, all the data needed to reclaim user's funds on an escape event is right there on the Ethereum blockchain - there are no additional trust assumptions.

How will the migration work for dYdX Perpetual positions on Layer 1?

After the public launch of Layer 2, our Layer 1 Perpetuals will continue to run in parallel with our Layer 2. After a few weeks, Layer 1 Perpetuals will be wound down, and users will need to close their positions on Layer 1 and then open new positions on Layer 2.

dYdX is a leading decentralized exchange built by developers on a mission to build open, secure, and powerful financial products. dYdX runs on audited smart contracts on Ethereum, which eliminates the need to trust a central exchange while trading. We combine the security and transparency of a decentralized exchange, with the speed and usability of a centralized exchange.