A Very Important Protocol Upgrade: Bridging Cost Reduction!

Scroll is excited to announce its first protocol upgrade since launching Scroll Mainnet on October 18th, 2023.

This upgrade will significantly improve the cost-efficiency for users who are bridging funds from Ethereum to Scroll. We are expecting a bridging cost reduction of up to 50% once this upgrade has been implemented on Scroll Mainnet.

Following the upgrade, only the Scroll contracts will be affected. Both the Scroll sequencer and follower nodes will remain unchanged, and will not need to be upgraded. This upgrade is backward compatible, and most of the contract interfaces and functionalities will stay the same. This means that most of the existing applications that rely on these functionalities will not need to be changed. Navigate to the Compatibility section of the blog post for further details.

Contents of this upgrade

To reduce the cost of bridging funds onto Scroll, we implemented a number of gas optimizations on both our bridge, and rollup contract suite. The optimization techniques that we used included the following steps:

  • We now use constants to store some companion contract addresses, instead of using storage variables. This is possible because these values should (almost) never change. With this change we can now save on a number of storage load operations.

  • We updated the intrinsic gas estimation in L1MessageQueue to use a simple upper bound instead of an exact calculation. The two results will be similar for most bridge transactions, but the new implementation is significantly cheaper.

  • We merged two contracts L1MessageQueue and L2GasPriceOracle to save on call costs from one contract to the other.

Technical details

Code changes

  • The code changes for this upgrade are in the following PR: https://github.com/scroll-tech/scroll/pull/1011. (Along with the audit fixes listed here.)

  • Previously deployed version: commit ff380141a8cbcc214dc65f17ffa44faf4be646b6

  • Version deployed in this upgrade: commit 6030927680a92d0285c2c13e6bb27ed27d1f32d1

List of Changes

Changes to L1 contracts:

  • In ScrollChain, change messageQueue and verifier to immutable.

  • In L1ScrollMessenger, change counterpartrollup, and messageQueue to immutable.

  • In all token gateways, change counterpartrouter, and messenger to immutable.

  • Merge L1MessageQueue and L2GasPriceOracle into a single contract L1MessageQueueWithGasPriceOracle (deployed on the same address as the previous L1MessageQueue). In this contract we also change messenger and scrollChain to immutable, and we use a simplified calculateIntrinsicGasFee.

Changes to L2 contracts:

  • In L2ScrollMessenger, change counterpart to immutable.

  • In all token gateways, change counterpartrouter, and messenger to immutable.

Contracts affected

  • L1: L1MessageQueueL2GasPriceOracleScrollChainL1ETHGatewayL1WETHGatewayL1StandardERC20GatewayL1ScrollMessengerL1CustomERC20GatewayL1ERC721GatewayL1ERC1155GatewayL1USDCGateway.

  • L2: L2ScrollMessengerL2ETHGatewayL2WETHGatewayL2StandardERC20GatewayL2CustomERC20GatewayL2ERC721GatewayL2ERC1155GatewayL2USDCGateway.

Audits

See the audit report by OpenZeppelin here.

Upgrade timeline

This protocol upgrade will be executed through the following steps:

  • In the weeks leading up to the upgrade, we have conducted extensive internal tests on the new contracts, as well as rigorous testing on Scroll Sepolia.

  • The contract upgrade will be initiated on 7th February 2024 through the Scroll Multisig contract. Following this, there will be a 14-day timelock for the upgrade transactions.

  • After the timelock, around 21st February 2024, the Scroll team will execute the upgrade on Scroll Mainnet.

You are welcome to follow and review the upgrade process on the following contracts:

  • L1 Scroll Multisig address: 0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe (on Ethereum)

  • L1 Timelock address: 0x1A658B88fD0a3c82fa1a0609fCDbD32e7dd4aB9C (on Ethereum)

  • L2 Scroll Multisig address: 0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe (on Scroll)

  • L2 Timelock address: 0xf6069DB81239E5194bb53f83aF564d282357bc99 (on Scroll)

Compatibility

Sequencer and follower nodes (l2geth)

Operators running an l2geth node do not need to upgrade. The changes in this upgrade will not affect l2geth.

Dapps and indexers

Dapps and indexers (and similar off-chain infrastructure) that query contracts or rely on contract interfaces would, in most cases, not need to be changed. The majority of the contract changes are internal and/or backward compatible.

If your application depends on L2GasPriceOracle to monitor how Scroll keeps track of the L2 gas price on L1, from the upgrade block number you will need to start monitoring L1MessageQueueWithGasPriceOracle. The original gas price oracle contract will be deprecated: it will no longer be updated or used by the Scroll bridge.

  • L2GasPriceOracle address: 0x987e300fDfb06093859358522a79098848C33852 (on Ethereum)

  • L1MessageQueueWithGasPriceOracle address: 0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B (on Ethereum)

What’s next?

We are constantly working on new features and improvements to continue to enhance the Scroll zkEVM, making it cheaper, faster, and more secure. Over the coming months, we will be rolling out some further optimizations in a subsequent protocol upgrade.

Usefully links

Until the next innovation!

Stay tuned for more exciting updates!

Website | X | Discord | Mirror

Subscribe to 𝐒𝐜𝐫𝐨𝐥𝐥 📜
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.