Life NFT — NFTs with immutable DNA data written on the blockchain

4 min readApr 18, 2021


A month ago, NFTKEY released our first NFT collection Life. The Life Collection is a interactive cellular automaton NFT collection, where people can design, play and mint their own BIOs, which evolves through time based on John Conway’s ‘Game of Life’.

Since then, we have been working on adding more ways the BIOs can be played. This article is dedicated to the Life Collection’s implementation, and why it’s unique and innovative in this space.

Unlike most of the NFT collections out there, Life Collection stores true immutable NFT data on the blockchain.

The current state of the NFT space

The most popular NFTs or NFT collections are mostly visual arts or music, in a form that can be viewed, heard or touched. Upon minting these types of NFTs, a token ID is issued, and how the artwork corresponds to the token ID vary from collection to collection.

A standard consensus approach among OpenZeppelin and NFT marketplaces is to have a URL to a data service surfaced from the contract, from which, the source URL to the NFT artwork and other additional data of a certain token ID can be retrieved. Two parts of this approach are not immutable:

  • The data service URL can be changed by the contract owners.
  • NFT’s data served can be changed.

The design of this implementation hugely helped the NFT space grow and scale, and it also enables flexibility, which helps all kinds of experiments in this space. However, from tech point of view, there is a possibility for many of these NFTs to lose data service or being changed.

Our Life collection is different from such a design. It is in a form of immutable data on the blockchain. And a seed to many art forms.

BIO DNAs in the Life Smart Contract

The NFTKEY Life Collection, unlike artwork-based NFTs, is a data-based NFT collection, which reads and writes BIO’s DNA data to the Life Smart Contract on the blockchain.

Here is a simplified diagram of how a 5*5 black and white matrix can be encoded to an array of numbers using Run-Length Encoding (RLE).

BIO DNA RLE Encoding diagram

For BIOs in the Life Collection, we encode 17*17 black and white matrix to its RLE array, and when a BIO is minted, the RLE array, aka “BIO DNA” is permanently written onto the blockchain and immutably stored in the smart contract’s storage.

5 to 48 active cells restriction

For the design of the BIOs, we implemented a constraint of how many cells can be activated, and the range is set at 5 to 48.

The reason for a lower limit is because of the rule “Any live cell with fewer than two live neighbours dies, as if by under population”. Therefore, we choose the number of active cells of the Glider as the minimum. A Glider evolves to a rotated version of itself every generation and travels diagonally forever.

The reason for an upper limit is to inspire creativity. Life Collection is symbolic of life, and building within constraint is the nature of reality. Therefore, we choose the number of active cell of the Pulsar as the maximum. Pulsar is a 8 directional symmetrical matrix, which loops every 3 generations.

The 5-cell Glider and the 48-cell Pulsar

The total possibilities of unique variations of BIOs is 21 million trillion trillion trillion trillion.

BIO validations by the smart contract

When minting a BIO, the BIO’s uniqueness and active cell count is validated mathematically by the smart contract.

The validations implemented include:

  • The total amount of active and inactive cells is no more than 289(17*17).
  • The amount of active cells is between 5 to 48.
  • The hash of the BIO’s DNA doesn’t match any existing BIO’s hash.

By doing these, the Life Smart Contract validates all the BIOs without any centralised organisations and services.

Unbounded user experience possibilities for BIOs

BIOs are in a form of a simple array of numbers. They evolve over time based on a simple set of rules defined by the computer, and can be presented in many formats and turned into different forms of art.

Since launched, we have implemented features like:

  • BIO Encounter: Randomly encounter other 8 BIOs as neighbours to evolve as a cluster.
  • BIO X-Ray: BIO’s evolution timeline aggregated through time.

Visit the Life Collection on NFTKEY and design, play and mint your own BIO NFT to live on the blockchain.