Author: Shew Wang & Bai Ding, Geekweb3

Abstract: Maybe everyone has the urge to design a game. If you combine all the ideas in your spare time, can you create a game? If you were asked to design a full-chain game, what would you do? It may be easier said than done. If you really design a full-chain game, the issues you need to consider are actually more complicated than you think.

This article takes an NFT placement mining game called MOPN as an example. Its main gameplay is to place NFTs on limited public land to earn income, that is, placement mining. When designing this game, game designers must not only consider creating destruction/deflation scenarios for their native tokens, but also think about how to fight witches, construct appropriate mathematical formulas for key data indicators, and solve the dependence of the full-chain game on third-party components such as oracles.

In the following, we will analyze MOPN from multiple angles, including its mechanism design and economic model, to help more people understand the design ideas of Web3 games and the implementation path of full-chain games.

A brief introduction to MOPN game rules

As a token-based placement game, the core gameplay of MOPN is simple: the game creates an open map with nearly 1 million plots of land, and players place NFTs on the open map to get rewards. MOPN contains 4 types of assets:

1. MOPN’s native token——MT (MOPN Token),

2. Plots of land for placing NFTs — MOPN Land

3. NFTs placed by players on plots of land

4. Bomb used to blow up NFTs on the land

Among them, MT Token is the core asset in the game. All economic activities are related to MT. After placing NFT on a certain plot of land, players can get MT rewards based on the NFT's score weight and placement time. 90% of the MT produced by NFT placement mining will be obtained by the owner of the NFT, 5% of the mining output will be obtained by the owner of the plot, which is equivalent to rent, and 5% will go into the vault of the IP to which the NFT belongs (for example, BAYC has its own in-game vault) - Collection Vault, which is equivalent to tax.

In MOPN's design, the plots belong to an NFT called MOPN Land. The total supply of MOPN LAND is 10,981, each Land covers 91 plots on the map, and all Lands together cover nearly 1 million plots on the map.

Land can be obtained through casting and auctioning. After obtaining Land, players can place it on the map to activate those dormant plots. Only the plots activated after being covered by Land can be used to place NFTs. Any player can place NFTs on a plot under the jurisdiction of a certain Land, but 5% of the proceeds must be distributed to the landlord (the owner of the Land).

What’s interesting about the MOPN game rules is that you can use “bombs” to clear out the heterogeneous NFTs around you. The game stipulates that with the plot where you place the NFT as the center, there cannot be NFTs from other IP series within the distance of two plots (for example, BAYC and Fat Penguin are conflicting IPs). At this point, if you insist on placing an NFT on this plot, you must use a bomb to clear out the heterogeneous NFTs.

The final effect is as shown in the figure below: within the distance of two plots around each NFT, there are NFTs of the same type.

In general, the rules of the game are relatively simple: place your NFT on a plot of land to get mining rewards, you have to give a portion of the mining output to the landlord, and you have to ensure that there are no non-similar NFTs around you.

In addition, MOPN is equipped with a specific Collection Vault for NFT collections participating in placement mining. Since MOPN is a full-chain game, market data related to NFTs should not rely on oracles, so MOPN sets up the Collection Vault to obtain off-market information such as NFT market prices through a specific mechanism (how to achieve this will be mentioned later).

The above rules build an economic system with MT Token as the core, as shown in the figure. Below, we will briefly introduce the implementation of MOPN from the perspective of game designers.

ERC-6551 Account Analysis

MOPN creates an ERC-6551 abstract account for each NFT participating in placement mining. The ERC-6551 account is the core component of the MOPN game system, and a large amount of business logic relies on it to be implemented.

The ERC-6551 standard is derived from EIP-6551, which aims to create a dedicated AA wallet account for NFT, so that NFT can have many rights like ordinary Ethereum users. For example, you can register an ERC-6551 account for BAYC and use it to collect payments and perform on-chain operations. When a user transfers an NFT, the ownership of the corresponding ERC-6551 account will also be transferred.

What is the point of doing this? In a game scenario, suppose Ethereum address A has a virtual game character named Bob, and Bob himself is implemented in the form of ERC-721 NFT, and holds multiple props (such as hats, shoes, weapons, etc.) and other assets (such as gold ingots), which may be implemented in the form of ERC-20, ERC-721, etc. Although these props are considered to belong to Bob in the game setting, from the perspective of the underlying contract, the above assets are associated with address A.

Assuming that the controller of address A sells the virtual character Bob to someone else, Bob and his game assets need to be transferred to the buyer one by one, which is cumbersome and unreasonable in actual operation. The goal of EIP-6551 is to create a dedicated wallet account directly for the virtual character Bob in the game to manage the props and assets he holds, making the entire interaction process simpler and more reasonable.

ERC-6551 is mainly composed of the following two modules:

1. Registry. Registry is a factory contract. Users can submit their NFT contract address and tokenId to it. Registry will generate a unique fixed address for it and deploy an NFT account for the user at this address.

2. Account Implementation. This module covers the specific implementation details of the ERC-6551 account. Each project party will adopt a specific implementation solution that suits its own needs.

