The notion of custom base tokens is both an elegant innovation and a dizzying proposition. The ZKsync Stack, particularly with its permissioned allowlist and bridging capabilities, offers developers a fresh canvas for redefining on-chain economics. Below, we untangle the intricacies—step by step.
What do Custom Base Tokens do?
Gone are the days when ETH was the unchallenged standard for gas fees. With custom base tokens, developers can anchor their chains to an ERC20 token of their choosing. This approach grants unprecedented freedom: tailor your tokenomics, court specialised communities, or simply brand your chain with a native token that resonates with your ecosystem.
The Allowlist Imperative
Right now, adding a token to your chain involves placing it on an allowlist. This list, stored in the BridgeHub contract on Layer 1 (L1), dictates which ERC20 tokens can double as gas currencies. While this process is semi-restricted today, there are plans to let any ERC20 token in, permissionlessly. It’s the sort of incremental step that might make even the most cautious developer rub their hands with anticipation.
For official references, visit the [ZKsync official documentation].
Setting Up Your Custom Base Token
1. Deploy an ERC20 Token on L1
Begin by deploying your chosen ERC20 token to L1. This token will act as the economic bedrock of your new chain, so choose carefully. Stability, community backing, and utility go a long way.
2. Create and Configure Your ZK Chain
When configuring the chain, specify the token’s address as the base currency. You’ll also be prompted for the nominator and denominator, which define how your token’s value stacks up against ETH. A ratio of 20/1, for instance, means 20 of your tokens equate to 1 ETH for gas fee purposes.
3. Fund the Ecosystem and Governor Addresses
Both the “ecosystem” and “chain governor” addresses on L1 will need a supply of your ERC20 token. These addresses can be found in your ecosystem’s YAML configuration files. Funding them ensures the chain has enough liquidity to process transactions and governance actions.
Use a CLI command like:
pgsqlCopyEditcast send <0xTOKEN_ADDRESS> "transfer(address,uint256)" \
<0xGOVERNOR_ADDRESS> 1000000000000000000 \
--private-key <PRIVATE_KEY> \
--rpc-url http://localhost:8545 \
--gas-price 30000000000
4. Initialize and Bridge Tokens
Finally, initialize your new chain in the ecosystem. Then bridge tokens from L1 to L2 using the ZKsync CLI:
luaCopyEditzksync-cli bridge deposit --token <0xTOKEN_ADDRESS> \
--rpc=http://localhost:3050 \
--l1-rpc=http://localhost:8545
On a standard ZKsync chain, ETH is referenced by a dedicated contract. For a custom base token chain, your bridged ERC20 effectively sits where ETH would on a default chain.
Restarting a Custom Base Token Chain
When the local L1 node goes offline (taking your ERC20 token with it) you’ll need to re-deploy the token contract and update its address in the chain configs. Then, simply re-fund those governor addresses, initialise the chain, and relaunch with zkstack server
.
If you do decide to bridge “regular” ETH onto this chain, it will register under a different contract address than your custom base token. To locate the contract address for ETH, call the l2TokenAddress
function in zksync-ethers
, passing ETH_ADDRESS_IN_CONTRACTS
as a parameter.
Custom Base Tokens and the Larger ZKsync Vision
Evolving Ecosystem
ZKsync’s forward momentum suggests that fully customisable economies are on the horizon. Current alpha code, ironically, relies on a “list,” but the hush around future permissionlessness is as thrilling as it is inevitable.
Real-World Deployments: UBS and Beyond
Already, major institutions like Swiss bank UBS are piloting ZKsync’s technology to tokenise assets like gold. This signals a broader trend: if global finance can test new asset classes and management strategies via zero-knowledge (ZK) technology, there’s no reason that a project’s community-oriented token can’t do the same.
ZK Rollups, Gas Fees, and the Road Ahead
ZK rollups, including ZKsync Era, bundle transactions together and validate them off-chain, drastically reducing costs. As transaction volume increases, the gas fees drop, a stark contrast to Layer 1 blockchains where fees typically soar with higher network usage. Looking to 2025, ZKsync targets 10,000 transactions per second at near-zero cost, buoyed by Ethereum introducing blobs and danksharding. This synergy could further slash fees and turbocharge throughput.
Custom base tokens are more than a quirk of the ZKsync Stack; they herald a new era of blockchain sovereignty. Whether you’re forging a chain for a niche gaming platform or future-proofing an institutional-grade solution, the route to launching your own branded chain is increasingly straightforward and compelling.
Disclaimer: This article is for informational purposes only and does not constitute financial advice. Always conduct thorough research before making any investment or deployment decisions.