header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP

Interpreting L2 transaction pricing from an algorithmic perspective: the impact of revenue, costs, and protocols.

2023-08-02 19:04
Read this article in 24 Minutes
总结 AI summary
View the summary 收起
Original author: 0xMlze, Salve Boccaccio & 0xMunehisa
Original translation: Deep Tide TechFlow


Second Layer Solution


The current average processing speed of the Ethereum mainnet is 12 transactions per second. During periods of high network activity, transaction costs have reached levels that are unacceptable for most users. This scalability issue arises from the fact that every node in the network needs to store and verify all transactions that occur on the network.



In order to solve this problem and expand Ethereum, people invented the second layer solution (L2). The second layer is an independent blockchain that extends Ethereum and inherits Ethereum's security guarantees. The second layer is essentially an independent blockchain, and users conduct transactions outside the main chain (Ethereum). Each second layer solution has its own security guarantees and trade-offs. On Ethereum, the most popular form of second layer extension is Rollups (Arbitrum, Optimism, zkSync).


Rollups


Rollups are L2 solutions that process L1 transactions before returning to L1. Standard transactions on Ethereum are typically 156 bytes, with signatures being the most data-dense part. Therefore, Rollups process multiple transactions in the L2 execution environment and bundle them into one transaction, which is submitted to L1 for regular state verification. Bundling multiple transactions into one transaction can reduce the gas fees paid for each transaction, as gas fees are shared among multiple transactions, not just one. However, not all Rollups are the same, and there are many different types of Rollups:


