Analysis

Why Would a dApp Leave Ethereum Right Now?

An In-depth look at dYdX’s flight to Cosmos — and what it means for Web3
Donovan Choy Donovan Choy Jun 27, 20227 min read
0
0
Why Would a dApp Leave Ethereum Right Now?

Dear Bankless Nation,

Last week saw one of Ethereum’s biggest L2-integrated dapps — derivatives giant dYdX — announcing plans to depart Ethereum upon its upcoming v4 release.

The destination? A fully sovereign blockchain on the Cosmos Tendermint consensus protocol, built using the Cosmos software development kit.

dYdX is a perpetual derivatives exchange, built on an Ethereum L2. dYdX offers standard spot and margin trading, but is most well known for its top position in a niche trading market known as perpetual swaps, a synthetic trading product that allows traders to make speculative bets on the future prices of anything from crypto and commodities and ETF indexes to government bonds.

To avoid high gas fees on the Ethereum mainnet, dYdX deployed in April 2021 as an app-specific rollup on StarkEx, a Layer-2 zero-knowledge rollup built by StarkWare.

So…what does this move mean for dYdX and Ethereum? Let’s review.

dYdX’s Reasons for leaving Ethereum

For those paying attention, dYdX’s departure shouldn’t come as a big surprise. Its founder Antonio Juliano hinted last November that the protocol was actively looking for elsewhere to deploy.

Unlike most DeFi DEXs that use the automated-market-maker (AMM) model, dYdX deploys a traditional order-book system that maintains pending transactions off-chain. This setup has worked well so far. But the protocol’s massive growth in recent months means it is soon charting into unfamiliar territory.

As stated on its official blog, the main motivation behind pivoting to Cosmos is to scale transaction speeds while maintaining decentralization:

“The fundamental problem with every L1 or L2 we could develop on is that none can handle even close to the throughput needed to run a first class orderbook and matching engine. For reference, the existing dYdX product processes about 10 trades per second and 1,000 order places/cancellations per second, with the goal to scale up orders of magnitude higher.”

At present, dYdX is slow, and no existing L2 gives dYdX even faster order book execution along with better fees. Additionally, its current StarkEx L2 setup forces them to operate a centralized orderbook instead of decentralizing that role to the validator network.

This is where Cosmos comes in.

Cosmos provides an SDK that allows developers to construct a sovereign blockchain with complete control over its validator set that will enable increased scalability to the order of magnitudes:

“In dYdX V4, each validator will run an in-memory orderbook that is never committed to consensus (i.e., off-chain). Orders placed and cancellations will be propagated through the network similar to normal blockchain transactions, ensuring that orders placed and cancellations will always make their way through the network. The orderbook that each validator stores is eventually consistent with one another.

On a real time basis, orders will be matched together by the network. The resulting trades are then committed on-chain each block.  This allows dYdX V4 to have extremely high throughput for the orderbook (which remember requires 100x the throughput of trades!) while remaining decentralized.”

⚠️ There are also other drawbacks of its current StarkEx setup.

dYdX’s current setup on StarkEx relies on a centralized sequencer — as is the case with all rollups presently (Starkware has hinted in a recent blog post as to its future plans to decentralize sequencers). Current standards for sequencers are efficient, but create a big centralization effect, as there is a single actor that can submit block batches onto the Ethereum mainnet. As such, a Cosmos setup with its own validator set would theoretically decentralize the protocol.

Finally, dYdX is also locked into its Starkware vendor, which prevents forks. This is unlike L2s like zkSync which are open source and freely forkable.

Cosmos removes these restrictions, while allowing dYdX to scale in a way that maintains some semblance of decentralization.


The tradeoffs ⚖️

Moving to Cosmos as a standalone Layer-1 chain comes with its own tradeoffs.

First, it requires setting up your own set of validators. This introduces massive costs for the dYdX protocol and creates new considerations upon dYdX tokenonomics.

Let’s take these in turn.

Unlike most chains on the Cosmos IBC that are set up within Cosmos’ signature hub-and-spoke model, dYdX’s plan is to set up as a standalone Layer-1 blockchain. This means it will not rely on the validators in the “hubs” of Cosmos IBC, but on the platform’s own centrally-designed, albeit intendedly decentralized validator sets.

This introduces important considerations of security from a user standpoint.