MOPN is equipped with its own Registry and Account Implementation modules. Users can enter the NFT contract address and tokenId to create a dedicated ERC-6551 account for NFT in a deterministic way to adapt to various needs in game operations.

Mechanism design for NFT placement mining

As mentioned earlier, the first step after a user enters the game is to select an NFT and place it in the appropriate area. The following figure shows part of the current MOPN map:

On the game map, we can see NFTs from different IP collections and plots of different colors. Each NFT will radiate the surrounding plots into a specific color. Only NFTs of the same type can be placed next to each other, and NFTs of different types must be at least two plots apart.

To this end, MOPN adopted hexagonal plots and established a coordinate system as shown below:

Obviously, each plot on the map has unique coordinates. The entire map is divided into 10,981 regions, divided into 10,981 MOPN Lands, and each Land has its own exclusive LandId. In the design of MOPN, Land owners can charge rent to NFT placers, that is, 5% of NFT mining income will flow into the ERC-6551 account of the plot owner.

Each placed NFT has a titleAccounts field in its ERC-6551 account, which indicates the collection to which the NFT belongs. When you try to place an NFT on a plot of land, the relevant contract will read the ERC-6551 accounts corresponding to the NFTs on the 19 plots adjacent to the plot, and check the titleAccounts field to determine whether there are heterogeneous NFTs placed in the adjacent area.

The above content is just the tip of the iceberg of the entire MOPN mechanism design. From the perspective of a game designer, you have to consider many troublesome issues. First of all, in the early stages of the game, you have to consider which NFTs can participate in the MOPN game. If you do not restrict the types of NFTs, someone will definitely place a large number of junk NFTs on the map to quickly obtain a large amount of MT Token income, which will eventually cause serious Token inflation. This is essentially the anti-witch problem.

In order to avoid such situations, restrictive measures must be taken to allow only certain types of NFTs to participate in the game. Before MOPN officially launched, all NFT collections on the market were scored using the following formula:

The following is a statistical table provided by MOPN officials based on the latest snapshot information.

We can see that there is a column called STAGES in the table, which indicates when the IP collection to which the NFT belongs can participate in the game. The NFT series marked as Stage 1 can participate in placement mining at the beginning of the game, while Stage 2 and Stage 3 need to wait until the game reaches a certain stage.

The second question is, who can place NFTs?

The answer is that anyone can. The person who places the NFT may not be the owner of the NFT, but only the owner of the NFT can directly withdraw the rewards for placing the mining, and then share a part of it with the person who placed the NFT on his behalf. We call this person who is not the owner of the NFT but places the NFT on his behalf an "Agent."

According to the design of MOPN, when the NFT holder withdraws the mining reward, or the NFT is moved or blown up, the Agent can share part of the mining income. The specific value is:

Where n refers to the number of existing agents in the NFT series (for example, n people are agents for BAYC NFT placement and mining). Obviously, as an agent, the earlier you participate in the game, the more rewards you can get.

Finally, the third question is, how to calculate the placement reward of NFT?

This question actually needs to be answered in combination with MOPN's own economic model. The total supply of MT is 1 billion. Every time Blast produces a block (about 2 seconds), MOPN will release a certain amount of token rewards to NFT miners. MT was initially set to release 60 tokens for every block produced by Blast. Every 50,000 blocks (1.2 days), the amount of MT released will decay by 0.03%. The specific release curve is as follows:

Once we determine the amount of MT released in each block, we can calculate the mining rewards for each NFT, because the MT released in each block will be distributed to different NFTs participating in mining according to their weights. The MOPN Point mentioned above determines the reward weight of each NFT.

Among them, Tile Point is classified according to the plot where the NFT is located, and is divided into three levels: +1, +5 and +15, corresponding to the three types of plots of different rarities on the map. Collection Point is related to the IP collection to which the NFT belongs and the pledge status, which will be detailed in the section about the NFT vault later.

Ultimately, each NFT receives a share of the MT rewards released in each block according to the proportion of its Points to the total Points of all NFTs.

Land Auctions and Bombs

We mentioned earlier that when you place an NFT on the MOPN map, you must declare the LandId where the target plot is located. LandID represents the LAND number to which the plot belongs. When the NFT placer extracts the MT mining reward, 5% of the MT will flow into the landlord account of the LAND to which the plot belongs (each landlord controls a different LAND). In MOPN, the function of Land is to manage plots, and the relationship between plots and NFTs is like that between flowers and flower pots. Therefore, LAND is also one of the core assets in the game.

(Land is actually an NFT. The (-48, 10) marked in the lower left corner represents the coordinates of the center point of this Land in the MOPN map)

The ownership of LAND is expressed in the form of NFT, and all LAND NFTs are issued in two ways: minting with ETH or minting through MT Token auctions.

The model of ETH minting Land is relatively simple. Players can spend a certain amount of ETH to directly mint and obtain Land. The minting price of the first Land is 0.02 ETH. After that, the price of each Land minted will increase by one thousandth compared to the previous one.

