Skip to content

Conversation

@hexshire
Copy link
Contributor

@hexshire hexshire commented Sep 4, 2025

Description

Enables OP Stack chains to use an asset other than ETH as their native fee currency by introducing a minimal, flexible, and standardizable Custom Gas Token (CGT) architecture. To do so, it introduces new predeploys (NativeAssetLiquidity and LiquidityController) that decouple native asset management from core bridging operations while using a single isCustomGasToken() flag that disables ETH transfer flows in all bridging methods. The two new pre-deploys manage the native asset supply.

Tests

Core contracts:

  • OptimismPortal and L1Block: Tests for isCustomGasToken() flag blocking ETH deposits/withdrawals
  • NativeAssetLiquidity: Tests deposit/withdraw access control and functionality
  • LiquidityController: Tests minter authorization, mint/burn operations, and metadata functions

Metadata


Contributors

@hexshire hexshire requested review from a team as code owners September 4, 2025 14:45
@hexshire hexshire requested review from mbaxter, protolambda and smartcontracts and removed request for a team September 4, 2025 14:45
@hexshire hexshire self-assigned this Sep 4, 2025
@tynes
Copy link
Contributor

tynes commented Sep 4, 2025

/ci authorize 1026df6

@tynes tynes added the M-do-not-merge Meta: Do not merge label Sep 4, 2025
hexshire and others added 3 commits September 4, 2025 13:18
* feat: add L1BlockCGT

* feat: add L2ToL1MessagePasserCGT

* chore: remove test exclution in test validation
* test(cgt): fix failing tests

* test(cgt): fix portal version

* test(cgt): skip tests on forked mode

* fix: predeploys test cgt mismatch

* test(cgt): minor fixes

---------

Co-authored-by: niha <[email protected]>
@tynes
Copy link
Contributor

tynes commented Sep 5, 2025

/ci authorize 4590fa8

},
CustomGasToken: &CustomGasToken{
Enabled: false,
Name: "Test",
Copy link
Contributor

@blockchaindevsh blockchaindevsh Sep 7, 2025

Choose a reason for hiding this comment

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

Name/Symbol should be empty since Enabled is false?

if len(chain.AdditionalDisputeGames) > 0 {
return fmt.Errorf("%w: chainId=%s additionalDisputeGames must be nil", ErrNonStandardValue, chain.ID)
}
if chain.CustomGasToken != nil && (chain.CustomGasToken.Enabled != standard.CustomGasTokenEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is something that we may need to revisit

/// @notice Address of the ETHLockbox contract.
IETHLockbox public ethLockbox;

/// @notice Whether the OptimismPortal is using Super Roots or Output Roots.
Copy link
Contributor

Choose a reason for hiding this comment

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

We may need to break this out into its own contract pending some open decisions on the rollout, will follow up as soon as possible

@tynes
Copy link
Contributor

tynes commented Sep 9, 2025

We will want to add a flag that enables the ability to set the amount of liquidity in the native asset liquidity contract so that it can be set to 0 for chains that would like that usecase

@agusduha
Copy link
Contributor

Closing in favor of #17412

@agusduha agusduha closed this Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-do-not-merge Meta: Do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants