> ## Documentation Index
> Fetch the complete documentation index at: https://core.anylayer.org/llms.txt
> Use this file to discover all available pages before exploring further.

# NFT Marketplace Integration

> Example of integrating ZKScore with NFT marketplaces

## Overview

This example shows how NFT marketplaces can integrate ZKScore to track trading activity, verify collectors, and reward marketplace participation.

## NFT Marketplace Integration

<CodeGroup>
  ```javascript JavaScript theme={null}
  class NFTMarketplaceIntegration {
    constructor(marketplace, zkScoreContracts) {
      this.marketplace = marketplace;
      this.zkScore = zkScoreContracts;
    }
    
    async trackNFTPurchase(buyer, seller, nftAddress, tokenId, price) {
      // Record trade
      await this.marketplace.executeTrade(buyer, seller, nftAddress, tokenId, price);
      
      // Update buyer's NFT score
      await this.zkScore.scoreCalculator.updateCategoryScore(buyer, 1, price / 100);
      
      // Check collector achievements
      const nftCount = await this.marketplace.getUserNFTCount(buyer);
      if (nftCount >= 10) {
        await this.zkScore.achievementRegistry.claimAchievement(200, '0x'); // NFT Collector
      }
    }
  }
  ```
</CodeGroup>

## Best Practices

1. **Track All Trades**: Update scores for every transaction
2. **Buyer & Seller**: Track both sides of trades
3. **Collection Diversity**: Reward diverse collecting
4. **Rarity Tracking**: Higher scores for rare NFTs

## Related Documentation

* [Complete Integration](/contracts/examples/complete-integration)
* [Achievement Registry](/contracts/achievement-registry/overview)
