Custom Gas Tokens let Appchains deploy with an ERC-20 token of choice to be deposited in as the native token to pay for gas fees. This allows for Appchains to customize their gas token to:

  • Enhance the utility of their project’s token.
  • Simplify gas cost subsidies for users through the token treasury.
  • Support in-game economies by enabling players to cover gas fees with in-game currency.
  • Strengthen alignment with any token’s community.

Native gas tokens

By default, Appchains allow users to deposit ETH from Base into the Appchain as the native token that can be used to pay for gas fees.

With custom gas tokens, appchains can set an Base ERC-20 token address at the time of deploying the contracts of their Appchain. When deposited, this Appchain ERC-20 token will become the native gas token on the Appchain and can be used to pay for gas fees.

Caveats to be aware of

  • You cannot switch from your custom gas token to another token after the chain is launched.
  • Existing chains cannot switch to use a custom gas token. A custom token must be configured at the time of chain deployment.

How it works

The custom token must adhere to the following:

  • must be deployed to Base mainnet or sepolia.
  • must be a valid ERC-20 token.
  • the number of decimals on the token MUST be exactly 18.
  • the name of the token MUST be less than or equal to 32 bytes.
  • symbol MUST be less than or equal to 32 bytes.
  • must not be yield-bearing.
  • cannot be rebasing or have a transfer fee.
  • must be transferrable only via a call to the token address itself.
  • must only be able to set allowance via a call to the token address itself.
  • must not have a callback on transfer, and more generally a user must not be able to make a transfer to themselves revert.
  • a user must not be able to make a transfer have unexpected side effects.

Appchains are then:

  • Deployed with a custom gas token whose address is set to that of the token deployed on Base mainnet or sepolia.
  • Users can deposit custom gas tokens to Base and it is subsequently minted on the Appchain.
  • Withdrawing the custom gas token results in unlocking the custom token on Base.
  • The custom gas token is used by default to pay for gas fees.

FAQ

What is the Wrapped (ERC-20) Gas Token?

  • The WETH predeploy at 0x4200000000000000000000000000000000000006 represents the wrapped custom gas token. If you wish to transact with your native gas token as an ERC-20, you can deposit and withdraw from this contract to wrap and unwrap your token.

  • What this means is the asset at the WETH predeploy is not ether but instead is the wrapped version of your custom gas token. Its an ERC20 token, the name() will be "Wrapped ..." (whatever the name of your token is).

How Do Fees Work?

Currently, there is no special logic for custom gas tokens to account for exchange rates between the custom token and Ether. The protocol charges user fees based on scalars applied to the L1 blob fee and L1 base fee in ETH. The chain operator collects fees in the custom gas token but spends them in Ether.

Can I migrate my chain into being custom gas token?

If you are already live using ether to pay for gas, you cannot become a custom gas token chain. This would likely require a risky, high lift state migration that we would not recommend.


Interested in the specs behind custom gas tokens? Check them out here