Nick Calabro About    Archive    Feed   

Holiday Card NFTs

The following was typed with a HHKB

How I Made My Holiday Cards NFTs, Kind Of — And How You Can Get In On The Next Block

Before we begin, I want to make it clear that this isn’t a ‘genuine’ NFT, in many regards and for a few reasons. If anything, this is more of a traditional token (and it’s not even that) since the physical holiday cards themselves all have the same properties — they’re literally fungible.

There is no money being made here. In fact, the proof of work this cost me along with the total lack of utility means I’ll forever be in the red. But, this is an interesting project & one that gave me a much deeper understanding of blockchain. I hope it does the same for you.

In this post I’m going to go over

  1. Why I did this — and a brief history lesson
  2. How I did it — and why this works

  1. How to confirm your card if you’re a node. i.e., got my card in the mail

Project Overview & Inspiration

First, I’ll address your initial questions: "what is this thing, Nick? I thought blockchains were on the web, or in the cloud, or.. everywhere! Not on a Christmas card!"

You’d be mostly correct, but not fully.

I’ve been involved in crypto since 2017 and the past year have been working as the Growth Manager at Mimo, a stable coin issuance protocol.

Earlier this year I started watching Gary Gensler’s MIT course on blockchain and money. While my mind was consistently blown, a particular section caught my attention. Gary asked the class what the longest running blockchain is. Naturally, murmurs of Bitcoin fill the air. But although Bitcoin solved somethings in a novel fashion and created a new application for the tech, the first blockchain was consistently running for more than a decade prior.

As it turns out, this blockchain has been maintained since 1995 and a new ‘block’ is published every Sunday in the New York Times.

Now, bear with me, because if you don’t understand crypto entirely yet, this will truly make things seen in a different, tangible light.

First, we need to understand some quick fundamentals on blockchain.

We’ve got a couple key components:

Hashes, nonces, and unique, immutable data.

When it comes to cryptocurrencies you’re probably using today, the data piece are the transactions that take place in each block; while the hashes and nonces might even go unseen as we abstract ourselves away from the underlying tech.

So, when you consider that this is all that is required to successfully maintain a blockchain, you realize tech itself, or computers, aren’t even necessary - though, makes it actually feasible, sure.

The New York Times is a pretty popular publication that gets distributed into many hands. These act as our confirmation nodes. The Times is also dated. Something that couldn’t really be forged.

Vitalik Buterin even mentions how difficult it would be to break this chain. The same attack could be done if someone decided to forge my greeting cards.

How & Why This Works (through a distributed greeting card)

Enough history, here’s where we are now. Although I would’ve loved to build a chain from scratch, the tech debt became entirely unworthy. It’d not be unlike spending $100 in electricity to mine $0.50 of ETH. So, take some liberties with me and enjoy the ride no matter how unsecure it is.

I piggyback off Anders Brownworth’s Blockchain 101 site.

Now, of course we shouldn’t trust anyone, so I decided — in typical crypto fashion — to fork it. Even more on-brand, we hard forked it. This just means that I’m now maintaining this separately from the upcoming blocks on the other chain. Of course in this example, it’s not a live, moving, chain, but the concepts are still there.

Although you can install your own instance of the Nick Calabro Holiday Card Global Chain, Anders’ works as of right now so you can simply use this.

So, how’s it work?

First let’s look at the components of the holiday card. We have the .png, a hash, a URL, and - most importantly - a postage date. The date is what makes each and every block unique & verifiable.

For the purposes of my cards, we assume their dates are Christmas day of that block’s year. Again, this is a brutally imperfect implementation.

The schema for how we display the block’s data is as follows:

December 25, 2021

</p>

If we imagine that date having to match an immutable postage date, we have a truly verifiable blockchain.

The URL is also a piece that an attacker would be needing a forge as well.

So, all we have to do is mine the first block, enter the data from the card onto a new block, and mine #2. If the created hash matches the one on the token, you’ve verified your holiday card is truly from me.

Of course the vector for attack is ripe. There’s only 1 block so far. So, in theory, all one would have to do is send everyone cards with my face on it, make up their own data, and they can effectively hack the chain.

There are 2 reasons why it’s still entirely easy:

