What I learned from creating an Ethereum NFT, a Bitcoin NFT, an Ethscription, and a BRC-20 token?

Damodarbihani
Coinmonks
10 min readJul 25, 2023

--

This image was created by the DALL-E 2 AI tool from the prompt ‘Create a pixelated version of a boy wearing a VR headset’ and the Bitcoin Ordinal transaction hash for it can be found here.

The Ethereum NFT I own stores data off-chain on a centralized server, making it susceptible to changes but a new addition to the Ethereum blockchain called Ethscriptions is slowly changing that paradigm. Similarly, another protocol called Ordinals is bringing on-chain, immutable NFTs and fungible tokens to the Bitcoin Blockchain, let’s take a deeper drive…

TL;DR

The topics covered in this article include:

- What is an Ethereum NFT?
- Where is the NFT data stored?
- What is the NFT URI & Metadata?
- How to locate the NFT’s metadata?
- Can an NFT’s metadata be edited?
- How to create an immutable JPEG NFT?
- Challenges with off-chain NFTs

- What is a Bitcoin Ordinal?
- How to create a Bitcoin Ordinal(NFT)?
- How to create a BRC-20 token?
- The Bitcoin Ordinals controversy

- What is an Ethscription?
- How to create an Ethscription?
- Current drawbacks of Ethscriptions

What is an Ethereum NFT?

An Ethereum NFT is a non-fungible token that is stored on the Ethereum blockchain. NFTs are unique and cannot be replaced, unlike cryptocurrencies like Bitcoin, which are fungible and can be exchanged one for another. This means that each Ethereum NFT has its own unique identifier and metadata, which can be used to track ownership and authenticity. The common Ethereum NFT standards include ERC-721 and ERC-1155.

Ethereum NFTs can represent a variety of digital assets, including artworks, collectibles, in-game items, and even real estate. Some popular Ethereum NFT projects include CryptoKitties, Axie Infinity, CryptoPunks, and BAYC.

Where is the NFT data stored?

The data for Ethereum NFTs can be stored in a variety of places, including:

  • On-chain: The most basic way to store NFT data is on-chain, meaning that the data is stored directly on the Ethereum blockchain. This is the most secure way to store NFT data, but it can also be the most expensive, as it requires paying gas fees to store the data. Some projects which are completely on-chain include CryptoPunks, OnChain Monkey, Chainrunners, and Nouns WTF. Hence, as long as the Ethereum chain is alive, these projects would continue to exist.
The attributes of CryptoPunk#1 have been permanently stored on-chain.
  • Off-chain: Another way to store NFT data is off-chain, meaning that the data is stored either on a centralized storage system(Google Cloud, AWS, Azure, etc.) or on a decentralized storage system(IPFS, CESS, Storj, Arweave, etc.). This is a more cost-effective way to store NFT data, but it is not as secure as storing the data on-chain. In fact, 12.8% of the NFTs on the Ethereum blockchain are missing.
  • Hybrid: A hybrid approach to storing NFT data is to store the most important data on-chain, such as the token ID and ownership information, and then store the rest of the data off-chain. This is a good compromise between security and cost.

What is the NFT URI & Metadata?

A URI (Uniform Resource Identifier) is a string of characters that identifies a resource on the internet. URIs can be used to point to websites, images, files, and other resources. In the context of NFTs, a tokenURI is used to point to the NFT’s metadata which in turn points to the location of the image file.

The TokenURI of a project can be obtained by inputting the Token ID of the NFT into Etherscan in order to read the contract.

The NFT Metadata is a JSON (JavaScript Object Notation) file that contains information about an NFT, such as its name, description, image, and other properties. The metadata is stored on the blockchain, and it is used to identify and track the NFT.

The metadata of the Elite#1944 NFT as obtained from Etherscan. Source

How to locate the NFT’s metadata?

  1. Go to Etherscan.io.
  2. Locate your NFT’s transaction.
  3. Select Contract from the drop-down menu.
  4. Click on Read Contract.
  5. Locate the token URI.
  6. In the given box, type your NFT token ID.
  7. This will display the NFT’s properties as a string of numbers and letters, which you may copy and paste into your browser.
  8. This will lead you to a page where you can find your NFT’s metadata.

Can an NFT’s metadata be edited?

Generally, the level of immutability to provide to an NFT is at the discretion of the project creator. However, a few properties that are usually immutable include the creator of the NFT, royalty percentage, token name, and token ID. Some data points that can usually be edited in an NFT’s metadata include:

  • The name of the NFT
  • The description of the NFT
  • The image associated with the NFT
  • The URL associated with the NFT
  • The owner of the NFT
  • The category of the NFT
  • Any other relevant information

