How did we build the World’s first move2earn NFT game in four months?

STEPN Official
11 min readDec 20, 2021

--

Introduction

Move2earn game is a new form of Game-Fi. Players use motion data as input to a series of gamification and earn tokens and NFT rewards. We had this idea back in early August 2021. Although we are not the first to come up with this concept, we managed to be the first to deliver the product under 120 days.Our move2earn NFT game has been running on Beta test net since 3rd Nov 2021; we have invited over 1,000 players from 43 countries to participate and achieved a weekly retention rate of over 70%.

The World has over 400 million running app users, and over 1 billion people use walking, jogging or running as a form of exercise. The market potential is immense. COVID also successfully raised the awareness of personal physical and mental health among people, and in 2021, the online fitness industry has experienced an unprecedented 33% annual growth. Capturing this non-crypto market means move2earn games can nudge millions of people into Web 3.0.

This article documented the challenges we faced and how we have overcome them.

Technical Challenge 1 — Proof of Movement

The initial plan is easy; we enable data import from wearable and running apps to our game as a form of “Proof of movement”. We assume user data on these platforms are trustworthy. We developed a mockup version in 3 days, and it failed the hack-test on the first day. We cannot verify the authenticity of the movement data; running apps users can easily “double spend” their data (carry 2+ mobiles to run). We also found running app and wearables do not have a stringent anti-cheating system, because why should they? They and their users have zero incentive to fake data, but the whole landscape changes when they are rewarded for their movement data. If our move2earn game does not have a “Proof of Movement” (POM) consensus, the entire token System will collapse quickly. To build a robust POM, we must be the primary motion data collector and validate the data; this can be done through access to players’ motion sensor data.

The gravity sensor

The gravity sensor is the primary sensor we use, which provides a 3D vector indicating the direction and magnitude of gravity. Typically, this sensor determines the device’s relative orientation in space. The following chart shows different motion patterns when players carry mobile; differently, we can observe the patterns are similar to each other — in a sinusoidal waves pattern.

Human movement “wavelength”

To enhance the accuracy of the motion sensor detection, we also utilized the following sensors:

· The linear acceleration sensor

· The significant motion sensor

· The accelerometer

· The gyroscope sensor

· The step detector sensor

· The step counter

With these motion sensors, we MUST validate all players’ motion data to ensure it is authentic human movement through a 3-factor authencation process: mobile motion matches human movement wavelength, mobile motion matches mobile step counter, and mobile motion matches GPS track.

Technical Challenge 2 — Proof of Distance

If we incentivize players for their steps, we need to know two things to calculate the reward. The first is how many steps the players have moved, which is quite simple with the step counter. The second is how far the players have moved. we have encountered the second roadblock — currently, all civilian GPS devices or apps have GPS inaccuracy, ranging between 3 meters outdoor to 20 meters indoors; no product on the market can accurately measure how far a person has moved. There are three types of GPS inaccuracy.

GPS Drifting

When the mobile device is covered by either tall trees or under the roof (indoor), the GPS signal starts to deviate from its course — even the mobile is stationary. The below figure shows a GPS device has drift 6,26 miles in 10 hours of stationary under the roof. (This is another reason we cannot rely on third party motion data providers — we do not know if third party provider has validated the motion sensor data or not)

Result of GPS Drifting

GPS degrade

Environmental factors can often cause GPS signals to lose for some time and later re-acquired. In cases of this, the pre and post signal-loss points will be treated just like any other two subsequent points and will be connected with a straight line. This results the players will record less distance.

Result of lost GPS signal

GPS Bounce

Tall buildings can often cause a GPS signal to “bounce” on its way between the mobile device and the satellites. This will often result in a “jumpy” GPS track as shown below. Bad GPS data like this can often cause extra distance to be recorded than what players have traveled since each zig and zag of the GPS track has to be accounted for with a straight line connecting them.

Result of GPS Bounce

Our solution

Currently, there is no readily available solution to the above issues; we have studied many established running apps and running GPS devices, and they are all affected by these issues. We have done extensive coding and developed a set of algorithms to tackle this issue. In the latest Beta test net, we have improved our GPS accuracy by 70x compared to the conventional running apps and GPS devices (through GPS drift corrective, environmental factor canceling, and player route planning algorithms).

