Skip to main content
MVP development
Create a top-notch MVP for your startup with us
> $1
billion the capitalization of our portfolio
120+
MVP for startups around the world

As a full-cycle software development company, we build the best minimum viable products ensuring your idea becomes a reality.

Learn more

How We Adapted a Mobile RPG for Blockchain and Enabled NFT Sales

legendary_play

RPG is not just entertainment, but also a source of income.

We developed NFT smart contracts and an API for one computer role-playing game, linking smart contracts with the online game. Spoiler: the transition from web2 to web3 worked out.

An NFT game where you can earn

Esports Heroes is the first blockchain-based esports RPG.

At its core is character enhancement and cooperative gameplay, allowing players to progress from amateur to professional esports athletes alongside friends.

Originally conceived under a web2 model, Esports Heroes was transformed into an innovative, free-to-play mobile game thanks to the web3 paradigm.

Nico Bordunenko

Blockchain ensures real ownership of digital assets and grants users the freedom to interact with those assets. For instance, a player can buy an NFT, play, enjoy the game, level up their character, and then sell it for a higher price.

Nico Bordunenko
Nico Bordunenko
Project manager at MetaLamp

NFTs and an API for interacting with smart contracts and the online game

The creators of the online game decided to transition it from web2 to web3. We had two main tasks at hand: developing NFT smart contracts and creating an API.

Smart contracts: We developed NFTs that serve as representations of in-game characters. These NFTs, built on the Polygon network, can be traded on popular marketplaces such as OpenSea, Blur, and Magic Eden.

NFTs in the game are a classic feature that allows users to exchange characters, items, and even resell them. Game creators don't need to develop their own solution for this. It's enough to release an NFT that will be supported on all popular marketplaces.

Pavel Naydanov
Solidity-developer at MetaLamp

Together with the client's team, we decided that NFTs should have two states: Playable and Tradeable. In the Playable state, NFTs are available for use in the game, while in the Tradeable state, tokens can be resold on marketplaces.

This approach protects the game from a common vulnerability known as Race Condition, where multiple processes attempt to simultaneously process the same data. Hackers can exploit this vulnerability to gain access to the application's currency.

Additionally, we implemented the ability to collect royalties from NFT resales, providing an additional monetization method for the application.

For the API, we developed a backend that served as a bridge between smart contracts and the game backend. This is a classic scheme used when transitioning games from web2 to web3.

In our backend, a random NFT is generated. It indexes relevant blockchain events associated with smart contracts and communicates these changes to the game.

Nico Bordunenko
Project manager at MetaLamp

The technologies we used

Solidity. Everything is written in Solidity. And what else?)

Foundry. MetaLamp developers favor this service. Tests are written directly in Solidity, not in JS. They execute much faster than in Hardhat. Moreover, the testing toolkit in Foundry is much broader.

The operator-filter-registry library. This small library was developed by the OpenSea protocol as a response to other marketplaces that did not plan to support the royalty standard.

The library allows NFT owners to exclude certain marketplaces where these NFTs can be sold. In other words, thanks to this library, NFT owners can have more control over their business models and tokens, choose platforms for distributing NFTs, guarantee royalties, and also prohibit trading their NFTs on platforms where there are no royalties.

We've encountered an issue: not all NFTs support royalty payouts. By integrating the operator-filter-registry library, we've found a solution and enabled trading our asset only on platforms where these royalties exist.

Nico Bordunenko
Project manager at MetaLamp

As of 2024, the library is deprecated and no longer supported by OpenSea, as it didn't gain enough popularity among the community and other marketplaces. However, at the time of implementation, the solution wasn't deprecated, considered fresh and quite appealing. Now, we wouldn't use this library and would seek an alternative.

Beacon Pattern. The technology is used for updating smart contracts.

In the game, there are numerous collections with characters. Each collection is an independent smart contract with a unique address on the network. However, the smart contract code for all collections is the same.

