
A Ten-Thousand-Word Analysis of dYdX's Development History: Why Abandoning L2, Determined to Build Its Own L1?
TechFlow Selected TechFlow Selected

A Ten-Thousand-Word Analysis of dYdX's Development History: Why Abandoning L2, Determined to Build Its Own L1?
From the brink of bankruptcy to DeFi leader, dYdX's story may be an excellent reference for every struggling project.
Author: Steve, Four Pillars
Translated by: Odaily Planet Daily Azuma
This article was supported by research funding from the dYdX Foundation. I would like to express my gratitude to the dYdX Foundation.
Introduction and Background
1.1 Purpose of This Article: Why Study dYdX?
Many people consider dYdX one of the most successful decentralized exchanges (DEXs), which is indeed true. However, from a researcher’s perspective, dYdX stands out for two main reasons:
First, it demonstrates in practice that building Rollups is not the only viable path in today's blockchain industry;
Second, it offers a significant case study in the ongoing debate about whether infrastructure or applications are more important.
We will explore these points in detail.
1.1.1 A Direct Challenge to Rollup Maximalism
The blockchain industry in 2023 can be described as the "Rollup era," with numerous Rollup solutions emerging rapidly. After Terra’s collapse (once a strong competitor to Ethereum) and Solana’s setback due to the FTX crisis, many believe “Ethereum has already won.” As a result, many projects have stopped developing their own Layer 1 blockchains and instead chosen to become Rollups on Ethereum—aiming to maintain some autonomy while leveraging Ethereum’s security.
However, this does not mark the end of Layer 1. Derivative projects from Meta’s Diem blockchain have introduced new concepts in areas such as consensus mechanisms (e.g., Bullshark, Narwhal). Notably, some projects started as Rollups but later evolved into independent Layer 1 chains. Particularly intriguing is why a project that achieved success on Layer 2 would abandon its achievements to launch its own chain. dYdX is exactly such a case, directly challenging so-called “Rollup maximalism.” Originally not a Layer 1, dYdX gained popularity as a Layer 2 project. Its transformation into an independent Layer 1 raises questions about whether Rollups are truly the universal solution to all scalability problems.
1.1.2 A Prominent Case in Infrastructure vs Application Debate
Secondly, dYdX provides a crucial example in the debate between infrastructure and application primacy. As discussed later, as dYdX advanced its infrastructure, its product quality also improved significantly. Essentially, the idea that “robust infrastructure is essential for product development” is concretely demonstrated through dYdX’s journey. Through two major infrastructure upgrades, the platform greatly enhanced its scalability and user-friendliness. Thus, in this debate, dYdX serves as tangible evidence supporting the importance of infrastructure.
1.1.3 Let’s Dive Into dYdX
Beyond the above reasons, dYdX is an exceptionally compelling project in many ways. It previously migrated from Ethereum’s mainnet to Layer 2 and unexpectedly faced a survival crisis during the DeFi boom. The challenges dYdX encountered and how it overcame them are both astonishing and provide valuable lessons for those building on-chain products.
Therefore, this article aims to provide an overview of dYdX’s history and explain in detail why it launched its own blockchain. I will compare the original and new versions of dYdX and ultimately discuss what its evolution means for the broader industry. This analysis should serve as a useful reference for anyone considering launching or transforming a product in this space.
1.2 Understanding Perpetual Contracts Protocols
First, dYdX is a decentralized exchange (DEX) focused on derivatives trading, particularly perpetual futures contracts, although it initially offered margin trading and options. To understand dYdX, we must first grasp cryptocurrency perpetual contracts. Unlike centralized exchanges where a central entity handles transactions, DEXs use blockchain and smart contracts to manage trades in a decentralized manner. Perpetual futures are similar to regular futures contracts—agreements to trade an asset at a predetermined price—but they have no expiration date, allowing traders to hold positions indefinitely.
Thus, as a DEX handling perpetual futures involving crypto assets, dYdX operates quite differently from traditional exchanges, using blockchain and smart contracts to facilitate trading in a highly decentralized environment.
Now that we have a basic understanding of decentralized perpetual futures exchanges, let’s delve deeper into dYdX and its evolution.
1.3 A Brief History of dYdX: From CEX to DEX
dYdX’s founder, Antonio Juliano, had extensive experience in the blockchain industry before founding the project. His crypto/blockchain career began at Coinbase—one of the world’s largest cryptocurrency exchanges. Working at Coinbase gave Antonio deep exposure to blockchain and cryptocurrencies, undoubtedly laying the foundation for his vision of dYdX. When he conceived dYdX, margin trading was gaining traction in the crypto space, with many investors employing leveraged strategies. Antonio envisioned enabling these leveraged trading strategies on the blockchain—a vision that eventually became dYdX.
dYdX then raised around $2 million in funding, reaching a $10 million valuation backed by prominent firms like a16z and Polychain. The project gradually developed and began showcasing its product to the world.
At that time, dYdX was vastly different from what it is today. It wasn’t built on Layer 2 (surprisingly, it was initially deployed on Ethereum’s mainnet) and lacked its own trading system (it relied on third-party DEXs). Moreover, it didn’t support perpetual futures at launch. So how did the dYdX we know today come into being?
1.3.1 Gas, Gas, Gas! The DeFi Summer “Catastrophe”