Technical Challenge 3 — Hack prevention

Two months into development, we encountered the biggest problem. What if a player uses Android Emulator to play the game on PC, and then gives tampered motion data to the game through a hack engine.

Interface of a hack engine

We have tried several methods, but none can completely solve the hacking issue (including GPS and motion hacks) without compromising players’ experience (such as using Captcha). We have realized only machine learning is strong enough to tackle the hacking issue. We assessed what we need and used our industrial connection to rapidly acquire the required talents that specializing in Deep Learning and Data Feed within a short time. We have developed the World’s first move2earn Anti-Hack prototype with 90% accuracy; we plan to expand our player base in the next six months to collect more data to train our System to achieve 99.99% accuracy.

Design Challenge 1 — Game’s assets storage

Occam’s razor is one of the most powerful problem-solving principles applicable in life and in software development. The premise of Occam’s razor is that

“Entities should not be multiplied without necessity”.

Thus, if the game need to collect and validate primary motion and GPS data from the players, the game must be a mobile game, and this creates the first design challenge — where does the game store its asset?

Currently, the available option on the market is limited. Ideally, to enhance the game’s playability, the game MUST:

· Smooth user experience (player doesn’t need jump in/out of several apps)

· Happy user experience (fast, cheap and convenient game asset transaction);

· Robust security;

· Can transfer fungible and non-fungible assets.

We discovered there is no readily available service provider, and we MUST develop a decentralized wallet that is fully customized to our game. We picked Solana to build our game on. Solana is one of the few available options on the market that offers low transaction costs and has its own NFT protocol. We can also tap into the decentralized order book such as Serum to create liquidity for our tokens; players can use the built-in swap to turn the game/governance token to ERC/SPL assets and withdraw to their preferred chain (via the cross-chain convert). We also add a private NFT bridge so that players can trade our NFTs on different platforms.

Design challenge 2 — Build a long-lasting reward system

When everyone accepts the play2earn model, they also accept the “play as work” model. We analyzed why people departed games, running apps, or even work; we discovered that making good returns is not always the primary motivator for people to keep doing their jobs. In fact, people leave their well-paid job when they cannot earn respect, affection, and self-actualization (Maslow’s Hierarchy of Needs). This finding makes us rethink the tokenomic design; we need more than just a tokenomic design to build a long-lasting game that not only attracts millions of players, but also retains them. Thus, we have designed three facades of earning.

The monetary facade

The monetary earning is the first layer, and usually, this is what people talk about the most, AKA the tokenomic. To Put it simple, we need to design game mechanics to drive demand and manage supply; when a token has more demand than supply, the market will set a price to the token, and players can earn monetary returns through their movement inputs.

The social facade

The next level is the social; human as social animal has an intrinsic need to socialize. We leak emotions to each other, which can be multiplied through Network Effect, and reinforced through Affirmative Action. Players can earn social recognition, awareness, and even relationship. Facilitate earning social reward via strong integration between our game and established social media and network. Thus we have integrated our game into Discord.

The achievement facade

Parallel to the social facade, the personal achievement is another driving force for player retention. We have witnessed a higher user retention rate in running apps with a built-in achievement system than running apps without it. Enable players to set a goal and track the progress to achieve the goal will grant satisfaction and a sense of achievement among players. Running apps with an achievement system will also enhance users’ physical fitness and mental wellbeing. The longer a player accumulated the social connection and achievements within an app, the harder it was for them to depart from it.

Design Challenge 3 — How to curb inflation?

Axie Infinity indeed made play2earn reaches outside the crypto community; by close analyzing Axie’s SLP tokenomic model, we have identified the game token design challenge; if the game token has infinite supply, how to balance the supply and demand? Studies have been done from Keynes to Hayek, from Token Velocity to the Network Effect. We discovered:

“A consistent minting of the game token must be managed through a consistent burning of the game token, to transform them to different forms of assets, this transformation can be voluntary, mandatory or structural.”

“An ad hoc minting of the game token must be managed through conspicuous spending of the game token, to create value outside of the monetary sense.”

