-
Notifications
You must be signed in to change notification settings - Fork 114
Multi Native Token in QuarkChain
qcdll edited this page Jan 22, 2019
·
3 revisions
- Treat all tokens equally, there is no cost difference to process transactions setting different gas_token_id and transfer_token_id
- Compatibility with EVM, keep original EVM opcode and add new ones to support querying token balances
- Token Balance Storage: to store a balance mapping, we can use either a list of token:balance pair, or use a trie structure and store in DB. Accounts with just a handful of token balances can benefit from using the balance pair list by avoiding to touch storage when reading/writing
- DEFAULT_TOKEN: each chain ID should pose a genesis native token as: (1) block reward (2) default token to use when EVM performs CALL or BALANCE without supplying token_id
- Genesis Token: default token for all the network, block coinbase reward will be paid in genesis token
- Default Chain Token: default token for EVM, this can be different than Genesis Token, allowing chains to use different tokens for EVM
All tokens are stored in the same way, and there is no performance advantage to use one token over another.
Official Website: https://www.quarkchain.io/
Discord Developer Community: https://discord.me/quarkchain