Updated on August 23rd 2021
These days everyone has already heard about cryptocurrencies and a growing number of people have even purchased assets like bitcoin and ether. But cryptocurrencies are just the tip of the iceberg of what blockchain technologies can do. Last year the biggest news in the space was DeFi and although it’s an interesting space it didn’t drive a significant level of adoption to the blockchain. This year however seems to be the year of the NFTs and in particular, the year of the blockchain games.
Blockchain games that are based on NFTs are nothing new, they have been around since at least 2018 with moderate success. To create a successful blockchain game requires a very delicate balance of playability, tokenomics and technology that seemed elusive until finally one game got it right: Axie Infinity.
Axie Infinity has exploded in popularity in recent months pioneering the concept of “play to earn” where players are able to earn real money by playing a pokemon-like game. My plan is for this to become the first article of many where I analyze different areas of the game to better understand what the secret recipe of this “killer app” is.
Today I’ll be focusing on the technology side and analyze how Axie Infinity leverages blockchain technologies to create a whole new chapter in the gaming industry.
Why a blockchain and not just a database?
Before talking about the specifics of Axie Infinity and the use of blockchain, it’s important to understand why they decided to use a blockchain at all. After all every game until now has relied on a centralized database to store game related information just fine.
In a regular game your characters, items and in-game currency are stored in a centralized database. In this situation, the game development company has the power to modify the content of that database at will and has also the power to decide who can access the information and who can’t. That leaves you as a gamer in a vulnerable position as you don’t have real control of your assets, you have only the illusion of control.
Another problem with a regular database is that they represent a single point of failure of the system. If the database stops working no one can play the game. Being a single point of failure also means that it’s vulnerable to being hacked and the information can be corrupted or wiped out by a hacker.
A permissionless blockchain is a type of distributed database where the game developer doesn’t have the power to change the information stored in it as it’s by design immutable. These systems can be considered to be “neutral platforms”. Whatever you own in these types of blockchains (NFT, tokens, etc.) is yours and can’t be taken away, not even by the company that developed the game.
As a blockchain relies on the collaboration of multiple nodes and the information is duplicated on each node, there’s not a single point of failure in the system. A blockchain is much more resilient to failures and hacks than a regular database. They are built from the ground up to handle rogue nodes using clever economic incentives and strong cryptography.
All this comes with a downside, blockchains are slower than regular databases. How much slower depends on the characteristics of the blockchain. With the current performance of the premier smart contract blockchain, Ethereum, and the high cost of fees to execute transactions, developing a game directly on Ethereum will make it unusable and impossible to scale. Luckily alternative approaches do exist: permissioned blockchains.
Permissioned vs permissionless blockchains
A permissionless blockchain like Ethereum and Bitcoin requires multiple nodes to work together to reach consensus and anyone can start a new node to mine and validate transactions. In these types of networks consensus can be reached by using PoW (Proof of Work) or PoS (Proof of Stake) algorithms. Permissionless blockchains sacrifice performance in favour of security.
In contrast, a permissioned blockchain has a small set of predefined validators. What this means is that you can’t start a new node on the network even if you want to. Usually in this type of blockchains mining is not required and only a simple consensus mechanism is needed as the set of nodes is small and assumed to be honest (trusted). Instead of the complex consensus algorithms of PoW and PoS, a permissioned blockchain can use a simpler PoA (Proof of Authority) that only attempts to verify that the validator is in fact one of vetted nodes. This can greatly increase performance but sacrifices decentralization and security. It’s a middle ground between a true blockchain and a database.
What blockchain is used to run Axie Infinity?
Sky Mavis has created an Ethereum sidechain named Ronin that’s dedicated to just that one game. This sidechain is a permissioned blockchain that has a two way bridge to Ethereum so ERC20 tokens like SLP and AXS (tokens used in the game) and ETH itself can be transferred from one chain to the other. The NFTs are not transferable and they live only on Ronin as shown in figure 1.
As discussed before, the reason to use a permissioned blockchain is performance as they allow for a greater volume of transactions compared to Ethereum with the added benefit of not needing to pay gas fees. Sky Mavis chose a set of validators that include Ubisoft and Binance among others that are directly compensated by Sky Mavis for their work securing the network instead of relying on mining rewards and gas fees like on Ethereum. Of course this implies that the gamers will have to trust that the validators will remain honest but at least it’s better than just Sky Mavis having complete control over a centralized database.
How does the Ethereum – Ronin bridge work?
I don’t know the specifics of how the Ronin bridge was implemented so I will explain how a bridge usually works as it’s likely a similar architecture.
A bridge works by deploying two smart contracts, one on Ethereum and one on the sidechain (Ronin in this case), that are able to communicate through an oracle. When a resource is sent from Ethereum to the sidechain, the smart contract on the Ethereum side locks the resource while the smart contract on the sidechain mints an equivalent amount of the same resource and sends it to the user’s wallet on the sidechain. Keep in mind that the sidechain wallet is different from the Ethereum wallet of the same user. Sky Mavis developed a wallet for Ronin that’s available as a Chrome extension.
On the other hand, when transferring a resource from a sidechain to Ethereum, the bridge smart contract on the sidechain side burns the resource while the smart contract on the Ethereum side unlocks the same amount of the resource and sends it to the user’s Ethereum wallet.
Why is a bridge to Ethereum needed?
Exchanges. Without a bridge to Ethereum, Sky Mavis would have needed to implement an exchange that somehow connects to the banking system of multiple nations and has enough liquidity for multiple trading pairs (USD-ETH, ETH-AXS, etc.). By creating an Ethereum sidechain, Axie Infinity can benefit from the Ethereum infrastructure while allowing for the game’s scalability.
Update: Turns out that Sky Mavis has a FIAT on ramp where for now you can only buy ETH (technically wrapped ETH or WETH) directly on the Ronin sidechain.
Keep in mind that the security guarantees of the sidechain are weaker than Ethereum. With the bridge you have the option to move at least some of your assets into a more secure network if you plan to HODL any of their tokens for a long term. The Sky Mavis team has in their roadmap the possibility to also withdraw the game NFTs to the mainnet but the date is unclear.
Conclusion
The blockchain technology stack of Axie Infinity is pretty solid considering the alternatives. A sidechain has clear trade-offs but it’s currently the only type of blockchain that can support a game of that scale while allowing room to grow. Other solutions that can be explored in the future are layer 2 networks with rollups and zero knowledge proof which at least in theory provide high scalability while preserving security guarantees from the Ethereum mainnet. Such technologies are still experimental and they will need to mature before being considered a real alternative for Axie Infinity.
It’s impressive how fast the team has been able to iterate and to move away from the Loom network to implement their own sidechain along with their own wallet and bridge. Their roadmap seems to tackle some of the most important topics for improving community participation and security. It’s not easy to be a pioneer but they seem to go in the right direction at least when it comes to their blockchain technology stack.