The most popular L2 networks include Arbitrum (which my employer, Offchain Labs, is focused on) , Optimism, and zk-Sync, which run on Ethereum. In the Bitcoin ecosystem, the Lightning Netwrork is the most widely used L2.

Networks like Arbitrum and Optimism are governed via corresponding tokens that have a combined global market cap of nearly $2 billion.

L2 systems help users overcome the scalability limitations of their underlying “Layer 1.” One can imagine “bridges” to L2s as on/off ramps on a highway, and “L2s” themselves as overpasses or side-streets that run parallel to the main blockchain road. When transacting on these side-streets, traders and other cryptocurrency users benefit from cheap and timely transactions.

As blockchain technology becomes a pillar of global marketplaces, L2s are the only way those tools and solutions can scale to serve mass audiences.

Why Blockchains Are Built in Layers

When we talk about the blockchain’s “Layer 1,” with the core properties of decentralization and disintermediation, we are referring to blockchain networks like Bitcoin BTC and Ethereum ETH. These systems use distributed ledgers (blockchains) to enable digital asset ownership and transfers without relying on any third parties. Since no trusted third parties are required, anybody can run the L1 software with a personal node, using a personal laptop or Raspberry Pi device.

The L1’s consensus mechanism ensures that all the nodes in the network will eventually agree on the state of the whole system system (for example, how much ETH a given user owns at a particular point in time). Right now, the Bitcoin network’s L1 can handle about 7 transactions per second; Ethereum can handle at most a few dozen. This limit (which is quite low, all things considered) creates competition for block space.

Users compete for space on the blockchain by bidding against each other via transaction fees. A user paying higher fees will get his or her transaction confirmed sooner than someone who paid a lower fee.

Enter Layer 2 Blockchain Scaling Solutions

To use an L2, a user deposits their L1 funds (like, say ether) into the L2 system via what’s known as a “bridge.” With their funds on L2, the user can transact. L2s utilize the underlying blockchain, but only minimally, which translates to L2 users paying lower fees.

Most L2s can be used with the same wallet software a user would use, like Metamask for Ethereum. For all major Ethereum L2s, fees are paid in the underlying chain’s currency ether. Generally speaking, a user will be able to do similar things on L2 that they would on L1, namely, sending and receiving payments and interacting with smart contract applications.

At any point, the proper owner of funds on L2 can use the bridge to “withdraw” their funds back to L1. An L2 user shouldn’t have to trust any designated parties to ensure that they have this withdrawal guarantee; in other words, fund security comes from the base layer blockchain itself.

Enforcing the L1’s security property is the core technical challenge of architecting L2 systems. There are two main categories of Ethereum L2s: Ethereum L2s that use “fraud proofs,” also known as “optimistic” L2s, and L2s that use validity proofs.

Fraud Proofs

Fraud proof-based L2s get their scaling benefits by enforcing what can be thought of as an “innocent until proven guilty” policy for their transactions.

When using a fraud proof based L2, the L1 “optimistically” assumes that all transactions are valid. If (and only if) something invalid has occurred (like, say, a user trying to spend funds that aren’t rightfully theirs), a fraud proof can prevent that invalid action from finalizing.

When simply using L1 directly, every L1 node must do the work of processing every transaction. Alternatively, with an optimistic L2 solution, transactions only require the software to do a lot of transaction work if there’s a problem, as if it were an assistant submitting a complaint report to the L1.

Since in the most common, “happy” case, these fraud proofs aren’t necessary, the corresponding network nodes have to do much less work than they normally would. As such, users pay lower transaction fees.

One family of protocols designed to use fraud proofs are “Optimistic Rollups” like the Ethereum L2s Arbitrum ARB and Optimism OP. After L2 transactions are posted to the layered network, there is a “dispute window” — an interval of time over which anybody can use L1 to prove (and in turn, prevent) fraud, if the need arises. In this way, the L1 acts as the ultimate judge, enforcing the L2’s rules when necessary.

Bitcoin’s Lightning Network also gets its security via fraud proofs. To use the Lightning Network, two users can submit an L1 transaction to open up what’s called a “payment channel.” Once they have a Lightning channel open, they can send payments to each other entirely off-chain.

Eventually the users settle only their final balances back on the underlying L1, a bit like closing out a bar tab at the end of a night out (as opposed to swiping one’s card for each individual drink and waiting for the receipt each time). If a user tries to “close out” with an improper balance, then once again, the other user can rectify this with a fraud proof on L1, preventing this attempted theft.

Arbitrum and Optimism support general purpose smart contracts, similar to Ethereum. Lighting Network is predominately used for simple payments, although Lightning channels could also, in principle, be leveraged for some more limited smart-contract-like functionality.

Validity Proofs

Another type of L2 system uses an approach called “validity proofs.” The most widely used protocol family that leverage validity proofs are known as “ZK-Rollups.”

Unlike fraud-proof systems — which temporarily “allow” invalid transactions with the guarantee that they can be disputed — ZK-Rollups use cryptographic proofs to directly ensure that transactions are valid to begin with. The mechanism of these cryptographic proofs involves some advanced applied mathematics; in effect, the validity proof lets the underlying blockchain ensure that the L2 transactions are valid without actually having to process them directly.

The initial batch of ZK-Rollups that launched were all “application specific,” meaning they supported more limited functionality than general purpose smart contracts. Starkware’s dydx supports derivative exchange functionality; Loopring LRC supports token payments and some simple swaps; Aztec Connect supports privacy preserving transactions for limited DeFI applications. The upsides to L2s offering this more restricted, “application specific” functionality are technical simplicity and potentially better performance (which means lower fees).

ZK-Rollups that offer general purpose smart contracts are more complex, and thus have taken longer to develop. But recently, developers have made progress on this front with the release of L2s like Polygon’s zkEVM and zkSync Era.

Decentralization And L2s

Across all blockchain networks, although L2 protocols are designed to be decentralized in principle, any accurate description of how they actually exist in practice must include a fair amount of qualifiers and fine-print.

Bitcoin’s Lightning Network advocates can credibly claim that it is decentralized at the protocol level. However, most Lightning users opt to use custodial Lightning wallets and third party services. That’s because the user experience is simpler and easier. These trusted third parties, however, effectively have custody and control over users’ funds.

In the world of Ethereum — where the overwhelming majority of L2 activity occurs — L2s tend to launch with centralized components in place, with the promise of phasing them out — or “progressively decentralizing” — over time. These centralized components allow for companies to deploy quick software bug fixes; in some cases, they are necessary while critical parts of the L2 system are still under development. Virtually all widely used Ethereum L2s still have some such centralized (or at least, not entirely decentralized) parts as of today.

For users, sorting this out is tricky business. As such, the L2Beat project has emerged as a widely trusted source in tracking the state of decentralization of Ethereum’s many L2s. As with all things in the crypto space, users are advised to do their own research to understand the risks of anything they use, and generally err on the side of caution.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *