Search code examples
storageblockchainethereumipfsnft

NFT Marketplaces and Storage


I am new to blockchain and NFT space, but with decentralization at the heart of it. How are NFT marketplaces providing capabilities like Stats and Searching, do we also have any decentralized storage for storing those types of data? I see that the NFT assets can be stored in IPFS, but what about other data to display the stats related to NFT on the marketplace.


Solution

  • They duplicate some of the raw blockchain data and aggregations of this data in their own searchable databases.

    Example:

    • Each token mint emits a Transfer() event log with params of the token sender (0x0 in case of a token mint), receiver, and the token ID.
    • There is a standardized function that each NFT collection can implement to return the token metadata - name, description, and image URL - in a standardized output format.
    • A marketplace subscribes to events of newly minted tokens (usually only on their users' collections), then queries the metadata of the newly minted token (by its ID available from the event log), and stores the metadata in their own searchable database (e.g. ElasticSearch).