New
July 24, 2024

Why Is a Decentralized Indexer Important for Runes/Ordinals Assets?

The purpose of BEVM's indexer development is to achieve decentralized cross-chain functionality for Runes and Ordinals assets. 

For BEVM, enabling $BTC and native Bitcoin assets to be used securely, efficiently, and in a decentralized manner is a critical mission. 

To this end, we need a native decentralized cross-chain bridge for BEVM. By utilizing SPV, Taproot Schnorr Signature, MAST, and BFT POS, BEVM has developed a truly decentralized Bitcoin cross-chain custody solution called Taproot Consensus.

Each Validator within BEVM is elected through a Byzantine POS consensus and acts as a custodian of the Bitcoin network. To ensure the authenticity of user asset deposits, each Validator must run its own Bitcoin SPV to verify transactions bridged from the Bitcoin mainnet to BEVM. When 2/3 of the Validators reach a consensus on a $BTC cross-chain deposit, the user receives $BTC on BEVM.

However, due to the unique nature of Runes and Ordinals assets and the limitations of SPV, the original Taproot Consensus cannot achieve decentralized cross-chain functionality for these assets. Although BEVM can obtain any transaction from the Bitcoin network through SPV, it cannot determine if it corresponds to a BRC20/Ordinals/Runes asset. Additionally, SPV cannot identify the type of Ordinals or Runes being processed, the quantity of assets, or the recipient. 

In this case, the information in Runes/Ordinals transactions must be recognized and parsed through external indexers.

Current Mainstream Indexer Development

The key to the indexer lies in the accuracy of recognizing Runes/Ordinals transaction information. 

Unlike Bitcoin light clients, mainstream indexers such as Unisat (not open-source), OKLINK, BINANCE, and ORDISCAN are not protected by the Bitcoin network. This introduces a risk of centralization, meaning that there is a possibility of errors in recognizing Runes/Ordinals transaction information. 

In 2023, $SATS and other Ordinals experienced issues where users purchased fake Ordinals due to an indexer mistakenly identifying different formatted symbols as the same. 

Single-node indexers lack cross-validation, and a single point of failure could result in user funds being lost, which is a major criticism of the centralization of Runes/Ordinals assets. 

To address this, some Bitcoin ecosystem contributors run different indexer codes and cross-validate large volumes of Runes/Ordinals transactions to identify indexer codes that align with market consensus, integrating them into OPI (Open Protocol Indexer).

BEVM's Decentralized Indexer Solution

BEVM aims to upgrade Taproot Consensus to enable decentralized cross-chain functionality for Runes and Ordinals assets. BEVM has proposed its decentralized indexer solution to address the issues of single points of failure and the authenticity of indexed transactions.

1. Decentralized Indexer Nodes

Each BEVM Validator must introduce the Runes/Ordinals indexer based on their own Bitcoin SPV. BEVM Validators are selected through Byzantine PoS consensus, staking $BTC and BEVM tokens, with a maximum of 1,000 Validators. This fundamentally resolves the issues of single points of failure and centralization in existing indexers.

2. Open-Source Indexer Cross-Validation

BEVM has developed an indexer based on the OPI open-source protocol, adding parsing steps for Runes/Ordinals transfer information. Additionally, BEVM plans to use other open-source indexers for auxiliary validation. 

However, different indexers use different databases, requiring multiple copies of $SATS cross-chain information to be stored in each indexer's database. Writing all indexer codes into the node would make the node code too large, affecting the speed of consensus and block production.

To maintain user experience and security, BEVM uses multiple well-known open-source indexer libraries such as OKLINK, Ord, and OPI for cross-validation. Validators only run the cross-validation process on BEVM nodes, significantly reducing costs. 

The process is as follows: 

  • A Bitcoin transaction is obtained by each Validator's SPV and verified for authenticity.
  • The Validator then places the transaction on the indexer, retrieves corresponding information from different data sources like OKLINK, ORD, and OPI for cross-validation on the BEVM chain, and reaches consensus on BRC20/Runes information. 
  • Ideally, there will be many excellent open-source BRC20 indexer repositories, with each Validator using different cross-validation paths, resulting in hundreds of combinations for cross-validation.

We have already integrated this part of the code into the BEVM framework. Stay tuned, everyone!