Beltsys Labs
Beltsys Labs

ELEPHANTPINK CREATIVE: Fox Mystery: P2E Game & NFT Collection

ELEPHANTPINK CREATIVE — blockchain case study by Beltsys Labs
Industry
Gaming & NFTs
Headquarters
Marbella, Spain
Technologies
Solidity, React, Polygon, IPFS
Website
https://foxmystery.com/

Fox Mystery is a collection of 10,000 unique programmatically generated NFTs, integrated into a Play-to-Earn video game deployed on the Polygon network. The project combined generative art, Solidity smart contracts, and a seamless minting experience built in React, enabling players to acquire NFT characters with unique attributes and use them within the game economy.

Development Challenge

The ELEPHANTPINK CREATIVE team needed a technical infrastructure spanning multiple layers: from algorithmic art generation to integration with the Play-to-Earn game mechanics. The main challenges included:

  • Art generation at scale: Producing 10,000 visually unique NFTs from over 361 traits distributed across 9 categories (background, body, clothing, accessories, expression, among others), ensuring no combination was repeated and that rarity distribution remained consistent.
  • Gas costs: Mass minting on Ethereum mainnet was prohibitively expensive for users. A solution on a low-fee network was required without sacrificing security.
  • Whitelist verification: The launch included exclusive access phases for early adopters, demanding a gas-efficient on-chain verification system.
  • P2E integration: The NFTs needed to function as in-game assets, with staking capabilities to generate rewards and influence player progression.

Technical Solution

Generative Art Engine

We developed a generation engine in Node.js that combined the 361+ traits across the 9 defined categories. The system applied compatibility rules between layers to prevent visual conflicts, along with a rarity distribution algorithm that assigned weighted probabilities to each trait. The final output included the composite images and JSON metadata files conforming to the ERC-721 standard.

Solidity Smart Contracts

The main ERC-721 contract was deployed on Polygon to take advantage of reduced gas fees while maintaining security inherited from Ethereum. Key contract features included:

  • Reveal mechanism: Metadata remained hidden after the initial mint. Once the sale phase was complete, the reveal function was executed, linking each token ID with its actual metadata stored on IPFS, preventing buyers from selecting specific traits.
  • Merkle tree verification: The whitelist was implemented using Merkle trees. Rather than storing all addresses in the contract (a gas-expensive operation), only the root hash was stored. Each user provided their Merkle proof at the time of minting, and the contract verified inclusion at minimal computational cost.
  • Staking contract: A second contract allowed holders to deposit their NFTs to accumulate rewards in the ecosystem token. Staking recorded the deposit timestamp and calculated rewards proportionally, with multipliers based on NFT rarity.

Decentralized Storage with IPFS

All images and JSON metadata were stored on IPFS, ensuring permanence and censorship resistance. Contract URIs pointed to immutable CIDs (Content Identifiers), guaranteeing that assets could not be altered after the reveal.

React Minting Page

The minting interface was built in React with Web3 integration for wallet connection (MetaMask, WalletConnect). The flow included automatic Polygon network detection, assisted network switching, real-time whitelist verification, and visual confirmation of the minted NFT. The interface displayed collection progress and the status of each sale phase.

Results

The project was delivered with the full collection of 10,000 unique NFTs generated from the 9 trait categories. The Polygon architecture reduced minting costs to fractions of a cent per transaction, facilitating mass adoption. The Merkle tree whitelist system processed verifications efficiently without congesting the network, and the reveal mechanism ensured a fair launch. The integration of the staking contract with the P2E game economy enabled holders to use their NFTs as productive assets within the Fox Mystery ecosystem.

See more case studies

Request information with no obligation!

Get a free consultation and tell us about your project.

Contact Us