NFT Airlock

Goals:

  • NFTs are always kept in the player’s wallet (no staking or custody).

  • NFTs inside the airlock can’t be transferred/sold to another wallet.

  • NFTs outside the airlock don’t affect the game.

  • NFT metadata is volatile inside the airlock and static outside the airlock.

  • Locking and unlocking transactions are always performed by the player.

Background Context:

The data model for NFTs (both Unicorns and Land) is stored in three different storage locations. Each location is the “source of truth” for part of the NFT’s record.

  • XAI Blockchain:

    • Ownership of NFTs

    • Data that persists when an NFT is sold or transferred between players.

    • The base information used to deserialize a Unicorn or Land: DNA, Class, Body Parts, etc.

    • Data that shows value (either money or time invested): rarity, level, breeding points, etc.

  • Arweave Metadata (JSON)

    • Supplemental information to the NFT is stored on a second blockchain (Arweave Permaweb) which is optimized for permanent file storage. The json file is the source of truth for “content” such as the name and portrait image for an NFT.

    • Metadata follows the OpenSea Standard.

    • This data is largely for display purposes, so some duplicate data is cached. The main examples are Stats derived entirely from data on the NFT which require a complex calculation; Unicorn metadata saves the derived stats for easy reference on OpenSea and similar marketplaces.

    • The metadata json file is regenerated when something changes that needs to be visible on the marketplace, such as land leveling up, or egg hatching.

  • Game Server

    • The game server owns volatile game state, such as cooldown timers, Unicorn energy, and Land positions in LOD2.

    • Storage on the server is fast and cheap to both read and write so the server may cache data from the other two stores for better performance.

Last updated