To understand why dYdX chose to transition from Ethereum’s mainnet to Layer 2, we need to revisit events prior to 2020. Contrary to popular belief, dYdX was then one of the highest-volume decentralized trading platforms, accounting for roughly half of all DEX trading volume. However, everything changed during the so-called DeFi Summer, triggered by Compound launching its governance token COMP and introducing liquidity mining.
During DeFi Summer, DeFi tokens surged explosively (many were arbitrarily created to incentivize liquidity without real underlying value). New DeFi tokens emerged rapidly and could be freely traded on Uniswap, leading many traders to shift there. This shift caused dYdX’s trading volume to plummet from 50% to a negligible 0.5%.
DeFi Summer brought more than just market share challenges. Ethereum’s gas fees skyrocketed, nearly destroying dYdX, which had been subsidizing users’ gas costs to improve UX. Before DeFi Summer, low gas fees could be covered by dYdX’s transaction revenue. But when gas fees increased 100–1000x, dYdX suffered severe financial losses. They implemented measures like setting minimum trade sizes (e.g., $10,000), but ultimately had to introduce gas-reflective trading fees, resulting in high cost barriers (often exceeding $100 per trade).
Ironically, just as DeFi reached peak popularity, dYdX faced its toughest challenge. Little known is that dYdX was on the brink of bankruptcy. With limited funds and existing investors unwilling to inject more capital, the company faced a serious financial crisis. It also struggled to communicate its differentiation in the market. Interestingly, the now-defunct Three Arrows Capital was among the entities funding dYdX at the time.
Ultimately, to escape this unstable situation, dYdX decided on a fundamental change—leaving Ethereum’s mainnet. This transition led to the familiar dYdX—a decentralized derivatives exchange built on Starkware’s STARK-powered scalability engine, StarkEx.
dYdX Meets Starkware—A Turning Point!
2.1 Why Choose Layer 2?
dYdX’s adoption of a Layer 2 solution was not only a strategic move after losing ground to Uniswap but, more importantly, a necessary response to unsustainable transaction fees on Ethereum. Layer 2 offered a viable alternative—capable of handling dYdX’s transaction throughput while drastically reducing fees.
At the time, Ethereum’s Layer 2 solutions—especially Starkware (StarkEx)—were designed precisely to address the migration of services off Ethereum’s mainnet. By leveraging Ethereum’s security while offering massive scalability, Starkware became the ideal choice for dYdX. This scalability also allowed dYdX to experiment with product innovations, significantly advancing the platform. I believe dYdX’s strategic transition and subsequent product upgrades represent a prime example in the “infrastructure-first vs application-first” debate.
As I’ll explain later, dYdX’s core functionality heavily depended on Starkware. With the Layer 2 solution, dYdX entered a new phase of prosperity. Let’s examine dYdX’s performance post-migration to Layer 2.
2.2 Why Starkware (StarkEx)?
When dYdX selected Starkware, questions arose—why choose it among the many Layer 2 options? If Starkware lacked distinct advantages, dYdX wouldn’t have specifically picked it. So how does Starkware differ from other Rollup solutions, especially other zero-knowledge (ZK) approaches?
First, Starkware as a Layer 2 solution is particularly well-suited for applications requiring rapid processing of large transaction volumes, like dYdX. While batching transactions isn’t unique to Starkware—other ZK solutions do this too—its real advantage lies in supporting a wider variety of transaction types. Although technologies like zkEVM have matured recently, when dYdX began exploring Layer 2, most ZK solutions were optimized only for simple operations (e.g., token transfers). dYdX needed a solution that could batch transactions and support custom smart contracts—requirements met by Starkware’s StarkEx at the time. Although Starkware doesn’t support EVM—requiring developers to learn its native language, Cairo—this seemed a surmountable hurdle for dYdX.
Additionally, according to Antonio Juliano, Starkware offered the most seamless integration for Ethereum-based applications and was fully product-ready at launch.
2.3 dYdX Post-Starkware: Growth Upon Growth
Leveraging Starkware’s architecture, dYdX introduced cross-margin functionality—allowing multiple positions under a single margin account—and combined with vastly improved scalability, attracted increasing liquidity. As dYdX added more assets, it drew in more traders. Powered by its new engine, dYdX’s trading volume grew fivefold, achieving a massive leap forward.
2.3.1 DYDX Launches, Solidifying Strategic Position
In summer 2021, the dYdX Foundation partnered with StarkEx to launch the DYDX token, further cementing its market position. As dYdX’s governance token, DYDX enables community-driven autonomous operation and encourages active user participation. Although growth was evident post-Layer 2 migration, the token launch marked a critical step toward consolidation. Let’s examine the DYDX token distribution.

