DeFi

Ethereum’s L2s and Shards Will Break DeFi

Why do cities exist? Why do industries cluster together? It turns out that the more interconnected a network is, the more powerful it can become. The whole can be greater than the sum of its parts.

This is no truer than for software and finance – two industries that are entirely about the flow of information. That is one of the core reasons why DeFi – with its notion of all entities having equal access to the same shared ledger – will ultimately outcompete the patchwork of ledgers held by intermediaries that is “traditional” finance.

DeFi’s unique ability to glue the entire ledger together in the tightest and most interconnected way possible is called “atomic composability”, but nearly every smart contract platform – bar Radix – will one day break it.

What is Atomic Composability?

Atomic composability lets a user combine many decentralized applications, and many tokenized assets, into a single transaction.

You can think of it like a sports trade of three athletes arranged between three teams. Either all deals are made, and all the players move at once, or one fails and everyone stays where they are.

With atomic composability, everything you want to happen in a single transaction all happens together, or everything fails, making sure you don’t get left with assets or things you don’t want while trying to get the things you do want.

What many people don’t realize is that 69% of all activity on top of Ethereum is composed of three or more smart contract calls. That means that atomic composability drives the majority of ALL activity on public networks. Scalability solutions that sacrifice atomic composability are going to continually handicap user experience.

In DeFi terms, atomic composability allows for arbitrage and efficient markets. You are able to purchase an asset low on one exchange, and sell it high on another – all in one transaction – knowing you won’t be stuck with an asset you don’t want, part way through.

For DeFi developers, atomic composability allows you to build a feature that anyone can leverage with an existing dApp (decentralized app) as if your feature were part of that dApp. Imagine being able to build a feature in your bedroom that can be embedded directly within the JPMorgan technology stack, allowing any customer to use it as if JPMorgan had built it themselves.

Traditional finance can all but dream of the collaboration and innovation-enhancing capabilities offered by atomic composability.

Moreover, with atomic composability, every component of every dApp on the ledger can be combined together as if they were in the same place. This means that the entire ecosystem can behave as if it were just one giant dApp.

That’s why DeFi is so powerful, as every small incremental improvement from anyone can instantly be adopted by everyone. Any possible combination of dApps can be joined together in an evolutionary battle for all assets and liquidity. How can the closed-wall approach of traditional finance compete with that?

So how much is atomic composability really used?

Ethereum is the undisputed home of today’s DeFi. The platform accounts for 58% of total value locked (TVL), a measure of money managed by DeFi protocols. Its next nearest competitor, Binance Smart Chain, holds 12%.

To find the proportion of transactions that leveraged atomic composability on Ethereum, RDX Works performed an analysis of every transaction for one sample day in October 2022. On this day there were approximately 988,000 transactions that used 109.7 million “gwei” of Ethereum gas.

For each transaction, the data included the number of “calls” that were executed, i.e. how many different methods or functions were invoked.

A “call_count” of 1 implies that the transaction is simple: either ETH or an ERC20 token is transferred from one address to another. In the example below, we can see that the ERC-20 token USDT is transferred from a user (0x1de2…) to Binance. That’s it.

A call_count of 2 implies that the transaction is a little more complex. In the example below, two calls are being invoked: from a user (0x8ac2…) to a contract address (0xa0b8…), and then a second call to another address further downstream (0xa232…).

With two calls, it’s possible that atomic composability was required for the transaction to have succeeded, as without it, the user may have been stuck halfway through execution and been left with a result they didn’t want.

A call_count of 3 and beyond (the highest call_count on our day was 2,525) implies we are getting into more complex transactions. One where the user calls a contract which then performs multiple downstream calls and so on.

In the example below with a call_count of 3, the user (0xa50a…) calls the Sorare L2 Bridge contract (0xf5c9…) which in turn calls the StarkExchange contract (0x4edd…) and the TokensAndRamping contract (0x8536…).

That’s just for a call_count of 3. So what do we make of this? Transactions that are composed of 3 or more calls can be assumed to be a reasonable proxy for transactions that require atomic composability.

If we then sum all the Ethereum gas used by transactions composed of 3 or more calls, filter out all ETH-only transactions (leaving just contract calls), filter out all failed transactions, and filter out all transactions that created a smart contract, that leaves us with ~359,000 transactions (out of a total of ~988,000) using 75.2m gwei (out of a total of 109.7 million).

And to answer the original question: how much is atomic composability really used? We can conclude that approximately 69% of all Ethereum gas used on our sample day required atomic composability.

So what?

So we’ve established that on Ethereum the majority of computation used on the ledger leverages atomic composability in some shape or form. But Ethereum today is unsharded. We take it for granted that it has atomic composability because it’s always had it.

If you look further ahead to Ethereum’s “danksharding”, “rollups” and “layer 2s” (such as Optimism or Arbitrum); as well as the sharding/subnet solution almost every other blockchain is using to scale; the picture changes quite dramatically. All of these proposed scaling solutions break atomic composability across the shards, subnets, rollups and layer 2s.

This is because each shard or layer 2 functions effectively as its own discrete ledger. While each retains atomic composability within its own confines, you cannot compose a transaction atomically across shards or back to the “layer 1” or other layer 2s.

The effect is that each of these “islands” needs its own instance of every dApp; or must wait for finality on one shard before conducting an action on another shard. Uniswap on Arbitrum is an entirely separate instance of Uniswap to the one on Ethereum, with its own liquidity, pools, and pricing.

And this results in a fragmented developer experience, bad user experience, and suboptimal infrastructure for the efficient allocation of capital.

The multi-chain vision for DeFi gets us back to square one: a patchwork of ledgers that aren’t particularly well connected.

And if the opening statement of this article is to be believed, we know that networks prosper when they’re well connected, not disconnected.

That’s why for Radix: sacrificing atomic composability was never an option. Nine years of research and development later and the solution is now clear: shard with atomic composability.

Author bio:

Ben Far is the Head of Partnerships at Radix. He has 14 years of experience in financial technology with a specialty in payments systems and financial market infrastructure.

   

Source

Click to rate this post!
[Total: 0 Average: 0]
Show More

Leave a Reply

Your email address will not be published.