The hitchhiker's guide to NFTs

The obvious answer to this post is 42, but the journey will try to explore exactly what's an NFT, where it's stored and how it came to be. I'll abstract as little as possible while keeping it light.

A non-fungible-token (NFT) is a unit of data on a digital ledger called a blockchain, where each NFT can represent a unique digital item, and thus they are not interchangeable.

The above description, from Wikipedia, is pretty much on point. But only scratches the surface. We already explored how Bitcoin blockchain works. You may remember that it stores transactions and only that. Bitcoin's blockchain is the source of truth for who-has-what regarding bitcoins. Now Ethereum, another blochain-based protocol is a different beast. It builds upon the original concept but made its blockchain way more flexible allowing users to store pretty much anything in the form of a Smart Contract.

A Smart Contract is a piece of code stored in Ethereum's blockchain that runs inside the Ethereum Virtual Machine (EVM). Code being code, you can do pretty much anything with it but, for the time being, the majority of smart contracts are being used to create and manage digital tokens.

So you actually write a piece of code into the blockchain?

Yes! Coming from the original blockchain, this is a pretty extravagant concept. Ethereum blockchain is public, so you can check everything. I'm delighted by Zora's Smart Contract code, it starts with "This contract only exists to serve as a testing utility!"... !

Zora's Smart Contract Code

As you may remember, one of the things that's costly in Bitcoin is writing stuff to the blockchain. The reason being that computer resources are finite and the blockchain has to be heavily distributed (bandwidth) and archived (storage). Size matters!

blockchain sizes compared
Bitcoin's full blockchain currently stores more than 330GB. Ethereum leaves that in the dust with its archival nodes storing more than 6.7TB! While the problem is being tackled by pruning and sharding is also on the roadmap - spliting a single database into several smaller ones - the thing to retain here is that there's a cost to write to the blockchain.

If on Bitcoin the only thing that gets written to the blockchain are transactions, which cost a fee, Ethereum had to approach the problem from a completelly different angle. You can write whatever you want to the blockchain and that has to be measured. The solution came in the form of gas a new unit of cost.

So what exactly is gas?

Just like your car runs on gasoline, operations on the Ethereum blockchain run on gas. You must pay gas for doing a computation on the EVM (Ethereum Virtual Machine), you must pay gas for doing a transaction, and you'll also pay gas for writing to the blockchain.

While the exact calculation of price is fairly complex, we can safely use the more linear rule of thumb; each 256 bits cost 20k gas. Gas cost, like in real-life, fluctuates with offer and demand.

What does this have to do with NFTs?

Digital art, by its very nature, can be replicated in an indistinguishable way. The clock depicted in the photograph below is unique. But the image, the jpeg you are seeing in your screen, has been downloaded by your browser and is an identical copy, bit by bit, of the original.

From the extraordinary mati.land

It's actually impossible to tell apart the jpeg that is stored in this server to the one your computer created. This is where the NFT (non-fungible-token) comes into play. Creators are trying to produce a singular item. One that can be sold and traded yet remains as a single source of truth. The blockchain, with its innate accountability and the possibility to store whatever you desire, looked like a prime candidate for such.

Companies like Zora, OpenSea and others developed Smart Contracts and wrote them in the blockchain. Those Contracts manage the creation (minting is the official jargon) of digital pieces of art. Then the artists can put them up for sale in a global marketplace. It is a digital piece but remains unique.

What about blockchain size?

If writing to the blockchain is a costly operation and if the Ethereum blockchain is already in the several terabytes worth of size, won't all this art skyrocket its size? There's where gas comes into play.

As we wrote above, gas is just a unit of cost. Today we had an average of 166 gwei per unit of gas. A gwei is 0.000000001 ETH.

Let's put that into more "natural terms".

size gas in ETH in USD
1 KB 625,000 0.05 $184
1 MB 640,000,000 51.20 $189 k
4 MB (average mp3) 2,560,000,000 204.80 $754 k
Grimes 11.5MB NFT 7,360,000,000 588.80 $2.1 M
Beeple 305 MB NFT 194,560,000,000 32296.96 $ 57.5
1 GB 625,000,000,000 50000.00 $184 M

As you can see, even though NFT are selling for more than red-diamonds, the cost to write them in the blockchain is prohibitively high. Even if Beeple sold "The First 5000 Days" for an outrageous $ 69M, who would gamble $ 57M just to put it online?

NFT marketplaces were sensitive to this problem from the very start. No one would pay thousands of dollars to mint pixel-sized artwork! The solution came in the most obvious of forms. A link. Not any link but a link to InterPlanetary File System (IPFS).

InterPlanetary File System?

It's a new type of network that improves on the Torrent protocol, drinks from version-control systems like Git and also draws some inspiration from the web. It then packs it all up in a single cohese protocol. It inherently makes browsing faster as its distributed, and safer as the design prevents content-manipulation by default. Currently, only Brave browser natively supports it. As more browsers join you'll be able to point your address bar to something like ipfs:// and see actual content. If your browser does not support IPFS you can still use a web-gateway such as https://ipfs.io/.

CloudFlare has a great post about IPFS is and how they support it.

Show me the NFT already!

Now that we've unraveled that:

  1. Smart Contracts can be written into the blockchain
  2. Smart Contracts can generate and manage the possession of Tokens
  3. Tokens can be unique (non-fungible)
  4. Tokens can carry any amount of data (including links)

Let's see a concrete example of where an NFT actually lives on the blockchain.

Mike Winkelmann, known by Beeple, recently sold an NFT on Christie's by an astonishing 69 Million. EVERYDAYS: THE FIRST 5000 DAYS. From the auctioneers site (previous link) you can see who governs the contract:

A day before auction they didn't have the token ID online! ;)

In possession of the contract's address (0x2a46f2ffd9...) we can explore it. Just go to EtherScan and give it a look.

If you dig a bit further you can see who the Smart Contract belongs to. The digital painting was minted on OpenSea and auctioned on Christie's. You can also see the item transfer from beeple to mp-escrow and then to MetaKovan. The irony of using an escrow service is not lost on me.

The piece being on OpenSea means that anyone can make a bid for it. MetaKovan will probably not sell as the highest current offer, at 22 ETH, is just short of $ 39k.

Now lets go to the Smart Contract's page again and click on the Read Contract button. From there go all the way to item 23. tokenURI and enter the Token's ID: 40913. That number identifies the token which supports this art piece.

And from here on we leave the realms of the blockchain and go straight to IPFS!

The highlighted text shows a link to IPFS.

ipfs://ipfs/QmPAg1mjxcEQPPtqsLoEcauVedaeMH81WXDPvPx3VC5zUz

Depending on your browser you may (or may not) be able to follow it but you can always resolve to a web-gateway to read it. Just click here to follow that link on a "normal" browser.

You'll get some text in Javascript Object Notation (JSON) that looks a bit garbled:

The token MetaKovan bought points to a file carrying this content

I've made the text more human-readable and removed non-essential content so that we may focus on the essential.

{
  "title": "EVERYDAYS: THE FIRST 5000 DAYS",
  "type": "object",
  "imageUrl": "https://ipfsgateway.makersplace.com/ipfs/QmZ15eQX8FPjfrtdX3QYbrhZxJpbLpvDpsgb2p3VEH8Bqq",
  "description": "I made a picture from start to finish every single day from May 1st, 2007 - January 7th, 2021.  This is every motherfucking one of those pictures.",
  (...)
  "properties": {
    "preview_media_file": {
      "type": "string",
      "description": "https://ipfsgateway.makersplace.com/ipfs/QmZ15eQX8FPjfrtdX3QYbrhZxJpbLpvDpsgb2p3VEH8Bqq"
    },
    "raw_media_file": {
      "type": "string",
      "description": "https://ipfsgateway.makersplace.com/ipfs/QmXkxpwAHCtDXbbZHUwqtFucG1RMS6T87vi1CdvadfL7qA"
    }
  }
}
The links present on the JSON point to MakersPlace. This was probably an oversight as it ties the item to MakersPlace DNS. Nonetheless, the addresses can still be used on IPFS.

As you can see, the minted token points to a JSON file that in turn links to a thumbnail and a raw_media image. A diagram would be more or less like this:

The blue square represents the unique token you can buy and sell. Grey squares represent files on IPFS. They are public and don't have the concept of ownership.

So you can download the original artwork?

You most definitely can, and should!

Thumbnail on the IPFS web-gateway. (1.5MB).

Original piece on the IPFS web-gateway. (300MB).

EVERYDAYS: THE FIRST 5000 DAYS

In fact, the more people download the image, the more IPFS nodes will pick it up. This scenario is a bit ironic as IPFS acts like torrents, the chosen vehicle for digital piracy.

So what is in fact sold?

The possession of the token. The token is unique and is attached to a particular wallet. Only that wallet can transfer it to another wallet.

The actual content of the token can be publicly read, as we did it, and points to a file (3 in this specific case) that live in the public domain.

What's the deal with buying a token that doesn't carry actual content?

Fair question. I don't really have a straight answer. You can make the case that the more representations there are of a single piece, say Mona Lisa, the more that artwork is valued. The only deviation here is that the representation and the original piece are indistinguishable - or, if you want it, fungible. It's as though anyone would be able to put an atom-by-atom identical representation of Louvre's masterpiece, in their living-room, for free.

I'm quitting piracy! The movie has been downloaded more than 75k times and not a single person donated.

The above rant, while anecdotal, actually happened. It serves to cast doubt on the value of things you get for free. Say that instead of a painting we're talking about a song or a movie. In the current scenario, as soon as you mint it, you're also putting it into the public domain. Every single person on the planet has instant access to the original. While that may eventually be beneficial to promote the artist, I find the case for the owner of the token harder to justify.

Can you destroy an NFT?

Say MetaKovan would wake up one day and decide that the world had seen enough of beeple's artwork and resolves to destroy the piece. Shred it. Can he do it? Is the NFT deletable? No. As soon as the piece if put up in IPFS the user lost control over it. He may try to unpin the piece from the original servers where it was put up but there is absolutelly no guarantee that the file will not be cached eternaly on other servers. But at least you have copyright over it, right?

When you, as an artist, sell a piece, you retain the copyright unless explicitly stated. If the token were to serve as a representation of copyright, the case would get much stronger as you would be legally entitled to the royalties the piece generates. But for the majority of NFTs, this is not the case.

Bluebox will be launching a copyright exchange soon.

However, if we follow down that path, where does the NFT stand? We're creating a copyright-exchange. Owning 20% to the Beatles's "I Want to Hold Your Hand" is completely fungible. Any 20% represent exactly the same thing, a quota of the copyright. Buying and selling shares of art, to me, is completly understandable. MasterWorks.io secondary-exchange (only available in the US) is doing just that with fine art. They hold the original painting and you can trade shares of it.

How could NFTs actually work?

To me, retaining possession of an item represents having a level of access that other people don't have. That is not currently the case with NFTs. I can imagine a scenario where you would have a vault on IPFS that could only be opened by whoever was the holder of said token. The technicalities behind it escape-me but I imagine you would need a Virtual Machine of some sort (to untie the file from the platform) that would query the blockchain for the tokens owner address and would only allow whoever had the private key to open the container.

The container could have multiple levels of access, one public where anyone would be able to see a smaller representation of what's inside (sample of a song, thumbnail of a painting, etc) but only the owner would have access to the unrestricted content.

Salvator Mundi tops the chart with $ 450M.

Final Thoughts

The First 5000 Days went straight into the list of most expensive paintings ever sold, putting beeple alongside Manet, Picasso and van Gogh in terms of valuation.

Independently of not understanding the intrinsic value of being the proprietary of a token that points to a file that's in the public domain, these sure are extraordinary and exciting times.

The amount of people with vast amount of funds is unimagined and they all look to be converging into technology. That is sure to sprout innovation.