Ledger overview
In this section, you will learn about the different types of ledgers that exist on the Internet Computer. This guide will go into detail about what the different ledgers are, what their purposes are, and how they differ from ledgers you may be familiar with from other blockchains.
ICP ledger
The ICP ledger is a canister that is responsible for keeping track of ICP balances, processing new transactions, and providing clients with data about the history of transactions. It stores all data on-chain. For every transaction, a single block is created, which points to its parent block by storing the parent block's hash.
The ICP ledger uses AccountIdentifiers
as its internal account representation. It is compatible with the ICRC-1 standard; however, due to the fact that it uses AccountIdentifiers
instead of Accounts'
it stores information in a different block format than ICRC-1 ledgers. The same is true for the minting account of the ICP ledger.
It runs on the NNS subnet, as it is part of the NNS, and its controller is the governance canister. Upgrades to the ICP ledger have to be approved by the NNS, making the process decentralized.
ICRC-1 ledgers
ICRC-1 ledgers are a standardized version of ledgers on the Internet Computer. While ICRC-1 is the network standard defining how ledger canisters should behave, an ICRC-1 ledger is a single implementation of the ICRC-1 standard. It differs from the ICP ledger as it uses Accounts
as its internal representation.
ICRC-1 ledgers are stand-alone implementations, but in many cases, they are part of a larger software structure, such as an SNS or chain-key token implementation.
Differences from other blockchains
One of the biggest differences between ledgers deployed on ICP and ledgers deployed on other blockchains is that most account-based blockchains have the balances of accounts baked into their base protocol (e.g., Ethereum). This is not the case with either the ICP or ICRC-1 ledgers.
The ICP ledger canister sits on the application layer of the network rather than the protocol level. Consensus on the Internet Computer is independent of the existence of the ICP ledger. Nevertheless, the ICP ledger is fundamentally important to the way the network functions, especially due to its importance as a part of the NNS.
Since the ICP ledger runs on the application layer, transfers of the ICP token do not happen at the protocol level as they do on other chains. All ICP token transactions go through this canister. Any information gathered about historic ICP token transactions originates from the ICP ledger canister. This includes the ICP index canister, which fetches blocks periodically from the ICP ledger canister.
ICRC-1 ledgers are very similar in this regard; however, they resemble tokens that can often be found on other blockchains more closely. They are also run by a canister that runs the ICRC-1 ledger code, and all transactions of the ICRC-1 token go through an ICRC-1 ledger canister.