Tokens
Tokens are the native digital currencies and assets that power the ArcBlock blockchain. This section defines what tokens are within the ArcBlock ecosystem, distinguishes between native and custom-created tokens, and introduces the crucial concept of "foreign tokens" that enable cross-chain correlation with EVM-compatible networks. Understanding tokens is fundamental to interacting with the ArcBlock chain, whether you are transferring value, purchasing digital properties, or participating in decentralized exchanges.
For a broader understanding of core blockchain entities, refer to Wallets and Accounts and Non-Fungible Tokens (NFTs).
What are Tokens on ArcBlock?#
On the ArcBlock chain, cryptocurrencies are referred to as tokens. A token is a digital or virtual currency secured by cryptography, making it nearly impossible to counterfeit or double-spend.
Native Tokens#
Every ArcBlock chain supports at least one native cryptocurrency. For instance:
- The native token on the main chain is ABT.
- The native token on the beta chain is TBA.
Custom Token Creation#
Developers have the flexibility to create an unlimited number of custom tokens on the ArcBlock chain by sending a CreateTokenTx
transaction. This allows for diverse use cases and economic models within decentralized applications.
User Interactions with Tokens#
Users can perform various operations with tokens on the ArcBlock chain, often without the need for complex smart contracts. These interactions include:
- Transferring Tokens: Sending tokens to other users.
- Purchasing Digital Properties: Using tokens to acquire NFTs.
- Exchanging Tokens: Swapping between different tokens at fixed rates.
Token State Structure#
The TokenState
represents the on-chain data for a token, detailing its characteristics and current status. Below are the key fields that define a token's state:
Field Name | Type | Description |
---|---|---|
|
| The unique address of the token on the blockchain. |
|
| The address of the entity that issued the token. |
|
| The full name of the token (e.g., "ArcBlock Token"). |
|
| A brief description of the token. |
|
| The ticker symbol of the token (e.g., "ABT"). |
|
| The smallest unit of the token (e.g., "wei" for Ethereum). |
|
| The number of decimal places for the token's smallest unit. |
|
| A URL or identifier for the token's icon. |
|
| The total supply of the token in circulation. |
|
| Optional. Details for correlating this token with a token on an EVM chain. |
|
| Optional. Contextual data related to the token's state. |
|
| Optional. Arbitrary data associated with the token. |
Foreign Tokens for Cross-Chain Interoperability#
Foreign tokens are a critical feature for enabling interoperability between the ArcBlock chain and EVM-compatible blockchains (like Ethereum). A foreign token is used to correlate a token on ArcBlock with an identical token on an EVM chain, ensuring they share the same symbol, decimal places, and supply.
For example, ABT on the ArcBlock main chain and ABT on the Ethereum mainnet are considered the same foreign token, allowing for seamless movement between the two networks.
ForeignToken
Structure#
The foreignToken
field is defined when a CreateTokenTx
transaction is sent and cannot be updated after the token's creation. Its structure is as follows:
Field Name | Type | Description |
---|---|---|
|
| The type of the foreign chain (e.g., "ethereum"). |
|
| The contract address of the token on the foreign chain. |
|
| The blockchain type of the foreign chain. |
|
| The name of the foreign chain (e.g., "Ethereum Mainnet"). |
|
| The unique identifier of the foreign chain. |
ArcBridge and Cross-Chain Movement#
Tokens configured with a valid foreignToken
should set up an ArcBridge. An ArcBridge Node is a crucial component that facilitates the secure and verifiable movement of tokens between the ArcBlock chain and the correlated EVM-compatible chain. This enables users to deposit tokens from one chain and withdraw them on the other, enhancing liquidity and utility across different blockchain environments.
Conclusion#
Tokens are versatile digital assets on the ArcBlock chain, ranging from its native cryptocurrencies to custom-created assets, and are enhanced by the capability of cross-chain correlation through foreign tokens and ArcBridge. This flexibility empowers developers to build rich decentralized applications and users to interact with digital value seamlessly across different blockchain networks. To learn how to programmatically manage and interact with tokens, proceed to the Token Transactions section.