Arbitrum: Layer-2 scalability for DeFi protocols

Off-chain labs has developed the Arbitrum optimistic rollup designed for a high-throughput, low cost transactions when interacting with smart contracts whilst remaining completely trustless and having the same security as Ethereum layer-1 transactions. Arbitrum, a highly anticipated scaling solution, recently beat Optimism to mainnet and was made open to developers on May 28th 2021. Protocols such as Uniswap which aimed to launch with Optimism have since migrated to deploying on Arbitrum meaning the first to market Ethereum scaling solution has the potential to form a moat especially in DeFi which faces the liquidity fragmentation problem.

Layer-2, DeFi and Liquidity Fragmentation

Ethereum is notorious for high transaction fees especially in periods of high demand in which traders look to utilize decentralized exchanges for crypto asset swaps. This has resulted in retail migrating to permissioned chains such as Binance smart chain which has 21 active validators actively updating the blockchains state. So why hasn’t Ethereum gone down the route as Binance if scalability is so easy to solve? Simply put it’s because scalability is not easy to solve.

Blockchains operate under a consensus algorithm that dictates how each node must update the state of the chain verifying each transaction is correct. In order to be decentralized, which is the single most important point of blockchains, the average person must have the computation resources (bandwidth & storage) to validate the entire chain and be able to update it. Binance smart chain has made a huge consensus trade off sacrificing what makes blockchains important being decentralization for scalability. This is not a long-term solution to the scalability trilemma.

So how do we solve the scalability trilemma? There are two ways. The first being we increase the throughput of the main chain. The second being we remove the amount of data that needs to be stored on-chain commonly known as layer-2 scalability. A common way to achieve layer-2 scalability is to use zero-knowledge cryptography. Instead of submitting all the transaction data on-chain, we can compress that into something called a zero-knowledge proof that proves the transaction is correct without having to submit all the transaction data on chain. These solutions are commonly referred to as zero-knowledge rollups.

In the layer-2 ecosystem there are a multitude of solutions. For example zkSync, Optimism’s optimistic rollup and of course Arbitrum. However, if we take the DeFi ecosystem on Ethereum as an example, protocols will not decide to choose the same scalability solution. This means that there is going to be a fragmentation of liquidity between each layer-2 solution. For example Uniswap could deploy on Optimism whereas Sushiswap could deploy on Arbitrum meaning that it’s not easy to transfer liquidity between the two DEX’s. It requires migrating back to layer-1 and then on to the other layer-2 solution. This is why layer-2 interoperability is important which should come at a later date pioneered by Starkware solutions.

Arbitrum & Optimistic Rollup’s

Smart contracts are code that lives in an account on the Ethereum blockchain and can be thought of as autonomous agents in which code deterministically modifies the Ethereum state based on what action another account wants to execute. In a rollup, smart contracts computation and storage is executed off-chain and the resulting state modification that comes from multiple transactions are ‘rolled up’ into a single state modification instead of the monotonous single transaction state update.

Optimistic rollup derives the name optimistic as when posting the state modification to layer-1, there is no actual proof that the state transition is valid, unlike our zero-knowledge proof counterparts in which the proof is correct by definition. This means the individual who posts this to layer-1 (the validator) must also post a bond which acts as an incentive to publish the correct state transition to Ethereum. If someone thinks this assertion is false, they can publish something called a fraud proof which proves the assertion is correct by definition which results in the malicious validator being slashed by the bond that they posted. Arbitrum’s optimistic rollup has a multi-round challenge period in which anyone can submit a fraud proof unlike Optimism’s optimistic rollup which has a single round challenge period. Additionally, there is a suite of compression tools which further minimizes the amount of data published to layer-1.

The Arbitrum rollup is a layer-2 chain that is built on and secured by Ethereum layer-1 in which all transaction data are logged. Arbitrum supports all smart contract programming languages such as Solidity and Vyper as it is EVM compatible. EVM compatibility means that any smart contract that runs on the Ethereum virtual machine can also run on the Arbitrum rollup. Similarly, Ethereum tooling such as Truffle and Hardhat also work with Arbitrum meaning the ability for developers to port existing decentralized applications to Arbitrum is effortless.

Transactions are submitted to an inbox contract on Ethereum layer-1 and the execution on the Arbitrum rollup chain is dependent upon the transactions submitted to this smart contract address. Transactions to this address can be aggregated together which will reduce transaction overhead and allow users to transact on Arbitrum with directly holding assets on Ethereum layer-1. Arbitrums transaction throughput is at a lightning speed of 4500 transactions per second compared to Ethereum layer-1 throughput of 15 transactions per second.

Arbitrum & Uniswap

In November 2020, Offchain labs deployed Uniswap V2 on the Arbitrum rollup test network in order to gauge how a high profile defi protocol would perform. The results are pretty astounding and the benchmarks from the experiments are as follows:

• L1 Uniswap costs 109,500 gas. At 10mm gas per block and roughly 1 block per 13 seconds, this means Ethereum layer-1 can handle 7 Uniswap transactions per second. • Uniswap V2 deployed on Arbitrum’s optimistic rollup reduces gas cost to 1965 gas per swap. Meaning L1 can now handle up to 390 swaps per second which is a 55x gain in efficiency.

Uniswap has declared many times that the protocol would be using Optimism’s optimistic rollup but since Arbitrum has beaten Optimism to mainnet the team has decided to deploy the Uniswap V3 contracts to Arbitrum as per their on-chain governance vote. This means that Arbitrum as a layer-2 scalability solution has the ability to form what is known in finance as a moat. A moat is simply a clear leader in the market due to a superior product so it would be very difficult for someone to disrupt this product or service. The fact Arbitrum is production ready and having developers actively porting over their DApp’s means the amount of total value locked (TVL) on this layer-2 solution will be huge and will most likely eat into some of Optimism’s market share.

The Arbitrum rollup ships with a token bridge allowing anyone to transfer ERC20 tokens from Ethereum layer-1 to the Arbitrum rollup and back again. The token bridge will be directly linked into the majority of DApp’s front-ends.

The Arbitrum Ecosystem

Everyone currently is focused on Ethereum decentralized finance applications as this was the ecosystem primarily responsible for Ethereum’s high gas prices. There are many projects deploying to Arbitrum such as the previously mentioned Uniswap, Sushiswap, MonteCarlo DEX (derivatives trading platform focused on perpetual trading) and Bancor. Additionally, core infrastructure products such as Chainlink and The Graph have announced they will be supporting the Arbitrum ecosystem. Plus on the developer side the dev tooling such as hardhat and ethers.js is already available for developers to deploy smart contracts to the Arbitrum optimistic rollup.

Summary

Ethereum layer-2 scalability is here live on mainnet and Arbitrum is leading the way to reduce the amount of on-chain computation on layer-1. The deployment of Uniswap on the Arbitrum rollup showed a 55x gas efficiency and has the ability to perform 4500 transactions per second. Additional improvements will be made with the introduction of new compression techniques such as BLS signatures which will reduce gas costs even further. Many DApp’s especially in the DeFi ecosystem are deploying their protocol smart contracts to the Arbitrum rollup’s and many protocols such as Uniswap have now chosen Arbitrum instead of waiting for Optimism’s optimistic rollup to go to mainnet. In the coming months we should see sufficient liquidity that allows DeFi to sufficiently scale and reach the retail market participants.

Did this answer your question?