The Beacon Pattern enables updating the logic for all deployed proxy contracts in a single transaction. To implement the pattern, we utilized the tried-and-true OpenZeppelin smart contract library.

Pavel Naydanov
Solidity-developer at MetaLamp

Results

We've empowered Esports Heroes users with true ownership of their in-game assets. Up to 5% of users purchase NFTs directly on the platform.

The project receives royalties from secondary market trading on the NFT marketplace.

Our smart contracts underwent audit and received the highest rating. Not a single vulnerability was found.

RPGs are popular among users worldwide.

It took us approximately a month in total. The smart contracts were completed in a week, while the backend took three weeks. Additional time was spent on communication, consultations, and support.

On MetaLamp's side, the project involved two developers and one project manager.

Esports Heroes was our first experience transitioning a computer game from web2 to web3. There were no difficulties, but now we have a clear idea of how to do it quickly and effectively without reinventing the wheel.

Nico Bordunenko
Project manager at MetaLamp

Read more about our cases

wallet

Articles

ethereum
web3

How Account Abstraction Lowers Gas Fees in DApps

Nico Bordunenko

Business Analyst at MetaLamp

Featured story
rocketcomputer

Articles

startup
MVP
design

How to Create a Startup MVP Design in 7 Days

Julia Cherepanova

Head of Design Office

Solana
New
TON_jettons
New
blocks
New
package_solution
Uma_protocol
Featured story
adsgram

How to Monetize Games on Telegram

Alexey Fedin

CEO at magnetto.pro

Articles

business
startup
TON
hamster_tap
Featured story
ggem
wine_vinesia
Featured story

Why Use Blockchain for Tokenizing Premium Alcohol

Elizaveta Chernaya

Brand Media Editor

Articles

ethereum
web3
business
dao

What Is DAO and How Does It Function?

Pavel Naydanov

Solidity developer

Articles

education
web3
l2
stacking_nft
Featured story
legendary_play
Featured story
payments
TON
sharding
Featured story
blockchain_top_companies
mvp_2024
launchpad

How to Successfully Create a Launchpad

Nico Bordunenko

Business Analyst at MetaLamp

Articles

web3
dApps
launchpad
aa zkp
Featured story
zksync
Featured story
rwa
Featured story
anonymus
Featured story

Zero-knowledge proof explained and 2024 Trends

Yevgeniy Biktimirov

Venture Analyst

Articles

ethereum
web3
dApps
cpay
Featured story
stock market chart
Featured story
planets
fundraising
Featured story
cto
wallet

How Account Abstraction Lowers Gas Fees in DApps

Nico Bordunenko

Business Analyst at MetaLamp

Articles

ethereum
web3
tokens
Featured story
rocketcomputer
Featured story

How to Create a Startup MVP Design in 7 Days

Julia Cherepanova

Head of Design Office

Articles

startup
MVP
design
crypto wallets
Featured story
speed up development
myths
Featured story

Myths About Blockchain Product Development Explained

Nico Bordunenko

Business Analyst at MetaLamp

Articles

web3
dApps
startup
mvp launching rocket
Featured story

Who Should Be on Your Team to Launch an MVP

Alexey Sukharev

Head of Sales Department

Articles

business
startup
MVP
galaxy
Featured story
magazine
Top_trends
cryptocoffee
investments
investors
squares

The First NFT Marketplace on Cardano: Our Story

Stanislav Zhdanovich

Haskell developer

Articles

cardano
web3
NFT
stair
bridge
abstraction

How We Use Our Training Program to Recruit Plutus Engineers

Svetlana Dulceva

The Education Program Supervisor

Articles

education
cardano
web3
mountains
computer in space

Discover Why IT Companies Appreciate Our Junior Developers

Svetlana Dulceva

The Education Program Supervisor

Articles

education
web2
business
salary
IT developer
cardano
chains
abstraction
salary

How to Effectively Motivate Developers

Roman Shtih

CEO Metalamp

Articles

business
purewhite
Featured story
rocket
a man with books
Featured story