dYdX

“Trades are submitted on-chain in ZK-Rollups, reducing the amount of gas required per-trade. We are able to pass on those savings to traders in the form of reduced trading fees across the board.”

Antonio Juliano

Co-Founder & CEO

To provide the best user experience for traders, we have decided to transition to Layer 2. Traders can expect significantly lower gas costs, and in turn, lower trading fees and minimum trade sizes. We remain committed to our mission of building open, secure, and powerful financial products.

Our engineering teams are collaborating on a Layer 2 scaling solution for Perpetual Contracts, based on StarkWare’s StarkEx scalability engine and dYdX’s Perpetual smart contracts. Our Perpetual Contracts will be powered by StarkEx starting in February 2021.

StarkWare is developing software to dramatically improve blockchain scalability by allowing any type of computation to move off-chain, using the Ethereum blockchain as a public immutable commitment layer. StarkWare’s dYdX integration combines STARK proofs for data integrity with on-chain data availability to ensure a fully non-custodial protocol.

We wanted something that could be on Mainnet within the next few months, not within some undefined timeline. So for that reason, we ruled out things like ETH 2 and Optimism which had not yet been on Mainnet. StarkWare was already running spot-trading exchanges in-production. StarkWare also has a stellar reputation in the industry in terms of security and expertise. Our Perpetual Contracts will be powered by StarkEx starting in February 2021.

Integration with StarkEx and New Abilities

Significantly Reduced Gas & Trading Fees
Trades are submitted on-chain in ZK-Rollups, reducing the amount of gas required per-trade. We are able to pass on those savings to traders in the form of reduced trading fees across the board.

Reduced Minimum Trade Sizes
Since there are smaller fees per-trade, we are able to offer smaller trade sizes, allowing traders to try out dYdX by starting with a smaller amount of capital.

Cross-Margin
Traders will be able to trade on multiple Perpetual Contracts using a single margin account, allowing for dramatically increased capital efficiency while trading multiple pairs.

More Trading Pairs
With cross margining and increased scalability, we will be able to launch many more trading pairs on dYdX. We will also be able to spin up new pairs faster, allowing traders to trade the tokens they want, when they want to.

Instant Trade Settlement
Trades are matched off-chain and held in batches until the zero-knowledge rollup and proof are submitted on-chain. This prevents front-running of trade settlement and allows for instantaneous balance updates without waiting for a transaction to be mined. Trading on dYdX will feel every bit as fast as trading on a centralized exchange.

More Performant Price Oracles
Prices are attested-to by oracles using STARK-compatible signatures, allowing prices to be used as soon as they are signed, rather than waiting for a transaction to be mined. This significantly increases the economic security of the system against flash crashes, and allows for real-time liquidations.

Higher Leverage & Lower Liquidation Penalties
Given the performance improvements of the oracles, we will be able to offer lower margin requirements, which means both higher maximum leverage as well as lower penalties when liquidated.

Cairo

The recently announced Cairo allows faster development and more flexibility in the types of things that are proven by Stark Proofs. This allows our more-novel code to run and for future changes to take place at a faster rate.

It also eventually means that we will be able to write our own programs to be verified by zero-knowledge proofs, opening up a huge amount of possibilities for new products and features without having to rely on Starkware’s engineers to write the code themselves.

"StarkWare has incredible expertise in the Zero-Knowledge space... StarkWare also has a stellar reputation in the industry in terms of security and expertise."​