Ordinals (Bitcoin NFTs) have been taking off on Bitcoin. They’ve done hundreds of millions of dollars in volume since their inception in January of this year.
ICP is poised to be the best blockchain to make Bitcoin better with the direct Bitcoin integration and ckBTC implementation. Bitcoin needs speed, scalability, and more capable smart contracts, and ICP can provide it all.
The first initiative that I want to put forward as a community is to build a decentralized Bitcoin indexer on ICP. Here’s what this would look like:
- Storage canister: this canister would use the restricted management canister API to pull Bitcoin block data in a decentralized way. This has already been implemented as part of the Bitcoin integration and it would only take an NNS proposal to allow another canister to make calls. Once a block is pulled into the canister, it would parse out all of the locations where people store data on Bitcoin. As far as I know right now, this would be the witness data of the input of a transaction, the op_return in the output, and the multi-sig in the outputs. Including these three data sources would be enough to index Ordinals, Counterparty, and other interesting Bitcoin protocols.
- Ordinals indexer canister: this canister would pull the witness data from the storage canister and would then apply the Ordinals protocol to determine Ordinals protocol state. This canister would store the entirety of the Ordinals index (currently 7GB) in stable memory and would be query-able by applications on the Internet Computer or via http_requests.
- BRC-20 indexer canister: this canister would pull Ordinals data from the Ordinals indexer canister and follow the BRC-20 protocol to provide BRC-20 state. There is some information that is required here that will need to be provided by the Ordinals indexer canister (original owner of an inscription, transfer history of all inscriptions, etc).
- Counterparty indexer canister: this canister would pull all op_return and multi-sig data from the storage canister and would process that data using Counterparty logic. This would enable indexing of Stamps, SRC-20, and other counterparty assets.
Building decentralized Bitcoin indexers on ICP solves many of the current problems with meta-protocol indexers on Bitcoin right now. Some of these problems include:
- Centralization. There is no incentive to run a meta-protocol indexer on Bitcoin.
- Trusting state. You don’t have any state guarantees or consensus around meta-protocol indexer state. Zero knowledge could help here, but isn’t yet.
- Governing protocol changes. There is weak social consensus around protocol changes right now.
By building these on ICP you get a decentralized meta-protocol indexer implementation, you can compare canister hash to code in Github to trust code, and you can govern the implementation using a governance canister. This provides better decentralization, more trust-minimization, and better governance.
This is one of the main initiatives I will be championing over the next 3 months and is a key example of how ICP can make Bitcoin better. If you are interested in getting involved, please reach out. There will be a working group forming around BTC & ICP as well (details coming soon).