Custom In-Game NFT Marketplace Development

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.
Showing 1 of 1All 1305 services
Custom In-Game NFT Marketplace Development
Complex
~1-2 weeks
Frequently Asked Questions

Blockchain Development Services

Blockchain Development Stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1349
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1247
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    949
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1183
  • image_logo-advance_0.webp
    B2B Advance company logo design
    642
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    921

Custom In-Game NFT Marketplace Development

A gaming NFT marketplace is more than just a JPEG display. If you don't carefully design the smart contract architecture and attribute indexing, players will face transaction delays, unexpected fees, and inability to trade items with unique characteristics. Unlike ready-made solutions, custom development allows you to integrate in-game currency, item rental, and complex auctions. This reduces operational costs and keeps the economy inside the game. We are Web3 developers with 5+ years of experience building marketplaces that handle hundreds of thousands of items with deep attribute layers (level, modifiers, class compatibility). Get a consultation to discuss your project.

What problems does a custom NFT marketplace solve?

Ready-made solutions like Seaport (OpenSea protocol) cover basic scenarios but don't account for gaming specifics. Typical problems we solve:

  • Gas optimization. In-game transactions can number in the hundreds per day. Custom contracts allow batch transfers with ERC-1155 and aggregate royalties into a single operation. We use batchTransferFrom and multiCall to reduce gas by 40-60%. This saves $0.01 to $0.05 per operation, which accumulates significantly at scale.
  • Reentrancy. Gaming marketplaces are frequent targets for reentrancy attacks. We block them using ReentrancyGuard from OpenZeppelin and verify with Echidna fuzzing.
  • Complex trade logic. Bundle sales (character + inventory), multi-currency auctions, and conditional listings (minimum level, classes) are not supported by Seaport without heavy customization.

How to choose the token standard and trading model?

We start by selecting the token standard. For games, ERC-1155 is best for multiple item types, ERC-721 for unique characters. For NFT rentals we use ERC-4907.

Standard Use Case Advantages
ERC-721 Unique items (characters, legendary weapons) Each token unique, easy to track history
ERC-1155 Multiple types (chests, consumables) Gas savings, batch operations
ERC-4907 Item rental Separation of ownership and usage rights

Then we define the trading model:

  • In-game currency vs ETH/USDC: Hybrid is best. Listings in-game token, but a "Buy with USDC" button automatically swaps via DEX. This keeps the economy in-game and attracts external liquidity.
  • Royalties: distribution among developers, creators, and stakeholders. We implement via separate percentages or the ERC-2981 standard.
  • NFT rental: For expensive items we use ERC-4907, where ownership and right to use are separate.

If you want to discuss your gaming marketplace architecture, contact us — we'll help choose the optimal stack.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract GameNFTMarketplace {
    IERC20 public gameToken;
    IERC1155 public gameItems;
    
    uint256 public marketFeePercent = 250; // 2.5%
    uint256 public royaltyPercent = 500;   // 5% to creators
    address public treasury;
    address public developersWallet;
    
    struct Listing {
        address seller;
        uint256 itemTypeId;
        uint256 amount;
        uint256 pricePerUnit;       // in gameToken
        uint256 minimumPurchase;    // minimum purchase
        bool acceptsBundle;         // accepts bundle offers
        uint256 expiresAt;
        ListingType listingType;
    }
    
    enum ListingType { FIXED_PRICE, ENGLISH_AUCTION, DUTCH_AUCTION }
    
    struct Auction {
        address seller;
        uint256 itemTypeId;
        uint256 tokenId;
        uint256 startPrice;
        uint256 currentBid;
        address currentBidder;
        uint256 endTime;
        uint256 minBidIncrement;
    }
    
    mapping(uint256 => Listing) public listings;
    mapping(uint256 => Auction) public auctions;
    
    // Fixed price purchase
    function buyItem(uint256 listingId, uint256 amount) external {
        Listing storage listing = listings[listingId];
        require(listing.seller != address(0), "Listing not found");
        require(block.timestamp <= listing.expiresAt, "Listing expired");
        require(amount >= listing.minimumPurchase, "Below minimum purchase");
        
        uint256 totalPrice = listing.pricePerUnit * amount;
        uint256 fee = (totalPrice * marketFeePercent) / 10000;
        uint256 royalty = (totalPrice * royaltyPercent) / 10000;
        uint256 sellerProceeds = totalPrice - fee - royalty;
        
        // Payments
        gameToken.transferFrom(msg.sender, listing.seller, sellerProceeds);
        gameToken.transferFrom(msg.sender, treasury, fee);
        gameToken.transferFrom(msg.sender, developersWallet, royalty);
        
        // Transfer items
        listing.amount -= amount;
        if (listing.amount == 0) delete listings[listingId];
        
        gameItems.safeTransferFrom(listing.seller, msg.sender, listing.itemTypeId, amount, "");
        
        emit ItemSold(listingId, msg.sender, amount, totalPrice);
    }
    
    // English auction
    function placeBid(uint256 auctionId, uint256 bidAmount) external {
        Auction storage auction = auctions[auctionId];
        require(block.timestamp < auction.endTime, "Auction ended");
        require(bidAmount >= auction.currentBid + auction.minBidIncrement, "Bid too low");
        
        // Refund previous bidder
        if (auction.currentBidder != address(0)) {
            gameToken.transfer(auction.currentBidder, auction.currentBid);
        }
        
        // New bid to escrow
        gameToken.transferFrom(msg.sender, address(this), bidAmount);
        auction.currentBid = bidAmount;
        auction.currentBidder = msg.sender;
        
        // Anti-snipe: if bid < 5 minutes before end, extend
        if (auction.endTime - block.timestamp < 5 minutes) {
            auction.endTime += 5 minutes;
        }
        
        emit BidPlaced(auctionId, msg.sender, bidAmount);
    }
    
    // Dutch auction: price decreases over time
    function getDutchPrice(uint256 listingId) public view returns (uint256) {
        Listing storage listing = listings[listingId];
        // ... linearly interpolate price from startPrice to endPrice over duration
    }
}

How to organize attribute search?

A gaming marketplace requires rich context: item level, modifiers, class compatibility, battle history. We build an interface where each NFT is shown not as a JPEG but as a full card with characteristics.

interface GameItemListing {
  tokenId: number;
  itemType: {
    id: number;
    name: string;
    rarity: "common" | "rare" | "epic" | "legendary";
    category: "weapon" | "armor" | "consumable" | "companion";
    imageUrl: string;
  };
  attributes: {
    level: number;
    damage?: number;
    defense?: number;
    speed?: number;
    durability: number;
    upgradeCount: number;
    enchantments: string[];
  };
  gameContext: {
    compatibleClasses: string[];
    compatibleGames: string[];
    requiredLevel: number;
    lastUsedInBattle?: Date;
    totalBattlesUsed: number;
  };
  listing: {
    price: bigint;
    currency: "GGD" | "USDC";
    seller: string;
    listedAt: Date;
    expiresAt: Date;
  };
  priceHistory: Array<{ price: bigint; date: Date }>;
  floorPrice: bigint;
  pricePower: number;
}

For filtering by attributes we use PostgreSQL with GIN indexes on JSONB or Elasticsearch. This allows searching for items with specific enchantments, level, or class in milliseconds.

interface MarketplaceFilters {
  itemCategory?: string[];
  rarities?: string[];
  minPrice?: bigint;
  maxPrice?: bigint;
  minLevel?: number;
  maxLevel?: number;
  compatibleClass?: string;
  hasEnchantment?: string;
  currency?: "GGD" | "USDC";
  sortBy?: "price_asc" | "price_desc" | "recently_listed" | "ending_soon" | "price_power";
}

async function searchListings(filters: MarketplaceFilters, page: number) {
  const query = db("listings")
    .where("status", "active")
    .where("expires_at", ">", new Date());
  
  if (filters.itemCategory?.length) {
    query.whereIn("item_category", filters.itemCategory);
  }
  
  if (filters.minLevel) {
    query.where("attributes->>'level'", ">=", filters.minLevel.toString());
  }
  
  if (filters.hasEnchantment) {
    query.whereRaw("attributes->'enchantments' @> ?", [JSON.stringify([filters.hasEnchantment])]);
  }
  
  return query
    .orderBy(getSortColumn(filters.sortBy))
    .limit(PAGE_SIZE)
    .offset(page * PAGE_SIZE);
}

Process

  1. Analytics: analyze the game economy, item flow, expected trading scenarios.
  2. Design: choose L2 (Polygon, Arbitrum) for cheap transactions, define contract structure.
  3. Implementation: write smart contracts with Foundry, frontend with Next.js + wagmi.
  4. Testing: unit tests, integration tests, fuzzing in Echidna, gas consumption tests.
  5. Security audit: internal Slither + optional external audit.
  6. Deployment: set up Tenderly monitoring, event indexing.

Contact us to get a detailed commercial proposal.

What's included

  • Smart contracts with full test coverage (95%+)
  • Documentation (architecture, functions, events)
  • Frontend code with customizable cards
  • Deployment and Etherscan verification scripts
  • Integration with game backend (REST or WebSocket)
  • Admin panel training for the client's team
  • 1 month support after launch

Estimated timeline

Stage Duration Result
Analytics 1–2 weeks Technical specification, architecture
Contract development 4–6 weeks Source code, tests, documentation
Frontend 4–6 weeks UI with detailed cards, filtering
Integration 2–3 weeks Game API, item import
Audit and deployment 3–4 weeks Audit report, mainnet contracts

Pricing is individual. Let us evaluate your project — contact us.

We guarantee the marketplace will pass audit and handle up to 10,000 concurrent users. Experience: 5+ years and 15+ delivered projects in DeFi and GameFi. Reach out for a consultation.

Game Economy, Contracts, and On-Chain Mechanics

We’ve seen this scenario multiple times. Axie Infinity generated substantial revenue monthly at its peak, but within 18 months the token crashed by 98% and the audience by 95%. The cause—lack of sinks: players earned SLP and cashed out, while burn mechanisms were insufficient. An analysis of Axie’s economy (Collins Dictionary) confirmed the model turned into a Ponzi scheme. We provide end-to-end GameFi development: from tokenomics to smart contracts, so your economy doesn’t repeat this mistake. Let’s evaluate your project at a meetup or online.

Play-to-Earn Economy Break Points

Inflationary tokenomics without sinks. Players earn tokens through gameplay. If sinks (burn or consumption mechanisms) are insufficient, supply outpaces demand. Price drops. Player fiat income declines. Players leave. A death spiral.

The right structure is a dual-token model with clear separation: a governance/value token with limited supply and a utility/reward token for in-game economy. The utility token must be actively consumed: item crafting, upgrades, entry fees, breeding. Examples: GODS/FLUX in Gods Unchained, AXS/SLP in Axie (though sinks were insufficient there). Historical data shows that without sinks, token supply inflates by 5–10% monthly, leading to price collapse within 6–9 months.

Effective Sink Mechanisms

  • Breeding/crafting — burning utility token to create a new NFT (e.g., Axie). Typical burn costs range from $5–$15 per action, removing 0.5–2% of total supply annually.
  • Character upgrades — each evolution requires token burning, consuming 0.1–0.3% of circulating supply per upgrade cycle.
  • PvP entry fee — token burn for tournament entry, part goes to prize pool. This can burn up to 0.5% of supply per week in active games.
  • Item durability — item breaks after N battles, token spent on repair. Cost per repair ~$0.50–$2.
  • Financial mechanics — staking with lock-up, removing tokens from circulation for a period. Typical lock-up periods of 30–90 days reduce circulating supply by 15–25%.

On-Chain vs Off-Chain: Boundary and Trade-offs

It’s not necessary to put all game logic on-chain—each transaction costs gas and takes 12 seconds. A game cycle is milliseconds. Balance:

Component On-chain Off-chain Examples
Asset Ownership + NFT items, land
Transfer/Trading + Marketplaces
Finance (staking, rewards) + Staking vaults, DAO
Random generation + (via VRF) Chainlink VRF
Gameplay + Battle system, movement
Game world state + Coordinates, health points
Matchmaking + Server-side logic

Gameplay results are transferred to blockchain via signed messages from server or ZK-proof. Verifiable off-chain with ZK: game server generates ZK-proof of session correctness, contract verifies proof and issues rewards. Implementations: Cartridge (Starknet), zkSync game rollups. Gas savings from batching proofs can reach 90% compared to per-action on-chain validation.

How Does Dual-Token Model Prevent Economic Collapse?

Governance token (limited supply) acts as value store and is used for major decisions. Utility token (minted via gameplay) is consumed by sink mechanisms, ensuring deflationary pressure. The ratio of governance to utility tokens in the initial pool should be 1:10 to 1:20. Simulation shows that a 30% burn rate on utility token keeps supply growth below 3% per year, preserving player income and token price.

Implementation of NFT Game Items

Standard: ERC-1155 for fungible items (resources, consumables) + ERC-721 for unique (characters, land). ERC-1155 provides up to 60% gas savings on batch transfers.

How to Implement Dynamic NFTs Without Overloading the Blockchain?

Item attributes change during gameplay (experience, durability, upgrades). Two approaches:

  • Fully on-chain: attributes stored in contract mapping, tokenURI generated from attributes via SVG/JSON encoding. Expensive in gas with frequent updates (e.g., $0.50 per update). Used for land and key assets.
  • Hybrid: attributes stored off-chain, tokenURI contains state hash. Updates signed by server, verified on-chain during transfer or sale. Cheaper ($0.02 per update) but requires server trust or ZK.

Breeding and crafting. Contract: two parent NFTs → pay utility token (burn) → mint new NFT with attributes dependent on parents + Chainlink VRF for randomness. Without VRF, miners can manipulate randomness via block selection.

// Simplified breeding with Chainlink VRF
function breed(uint256 parent1Id, uint256 parent2Id) external {
    require(ownerOf(parent1Id) == msg.sender);
    require(ownerOf(parent2Id) == msg.sender);
    require(breedingToken.burnFrom(msg.sender, BREEDING_COST));

    uint256 requestId = vrfCoordinator.requestRandomWords(...);
    pendingBreeds[requestId] = BreedRequest(parent1Id, parent2Id, msg.sender);
}

function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
    BreedRequest memory req = pendingBreeds[requestId];
    uint256 childAttributes = deriveAttributes(req.parent1Id, req.parent2Id, randomWords[0]);
    _mintWithAttributes(req.requester, childAttributes);
}

Marketplace and Royalties

An integrated marketplace gives control over fee structure and custom logic (e.g., banning item trading below a certain level). Royalties per EIP-2981 are standard but not enforceable: Blur and other marketplaces ignore on-chain royalties. For enforcement—whitelist-only transfer (only through contracts that pay royalties). Sacrifice composability for rights protection. Typical marketplace fee is 2.5–5% per transaction, generating recurring revenue.

Staking and Rewards Distribution

Staking NFTs is a mechanic for player retention. Problem: distributing rewards with thousands of stakers requires constant transactions (expensive). Solution—reward-per-share pattern (as in MasterChef from SushiSwap): global accRewardPerShare, upon claim or state change, debt is recalculated by formula pendingReward = stakedAmount * (accRewardPerShare - userRewardDebt). O(1) complexity regardless of staker count. Gas savings up to 70% compared to per-element distribution. Over a year with 10,000 stakers, this translates to roughly $40,000 saved in gas.

Why Is Reward-Per-Share Pattern Critical for Scalability?

Direct per-user reward updates cost O(n) per block, consuming more than 200,000 gas for 1,000 stakers. Reward-per-share reduces this to 30,000–50,000 gas per user claim, enabling thousands of stakers. Many early P2E games collapsed under gas costs that exceeded reward value. This pattern scales to tens of thousands without infrastructure overhead.

Process and Timelines

We start with a game economics document: token flows, mint/burn mechanics, projected supply schedule, sink analysis. Before writing code, the economy is modeled (Cadence, Python simulation).

GameFi Building Process: 5 Stages

  1. Economic modeling — 1–2 weeks. Develop dual-token model, calculate sinks, outline incentives for long-term holding.
  2. Token contract development — 2–3 weeks. ERC-20 for governance, ERC-20 for utility, with configurable mint/burn policy.
  3. NFT smart contracts — 3–5 weeks. ERC-721 / ERC-1155 with dynamic metadata, breeding/crafting, Chainlink VRF.
  4. Staking + rewards — 2–3 weeks. Contract based on reward-per-share, interfaces for frontend.
  5. Marketplace (optional) — 2–4 weeks. Custom marketplace with enforced royalty.

Work Deliverables

  • Source code for all smart contracts with tests (Foundry/Hardhat)
  • Architecture and economics documentation
  • Integration with Chainlink, Tenderly for monitoring
  • Code audit and formal verification (Slither, Mythril, Echidna)
  • Team training on contract interaction
  • Post-deployment support (3 months)

Basic GameFi stack (tokens + NFTs + staking + marketplace) — 8 to 16 weeks. Full game with on-chain randomness, breeding, dynamic NFTs — 4–8 months. ZK-based verifiable gameplay — a separate project from 6 months.

Contact us for an audit of your tokenomics—we’ll assess risks and refine sink mechanisms. Order GameFi project development—receive a ready product with proven economy. We guarantee contract stability and code transparency. Our experience includes dozens of implemented Web3 projects, including audits of 15+ P2E games. Get a consultation to start your project.