Skip to content

Conversation

@hexshire
Copy link
Contributor

@hexshire hexshire commented Aug 19, 2025

Description

This specification defines the technical implementation requirements for Custom Gas Token ("CGT") support on OP Stack chains. It specifies the minimal contract modifications, predeploy enhancements, and protocol changes needed to enable chains to use native assets other than ETH as their gas currency. The specification provides detailed function signatures, validation rules, and behavioral requirements for all affected system components while maintaining backward compatibility.

Design Doc: ethereum-optimism/design-docs#305

@tynes
Copy link
Contributor

tynes commented Aug 20, 2025

We will need to coordinate with some other teams to know for sure if this lands in jovian or in the following hardfork. Will follow up on this

@tynes tynes requested a review from Copilot August 27, 2025 17:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Custom Gas Token (CGT) support for OP Stack chains, allowing chains to use native assets other than ETH as their gas currency. The specification defines the minimal contract modifications, predeploy enhancements, and protocol changes needed while maintaining backward compatibility.

  • Introduces new predeploys NativeAssetLiquidity and LiquidityController for CGT chains
  • Adds CGT flag checking across system contracts to block ETH operations when CGT is enabled
  • Updates documentation to specify CGT behavior and requirements

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
words.txt Updates word list with new terms and capitalizations for CGT feature
specs/protocol/jovian/withdrawals.md Specifies withdrawal restrictions for CGT mode
specs/protocol/jovian/system-config.md Documents system config CGT flag functionality
specs/protocol/jovian/predeploys.md Comprehensive specification of new CGT predeploys and existing predeploy modifications
specs/protocol/jovian/overview.md High-level overview of CGT feature and architecture
specs/protocol/jovian/optimism-portal.md OptimismPortal CGT restrictions specification
specs/protocol/jovian/messengers.md Cross-domain messenger CGT restrictions
specs/protocol/jovian/bridges.md Bridge contract CGT behavior overview
specs/interop/managed-node.md Minor documentation reference fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hexshire
Copy link
Contributor Author

hexshire commented Aug 28, 2025

@tynes Is this going to be in jovian folder? I See there are some conflicts and I would like to know if I have to move the files to another folder or resolve the conflicts.

| Name | Address | Introduced | Deprecated | Proxied |
| -------------------- | ------------------------------------------ | ---------- | ---------- | ------- |
| NativeAssetLiquidity | 0x4200000000000000000000000000000000000029 | Jovian | No | Yes |
| LiquidityController | 0x420000000000000000000000000000000000002A | Jovian | No | Yes |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we remove NativeAssetLiquidity and LiquidityController, and instead allow only the Portal contract to mint native assets on L2 if CGT is enabled? Here is an implementation following this model.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This couples the minting logic to be on L1. A design goal was to enable the minting logic to be on L1 or L2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain how minting on L1 is addressed in this specification? I didn’t see any modifications to the Portal contract related to L1 minting.

Copy link

@blockchaindevsh blockchaindevsh Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tynes, when you say minting on L1, do you mean:

  1. bridging the L1 ERC20 to L2 via OP's standard L1 bridge
  2. minting via the LiquidityController using the bridged L2 ERC20?

or via the to-be-specified L1CGTBridge ?

- **ETH Bridging Disabled**: ETH bridging functions in `L2ToL1MessagePasser` and `OptimismPortal` MUST revert
when CGT mode is enabled to prevent confusion about which asset is the native currency.
- **Native Asset Bridging**: Custom Gas Token chains use dedicated CGT bridges (`L1CGTBridge` and
`L2CGTBridge`) for native asset transfers between L1 ERC20 tokens and L2 native assets.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are L1CGTBridge/L2CGTBridge defined? More importantly, do they interact with L1CrossDomainMessenger/L2CrossDomainMessenger?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The L1CGTBridge/L2CGTBridge will be defined in a following spec.

@tynes
Copy link
Contributor

tynes commented Sep 2, 2025

@tynes Is this going to be in jovian folder? I See there are some conflicts and I would like to know if I have to move the files to another folder or resolve the conflicts.

Just to follow up on this, we should not put this in the jovian folder given that we are not implementing the upgrade as part of the initial release, I think its good to go in the base protocol directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants