League of Light — Dynamic NFT Collection

0xJones
6 min readDec 29, 2022

--

League of Light is a dynamic NFT project, featuring evolving artwork and detailed game mechanics. The collection was released in March 2022, and sold out within 12 hours of the public sale being activated.

League of Light is a collaboration between ktrby & artistic_resonance.

To read about the development and tech stack of this project, skip ahead to Smart Contract Game Mechanics or Development.

View the collection at https://opensea.io/collection/league-of-light

Narrative

Narrative is a big part of most contemporary NFT collections — it is the story, journey or experience designed for the collector, by the creator.

League of Light’s narrative was deliberately mysterious from the beginning. Prior to its release, my co-creator artistic_resonance and I left clues on Twitter and Discord among our target communities about our upcoming NFT experience.

League of Light relied on beautiful artworks, and hints at smart contract game mechanics to generate hype among collector communities.

Soon, hints about the collector’s experience became more tangible — we suggested that the orbs, shown in marketing images, would break open as part of the game. In marketing images, an ethereal shining light was shown emanating from inside of a broken orb.

Our final narrative-building step was to hint that the orbs would, by the end of the game, fully transform into something different. Our strategic marketing images and hints about game mechanics made the collection seem magical.

The narrative we built around the collection prior to launch helped to created excitement and buzz in our target communities. Mystery was a powerful motivator for collectors — it helped us generate a lot of discussion and interactions around the project.

Sale & Reception

League of Light sold out within 12 hours of the public sale being activated. 120 tokens in total were sold, at 7 $ASH (ERC20 token used for payment) each.

Minting took place through https://leagueoflight.xyz website. No issues were reported by users minting through the website.

The smart contract was optimised to make minting as inexpensive as possible. At gas prices of 40–50 gwei, users were able to mint 4 tokens each for ~0.01 Ether in transaction fees.

TooMuchLag, renowned NFT creator, minted a token from the collection via the website, and showed support for the collection on twitter.

The collection’s reception was wholly positive, receiving a lot of support, interactions, and excitement on twitter and discord.

Smart Contract Game Mechanics

League of Light’s smart contract facilitates special mechanisms which create a dynamic and unique experience for collectors. During the game, collectors may choose to take actions that will affect the rarity of their NFT.

The collection has been divided into 5 classes from the beginning, with equal amounts of tokens from each category. Among the categories were ‘Hope’, ‘Dreams’, ‘Shadow’, ‘Light’ and ‘The Unheard’, which appears and works differently from the rest.

All tokens are minted at Stage 0. Any token that is held for 1 week without being transferred will automatically ‘age’, moving up to the next stage. As tokens age, their appearance & metadata changes.

There are 4 stages in the life cycle of a League of Light NFT

As more tokens age, fewer tokens will remain at the earlier stages, shifting the balance of rarity in the collection. Thus, players can affect the rarity of their token by playing the game.

If a token is transferred before moving up to its next stage, it stays at its current stage, but the clock resets, and the new owner will need to wait a week for the token to age.

Tokens held in the same wallet as NFTs from my co-creator, artistic_resonance, age at twice the rate as other tokens from the collection. So if you hold a token from ‘Unity’ or ‘Shadow of the Ashen’ by artistic_resonance, your League of Light NFT will move to the next stage in only half a week.

Tokens in ‘The Unheard’ class are exempt from aging — they only have one stage.

After some tokens from the collection reach stage 3, new game mechanics are unlocked. Collectors may burn two tokens, once they have both reached stage 3, in exchange for one new ‘Monarch’ NFT. The metadata of the new Monarch NFT will depend on the NFTs which were burned — burning “Carrier of Light” & “Catcher of Shadow” will yield “Monarch of Light & Shadow”, for example.

‘The Unheard’ tokens, though exempt from aging, can be burned as part of this process at any time, to create a more rare ‘Unheard Monarch’.

The game mechanics in the League of Light collection offer collectors multiple routes to increase the rarity (and, by extension, value) of their NFT. This experience is more engaging for collectors than simply collecting artworks.

Development

The smart contract and website for League of Light were developed solely by me, over 1 month.

The smart contract was developed using Solidity and Remix IDE. The League of Light website was developed using HTML, CSS & Javascript, and web3.js to interact with the blockchain.

The smart contract supports ERC721 — Non-Fungible Token Standard, and ERC2981 — NFT Royalty Standard. It was also seamlessly able to receive ERC20 tokens as payment for the minted NFTs.

One challenge that I faced while developing the smart contract was running into the code size limit for smart contracts. Because of the dynamic metadata and functionality facilitating the game mechanics, the contract code size became too large during development. To work around this, I moved the token metadata functionality into a separate smart contract, and then set up each contract to communicate with the other when needed.

You can view the main contract on Etherscan here, and the metadata contract here.

Website & Minting Experience

Minting, and transactions related to game mechanics, take place on the League of Light website, built by me.

Users are able to seamlessly connect their wallet and send transactions without issues. The website is dynamic, and responds automatically to a change of the connected wallet or network.

The website was optimised for mobile devices, so that users can mint tokens and interact with the site from their phones.

Before the sale began, users were given the option to pre-approve our smart contract to spend their $ASH (ERC20 token used to pay for the NFTs). This allowed users to prepare for the sale when they were ready (or when gas was cheap), and not risk missing out during the public sale.

After minting new tokens, users are presented with automatically generated sharing options, to view their new NFTs on OpenSea or share them on Twitter. To facilitate this behaviour, the website must read and interpret the logs emitted by the user’s sent transaction. This capability makes the website more responsive and automatic, drastically improving the user experience.

Each phase of the sale (pre-approval, whitelist minting, public minting, etc.) required a different user interface, and each phase was developed and tested ahead of time. The last phase, monarch redemption, is currently live at https://leagueoflight.xyz.

--

--