How to create an immutable JPEG NFT?

Centralized storage services use location-based tracking. Hence, even though the URL the NFT points towards is immutable, the image itself can be changed. Furthermore, if the centralized websites go down for maintenance, or even stop running for any number of reasons, the NFT’s metadata is not retrievable making the NFT essentially worthless. This is further complicated if the creators decide to back out of the project and you’re left wondering how to get an IP rights claim on your NFT, as happened in the Mv3 ecosystem.

A better way to store NFTs that are too large to be on-chain is by using a decentralized storage service like IPFS or CESS. These services provide redundancy, immutability, and permanent storage — so long as there are nodes to store your data. Furthermore, these services use content identifiers to store data, hence no changes can be made to the file itself. The content identifiers(CID) for the same image are as follows:
- IPFS:
https://bafkreie4oxtnuwm5puzeqs6vuwxz5mvcmib65q22brhtxlfaapfq4hueg4.ipfs.nftstorage.link/
- CESS:
https://d.cess.cloud/628167011.jpg

These CIDs are immutable once added to the NFT metadata.

Pinning your IPFS file on a platform like Pinata or Filebase or NFT.Storage is extremely important to make sure that the file is stored in the node’s permanent storage, for long-term, persistent availability. This helps in finding the file quickly without having a lot of computing power and a large amount of developer resources. Source

Platforms like OpenSea provide the added functionality of single-click freezing of the metadata while deploying your NFT on the platform. When you freeze your metadata, the following information will be locked:

  • item name
  • media (JPG, PNG, GIF, SVG, MP4)
  • description
  • properties, levels, and stats

Challenges with off-chain NFTs

Even though storing off-chain NFTs in a decentralized server is fairly secure, certain drawbacks include:

  1. Data can still be lost if it is not stored properly, particularly if the data is not pinned or highly unlikely, but if the whole decentralized storage provider network goes down.
  2. Storing Dynamic NFTs can be a challenge, particularly understanding the crucial data points that should be absolutely stored on-chain vs off-chain.
The metadata of a dNFT representing a property can change to reflect maintenance history, past sales, etc. image from https://blog.chain.link/what-is-a-dynamic-nft/

Therefore, should you trust an NFT collection that stores data on a centralized server?
Probably Not.

Does that mean you can trust an NFT collection that stores data on a decentralized server?
Maybe. Depends on how they’ve stored it.

So, are there any protocols that completely store all data on-chain in a cheaper way?
Yes. Presenting:
1. Bitcoin Ordinals
2. Ethscriptions

What is a Bitcoin Ordinal?

A Bitcoin Ordinal is a new class of assets that lets users embed data permanently on the Bitcoin Blockchain. The Ordinals Protocol was created by Casey Rodarmor with the aim to launch Bitcoin-native digital artifacts. The protocol was made possible due to Bitcoin’s SegWit & Taproot upgrades that allowed developers to record enlarged arbitrary content within specific transactions in a block. The Bitcoin Ordinal has two parts to it:

  1. Satoshi: A Satoshi is the smallest unit of Bitcoin, equal to 0.00000001 BTC. As of July 2, 2023, 1 Satoshi is worth about $0.000305 USD. All Satoshis are fungible(interchangeable).
  2. Inscription: The data asset itself, could be an image, text, HTML, audio, video, sound, or code.

An Ordinal is simply the permanent pairing of a Satoshi with the Inscription in order to add ‘non-fungibility’ to the Bitcoin blockchain and then tracing the Satoshi by assigning them numbers based on when they were mined. The ordinals are completely Bitcoin-native, don’t require layer-2 solutions like Counterparty or Stacks, and are backward compatible with the network.

Ordinals have been growing in popularity and as of July 2, 2023, around 1,801 BTC has been accrued in total Ordinals fees. Source.

Since the Bitcoin network does not natively support smart contracts, there can be two types of Ordinals:

  1. Semi-Fungible: The BRC-20 tokens enable the functionality of a smart contract for deploying, transferring, and minting tokens by setting inscriptions in JSON format. They are very similar to the famous Ethereum standard ERC-20 tokens. However, they have limited utility since they only store the name and amount of tokens held. This prohibits DeFi and arbitrary applications use-cases, and they can probably be used only for speculation purposes as of now. A few famous tokens include ORDI, PEPE, WOJACK, and MOON.
  2. Non-fungible: Similar to Ethereum PFP collections, there has been a rise in Bitcoin NFTs and a few famous projects are Bitcoin Punks, Bitcoin Frog, Twelvefold, and Pixel Pepes. One important thing to keep in mind is that Ordinals are not formally supported by the Bitcoin protocol, hence if a user does not care about the data attached to the ordinal, it can be treated just like a normal fungible Bitcoin. This is different than Ethereum NFTs because ERC-721 tokens are always treated separately from the ERC-20 tokens.