DYDX’s distribution differs from others, especially in retroactive mining, trading incentives, and liquidity incentives. Let’s explore each.
-
Retroactive Mining
Since dYdX hadn’t issued a token before, rewarding only new users upon launch could alienate long-term users, potentially causing churn. To balance this, dYdX introduced “retroactive mining”—rewarding users who had previously traded on the platform. Users qualified if they’d deposited and completed at least one trade. However, eligibility wasn’t automatic; users also had to continue trading on the new Layer 2 dYdX and meet certain thresholds. This rewarded loyal users while incentivizing continued use of the new platform. About 5% of total supply was allocated this way.
-
Trading Incentives
Trading incentives reward users who trade on Layer 2 dYdX, allocating approximately 20% of total supply. Rewards are calculated based on fees paid during trades, with details available in dYdX’s official documentation.
-
Liquidity Incentives
Liquidity incentives complement trading rewards, providing token bonuses to liquidity providers—similar to other DeFi projects. This aims to improve bid-ask liquidity, distributing about 5.2% of total supply. Specific allocation mechanisms are detailed in dYdX’s documentation.
-
Impact of the DYDX Token
The DYDX token launch was highly effective. Daily trading volume for dYdX’s Layer 2 perpetuals started at $30 million but surged to around $2 billion after the token launch—an extraordinary growth curve. This highlights the powerful impact of token issuance.
2.4 Constraints of Layer 2 Begin to Surface
In summary, dYdX’s strategic shift to Layer 2 achieved major success. The migration not only saved the product but helped it become a standout project in the market. With the token launch, dYdX solidified its unique position among DEXs.
However, upon deeper reflection, dYdX’s founder Antonio Juliano identified another issue: “If we can never achieve full decentralization, what’s our advantage over Binance and FTX? Where can we outperform them tenfold? Frankly, I didn’t have a clear answer at the time.”
Despite its Layer 2 success, dYdX still faced uncertainties. First, it wasn’t fully decentralized—the Layer 2 version operated as a hybrid DEX, with its order book and matching engine running centrally. Second, despite improved scalability, dYdX needed to handle even more transactions to grow further (showing infrastructure remains key). Third, dYdX required infrastructure tailored specifically to its product. While Layer 2 offered some customization, dYdX needed deeper alignment across every aspect of development. Relying on existing networks as Layer 2 solutions was no longer ideal.
To evolve into a better product, dYdX needed not only higher throughput but also a stronger commitment to decentralization and features aligned with a true DEX. Hence, dYdX decided to change its blockchain architecture once again.
V4 Arrives: dYdX Becomes a Layer 1
3.1 Why Launch a Standalone Chain? The Path to Full Decentralization
As mentioned, Antonio Juliano constantly questioned how dYdX could differentiate itself from centralized exchanges (CEXs). Could full decentralization be its unique selling point? Among the many reasons for launching its own chain, dYdX repeatedly emphasized one core goal: “achieving full decentralization.”
Ethereum proponents might question how leaving Ethereum—the most decentralized Layer 1—for a dedicated chain enhances decentralization. However, since dYdX wasn’t processing all operations on-chain, Ethereum’s decentralization benefits were less relevant. Perhaps Ethereum supporters and dYdX define decentralization differently.
dYdX doesn’t merely seek partial use of a decentralized network—it wants every aspect of its product handled in a fully decentralized manner, which inevitably requires launching its own blockchain. Simply running on the most decentralized network doesn’t guarantee a fully decentralized product.
By launching its own chain, dYdX now manages all operations—including the order book—decentrally. dYdX Trading, the operating entity, no longer participates in any aspect of the dYdX blockchain.
Another key factor is scalability. By launching its own chain, dYdX solved its longstanding scalability issues while achieving full decentralization. While Layer 1 processed around 100 transactions per second, its standalone blockchain now handles ~2,000 TPS—a 20x improvement. Such a leap may impact dYdX’s product as profoundly as its earlier shift from Ethereum mainnet to Layer 2. Going forward, dYdX is likely to offer users worldwide a faster, more user-friendly trading experience.
3.2 Why Cosmos?
In migrating to a dedicated chain, dYdX chose Cosmos SDK as its blockchain framework. Just as it previously used Starkware’s StarkEx, dYdX preferred using a mature, battle-tested framework that could be customized rather than building from scratch. Thus, it adopted Cosmos SDK—one of the most widely used blockchain development toolkits.
Why specifically Cosmos SDK? While dYdX hasn’t detailed its reasoning, industry consensus suggests the flexibility of Cosmos SDK (many protocols customize it) and the robust ecosystem built around Cosmos were key factors. Indeed, after launching its chain, dYdX immediately partnered with Noble—a Cosmos-based chain—to enable seamless USDC migration. Leveraging Cosmos’ Inter-Blockchain Communication (IBC) protocol for smooth cross-chain data flow is a major advantage for dYdX.
3.3 Architecture Deep Dive
dYdX’s base architecture is built on Cosmos SDK, similar to other Cosmos-based blockchains. However, there are differences—such as the presence of indexers and frontend components—and dYdX validators carry more responsibilities than standard Cosmos validators. Let’s examine these distinctions.

