Blockchain indexer

Modified on Tue, 03 May 2022 at 10:48 AM

To display data from the blockchain (aka your NFTs), a web3 application like the Liteflow NFT White-label Marketplace needs to fetch the information from the blockchain. Blockchain is not optimized to query many different data, and thus, making basic requests like fetching 10+ NFTs can take minutes. Of course, this is unacceptable for users and the general user experience of the platform.


The indexer

The indexer is a tool that synchronizes all the data from the blockchain to a dedicated database that acts as a cache layer. This indexer is constantly running and listening to every event from the blockchain necessary for your marketplace, then extracting all relevant information to put them in the database as an easy-to-query data.

It is critical for the indexer to index every single event in the correct order. This can become highly complex when dealing with unreliable nodes (from centralized chains or chains with small networks). The indexer is built with resilience and redundancy in mind allowing it to run, recover any block, and access multiple nodes from different providers to reduce the risk of failure.


Data indexed

The indexer only indexes a fraction of the data from the blockchain. Only data related to your NFT Marketplace are indexed to reduce storage on your database and thus cost. 


NFT Information

All information related to your NFT like the title, description, images, etc... This is not only fetched from the blockchain but also from the metadata retrieved from IPFS, where metadata is stored.


Ownership

Ownership is critical for NFT, so every single transfer is indexed to ensure that in any situation (transfer, gift, sell...), the full ownership is transferred on-chain and also off-chain.


Trades

As the marketplace is based on a decentralized exchange for NFTs, trades are essential to track the value of these NFTs and update the platform's offers accordingly.
















Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article