Practical Application of ERC-721 Contracts in Regard to Digital Interactive Media

By Ian Mahoney

The Ethereum ERC721 standard allows for the creation of NFTs (Non-Fungible Tokens), this standard has most notably been used as the backbone of the CryptoKitties online game. The non-fungible nature of ERC721 allows these assets to be uniquely identifiable on the blockchain, creating rarity for certain ‘kitties’ based on characteristics deemed desirable. This has lead to some kitties being sold for many thousands of dollars.

Although CryptoKitties and games similar to it are great to demonstrate an application of NFTs, they are extremely rudimentary in terms of any actual gameplay. Aside from breeding, the kitties are simply digital collectibles with no real usability.

Using ERC721, along with ERC20 token protocols in digital media can vastly enhance interaction between users and digital assets. For demonstration purposes I will be using the video game Fortnite: Battle Royale as an example because of its current popularity and many collectible vanity items.

ERC-20 Token & Onboard Exchange

ERC20 tokens will be used as the games native currency to allow for simple buying and selling of digital assets. Every in-game purchase must be made with tokens to allow for the flexibility of programmable transactions. Players may convert fiat currency to tokens through the games onboard exchange.

ERC-721 Implementation: Items of Rarity

Outfits and other vanity items will be backed by ERC721 contracts in a way that is similar to CryptoKitties. This will allow these items to be initially sold in limited quantities and acquire rarity once on the market. Players may then not only use their items in gameplay, but may buy, sell, and trade them with other players in an onboard digital marketplace.

For example: Only 20 ‘Outfit-1.A’ outfits are produced, each uniquely identifiable on the blockchain. They are initially sold on a first come first serve basis for a price of 5 tokens each. Due to their rarity relative to many other outfits which may release in quantities of say 100 each, they are highly sought after and may appreciate in value. Players who desire this specific outfit may search the marketplace to purchase it at market price, or identify and make an offer to an owner of the outfit directly.

This also allows for unique collectible experiences,

For example: A set of 5 distinct Outfits may be released and sold individually

(ie. Outfit-1.A, Outfit-1.B, …, Outfit-1.E, collectively known as Outfit-1.AE), these outfits may or may not be identical in appearance/function. These Outfits may hold special properties such as, “If all 5 outfits are acquired by one user, the contracts may be triggered to interact, resulting in the combined Outfit-1.AE. Outfit-1.AE may have in-game aesthetics or functionality different (generally superior) to the Outfits as individuals.” This is simply one way digital items may be enhanced.

ERC-721 Implementation: DLC 2.0

Digital items with uses other than appearance may also be created using ERC721.

For example: Limited quantities of ‘Keys’ may be bought by players to access certain exclusive game types, events, maps, etc.

This creates a new type of DLC with programmable rules and the option to permit only a set amount of players access at a time. The smart contracts for Keys may be programmed with rules such as, “No player may hold more than one Key at a time”, “If a key is not in use for ‘x’ amount of time, it is automatically sold back to the market at market price, unless market price is less than that of the purchase price.” etc.

Other Smart Contract Uses: Real Time P2P Game Betting

Using Ethereum smart contracts players may bet in real time on the outcome of a game from the spectator position. Bets may be settled with rewards and losses immediately distributed upon the games conclusion. Because of the versatility of smart contracts, players may bet using any digital items that are part of the game including tokens, vanity items, Keys, etc. so that as long as the contract is agreed upon a bet may consist of one player betting an Outfit while the other bets ‘x’ amount of tokens, as well as other unique betting combinations.

Other Smart Contract Uses: P2P Trading

Similar to smart contract enabled bets, trades can also be handled and players may trade any digital items such as trading a map key for an outfit.