Digital assets overview
A digital asset is an electronically-stored item that has value and can be owned, sold, traded, or transferred.
Digital assets can take many forms, such as:
Tokens, including stablecoins.
Non-fungible tokens (NFTs) representing digital assets or corresponding to physical items, such as real estate or luxury goods.
On ICP, digital assets come in three primary forms: ICP tokens, ICRC tokens, and chain-key tokens.
ICP tokens are the network's native utility token. They are used for different actions on the network, such as being converted into to pay for a canister's resources, or being staked in a neuron to receive voting power on the NNS.
ICRC stands for Internet Computer Request for Comments
and is a working group for various topics. ICRC standards can be created for anything, not just token types. Currently, the protocol supports the ICRC token standards ICRC-1, ICRC-2, ICRC-3, and ICRC-7, with several more in the process of being drafted and developed.
Chain-key tokens are created using ICP's chain-key cryptography protocols, such as threshold signing. The chain-key tokens ckBTC, ckETH, and ckERC20 use ICRC-1 ledgers that support the ICRC-2 extension. Each chain-key token is deployed on ICP and backed 1:1 with the native token, such as BTC, ETH, or ERC20, locked and kept on their native chain. There are no intermediaries or centralized bridges used for chain-key tokens.
The older token standards, DIP-20 and DIP-721, are designed to resemble the Ethereum ERC-20 and ERC-721 standards respectively. While some projects on ICP still use DIP-20 and DIP-721, the new ICRC-2 and ICRC-7 standards are designed to provide a newer, alternative standard for each.
Each token standard is elaborated on in the token standards documentation.
Terminology
Principal: An entity that can be authenticated by ICP. Principals are used to identify canisters, individuals, services, ledger accounts, or other components deployed on ICP. A principal can have multiple accounts because you can change the bytes of the subaccount. Principals are ICP's representation of a public key of a user.
Subaccount: A optional 32-byte array. Together a principal and a subaccount form an account according to the ICRC-1 standard.
Account: Used by ICRC ledgers, it is defined as a struct that contains a
principal
and an optionalsubaccount
in the format of(principal, subaccount)
.Account
can be converted into anAccountIdentifier
but not vice versa.AccountIdentifier: Used by the ICP ledger, defined as essentially a hash of the ICRC-1
Account
value. The ICP ledger can never have the same internal representation as ICRC ledgers.Wallet: On ICP, a wallet refers to an asset custody solution. Wallets refer to custody options for ICP tokens, ICRC-1 tokens, cycles, NFTs, or other digital assets.
Ledger: Used to record transactions in a chain of blocks. A ledger serves transaction requests and offers a variety of endpoints to fetch data and information about its state.
Index: Allows for querying a transaction list for a specific account rather than querying a ledger's entire history. Indexes can also serve blocks like the ledger and is actually the preferred method of doing so.
Decentralized exchange: A peer-to-peer marketplace for buying, selling, and transferring tokens.
Ledgers
Ledgers are used to record transactions in a chain of blocks. One block references its parent block forming a blockchain that is immutable without changing all previous blocks in the chain.
Currently, on the Internet Computer you will find two different types of ledgers mainly being used:
The ICP ledger canister that is running on the NNS.
ICRC-1 ledgers.
ICP ledger
The main purpose of the ICP ledger is to record burn
, mint
, approve
, and most commonly transfer
transactions with regards to ICP's native token ICP
. The ICP ledger canister services transaction requests and offers a variety of endpoints to fetch data and information about the state of the ICP ledger.
There is only one ICP ledger on the mainnet.
See the documentation on how to interact with the ICP ledger for more info.
ICRC-1 ledgers
To create a new token, one requires a ledger to record all transactions made with this token. This is where the ICRC-1 standard comes in.
ICRC-1 is a standard created by the Ledger and Tokenization Technical Working Group that defines the general functionalities of ledgers. All tokens and their corresponding ledgers that wish to support this standard have to fulfill all requirements specified in the standard. View the full description of the ICRC-1 standard.
Extensions of the ICRC-1 standard called ICRC-2 and ICRC-3 have been created. ICRC-2 enables approve
and transfer_from
transactions, which is a concept that has seen wide adoption among other token standards. If your ICRC-1 ledger supports the extension standard ICRC-3, then your ICRC-1 ledger will have an endpoint to serve transactions.
There may be further standards that serve as extensions to the ICRC-1 standard; however, not all ICRC standards necessarily have to be extensions of ICRC-1.
The purpose of the ICRC-1 ledger is to create a universally accepted standard for making and recording transactions for tokens on ICP.
Difference between the ICP ledger and ICRC-1 ledgers
The ICP ledger does not follow an official standard. It was created before the ICRC-1 standard had been conceptualized and created.
ICRC-1 is a standard, not a specific implementation of a ledger. There is a reference implementation created by DFINITY, but there may be different ICRC-1 ledgers with different implementations that all follow the same standard.
The ICRC-1 reference implementation and the ICP ledger have different endpoints, different transaction and block objects, and quite a few other, more subtle, differences.
The ICP ledger implements all endpoints defined in the ICRC-1 standard; however, this does not mean that the ICP ledger is an ICRC-1 ledger. The ICRC-1 standard clearly defines how an Account
should be represented, while the ICP ledger uses AccountIdentifiers
.
Should a future ICRC-1 extension standard or the use of index canisters result in the exposure of the internal representation of accounts, any ICRC-1 ledger will deviate from the ICP ledger.
See the documentation on how to interact with the ICRC ledger for more info.
Indexes
If you want to fetch transactions for a specific Account
or AccountIdentifier
you would have to first query all blocks and transactions from the ICP or an ICRC-1 compatible ledger, then search through them for transactions in which the Account
or AccountIdentifier
was involved. To solve this issue, index canisters exist. The index canisters allow for the querying of transaction lists for a specific account. Furthermore, they offer endpoints for querying the current balance of an account, and you can also fetch blocks from one of their endpoints.
There are two different types of index canisters: one for the ICP ledger and one for ICRC-1 compatible ledgers. Due to the previously mentioned difference between the ICP ledger and ICRC-1 ledgers, these two index canisters do not use identical endpoints. Since one uses Account
and the other uses AccountIdentifier
as an internal representation of accounts, the returned transactions will differ in this regard.
ICP index canister
The ICP index canister is running on the NNS subnet with the canister ID qhbym-qaaaa-aaaaa-aaafq-cai.
ICRC index canister
Since there are multiple ICRC-1 compatible ledgers, there will be multiple ICRC-1 index canisters. For example, the ICRC-1 index recording ckBTC transactions is running under the canister ID n5wcd-faaaa-aaaar-qaaea-cai.
Learn more about index canisters.
Cycles
When a canister is deployed onto the ICP mainnet, it is required to pay for the resources it uses, such as storage and compute. To pay for these resources, developers need to use cycles. A developer can top up their canisters with cycles by converting ICP tokens into cycles, then depositing them into the canister's cycles balance.
Cycles are used because, while the value of an ICP token is volatile, the value of cycles is pegged to XDR, a group of fiat currencies. This enables smart contracts on ICP to maintain a rather stable cost.
Asset custody
In order to obtain tokens and other assets, you will need a wallet or other asset custody option. There are different wallet solutions available for various security or access levels, such as:
Hardware wallets.
Web-based wallets.
Mobile app wallets.
Browser extensions.
Obtaining tokens
Once you have selected a wallet or other custody solution, you can obtain tokens by:
Purchasing them from a marketplace or decentralized exchange.
Receiving airdrops or transfers from others.
The ICP index canister is running on the NNS subnet with the canister ID qhbym-qaaaa-aaaaa-aaafq-cai. As there are multiple ICRC-1 compatible ledgers, there will also be multiple ICRC-1 index canisters. For example, the ICRC-1 index canister recording ckBTC transactions is running under the canister ID n5wcd-faaaa-aaaar-qaaea-cai.