Notices (README)
Preparing for Custom Gas Tokens deprecation

Deprecation of Custom Gas Tokens

The Custom Gas Token beta feature has been deprecated. Beta features give developers access to early versions of highly requested features, allowing us to validate demand through usage data and user feedback. Since May 2024, usage of the custom gas token beta feature has steadily declined as ERC-4337 and robust paymaster services gained traction.

Based on this trend, the beta feature was deprecated instead of being moved to the OP Stack standard configuration. While the custom gas token code has been removed from the Optimism monorepo, chains can choose to maintain their own OP Stack Fork at their own risk. Future upgrades to the OP Stack will not be compatible with custom gas tokens. Options for existing chains that use custom gas tokens and new chains are discussed below.

Additionally, advancements in Account Abstraction (AA) tooling now enable gas payments in any token, offering better alternatives for the limited number of chains that require this feature.

Highlights

  • Code removal: The Custom Gas Token code has been removed from the Optimism monorepo in the following PRs 1 (opens in a new tab), 2 (opens in a new tab), 3 (opens in a new tab).
  • Use AA Tooling: New chains looking to enable Custom Gas Token functionality should utilize paymasters to enable the same functionality
  • End of developer support: OP Labs Developer Support will no longer address CGT-related issues or requests.

Options for new chains

The Optimism ecosystem is focusing on interoperability within the Superchain, with efforts and incentives directed towards standard configured chains. Some options are:

  • All new chains launch with the standard ETH gas token configuration.
  • Utilize Account Abstraction tooling to allow users to pay gas fees in alternative tokens instead of relying on Custom Gas Tokens.
    • For example, a given chain can maintain ETH as its protocol gas token while using AA tooling to permit payments in their native token.

There are many account abstractions providers in the space. You should find the correct one for your needs, but we've compiled a list to get you started.

Options for existing chains

For existing chains that utilize Custom Gas Token, there are a few paths forward:

  • You can continue to operate your chain as is and not pull in the latest upgrades to the OP Stack.
  • At your own risk, you can start maintaining an OP Stack fork that adds back in the CGT code, upstreaming the latest OP stack upgrades into your fork- which was removed from the Optimism monorepo in the following PRs 1 (opens in a new tab), 2 (opens in a new tab), 3 (opens in a new tab).
  • You can launch a new standard configuration chain and coordinate a migration of applications and users from your current Custom Gas Token chain to the new chain.

Risks of continued use of Custom Gas Tokens

For any chain considering CGT post-deprecation, be aware of the following risks:

  • Fee mechanism flaws: Fees are charged as a scalar on blob fees denominated in ETH. This means CGT chains will either drastically overcharge or undercharge users for transaction fees relative to their L1 Data Availability costs.

  • Higher overhead for RaaS providers: Managing CGT chains requires RaaS providers to assume additional risk exposure to the custom gas token asset.

  • Security concerns: The CGT code modifies the L1 OptimismPortal, where all native assets are stored, and will not have undergone third-party auditing.

  • Lack of future compatibility: Without official support from core protocol developers, there is no guarantee that future OP Stack upgrades will function properly with CGT-based chains.

Need help?

For further assistance or questions about this migration, feel free to reach out through the following channels: