Paradoxically enough, anonymous yet well-known digital artist Pak has never ceased to amaze his followers and collectors by coming up with awestruck NFT masterpieces. From The Fungible to the Merge NFT project, he has spared no area to master dynamic NFTs whose mechanisms are as complex as his identity.
Just when you think you have figured out how his NFTs work and evolve with unprecedented twists, there is always something down the line to comprehend. For instance, after the merge project was presumed to draw its last stroke, Pak leveled up the project with Matter tokens, reviving the merge once again.
However, in this article, the topic at hand is Pak’s most-talked about Merge NFT project, which has set a world record for an NFT sale. In 48 hours, he sold a total of 312,686 units of mass to 28,983 unique collectors, fetching over $91.8 million.
Impressive, right? But the mechanism by which it became what it is now is still shrouded in smart contracts, which we will thoroughly explain shortly. Let’s begin by unfolding its layered and multifaceted mechanism that came to life with numerous possibilities.
Overview of Merge NFT Project
Before moving on to decode the smart contract of the Merge NFT project, you’ll need a quick recap of what actually happens when a person buys a mass token. First and foremost, understand that Pak creations are a bit unconventional to follow, as there are frequent developments one after another.
So, if you really are a curious NFT newbie or have missed out a lot, then you must study the historic Merge NFT project from front to back.
Here, let’s just get to know the prerequisites for analyzing the smart contract of the Merge project. The Merge is the NFT collection in a way that it consists of mass units represented as NFTs. Each mass is an NFT and has a different value.
Only one mass token can be stored per wallet address. If you own a mass token and purchase another one, then both mass tokens will be merged into one with their masses added together, and the visual representation of the mass, which is a circle, will also grow in size.
Now back to the mechanism and smart contract analysis of the Merge NFT project, to comprehend how it is possible.
Analyzing Pak’s Merge NFT Project Smart Contract
In this section, we will understand the implementation of the Merge NFT project mechanism, and decode its smart contract. To begin with, the smart contract address is ‘0xc3f8a0F5841aBFf777d3eefA5047e8D413a1C9AB’ which you can also check out on Etherscan.
The First Contract Merge.sol
Well, let’s look into the first contract ‘Merge.sol’.
How can two mass tokens merge into one?
As the name suggests, Merge is not only the project but is also the process that sets the foundation of its mechanism. The merge happens in the _merge function. When a collector transfers a mass token, the contract checks if the recipient wallet address already owns a token. If so, it will invoke the _merge function, as given below.
The inputs are two tokenIds. This _merge function first checks the mass of two tokens using the decodeMass function. The function then merges the smaller mass token into the bigger one by updating the mapping _values with an increment of the smaller mass.
Note that, decodeMass returns “mass” given a value, using the formula mentioned below:
Mass = value % CLASS_MULTIPLIER. Note that ‘_values’ is a variable mapping token ID to mass value.
In this process, the small token will be burnt, and the addition of both the masses will be the ultimate mass token.
Part of the burning process takes place in the _merge function by deleting the smaller token in the _value. However, most of the burning happens outside of this _merge function with the help of the returned value tokenIdSmall.
Moving forward, the Merge NFT project smart contract keeps track of the number of times each token is merged using a mapping _mergeCount. Consequently, this mapping gets updated every time a merge happens.
As per the people who analyzed the contract closely enough, there is an ambiguity if this is the best way to structure the code as it still has room for improvement.
What is an alpha mass token and how does the smart contract decide the alpha mass?
Alpha is the Merge NFT project’s biggest mass and a dynamic class that is given to the top collector. It is visually represented as a black circle. This “alpha” class is awarded when you secure the maximum mass among all collectors. You can merge more and more mass tokens from the secondary market or acquire masses of larger values to make your mass token “alpha”.
The alpha mass token with its id and mass value is stored in variables _alphaId and _alphaMass. This function checks if the mass of the merged token is larger than _alphaMass, in which case, _alphaMass and _alphaId will be updated.
The Second Contract MergeMetadata.sol
The SVG generation code is in the second contract ‘MergeMetadata.sol’. Simply put, a circle in an SVG is represented using <circle id=’c’ cx=’1000′ cy=’1000′ r=’_RADIUS_TAG’/>. Based on the mass of each token, the _RADIUS_TAG is dynamically produced.
Use Cases of Merge NFT project Smart contract:
The Merge NFT project smart contract can be used in numerous ways, but in this article we’ll discuss two of the observed options.
1. In-game usages:
Though the current crypto market conditions are pretty much going down the hill, play-to-earn games and metaverse development continue to soar. Since the gaming industry still has a long way to go before efficiently adopting metaverse-inspired gameplay, the Merge NFT project’s smart contract has a lot to offer.
The smart contract that is used in making the mass bigger and bigger with each merge can also be used to upgrade players’ weapons, tools, avatars, or any other in-game items.
For example, if you are playing a mission game in which you collect or earn a machine gun by completing a task, and then you again go on to collect one more in-game item, say a military vehicle.
Now, as soon as you collect a military vehicle, both the collected items will magically be merged to become a warthog, a battlefield vehicle with a 12.7mm three-barreled machine gun mounted in the rear. Whoa! How cool that would be.
Well, there can be many such examples but you got an idea. Moreover, this smart contract can also be used to level up the stages in the game. For instance, if you are at stage 1 of a particular game, and as you complete the tasks and collect rewards, these rewards will keep on merging to unlock stage 2 and so on.
Well, that’s just the surface-level explanation, the merge NFT project’s smart contract could be used in numerous ways to make gameplay interesting. And of course, to keep players hooked for more in anticipation of getting something entirely different from what they have collected!
2. To ease out the Credit score mechanism by Credit Cards:
This is the most practical use case of the Merge NFT project’s smart contract. The contract can simply be used to add up the points you get after spending money to increase your credit score.
The more you spend and repay the bill, the more points will be merged to boost your score, which will ultimately increase the limit of your credit card.
With each purchase and paying off bills you will get some points, which will then keep on merging as you go on purchasing more stuff. As such, your credit score would be improved significantly, and this smart contract could prove to be revolutionary in easing out the score-boosting mechanism.
As smart contracts run on blockchain, it would be really convenient for other banks to access your data and check if you have paid off your balance every month. This way, financial systems would be more transparent and rewarding.
Also Read: Exclusive Interview: Federico Clapis Personifying NFT Artworks
The Final word
Pak has truly designed an extendable smart contract with a lot of precision and details. The merge NFT project is still evolving with each passing day, whether it’s about matter tokens or building a community. The Merge project was truly inclusive and interactive which makes its mechanism worthwhile to comprehend.
Pak will continue to drop more NFT projects in the future, but merge has engraved its name in the history of NFTs as the most participative and expensive project to date. Its mechanism says it all. A lot of work and thoughtfulness has been poured into making it an ever-lasting NFT adventure.
It’s a puzzle that the whole NFT community is trying to complete, yet in each stage, it gets complex and demanding. Well, now you know how this project is in a continuous loop to develop itself into something unique every time you merge a mass. Yeah, that’s a smart contract for you!