Analysis of the fee mechanism of zkSync: How can users save transaction costs?
Original compilation: Luffy, Foresight News
Original compilation: Luffy, Foresight News
The zkSync ecosystem is growing rapidly, but it also faces a hurdle: rising gas prices. After digging deeper, I found some ways to reduce transaction costs.
The success of zkSync is evident and its TVL growth has been staggering. However, many people are still confused about the high transaction costs of this L2 solution, what is the reason? How can we reduce transaction costs?
zkSync’s Transaction Fee Mechanism
The gas fee for transactions on zkSync consists of two parts: on-chain and off-chain. On-chain fees are the cost of checking proofs and publishing incremental state (the difference between the old and new state) on Ethereum, and off-chain fees are the costs of storing state and generating proofs.
The cost of on-chain fees fluctuates with the current gas price on the Ethereum network; the off-chain fee is a set value of about $0.001, the state contains all the details about wallets and balances, and cryptographic proofs show that the transaction is legitimate and related to The current state is consistent.
Gas mechanism comparison between Ethereum and zkSync
Ethereum Gas Mechanism
Gas limit = the maximum Gas consumed
Gas price = ETH price per unit of Gas
Total cost = Gas limit x Gas price
zkSync Gas Mechanism
Fixed off-chain fees and variable on-chain fees
On-chain fees depend on the current Ethereum price and the amount of data to be published on Ethereum
Off-chain fees do not depend on transaction complexity
Track Gas prices on zkSync to reduce transaction costs
There is a parameter "Gas_PER_PUBDATA_LIMIT" in zkSync that can be used to calculate transaction costs. It is the Gas price for publishing one byte of data to Ethereum, determined by the operator based on the current Gas price, and only affects the on-chain part of the transaction fee.
Tracking gas costs is critical to the optimal operation of the network, as the performance of zkSync depends on gas costs.
You can use some handy tools to track Gas👇
The CoinTool website provides a dashboard that allows users to track Gas in real time, and it supports browser plugins.
If you want to save on gas, check out the Dune chart contributed by @alex_kroeger. By keeping an eye on this graph, you can save costs by initiating transactions when gas is low.
There is also a little-known trick that may help you reduce transaction costs.
First turn on the advanced Gas settings in Metamask.
When creating a transaction, click "Edit" and reduce the gas limit by 3 times.
While there is no documented evidence to support this approach, some will find it cheaper to trade this way. This may not always be the case.
Please note that there is a certain risk in doing this, because the transaction may be canceled due to insufficient gas.