Smart contract Rollups: Optimistic Rollups (Arbitrum, Optimism), zero-knowledge Rollups (Matic's zkEVM, zkSync, Scroll);


Celestiums;


Enshrined Rollups;


Sovereign Rollups.



Smart contract Rollups are Rollup smart contracts that users send funds to on L1, and then the smart contract manages transactions and state changes.


Rollups and a key component of blockchain are Merkle trees. Merkle trees are data structures that store the financial state and transactions of each person, allowing L1 to verify the state on L2 without downloading the entire state. Simply put, users interact and transact on L2 (thereby changing the state), and L2 regularly sends the Merkle root of the state to L1 so that L1 can verify the state of the chain.


除了将 Merkle 根发布到 L1,L2 还必须发布足够的 Merkle 树变化数据,以便用户能够完全重建 Merkle 树。如果由于某种原因 L2 停止运行,如果没有提供这些数据,用户将被困在 L2 上。因此,L1 智能合约具有「紧急功能」,用户可以在 L2 停止运行时从智能合约 Rollup 中提取他们的资金。

Translation:

In addition to publishing the Merkle root to L1, L2 must also publish enough Merkle tree change data so that users can fully rebuild the Merkle tree. If L2 stops running for some reason and this data is not provided, users will be trapped on L2. Therefore, the L1 smart contract has an "emergency function" that allows users to extract their funds from the Rollup smart contract when L2 stops running.



L1 requires some form of proof to ensure that the Merkle root sent by L2 is valid, which is the main difference between the two types of smart contract Rollups. The two main types of proof used are fraud proof and zero-knowledge proof.


Optimistic Rollup


OptimisticRollups like Arbitrum and Optimism use fraud proofs to achieve final confirmation of state. The working principle of fraud proofs is as follows:


L2 nodes publish the Merkle root along with a small amount of collateral to the L1 smart contract.


L1 smart contracts trust L2 nodes by default, which is the meaning of "Optimistic" - L1 holds an optimistic attitude towards updates from L2.


However, this state change will not be finally confirmed within 7 days.


Within these 7 days, anyone can submit a proof that the submitted Merkle root is fraudulent, which will revoke the update and punish the L2 node, and the collateral will be given to the person who reports the fraudulent update.



If no objection is raised to the state transition within the 7-day dispute period, the update will be finally confirmed and deemed immutable.


ZK Rollup


ZK Rollup uses zero-knowledge proofs. Their working mechanism is as follows:



If a Layer 2 node attempts to publish a fraudulent update, they will be unable to generate a valid zero-knowledge proof, so the L1 smart contract will not accept the new Merkle root.


Once the zero-knowledge proof is verified, the state update will be completed immediately.


Sorter


Sorters are mechanisms that collect and publish transactions back to the Ethereum main chain in L2. In their current centralized state, their operation is as follows:


Users submit transactions on L2 - DeFi, NFT, sending/receiving, and more.


These transactions are collected by centralized sorters.


Then, the sorter (block builder) arranges these transactions (call data/state changes) in order to form a single block or batch transaction.


Currently, the L2 sorter uses a first-in, first-out (FIFO) sorting method to sort these transactions.


Then, the sorter submits these transactions back to the Ethereum mainnet to be included in a block.



Currently, the sorter of Rollup is centralized and controlled by a single entity (Offchain Labs for Arbitrum and Optimism PBC for Optimism). This centralization creates a single point of failure for Rollup and may lead to issues with activity (as well as a lack of resistance to review) - if the sorter fails, L2 will not be able to function properly.


For example, in early June, Arbitrum's sequencer encountered an error that caused batch processing to roll back on-chain, resulting in a loss of gas cost for batch processing. In a short period of time, batch submitters ran out of gas and were unable to correctly send transactions to Ethereum.



L2 Gas Fees


Now let's take a look at how these two main Rollup smart contracts calculate the gas fees that users will pay and their impact on centralized sequencers.


On Arbitrum and Optimism, users need to pay two fees when trading:


L2Gas/Execution fee;


L1 Call Data/Security Fees.


L2Gas/Execution Fee


L2 Gas fees are similar to Ethereum's Gas fees. Each transaction on L2 requires payment of a Gas/execution fee, which is equal to the amount of Gas used in the transaction multiplied by the current Gas price.




The data fee for L1 calls is paid to cover the cost of publishing transactions back to Ethereum. This fee exists because sorters or batch submitters need to pay L1 Gas fees to publish transactions to Ethereum.



Sorting Income Model


Currently, Optimistic Rollup (ORU) generates revenue through the operation of a single centralized sequencer. In the future, it is expected that ORU will eventually achieve decentralization, which will open the door for other revenue streams such as MEV (Maximizing Ethereum Value) or requiring sequencer operators to stake native tokens/share revenue.


However, for now, in the simplest representation, we can assume that the sorter charges L2 transaction fees (sorter revenue) to ORU users and needs to pay L1 gas fees to batch submit user's L2 transaction data to the Ethereum network (cost 1), as well as pay for the operational costs of running the sorter (cost 2).





收入(L2 Gas Fees) ->

Revenue (L2 Gas Fees)


Fees = L1_gas_price_estimate * (L1_calldata_size + L1_buffer) + L2_gas_price * L2_gas_used


Cost


Costs = L1_actual_gas_price * L1_calldata_size + Sequencer_operational_costs


L2 Pricing


Among all ORUs, the L2 fee price is a function of L1 calculation scale, L1 calculation cost, L2 calculation scale, and L2 calculation cost.


Due to the fact that all L2 sorters generate costs when publishing batches/proofs to the L1 mainnet, it is logical to pass on the dynamic costs settled on the mainnet to users when executing L2 transactions.


Arbitrum and Optimism have different L2 fee pricing methods. One very important difference between the two is how Optimism and Arbitrum calculate the cost of L1 computation. Arbitrum uses an oracle that prices L1 computation in the same way as before 4844, meaning that the oracle prices L1 computation in the same way without governance voting. However, Optimism's L1 computation includes a dynamic overhead (scalar) variable that can be adjusted by the Optimism team to adjust the cost of L1 computation.


Arbitrum


Arbitrum's L2 fee pricing implements the concept of "two-dimensional gas fees", where the gas limit is a function of the gas units used on L2, the gas units used on L1, and the estimated L1 gas price.



From this, we can draw the following conclusions:


L2 Gas restrictions decrease as L2 Gas prices increase.


L2 Gas restrictions increase with the increase of L2 computation, L1 Gas price, and L1 computation.


Optimism


Similar to Arbitrum, Optimism considers the cost of both L1 and L2 computation when calculating transaction fees. Optimism refers to this as L2 execution fees and L1 data/security fees.



Attention:



- Currently it is set to 0.684, which means the sorter is subsidizing gas costs.


- Historically, this value is mainly set to 1 or above, indicating that the sorter is charging extra fees to maintain the L1 settlement Gas buffer.



As a practitioner in the encryption industry, I will translate the Chinese text to English without considering the context or industry-specific terms. English words and phrases, as well as capitalized English words and phrases, will not be translated or abbreviated, such as ZKS, STARK, and SCROLL. If there are English characters in an a tag, they will not be translated and will be returned as is. When the content only consists of punctuation marks, the punctuation marks will be returned as is. HTML tags in the content, such as

, , , and

, will not be translated. If an HTML tag contains English characters, they will be omitted and returned as is. The content within an a tag will be preserved and not translated. All Chinese characters will be translated. The text to be translated is:

随着时间推移的动态管理费用/ L1 标量费用 Translation:

Dynamic management fees/L1 scalar fees over time



EIP-4844


Currently, the cost of executing and storing Optimistic Rollup on Layer-2 is relatively low. However, in order to comply with data availability, publishing data to Layer-1 is still expensive for users.


Data is published to Ethereum Layer-1 using the calldata opcode, so both Arbitrum and Optimism have implemented calldata compression algorithms such as Zlib and brotli compression algorithms. This type of data publishing is very expensive and accounts for 80-90% of the transaction fees paid by L2 users.


However, between October 2023 and February 2024, the highly anticipated Ethereum Improvement Proposal (EIP-4844, Proto-danksharding) is planned to be launched. EIP-4844 proposes to add a new transaction type to Ethereum that allows for the acceptance of "data blocks". These "data blocks" are deleted or pruned approximately two weeks later, unlike existing calldata which is permanently stored. The size of these data blocks is designed to be small enough to reduce storage costs on the mainnet chain.


The high transaction fees on Ethereum Layer 1 (L1) are the main cost for L2 Rollup when publishing batches and proofs. The impact of EIP-4844 is to significantly reduce the cost of L1 while allowing batch data to be available for a long enough time to publish any fraud proofs. Current estimates range from 10 to 100 times the cost savings from the current L1 batch publishing cost.


Advanced Overview of the Impact of Sorter Revenue


Before delving into the changes we expect to see in Arbitrum and Optimism, it is important to consider the differences in L1 computation pricing between the two (as explained in the previous section on L2 fee pricing). Given Arbitrum's L1 pricing oracle, we now know that it is likely to pass on 100% of the fees to users (unless we see governance votes). This is not the case for Optimism, as they still control the dynamic overhead variable.


The table below provides us with the possible outcomes after EIP-4844.


Arbitrum


Considering the current financial situation of Arbitrum mentioned above, we have explored the possible changes in the valuation of Arbitrum under certain assumptions. Due to the expected significant cost reduction after EIP-4844, it is anticipated that profits and profit margins will increase while maintaining the same level of revenue.


Based on this, we have created a table that displays various possible outcomes, including different combinations of EIP-4844 savings passed on to users (Y-axis) and EIP-4844 cost reduction factors (X-axis, where higher numbers indicate higher EIP-4844 savings).


We have marked with shadows the combinations that we believe are most likely to appear after EIP-4844.



If 100% of the savings are passed on to the users, we can assume that this cost savings may increase the number of transactions on Arbitrum (new types of dApps, more users).


Make some assumptions:


Keep the current price-to-earnings ratio (P/E);


Assuming the cost is reduced by 10 times;


Due to cost savings, the number of transactions has increased.


We can calculate the impact of these changes on the prices of ARB and OP. For example, if the Tx volume increases by 40% and only 90% of the cost savings are passed on to users, then the price of ARB will be $2.10.


Optimism


Performing the same calculations for Optimism, we obtain the following results.



L2 Token Economics and Valuation


Currently, the only value accumulation of Arbitrum and Optimism is governance; this is the only function of ARB and OP. However, the value accumulation of ARB and OP may come from two other sources: transaction fees and MEV.


As they currently stand, these two L2 solutions heavily rely on their centralized sequencers, with all the profits from building and proposing these centralized blocks passing to the Arbitrum Foundation and Optimism Foundation. However, both solutions have committed to moving towards a decentralized sequencer mechanism, where the foundations are not the only entities building and proposing L2 blocks. The first step towards value accumulation for L2 tokens is a decentralized sequencer, which is not an easy task, but it can allow L2 token holders to participate in the value generated through the building and proposing process.


The decentralization of the sorter is likely to be achieved through the PoS mechanism, where users stake native L2 tokens. If the staker fails to fulfill their responsibilities or engages in malicious behavior, their stake will be reduced. Stakers can receive a portion of transaction fees, MEV (in the post-FIFO world), or staking rewards in the form of native tokens.


The importance of decentralized sorters lies in the fact that centralized sorters may lead to user transactions being censored, excessive rent extraction, or harmful MEV, which can have adverse effects on users.


Source Link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
This platform has fully integrated the Farcaster protocol. If you have a Farcaster account, you canLogin to comment
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit