Solple Metaverse Exchange

Economic / Gaming NFT

Solple Metaverse Exchange

Solo-built multi-tenant NFT exchange concept for metaverse/game assets.

Role
Solo builder · architecture, implementation, and operational tooling
Period
2022
Context
Side Project
01 / Executive summary

Solo-built multi-tenant NFT exchange concept for metaverse/game assets.

DECISION / ASystem challenge

What made the system difficult.

Had to support heterogeneous asset types while keeping marketplaces isolated and configurable per tenant.

DECISION / BEngineering response

How boundaries and flows answered it.

Designed contract and metadata patterns to support multiple game asset categories and tenant-specific marketplaces.

03 / Technology field
01Solidity02React03IPFS04Node.js05MongoDB
04 / Detailed record

Metaverse NFT Exchange for Game Companies

Developed a specialized NFT exchange platform designed for metaverse and gaming ecosystems, enabling game companies to manage in-game assets as tradable NFTs with full on-chain implementation.


Platform Architecture

Game-Centric Design

Built a multi-tenant marketplace where each game company operates its own branded NFT storefront within the unified platform.

Key Features:

  • Isolated marketplaces per game
  • Cross-game asset trading support
  • Unified wallet integration
  • Customizable storefronts

Smart Contract Implementation

Multi-Game NFT Management

Designed contracts to handle diverse game asset types on a single platform.

// Solple Multi-Game Marketplace
contract SolpleMarketplace {
    struct Game {
        string name;
        address admin;
        uint256 feePercent;
        bool active;
    }
    
    struct Listing {
        address nftContract;
        uint256 tokenId;
        address seller;
        uint256 price;
        string gameId;
        bool isActive;
    }
    
    mapping(string => Game) public games;
    mapping(bytes32 => Listing) public listings;
    
    function registerGame(
        string memory gameId,
        string memory gameName,
        address admin,
        uint256 feePercent
    ) external onlyOwner {
        games[gameId] = Game({
            name: gameName,
            admin: admin,
            feePercent: feePercent,
            active: true
        });
    }
    
    function listAsset(
        string memory gameId,
        address nftContract,
        uint256 tokenId,
        uint256 price
    ) external {
        require(games[gameId].active, "Game not active");
        
        bytes32 listingId = keccak256(abi.encodePacked(
            nftContract,
            tokenId,
            msg.sender,
            block.timestamp
        ));
        
        listings[listingId] = Listing({
            nftContract: nftContract,
            tokenId: tokenId,
            seller: msg.sender,
            price: price,
            gameId: gameId,
            isActive: true
        });
        
        // Transfer NFT to marketplace escrow
        IERC721(nftContract).transferFrom(msg.sender, address(this), tokenId);
    }
    
    function purchaseAsset(bytes32 listingId) external payable {
        Listing storage listing = listings[listingId];
        require(listing.isActive, "Listing not active");
        require(msg.value >= listing.price, "Insufficient payment");
        
        Game memory game = games[listing.gameId];
        
        // Calculate fees
        uint256 gameFee = (listing.price * game.feePercent) / 10000;
        uint256 platformFee = (listing.price * 250) / 10000; // 2.5%
        uint256 sellerProceeds = listing.price - gameFee - platformFee;
        
        // Distribute funds
        payable(game.admin).transfer(gameFee);
        payable(platformAddress).transfer(platformFee);
        payable(listing.seller).transfer(sellerProceeds);
        
        // Transfer NFT to buyer
        IERC721(listing.nftContract).transferFrom(
            address(this),
            msg.sender,
            listing.tokenId
        );
        
        listing.isActive = false;
    }
}

In-Game Asset Types

Supported NFT Categories

Implemented support for various metaverse asset types:

  1. Avatars & Skins

    • Character appearances
    • Customization items
    • Accessories
  2. Virtual Land

    • Parcels and estates
    • Building rights
    • Location metadata
  3. In-Game Items

    • Weapons and tools
    • Consumables
    • Collectibles
  4. Virtual Currency

    • Game-specific tokens (ERC-20)
    • Currency bundles
    • Reward points