3.3.1 Validators
Although built on Cosmos SDK, dYdX’s validator roles differ from typical Cosmos app-chains. Standard Cosmos validators mainly propagate transactions, validate blocks, and reach consensus. On dYdX, however, each validator must independently maintain an order book and store orders (not reflected at consensus level). Validators manage order books off-chain, meaning users incur no fees when placing or canceling orders.
Among all validators, the proposer node is responsible for proposing the next block’s contents. When users place orders, the proposer matches them and includes the results in the proposed block, participating in consensus.
Full nodes also play a vital role in dYdX, supporting indexer operations—critical for dYdX’s service (though full nodes are important in traditional blockchains too).
3.3.2 Indexer
As shown in the diagram, indexers read data from dYdX’s full nodes, store it, and deliver information to end users in a Web 2.0-compatible format. While the protocol could theoretically perform this role, dYdX’s validators and full nodes aren’t optimized for it, risking slow and inefficient processing. Excessive direct queries could also interfere with validators’ primary duty—participating in consensus. Hence, a dedicated indexer system is crucial.
Postgres, Redis, and Kafka on the right side of the diagram store on-chain data, off-chain data, and transmit data to indexer services, respectively.
3.3.3 Frontend
The frontend simplifies end-to-end application development. The JavaScript and React-based web frontend fetches order book data via API from the indexer and sends transaction data directly on-chain. dYdX has open-sourced its frontend code, allowing anyone to use its interface. The mobile app works similarly—interacting with indexers for data and recording transactions directly on-chain. It’s also open-source, enabling anyone to deploy and use it.
3.3.4 How Are Orders Processed?
Let’s see how orders on dYdX chain are collaboratively handled by the above components:
-
Users submit orders via API or frontend.
-
Orders are sent to a validator, which broadcasts the transaction to other validators and full nodes, updating their order books.
-
As with other Cosmos SDK chains, a proposer node is selected via consensus, matches orders, and adds them to the next block.
-
The proposed block enters consensus; if confirmed and voted by over two-thirds of validators, it’s recorded, committed, and stored on-chain (and on full nodes).
-
If the block fails to gain over two-thirds majority, it’s rejected.
-
Once committed, data is relayed to full nodes and indexers, which feed it back to the frontend via API and Websocket.
3.4 Changes in Token Utility
Clearly, launching a dedicated chain brings changes in token utility.
As previously noted, dYdX blockchain’s primary goal is “full decentralization.” Previously, dYdX governance was limited. Now, every aspect of the product is decided by DYDX token holders. Another major shift: previously, all revenue went to dYdX Trading; now, earnings are distributed to DYDX holders. This is expected to boost demand for the DYDX token—protocol growth generates more revenue, leading to higher return expectations, increasing the asset’s appeal, and ultimately driving market demand and value.
3.5 Governance Evolution
Governance on dYdX chain determines:
-
Adding or removing new assets;
-
Changing protocol parameters;
-
Updating lists of third-party price feed providers;
-
Adjusting fee rates;
-
Modifying trading reward mechanisms;
-
Tuning x/distribution module parameters (determining how Cosmos rewards are distributed);
-
Tuning x/staking module parameters (related to staking settings in Cosmos);
-
Changing funding rate calculation formulas;
-
Managing the insurance fund…
As noted, neither dYdX Trading nor the dYdX Foundation will initiate governance proposals or discussions. Decision-making power now rests entirely with DYDX token holders. This shift marks a key difference between dYdX chain and its predecessors. It also addresses Antonio Juliano’s earlier concern—how dYdX differentiates itself from CEXs.
Implications of dYdX’s Evolution
So far, we’ve explored dYdX’s journey from inception to launching its own dYdX chain. Since dYdX chain is only just starting, it’s too early to declare the project a success. Yet, dYdX’s trajectory over the past five years offers valuable insights.
4.1 Infrastructure Development Remains Crucial
dYdX’s product evolved through several stages: launching on Ethereum mainnet, transitioning to Layer 2, and finally launching its own chain. Despite continuous blockchain infrastructure evolution, dYdX’s journey shows that infrastructure progress profoundly impacts product quality. The fact that dYdX moved from Rollup to a standalone chain proves Rollups alone don’t fully solve scalability. Both Rollups and Layer 1s must keep evolving to become truly scalable “general-purpose blockchains.” Infrastructure building remains vital. I often liken infrastructure to the “boundary of imagination”—if scalability limits are considered upfront, products inherently start at a disadvantage compared to existing (centralized) services. While I don’t believe blockchains always need to compete, for those that do (like dYdX), infrastructure development is essential.
4.2 Rollups Are Not a Panacea
Given the surge of Rollups in the past year or two, we’re clearly in a “Rollup era.” Today, Rollups, “Rollup-as-a-Service” (RaaS), and Rollup SDKs are everywhere, and industry experts often recommend building products on Rollups. However, Rollups aren’t universal solutions. For dYdX, true decentralization was only achieved after launching its own chain—highlighting Layer 2 Rollup limitations. While some criticized dYdX’s chain launch as the “worst decision,” this article has shown it was a thoughtful, deliberate move—not hasty or irrational (and certainly not just to pump the token price).
Leveraging Ethereum’s security is indeed crucial for product legitimacy, but if Rollups can’t deliver truly decentralized services, that advantage may be limited. Some may prefer staying on Ethereum despite partial centralization, while others (like dYdX) prioritize full process decentralization. Ultimately, neither approach is universally “more decentralized”—the choice depends on product nature and personal preference. Remember: Rollups aren’t always the ideal solution.
4.3 Flexibility Is Critical
dYdX survived and thrived by making fundamental changes in response to market and industry shifts, becoming a leader in the DEX space. While many see dYdX as a successful product, looking back reveals it once teetered on the edge of bankruptcy. Yet, by flexibly adapting to changes, dYdX succeeded. Had it clung stubbornly to Ethereum mainnet, it might have faded into obscurity. The key lesson: the ability to continuously monitor market trends and adapt accordingly is crucial.
Thus, for those struggling in product development, dYdX offers a valuable case study. Sometimes, the problem isn’t the product itself—but the underlying infrastructure.
Conclusion: What Lies Ahead for dYdX?
Since dYdX chain has just launched and V4 trading is only beginning, it’s too early to judge its success as an independent blockchain. However, over the past five years, dYdX has built credibility among traders and consistently improved its product. I believe the dYdX brand holds substantial intrinsic value.
I maintain that many products still require independent Layer 1s. While many researchers now focus on Rollups and modular blockchains, I believe Layer 1s remain essential. While the Cosmos app-chain narrative doesn’t conflict with modular blockchains, dYdX’s emergence as an independent Layer 1 carries symbolic significance. Its independent evolution has become an important case I’m closely watching.
Therefore, the success or failure of dYdX chain matters deeply to me. Frankly, I hope it succeeds—because it would inspire and encourage more projects currently “trapped” in Rollups to launch their own independent chains.
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News