SLP is consistent minting, there was no constant burning case, but only ad hoc burning (breeding), this does not only cause inflation, but also when the game developer interferes with the game’s economy too much, it will irreversibly change the market expectation of the game token (Keynesianism — macroeconomy dictates personal choice).

We have designed various “Token Sinks” for paying players and various of pathways to success to free playing players.

Design challenge 4 — NFT value discovery

Uniqueness vs. Rarity vs. Scarcity

Definition

- Uniqueness — one of a kind.

- Rarity — only a handful available.

- Scarcity — when something’s demand is greater than supply.

Once we understand the definition, scarcity is relative, as long as there are more demands than supply, something will be scarce; only when something is scarce, the rarity and uniqueness will have value. Therefore, our NFT is designed with two layers to make it a Veblen Good.

Price discovery of NFT

To make our NFT scarce, we first need to pick what kind of item we need to make the main NFT we use in the game; the answer is obvious — Sneaker is the most relevant and essential item for running. To drive the needs for our NFT, we turn it into a mining machine, a mining machine you can customize, level up, and even “breed” (welcome to the Web 3.0). Each player must have an NFT Sneaker to make token earnings; the more mining machines you have and the higher level of these mining machines are, the more you will make. There will never be enough Sneakers, “breeding” Sneakers (Shoe-minting) takes time, burns tokens, and token also needs time to accumulate.

Value discovery of NFT

Once we have addressed the scarcity of the NFT Sneakers, Rarity is addressed by our 5-quality System — from common to legendary Sneakers; the higher the quality, the better the mining performance, and harder to get. Uniqueness is addressed by the Sneaker Series numbers, the first 10,000 NFT Sneaker are numbered and after 10,000, the Sneaker Series number will be random. The first 10,000 Sneakers will be forever unique, and the №1 to №1,000 Sneakers will be rewarded to our early adaptors.

Building a robust Moat to Competition

Other than being the first mover in this new track and the Proof of Movement, Proof of Distance and Hack Prevention. We have built several moats to competition.

AI-generated music

Through our conquest to develop an AI system to detect cheating and hacking, we take the liberty also create an AI-generated music background for players; the music will be randomly generated by the speed of the players’ pace.

Carbon Neutrality

We always believe a great crypto-native project should also be a great social experiment for social justice. Therefore, our game’s profit is voted in a DAO manner; governance token holder decide how much percentage of the game’s profit goes to carbon neutrality and how much are paid to governance token holders, the more the donation, the more governance token reward will be given; the more is paid as dividend, the more of their governance token will be burned as punishment.

LBS Social integration

As we have invested a significant amount of time correcting the GPS inaccuracy, we become experts in this field. Subsequently, we developed a Location-Based Service (LBS) integration with Discord. Players are assigned to our Discord’s subchannel when they have unlocked certain milestones; for example, Player A has ran 100km in Sydney and Player B has minted 100 Sneakers in Sydney will be enrolled to the High milage Club Sydney and Shoe Tinker Club Sydney respectively.

Reach to millions of non-crypto runners

We have also made the game accessible to non-crypto players; we believe this will be the key for our game to grow tenth of million players. We made an automatic matching system, crypto players with multiple pairs of NFT Sneaker can lease it out to non-crypto runners, and the earning will be split by the two.

Scalable game server

As an established game developer, we understand the most critical requirement of game business is the real-time performance and high concurrency support capability of server-side logic processing. A game server must cope with high concurrent data synchronization (either state or frame). Hence, we have built our move2earn NFT game a scalable game server with an initial server capacity of 100,000 simultaneous data synchronization (1 million MAU).

Conclusion

Delivering an original product from a novel concept in a short time is extremely challenging. Now our team has over 25 full-time developers, covering:

· Software architecture (game server, game engine)

· Game parameter modeling and design

· Blockchain (Decentralized wallet, Private NFT bridge, token cross-chain convert, NFT)

· AI (machine learning, deep learning, neural network, data feeding)

· GPS optimization

STEPN is both the World’s first move2earn NFT game and Solana Ignition Hackathon Gaming Track winner that aims to nudge millions of non-crypto players to the Web 3.0 world and contribute positively to carbon neutrality.

--

--

STEPN Official

STEPN is a Web3 lifestyle app with Social and Game elements.