As the years go on and I send more cards, the chain grows, and then the attacker would have to repeat the previous year’s cards to recreate the entire chain to match up with their current block’s hash.

()

As the years progress, you’ll have to install the chain’s history to catch up. And, as more years go on, more people are going to enter my network and start receiving holiday cards. These are all extra entities carrying a copy of the ledger since they’ll have that latest hash.

If almost everyone in my network decided to burn their cards, and an attacker tried overtaking the whole chain, so long as there’s 1 person with a card still on their fridge, that would disprove the new side-chain.

How To Confirm Your Holiday Card On-Chain

To ensure you’re getting genuine holiday cards from me, the one and only, you can either trust me, or you can verify me.

Why would you trust the greeting card is from myself & truly authentic? Well, the incentive to fake a holiday card from me is quite low. These cards aren’t being traded and they’re really an ephemeral slice of cardboard that gets tossed by 95% of recipients anyway. Trust, in this case, is not a bug - nor even a feature.

But, in the spirit of overly-optimizing, let’s verify:

Details & Schema

To collect the data necessary to confirm the hash on your card, there are a couple things we’ll need to look out for.

Date: an immutable timestamp that can never be recreated.

Unique id: each block (holiday card) comes with an image. That URL is used to verify as well.

Genesis Block: The first block has already been mined and is ready to be built upon, the data in that block also helps make up the hash that you’re seeing on your card now. If you can’t confirm that first block, you’re already side-chaining and no further cards can be trusted.

You’ll know you have the correct Genesis Block when:

  • its previous hash is 64 0s
  • its data is simply: nick.finance
  • its nonce is: 4008
  • and its current hash after mining is 000094ad55d3f7eccb5a1c1d6f1d2c36f52d77ee47ca98a26371267cddb53bf0

Step 1: Claiming

One of my investment philosophies is to buy things that you want to own. This is how most die-hards get away with holding on to certain NFTs regardless of where they’re trading at. By accepting the card, you’ve "claimed your token".

Step 2: The Timestamp

One of the properties surrounding this entire chain is the concept of time. Since there’s only 1 moment of time that can never be changed, it’s a great function to use as it’ll be different every time.

Now, if we were creating a truly secure chain, we’d already be broken, as the postal service is subject to human-error and may not stamp the card at the chain’s expected time. So for the purposes of the Nick Calabro Holiday Card Global Chain, we’re going to assume the date is always December 25.

Step 3: The Data

Now that we have all the components necessary to mine, we can go ahead and put it together to create the next block’s hash that is written on your card.

December 25, 2021
https://nick.finance/holiday-2021.png

This is block #2’s data. If we followed this patter, you could even guess next year’s, but that would be wildly insecure! So, know that although we’re not running this through any random number generators, the filename for the next block will not be holiday-2022.png.

Step 4: Mining

As we discussed above, this is a hard fork from Anders Brownworth’s example that you can find on his website. In fact, you might be best off using his to confirm (for now) since you’ll be forced to install and run my fork locally. This aspect is even similar to the first days of Bitcoin.

Edit: As of writing this, the Nick Calabro Holiday Card Global Chainhard fork is not modified for prime-time. Tech debt..

So, Whether you’re using Anders’ or installed your own ledger locally, let’s mine the chain and confirm you have an authentic greeting card.

On the blockchain tab, you’ll find a series of blocks.

We know the data for the genesis block: nick.finance, and that’s all you need to input before hitting mine.

Mining the block will find the correct nonce to create our first hash. On the second block, gather your data and enter it. The previous block’s hash is pre-loaded for you.

You’ll notice the block is still red, meaning it hasn’t been mined yet or simply broken. If the data is entered correctly, go ahead and mine the block.

Finally, block #2’s hash should match the card on your greeting card, thus giving you proper verification that this is truly from me.

You’ll know you won if your screen looks like this:

Known attack vectors & imperfections:

  • The timestamp. The postal service is run by humans. Humans are prone to error. Unlike the NYT example where the operation is smooth enough to ensure there’s always an issue being distributed on a particular day of the week, I don’t trust that we can be so specific with this case.

    So, by creating the rule now, that the date of new blocks will be December 25, we can assume this will always be true — until we hard-fork and change the whole thing again.