The greatest advantage of being deployed on a Layer-2 rollup like StarkEx is that it allows for improved scalability — relative to the Ethereum mainnet — while still relying on Ethereum’s robust security and avoiding the gargantuan costs of bootstrapping your own security.

Transaction security on dYdX was certain, as long as you trusted the underlying base chain of Ethereum. Now, users are required to trust an entirely new set of validators on the dYdX chain. How many validators will there be? What are the staking parameters? We don’t know yet.

On the future dYdX chain, users would pay for transactions with the $DYDX token rather than ETH. dYdX chain validators will also be paid in $DYDX, which fundamentally changes the nature of the dYdX token as it currently stands. This creates a security cost as some form of token emission to validators is required at the protocol’s expense.

It also brings the token economics of the $DYDX token into consideration. A quick look at its token economics finds at least a troubling 50% of its native token allocated to insiders.

This makes things a lot more complicated. Setting up as a new Layer 1 chain with its own validator set means the necessity of using cross-chain bridges for users onboarding the dYdX chain.

Vitalik wrote on the problems of these bridges but for the uninitiated, here’s the problem in a nutshell:

If your BTC is contained within the Bitcoin network, then it depends only on the Bitcoin network’s security validation. When BTC is wrapped, locked up, and transferred across different chains via cross-chain bridges, the security of your BTC is dependent not only on the original Bitcoin network but also on all other chains through which your BTC is traversing.

The security risks of bridging are well known, with many high profile bridging hacks in the past year:

This is of course not to say that a dYdX bridge will be insecure, but simply that it simply introduces new attack vectors as opposed to remaining within Ethereum.

In sum, the security of dYdX depends less on whether users trust the Ethereum chain, and more on whether you trust the operators of the new dYdX chain.

The familiar dynamic of the blockchain trilemma rears its head. dYdX was decentralized and secure on Ethereum/StarkEx, but lacking in scalability. The direction in which dYdX is headed sacrifices security in exchange for scalability.

Solving the Blockchain Trilemma: On Scaling Challenges and their Solutions  - The TIE Research

CYA4SEC: Cover your ass for the SEC

Is scalability the real reason?

This is where we enter the speculative territory. dYdX’s current transaction speed of ~10 TPS is still fairly far off from StarkNet’s maximum capacity of ~100,000 TPS. It’s not clear that transaction speed is the pressing concern.

There’s more to the story than mere scalability. Firstly, Starkware charges an undisclosed cost to users of its rollup technology. With dYdX’s spectacular growth over the past year, it is perhaps starting to make more economic sense to break off on its own.

Second, there’s notable speculation as to a legally-based impetus for dYdX moving chains. Thus far, dYdX has treaded extra carefully around American regulatory issues with its service notably unavailable to U.S. residents.

In a Forbes interview, Juliano openly stated that the protocol “has been in contact with the Commodity Futures Trading Commission and other government regulators” since early 2018 and that “multiple comment letters” have been submitted to regulators.

As an exchange processing billions of dollars in daily trading volume, it could be argued that the move towards its own chain creates better regulatory optics than its current setup that requires centralized sequencers on the StarkEx rollup posting data batches back to the Ethereum mainnet.

The idea here is that having a set of decentralized validators on a new chain would deter regulators from flagging the platform as running a “centralized exchange”.


Is Centralized Just Better for Some Platforms?

dYdX may be prioritizing control and finality over everything that happens on its chain.

Although its transaction volume is high, most of that is contained by a finite group of whale traders. It’s reasonable to suggest that for dYdX, code-is-law, hard decentralization is not a priority to its users. Would the confirmation of that logic be damaging to the undergirding philosophy of Ethereum?

And is this bearish/bullish for dYdX, Starknet, Cosmos or Ethereum? These questions may be inconsequential in a space where so much is still being figured out.

Finally, how will this affect dYdX’s growth? The question of how well the protocol nails security will determine if users willingly migrates to its new chain, or open up a space for its competitors FutureSwap or Perpetuals Protocol to carve out a new base for perpetual traders on Ethereum.

Tomorrow’s (Tuesday, June 28) Bankless livestream sees dYdX founder Antonio Juliano on the podcast, and we’ll be getting answers to all of these questions. Live, 2pm EST. Be there!

— Donovan (Twitter)


Action Steps

Donovan Choy

Written by Donovan Choy

84 Articles View all      

Former writer at Bankless.

No Responses