CryptoPunks, cats and stones
Currently, projects related to the so-called NFT are extremely popular in the blockchain and cryptocurrency world. One of the most recognizable initiatives are the so-called CryptoPunks. What are they? Simply put, they are digital pixelated images that people are ready to pay millions of dollars for (yes, I know, the cryptocurrency world can be weird). More precisely, people purchase the rights to this graphic. Of course, there’s nothing preventing you from copying the image itself, but it’s easy to verify on the blockchain who the rightful owner is. Even if we use the copy/paste method, in case an application wants to integrate with CryptoPunks and, let’s say, allows you to have an avatar in the form of a Punk, only the owner of a particular NFT will be able to use it.
So is it worth spending millions on such a purchase? This is highly debatable and relies heavily on speculation. Who is playing this game, then? Mainly, but not exclusively, the cryptocurrency market participants. This year, even a big and serious company like VISA decided to take this step and spent almost $150,000 on a digital graphic. CryptoPunks are just one of many examples. I won’t be listing all of them here, but it’s worth mentioning that people also buy images of stones, called Ether Rocks, as well as virtual kittens. Note well that traffic generated in 2017 by the CryptoKitties app slowed down the entire Ethereum network. Well, problems are inevitable as new technologies develop. If you would like to take a closer look at the various and sometimes strange collections, try visiting the OpenSea portal.
So what is the NFT?
Surely it’s not just about digital images. NFT, or non-fungible token, can be understood as a certificate stored on the blockchain. We can trade, sell or simply store this certificate as a proof of originality for a digital or real asset we own. It will also work well as a certification of the uniqueness of collectible items.
Let’s assume that we create a collection of one-of-a-kind mugs we then sell. Each mug is unique, therefore it would be a good idea to have something to attest its originality, as someone may wish to resell their purchase one day. We can, of course, attach paper certificates, but the problem is that they are easy to forge and not very durable. This is where blockchains come to the rescue, where we can create our NFTs and attach them to the real product. Hence, using blockchain’s qualities such as transparency and invariance of history, we get a perfect way to certify the authenticity of an asset.
Obviously there are still many unsolved issues, for example what would happen if someone has a certificate, but forges and resells the real product while keeping the original to himself. We may imagine that the counterfeit could then become the original. The moment NFT certificates are commonly acknowledged, only the owner of the digital certificate will be able to sell a given product. Even if someone keeps the real mug but has no NFT to certify its originality, they will not be able to sell it. This would mean that the value is actually in the token itself rather than in the object.
Of course, I’m simplifying things here as one day there could be specialists able to distinguish between a counterfeit and an original, but I believe such problems will be solved in the future.
The matter is simpler if the NFT token is associated only with a digital asset (e. g. an image of a stone), because then we are able to easily verify everything within the blockchain and the asset cannot be forged.
Before we move on, let me explain briefly what a smart contract is. We won’t go into details as it is a subject for another article, but I will try to illustrate it with a simple example.
What are smart contracts on blockchain?
Suppose it is 2022 and the final match of the World Cup is about to take place, featuring Spain and… Poland (remember, this is just an example and it doesn’t have to be realistic). Two people would like to make a bet on the champion. Each person bets 5.000 PLN on their favourite, so the pot is 10.000 PLN, and there can be only one winner. The question is what to do with this money until we know the score. We need some sort of intermediary, so we find a third person to keep the accumulated funds and then transfer them to the winner once the result is announced.
This is where the first problem arises, namely how can we be sure that the third person gives all the money back, if at all? Once more what if this person has colluded with a 3rd party to tamper the result? We have no guarantee. So the first thought is to use an app that would allow us to make such bets; this way we eliminate the referee issue. Or do we? No way! We have merely exchanged a natural person for a computer program, which we can trust no more that a random passer-by And it doesn’t matter whether we use reputable companies or shabby entrepreneurs.
First, we are unable to verify what the program actually does as we have no access to its code. Even if the author claims one thing, they may be trying to fool us. Second, since such applications are centralized, the owners have full control over what can happen. There are multiple testimonies online where due prizes have either never been paid by the bookmakers, or things got really complicated.
This is where the smart contract mentioned before can come in handy. To put it simply, it is a fragment of code stored on the blockchain and associated with a specific state, which executes when certain predefined conditions are met. This may sound like any other computer program, although there is at least one significant difference. Everything is executed on the blockchain, meaning that smart contract has exactly the same features, which makes it very different from conventional applications.
To begin with, the entire smart contract code is visible and everyone can verify it (provided that the blockchain is public).
The authors of a program cannot claim that it works in a certain way, whereas in reality it would be doing something completely different. Next, the code itself is fixed, so there is no way to alter the operation of a created smart contract. For the sake of clarity, it should be noted that there are mechanisms to create a smart contract that can be updated, but in this case we know from the very beginning that the code in question can be changed and we can always find the current implementation. Such a contract is also deterministic and automatic, so in the case of our bet it would be impossible for the winner not to receive the prize.
Once the contract learns the score, the prize pool would be transferred to the winning party. The question that comes up is, though, how such a contract would know who has won. Blockchain itself knows nothing about the outside world and despite we call it ‘smart’, there is no cunning or artificial intelligence involved (at least for now). All data must be provided to the blockchain, but there are ready-made ways to do it. If you are interested in how to deal with this, I recommend to look up so-called oracles, which serve as a bridge between the outside world and the blockchain. There are several other qualities that make blockchain based apps from standard solutions, but this deserves a separate article.
NFTs are simply appropriately written contracts
Of course, we can try to reinvent the wheel, but it’s better to stick to proven solutions and take advantage of the existing standard. Contracts based on this template are called ERC-721 tokens. The name comes from the Ethereum Improvement Proposals (EIP) number, in which a standardized interface was proposed [14]. Another standard is ERC-20, used for creating cryptocurrencies based on Ethereum, Binance Smart Chain or Polygon blockchains. It is worth mentioning that bitcoin is a coin, not a token, but I won’t be getting into details here, so for the purpose of this article, we can treat both of them equally. What differs standard cryptocurrencies from NFT tokens is the fact that each NFT has its own ID, therefore we are able to identify various tokens even if they belong to the same contract.
This distinction allows us to assign different properties to individual tokens, and this is where the variance in valuation comes from. In the case of standard cryptocurrencies, there are no IDs, therefore particular tokens are identical. So does each bitcoin have its ID? In a way, yes; this makes it possible for certain people to treat individual coins as some sort of NFT tokens.
UTXO, or bitcoin banknotes
When someone transfers 1.000 PLN to someone else, in practice this is only a change of numbers in a system. Of course, the entire transaction history is stored, but we are unable to tell which specific zlotys were transferred from our account, because only the balance changes and our account is not linked to specific physical banknotes and their serial numbers. The case is similar when it comes to transfers of multiple cryptocurrencies.
In the Ethereum protocol, if one user sends an ether to another wallet, they change the state linked to that address but they don’t select which ether to transfer. This is the so-called account based model. This means that each individual coin is identical and even if it was used in illegal transactions, we would be unable to point exactly which unit was involved.
Of course we can tell that a given address did this, but we couldn’t for example block particular tokens as they would be indistinguishable. By blocking, I don’t mean a direct interference with someone’s account and preventing them from sending tokens to another address. Such action is impossible, but if, let’s say, stock exchange could tell coins apart, they would be able to seize them at the moment of the transaction. In the case of Ethereum, the only option is to block entire addresses, but there are workarounds to that as well. Things are quite different with bitcoin, because transactions there are based on the so-called UTXO model.
UTXO, or Unspent Transaction Output, means that bitcoin wallets formally store no coins and have no balance. At this point, someone might ask why their bitcoin balance is visible on their wallet. This is because it’s an easier and more convenient way of presenting this to the average user, rather than delving deep into what is actually going on there. Thus, logging into any wallet application, we are able to see how many bitcoins we have, whereas blockchain itself has no stored state to define this number explicitly.
Wallets find all UTXOs associated with an address, which then makes it possible to display the amount of bitcoin owned.
Let us briefly explain where all those UTXOs come from. To simplify, each bitcoin transaction has at least one entry and exit, or input and output. Every input is linked to a certain output from other transactions. All exits that have not been used yet are called UTXOs. Such an approach allows us to create a graph so that we can trace the entire history of individual coins. We can then check exactly which bitcoin was involved in which transaction.
I will use a simple example to explain the UTXO model even better. Suppose we have two people, Kate and Tom. Kate would like to send Tom 3 bitcoins. She has 3 UTXOs linked to her address, worth 0.8 BTC, 1 BTC and 1.5 BTC. We will call them banknotes for the sake of illustration. Unfortunately, Kate doesn’t have a banknote worth 3 BTC, so all three bills will be involved in this transaction. The result of this action will be two new bills: one worth 3 BTC, which will go to Tom, and one worth 0.3 BTC, which will go back to Kate. At this point, we have two brand new UTXOs on the blockchain instead of the previous three.
To make things easier, I skipped the transaction fee. It is important that individual UTXOs must be spent as a whole and there is no way we can use them only partially. This approach solves the issue of so-called double spending, which can be compared to shopping with cash. If you hand a sales clerk a 50 zloty bill, there is no way you can later buy something else with that same bill. Unlike physical cash where we have predefined denominations, each UTXO can have any value, be it 0.000001 BTC or 1000 BTC.
Now that we know what UTXO are and how – in a simplified manner– bitcoin transactions work, we can easily recognize this unique feature that allows us to distinguish between individual coins. Transaction history linked to each individual bitcoin makes some of them more attractive than others. If we knew that a 100 zloty bill was involved in an illegal transaction, we probably wouldn’t want to trade it for our product. The exact same situation applies to bitcoin. In this case, the best option would be to have a coin with no history saved on it. The only way to achieve it is to ‘mine’ a new bitcoin. I won’t elaborate on this, but such ‘fresh’ bitcoin could be the most red-hot thing in the future.
Summary
So does a single bitcoin have more in common with a NFT token, or with a coin that could one day become digital money? Everyone must answer this question for themsevles. Personally, I believe it is likely for bitcoin to be recognized as a worldwide currency. It’s good to know that some bitcoins might be highly desirable, while others can burn your fingers. Therefore, it’s better to choose those with as little history as possible whenever we can. Chances are that such a coin was not linked to any suspicious transaction, which could impact its value in the future. This will probably be even more important when Central Bank Digital Currency (CBDC) is rolled out on a large scale. This idea is not as remote as it may seem, but we will cover that some other time.
Do you already know the first part of Przemek’s article? Be sure to check out Are two bitcoins equal? Part I