Introducing On Chain Kongz

4 min readMar 26, 2022

On 26 March 2022, a phenomena happened and CyberKongz holders found a token called “On Chain Kongz” in their wallets, replicating their CyberKongz counterpart. They appeared out of nowhere, and seemed to always follow the owner of the CyberKongz. It was the first “NFT-Bound” token ever created.

On Chain Kongz is an Offical Cyberkongz Project that I was incredibly happy to work on with the Council of Kongz to store the artwork of the original CyberKongz pieces on the blockchain forever.

Together with the Council of Kongz, we recreated the original 2d art of CyberKongz fully on-chain so that they can live forever on the blockchain. 100% decentralized, trustless, without any back-end server or IPFS. From now on, they will live forever on-chain for as long as Ethereum exists.

On Chain Kongz are KongzBound. They are “Gallery” pieces that are completely Gasless, non-user-transferrable, and will always automatically jump to the new owner’s wallet on any transfer of CyberKongz.

On Chain Kongz!

The Original On Chain Data

Each CyberKongz has a special tracker in the original contract which is called Kongz DNA. It is a uint256 which can be translated back to bytes32 and then chopped up into bytes8 and then transcoded into uint32s in order to discover their on-chain traits. A system implemented by Owl of Moistness since the inception of the CyberKongz contract.

Kongz DNA

In addition to that, each CyberKongz also had an on-chain Name and Bio which is empty by default, but can be written onto their CyberKongz by spending a bit of $BANANAs to do so.

Kongz Building Blocks

These were the necessary building blocks in order to replicate CyberKongz completely on-chain. Thus, On Chain Kongz was born.

The KongzBound Tokens

The On Chain Kongz are KongzBound. They “Gallery” pieces that are completely Gasless, non-user-transferrable, and will always automatically jump to the new owner’s wallet on any transfer of CyberKongz.

With a clever trick, we are able to talk with the CyberKongz contract and accurately represent the token owner of the CyberKongz.

A Special OwnerOf

Combined with some magic implementation code, we were able to create 5,000 tokens representing the on-chain versions of CyberKongz, which accurately track the owner of the CyberKongz.

Creating the On Chain Kongz

First, we had to decode the Kongz DNA to get the necessary data to build on top of it.

Decoding Kongz DNA

Rendering the On Chain Kongz

Then, I had to define all the on-chain assets and map them together, which resulted in over 20 contracts having to be deployed across the EVM.

After that, it was a lot of work required to show the correct metadata and combine everything correctly into TokenURI packages, communicating with the original CyberKongz contract to receive the data of DNA, Name, and Bio from each CyberKongz.

GIFs was an issue because some of the GIFs were so big that they would not fit in a single contract. I developed a method to stitch base64s together, allowing us to be able to include every single GIF of the Legendary CyberKongz in the On Chain Kongz contract.

The contract is very long, over 900 lines of code, so, if you are interested, you can go read the contract here!

On Chain Kongz

On Chain Kongz Gallery