On-Chain Implementation

NFT Standard Customization

Extended ERC-721 with game-specific metadata:

contract GameAssetNFT is ERC721 {
    struct AssetMetadata {
        string assetType;      // 'avatar', 'land', 'item', 'currency'
        string gameId;
        uint256 rarity;        // 1-5 scale
        mapping(string => string) attributes;  // Dynamic attributes
        bool transferable;
        bool tradable;
    }
    
    mapping(uint256 => AssetMetadata) public assetData;
    
    function mintGameAsset(
        address to,
        string memory gameId,
        string memory assetType,
        uint256 rarity,
        string[] memory attrKeys,
        string[] memory attrValues
    ) external onlyGameAdmin(gameId) returns (uint256) {
        uint256 tokenId = _nextTokenId++;
        _safeMint(to, tokenId);
        
        AssetMetadata storage metadata = assetData[tokenId];
        metadata.assetType = assetType;
        metadata.gameId = gameId;
        metadata.rarity = rarity;
        metadata.transferable = true;
        metadata.tradable = true;
        
        for (uint256 i = 0; i < attrKeys.length; i++) {
            metadata.attributes[attrKeys[i]] = attrValues[i];
        }
        
        return tokenId;
    }
}

Backend Services

Game Integration API

Developed RESTful API for game studios to integrate with the platform:

Endpoints:

  • POST /api/game/register: Register new game
  • POST /api/asset/mint: Mint new in-game asset
  • GET /api/marketplace/{gameId}: Get game marketplace listings
  • POST /api/trade/initiate: Start asset trade
  • GET /api/player/{address}/inventory: Get player assets

Metadata Management

Implemented off-chain metadata storage with IPFS:

// Asset Metadata Service
class MetadataService {
    async uploadAssetMetadata(assetData) {
        const metadata = {
            name: assetData.name,
            description: assetData.description,
            image: assetData.imageUrl,
            attributes: assetData.attributes,
            game_info: {
                game_id: assetData.gameId,
                asset_type: assetData.assetType,
                rarity: assetData.rarity
            },
            created_at: new Date().toISOString()
        };
        
        // Upload to IPFS
        const cid = await ipfs.add(JSON.stringify(metadata));
        const metadataURI = `ipfs://${cid}`;
        
        // Store mapping in database
        await db.assetMetadata.create({
            tokenId: assetData.tokenId,
            metadataURI: metadataURI,
            cid: cid
        });
        
        return metadataURI;
    }
}

Frontend Development

Player Dashboard

Built comprehensive UI for asset management:

  • Portfolio View: Display all owned assets across games
  • Marketplace Browser: Search and filter by game/type/rarity
  • Trade Interface: Initiate trades and accept offers
  • Transaction History: Track all asset movements

Game Studio Portal

Admin interface for game companies:

  • Asset minting tools
  • Marketplace configuration
  • Revenue analytics
  • Player statistics

Cross-Game Features

Universal Inventory System

Enabled players to view all their metaverse assets in one place:

// Unified Inventory Query
async function getPlayerInventory(playerAddress) {
    const registeredGames = await solpleContract.getActiveGames();
    const inventory = [];
    
    for (const game of registeredGames) {
        const nftContract = await solpleContract.getGameNFTContract(game.id);
        const tokenIds = await nftContract.tokensOfOwner(playerAddress);
        
        for (const tokenId of tokenIds) {
            const metadata = await fetchMetadata(nftContract, tokenId);
            inventory.push({
                game: game.name,
                tokenId: tokenId,
                ...metadata
            });
        }
    }
    
    return inventory;
}

Technical Achievements

FeatureImplementation
Multi-TenancyIsolated game marketplaces
Asset Types4+ categories supported
On-ChainFull blockchain implementation
MetadataIPFS decentralized storage
Cross-GameUnified inventory system
05 / Factual evidence
Solple Metaverse Exchange project evidence
ACTUAL PROJECT ASSET / NOT GENERATED