The process of using MT to auction and cast Land is relatively complicated, and adopts the Dutch auction mode. The starting price of each Land is 1 million MT. One piece of land is auctioned in each round, and the starting price is automatically reduced by 1% every 5 rounds. After a round of auction is completed, the next round will automatically start. All MT used to purchase/cast Land will be burned. This is the first way MT is destroyed in the entire MOPN game.

Bomb Mechanics

When placing an NFT, if there is a different NFT within the distance of 2 plots around the target plot, you must use a bomb to blow up the different NFT and clear the plot where it is located. Bomb is a way to forcibly remove different NFTs from the map. It needs to be obtained by burning MT. The used bomb is destroyed. This is the second destruction scenario of MT in MOPN.

Bomb's pricing follows the formula:

Among them, MT Production is the MT output mined on the target plot, titles represents the number of plots to be cleared by this bomb, and bomb production represents the usage of Bomb in the past 7200 blocks. The more MT NFT has mined on the target plot, or the more times people have used Bomb in the past period of time, the more expensive the bomb will be.

NFT Collection Vault

As we mentioned earlier, MOPN distributes rewards to NFTs placed on the map according to a scoring system called MOPN Points, which consists of two parts: Title Points and Collection Points. Title Points are determined by the rarity of the plot where the NFT is located, while Collection Points are related to the exclusive vault of the NFT collection (such as BAYC) in the game.

Collection Point measures the MT inventory in the NFT vault. The more MT there is in the vault, the higher the mining income of this type of NFT will be. The initial calculation formula is:

Among them, Vault $MT is the MT stock of the NFT vault. There are two ways to add MT to the vault, including mining tax and pledge. The first one is what we mentioned earlier. Any NFT placed for mining will automatically submit 5% tax to the vault when extracting income (the other 5% is land rent). The other is a voluntary pledge. You can get APY by staking MOPN in a certain NFT vault.

MOPN's NFT vault has other functions, such as providing MOPN with NFT market price data. Since the entire MOPN game revolves around NFT, the market price of NFT is an important data indicator. However, as a full-chain game, MOPN does not want to rely on centralized components such as oracles.

To this end, MOPN has set up an NFT trading platform similar to AMM (in other words, it is to build a pool by itself). Players can buy/sell NFTs on this platform. Various arbitrage behaviors will make the NFT prices on the platform consistent with the prices in the external market. In this way, the system can try to obtain the quotes of NFTs in the external market without relying on oracles.

MOPN's NFT trading platform adopts a model similar to Uniswap, which is essentially a peer-to-peer pool. However, compared with ERC-20's AMM, NFT's AMM is more difficult to implement. On the one hand, because NFT is non-homogeneous, everyone has their own psychological price for a specific NFT, and it is impossible to directly price an IP series. On the other hand, the number of NFTs themselves is limited, and the liquidity is far less than that of FTs, which makes NFT transactions more difficult.

To address this problem, MOPN combines auctions and AMM, allowing the treasury contract to directly participate in the sale and purchase of NFTs and directly contribute to liquidity. The process of the NFT treasury purchasing NFTs from players follows an automatic bidding system, with the starting bid being 20% ​​of the MT balance in the treasury. After the first transaction, the next initial purchase price will be set to 75% of the treasury's final asking price, increasing by 0.05% per block, with a maximum limit of 20% of the treasury balance.

When an NFT holder believes that the offer meets his expectations, he can sell his NFT. After that, the vault will switch from buying NFT to selling NFT mode, start the Dutch auction, and publicly sell the NFT he just acquired. The starting offer of the Dutch auction is 125% of the purchase price, which decreases by 0.05 per block, with a lower limit of 1MT. After the auction is completed, MT accounting for 0.5% of the transaction price will be destroyed. This is the third way MT is destroyed.

After completing the sale of the NFT, the vault can once again enter the acquisition state and provide NFT quotations to the outside world, and the cycle will repeat.

Compared with the conventional x * y = k model, the generalized AMM based on the auction mechanism can help each NFT to be fully priced, and ultimately the vault will be traded at a price close to the best offer. If MOPN has enough influence in the future, a large number of NFTs may be traded in this way, and the liquidity of NFTs will be solved to a certain extent.

Since the above-mentioned auction mechanism makes NFT fully priced, we can roughly assume that the buying and selling transaction price of NFT in the vault is the floor price of the current NFT collection, which replaces the price feeding function of the oracle.

Back to MOPN Point, since the MT inventory in the vault may be unstable, whether NFT is bought or sold, the MT inventory in the vault will change greatly. For fairness and stability, after the vault of a certain NFT sells the NFT, the Point calculation formula becomes:

Among them, vault last ask-accept price is the amount of MT obtained after the NFT was sold by the vault for the last time, and vault $MT is the MT deposit in the vault before the NFT was sold.

Summarize

From the perspective of technical implementation, MOPN introduced ERC-6551 accounts, which improved the flexibility and composability of the game system. At the same time, it adopted an auction-based NFT trading platform and provided a peer-to-pool-based NFT market. Through the quotation of the internal market, it solved the problem of the full-chain game's dependence on the oracle. As a relatively easy-to-understand full-chain game economic model design case, MOPN is still worth our in-depth study.