DeFi on Layer 2

Low gas activities and crypto dollars by CEX/DEX volume

Gas costs remain the most popular water cooler talk for the DeFi enthusiast. It’s easy to connect to a fellow farmer by commiserating over 300 gwei prices or discussing gas prices by time of day.

Gas prices will be high as long as there is significant economic value to be captured by transacting on Ethereum, and it’s hard to imagine any short-term scenario where Ethereum block space doesn’t remain valuable.

Frustration with high gas prices has been a boon to Ethereum’s scaling efforts, and while ETH2.0 may be “around the corner”, almost every DeFi project is exploring some scaling solution at this point. The Layer 2/sidechain landscape is wide open; each solution comes with a set of tradeoffs around security, EVM compatibility and speed.

Composability is DeFi’s favorite buzz word but it only exists in base-layer Ethereum, where a single transaction can call several contracts simultaneously. Developers will need to find a way to limit this disruption to the end user, but the need to scale is paramount.

Scaling DEXs

Trades are not the most expensive transactions on Ethereum but they may be the most frequent. Market makers must submit and cancel orders as prices change, which is costly on Ethereum. The first generation of DEXs (0x, IDEX, dYdX) tried to solve this by off-chain order submission and cancellation.

Given their scalability needs, DEXs are much further than other DeFi apps in the move to Layer 2. In January, I examined the scaling solutions for IDEX (Optimized Optimistic Rollup), Loopring (ZK Rollup) and 0x/Diversifi (ZK STARKS). The post (mostly) holds up and gives a (somewhat) easy-to-understand technical explanation of each of the options. Have a read.

In general, orderbook DEXs have unique needs compared to the rest of DeFi. Composability is not terribly important and design is optimized for high-frequency traders. Orderbook DEXes could even have their own roll up. There are withdrawal costs and time delays coming in and out of L2, but the experience will hopefully be better than centralized exchanges.

Loopring is the most viable option right now ($19m locked up), because it comes with the security properties of Ethereum. The challenge for it and other DEX rollups is how to encourage other complimentary economic behavior in the rollup.

xDai: So hot right now

xDai has been around since 2018 and could perhaps more accurately be described as a sidechain, because it relies on a limited validator set for security. Its STAKE token is used to secure the network through a Proof of Autonomy consensus, which is like Proof of Authority but for DAOs. Getting assets from Ethereum onto xDai requires a trusted bridge. If a bridge is compromised, any assets that passed through could be stolen.

While it lacks strong security properties, it does have two key advantages:

  1. Fully EVM Compatible - Any existing contract can be deployed to the xDai chain with little to no code changes. For teams struggling with gas prices now, xDai is the quickest way to relief.

  2. Metamask Integration - blockchain wallets are a tough business, especially true for Web3 wallets that need a native browser integration. I’d guess (with no evidence) that 90% of DeFi users at least have a Metmask Browser plugin.

Ameen Soleimani has a longer post espousing the benefits of xDai. He and the MetaCartel gang are big supporters. Gnosis announced a big partnership last week with xDai and there is a long list of projects planning to launch on xDai.

So far, xDai has $2.6m locked.


The big news in Layer 2 land last week was the Optimism Test Net announcement. Synthetix unveiled a L2 demo for its popular Mintr App the same day. Optimism is seen by many as the ultimate scaling solution, because it comes with Ethereum’s security properties and the Optimism Virtual Machine (OVM) is EVM-compatible. Optimism is also backed by some heavy hitters in the industry and friends with others.

Expectations were high, but the testnet shows there is still a ways to go:

Fraud proofs come from the OVM’s ZK Snark construction and is the core component of its security profile. This test net feels like the test before the test net and indicates that we’re at least 6 months away from any real liquidity on Optimistic Ethereum. Uniswap founder Hayden Adams is a fan, but is Uniswap v3’s schedule tied to Optimistic Ethereum’s?

Siloed Liquidity

Ethereum’s high gas prices have created a pressing market need for scalability, but the market to meet this need is surprisingly fragmented. Some options exist now, but they are limited in what they can do, while others offer the technical capabilities without the security properties, and new options are not yet ready for prime time. This means a DeFi landscape that is still anchored to Ethereum, but pushes expensive transactions to specialized L2/sidechain, which have composability within the rollup/sidechain, but cumbersome withdrawal and interaction with other scaling solutions.

There are likely other Ethereum L2 options to emerge and the ZK and rollup revolution may have just begun, but other base layer chains, most notably NEAR, Solana, Cosmos and Polkadot, could position themselves as akin to “Ethereum Sidechains”. They will need to focus on their bridge-to-Ethereum but splintering liquidity is a positive development for ETH killers.

The real question is how do these L2/sidechains interoperate? Of course, cross-shard communication eventually solves this, but in the mean time, their security properties will not be consistent for easy transfers. Will centralized companies facilitate easy transfers? Connext’s Spacefold is working on cross-chain interoperability for EVM compatible chains.

Tweet of the Week: Low(er) Gas

Hasu searching for fall cleaning suggestions or transactions that may be put off or delayed because of their high costs and lack of an immediate economic reward. I’m not sure if gas is “low”, but it does seem to come down a bit from the summer highs. Prices are around 100-150 gwei during peak usage and 60-90 gwei during off hours. Some suggestions to Hasu: layer 2 account creation (Loopring), buy gas token CHI and approve tokens to trade on Uniswap, Curve and other DEXs.

Chart of the Week: Cryptodollar DEX/CEX volume,q_auto:good,fl_progressive:steep/

Crypto dollar (not stablecoin) volume broken down by decentralized/centralized exchanges from a Dapp Radar post on stablecoins in the DeFiant. I suspect the CEX numbers are all inflated from inaccurate CEX self-reporting and wash trading, so squint and add a bit more pink for each pie. There are still some takeaways: USDT’s recent surge into DeFi is just pennies compared to its centralized liquidity. USDC has a sizable chunk in DEX land; it did $35m on Curve and $27m on Uniswap in the past 24hrs. Dai, meanwhile, has more liquidity at centralized exchanges than you might expect. It typically trades $3m + on Binance and ~$2m on Coinbase plus some other centralized exchanges. Dai CEX volume has increased, but DeFi volume has just grown faster. Curve and Uniswap each trade $20m+ of Dai a day.

Odds and Ends

  • Synthetix retires dashboard, unveils new Synthetix Stats Link

  • Blocknative launches an Ethereum mempool explorer Link

  • DXdao* introduces Rails, an L2 payment app built on Loopring Link

  • Aave announces governance on mainnet, LEND migration to AAVE Link

  • Uniswap passes $2bn in TVL Link

  • Gauntlet announces automated governance platform for DeFi Link

  • tBTC relaunches on mainnet Link

Thoughts and Prognostications

That’s it! Feedback appreciated. Just hit reply. Written in Brooklyn. No Kucoin or $EMN and I’m not cool enough to write about NFTs (yet).

Dose of DeFi is written by Chris Powers. Opinions expressed are my own. I spend most of my time contributing to DXdao*. All content is for informational purposes and is not intended as investment advice.