How to create a Bitcoin Ordinal(NFT)?

The OG way to create an Ordinal includes the following steps:

  1. Run a Bitcoin Node, and sync the entire Bitcoin blockchain using CLI

2. Download the Ordinal Protocol from Github

3. Send an ordinal(satoshi+inscription) to a Taproot-compatible wallet and wait for it to be minted.

Whereas, the user-friendly way to create an Ordinal includes the following steps:

  1. Create an account on the Bitcoin wallet, Xverse
  2. Create an ordinal by uploading an inscription, i.e. an image or text on a no-code platform like Gamma
  3. Check it out on the Ordinals Protocol Explorer
The Elite#1944 NFT that I hold in the MV3 Universe which I converted into a Bitcoin Ordinal can be found here.

How to create a BRC-20 token?

  1. Create a Taproot account on the BRC-20-friendly wallet, Unisat. Keep in mind that you can safely send BTC from a Taproot account to a Legacy, SegWit, and Native-Segwit account and vice versa.
  2. Mint, deploy or transfer the token by adding the relevant fields.
  3. Check it out on the Mempool
My first BRC-20 token deployment called “MAAD” can be found here. I also minted another BRC-20 token called “DUKE” which can be found here.

The Bitcoin Ordinals controversy

A few BTC holders aren’t happy with the Ordinal Protocol because they argue that this is not how Satoshi Nakamoto envisioned Bitcoin in the OG whitepaper and hence decided to keep Bitcoin ‘Turing incomplete’:

‘A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.’

Hence, any applications built on top of the Ordinals Protocol go against the essence of Bitcoin, clog up the system, and drive up transaction fees, especially since the blockchain currently lacks speed, scale, and low-energy consumption. While others welcome Ordinals because of their cultural value and the demand they create for blockspace. It would be interesting to see how the hypothesis of storing immutable data on the Bitcoin network ultimately plays out.

What is an Ethscription?

An Ethscription is a new class of assets that lets users permanently embed digital artifacts on the Ethereum Blockchain. The Ethscription Protocol was created by Tom Lehman with the aim to launch fully on-chain assets in a secure, trustless, cheaper, and decentralized manner. The protocol uses Ethereum ‘call data’- a tiny bit of data sent with every blockchain transaction- to store images, resulting in on-chain NFTs.

Ethscriptions are still in a nascent stage but have already crossed $2 million in daily trading amount. Source

How to create an Ethscription:

  1. Convert an image (max size: ~90KB) to a Base 64-encoded data URI (data:image/png;base64,...) using a service like base64-image.de. The Ethscriptions protocol supports all data URIs but images work best.
  2. Convert the data URI to hex using an online tool like hexhero.
  3. Send a 0 eth transaction to the person you want to own the Ethscription with the hex data from (2) in the “Hex data” field
  4. After a few moments, it should appear on this site, provided someone hasn’t already Ethscribed the same data. Duplicate content is ignored!

Or head over to ethscriptions.com to create it in a single click.

This image was created by the Microsoft Designer AI tool from the prompt ‘A 500x500 pixel art image of NYC’ and the Ethscription transaction hash for it can be found here.

Current drawbacks of Ethscriptions:

  1. The protocol only supports images with a maximum size of 96 KB.
  2. Applications only have the availability to read data from smart contracts and not calldata.
  3. There’s no utility to Ethscriptions because there’s no added programmability, unlike most Ethereum NFTs.
  4. There may be future EIPs that may prune calldata, hence essentially deleting the Ethscriptions.

The protocol is still in its nascent stage but it would be interesting to see how this experiment pans out, especially since developers have already started creating projects on it, for e.g. Ethereum Punks.

Final Words

Should you switch your NFTs from Ethereum to Bitcoin just to be able to store data fully on-chain? No.
Currently, should you launch a BRC-20 token to raise funding as you did with your ERC-20 token launch?
No.
Do you need to switch your NFTs from Ethereum or another Alt-1 like Solana or Avalanche to Bitcoin because it is more decentralized and immutable? Well, that is a rabbit hole that I’d like to go down some another time.

Fin.

--

--