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:
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
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).
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.
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