the_coin

Completely on-chain NFT series visualizing Bitcoin’s history with math, data and SVGs.

Contents

  • Motivation
  • Features, terms, conditions, copyright
  • Historical preamble
  • Visualizations
  • Owner’s guide
  • About Takens

Motivation

Bitcoin is the basis for all cryptocurrency. Prior attempts at digital currency, many of them intriguing and sometimes funny, could not sustain uptake by any major stakeholders, public or private. Bitcoin’s success and survival served as a kind of sustenance for an entire industry that has now ballooned from $0 in 2009 when Bitcoin was deployed, to over $1,000,000,000,000 just over a decade later.

Bitcoin still dominates this industry, numerically and philosophically. Indeed, the second dominant cryptocurrency Ethereum was born out of Bitcoin in many ways itself. For one, the originator of Ethereum began his career in crypto by writing articles about Bitcoin and co-founding Bitcoin Magazine. Bitcoin is mentioned in the original Ethereum white paper over 50 times.

One of Vitalik’s early articles.

This blog post introduces “the_coin,” a project that uses the ERC-721 (NFT) mechanism of Ethereum to encode Bitcoin’s amazing history in the form of stylized data visualizations. It is in the spirit of a prior project, “Ethstory,” which visualized Ethereum’s history across 16 creations.

I’ve titled this project “the_coin,” lower case, with an underscore that connotes a variable in code. It implies a sort of obscure and modest origin — a draft, a tracer bullet codebase, something that many still claim won’t succeed.

the_coin is a small-scale NFT project. A “miniseries.” Why one at all? For one, I am inspired by Satoshi and Bitcoin and its history. The history of blockchains is fascinating. If Ethereum’s history is intriguing (and it is), Bitcoin’s is like having a real-life unfinished Silmarillion before you. I decided to create just a handful of very simple data visualizations. These are carved carefully from on-chain and other data. They are small-scale graphical reminders of its history, encoded on Ethereum as on-chain SVGs, technically inspired by such projects as these. I decided to churn the data into visualizations inspired by a “digital time capsule” concept, like those on the famous Voyager satellites:

The Golden Record, etched with human history

In that sense, because these modest visualizations live on chain, this encoding of Bitcoin — as an idea, as a history and as a transformative economic contribution to human civilization — will propagate long into the future. Like a digital time capsule.

Finally, the_coin focuses on big-picture aspects of Bitcoin’s history. There are many intriguing events and themes that could be highlighted — from pizza purchases to hacked exchanges and block-size wars. Like any history, especially short histories, focus is rendered at the exclusion of many other interesting things. I apologize in advance for skipping over so much.

Features of the_coin project

Release. 4 visualizations, max 21 editions each = 84 (total issuance). This minting limit is hardcoded in the contract. 56 of these tokens were gradually released on OpenSea starting Sunday July 11th, including as part of an auction of a couple dozen tokens. 50%+ of auction planned for charity and, like Ethstory, to public charity addresses. A final batch among the 56 was dispersed to auction winners, and some tokens to those who did not secure a piece in the auction. The remaining 28 of the 84 tokens reserved for supporters, prior collectors, and the creator.

Donations. The auction’s proceeds were donated in the following way:

These four charities are 501(c)(3) registered in the US and have excellent Charity Navigator scores. More than 70% of auction proceeds went to these charities. Proof of giving: Click “tx” to see the public transaction and amount in ETH. The webpage with their Ethereum address is linked on “web,” and just in case, an Internet Archive link to this webpage is linked on “archive.” Thank you, thank you to collectors, supporters.

100% on chain. Metadata and editions themselves are entirely encoded inside the_coin contract. The tokenURI() function on the contract returns a JSON payload that contains attributes along with image data in the form of an SVG. When a token is transferred, the piece itself moves with the token. There is no off-chain URL.

Satoshi quote. Most visualizations contain a historically relevant quote from Satoshi (each is described below in this post).

Dynamic owner stamp. On each edition, near the signature, the owner’s address is stamped. When a token is transferred, the SVG updates to the new owner’s address.

Small signature accompanies stamp of owner’s address

Interact and restyle. The contract exposes a function called changeStyleMode(). Owners can interact with this contract by sending a CSS snippet. If they own a token, this CSS snippet will replace the default CSS snippets that style their edition, allowing owners to create new versions of the editions on chain (see owner’s guide below). Use of this function is free (owners only pay gas). Update: Further examples here.

Example of simple restyling by interacting with the_coin. See below for more.

Minimizing gas at setup. the_coin contract stores skeletal SVG data as a basis for the 21 editions of each piece. This means just one “source mint” was needed for each NFT. When interacting with the contract, owners get these skeletal SVGs along with the CSS and signature that determine their edition. This decreases required gas expense by over 90% at contract setup.

Terms, conditions. the_coin is an experimental project, use at your own risk. Each token is provided as-is and as-available without any and all warranty. By using the contract you accept sole responsibility for any and all transactions involving the_coin.

Owner rights. Owners have full rights over the visualizations, they may modify and adapt them as they wish, including for commercial purposes. However, if owners redistribute the underlying data of these visualizations, the license requires them to grant to their users these same freedoms (via GPLv3).

Historical preamble

In 2008, a seemingly modest 9-page technical PDF was posted to a cryptography mailing list. Its author went by the name of “Satoshi Nakamoto,” and the paper proposed an “electronic cash system.”

See Satoshi Nakamoto Institute for this and other early communiqués

Satoshi implemented this cash system, and solicited members of this list to join in establishing a network of computers that would distribute the asset, confirm transactions and secure the overall system.

Visualizations

Below are the 4 visualizations. They are ordered historically: the Bitcoin model, first mining activities, its expanding network, and public and institutional integration of recent years. Background for each original is described, with pointers to further reading. Each is like a frame or canvas, encoding general properties of Bitcoin. By interacting with the contract, owners can build from this base layer to render their own modified visualizations.

1. “Issuance”

“Total circulation will be 21,000,000 coins. It’ll be distributed to network nodes when they make blocks, with the amount cut in half every 4 years. first 4 years: 10,500,000 coins next 4 years: 5,250,000 coins next 4 years…” (SN)

Bitcoin began as an idea. This idea was encoded in a short and surprisingly readable white paper. The paper describes a system for electronic cash, and combined a number of advances in applied cryptography. The white paper proposed a monetary system with a diminishing supply. Issuance of the main unit of supply — now known as the bitcoin — shrinks every 4 years or so. For the first 210,000 blocks on Bitcoin’s ledger, miners would get 50 BTC as the coinbase (the reward). At block 210,000, during the first “halving” event, this reward would drop to 25. At block 420,000, it would halve again to 12.5. This visualization captures this diminishing supply. The circles have radii that are a function of this diminishing issuance. Along the circumference is a series of numbers: block number at halving, year of halving, and the cumulative bitcoin count.

The difference between the log of a number and the log of its half is log(2). Still, for completeness, here’s a proof of linearly scaling radii, producing these concentric circles, representing diminishing issuance:

Why the circles stack neatly as regularly spaced radii.

As much as this model is central to Bitcoin’s beginnings, it is also central to its future. Zooming in on the piece, one sees the coinbase vanish into a kind of singularity, when the 21,000,000-th bitcoin is complete (actually the very last coinbase will be 1 satoshi, one-hundred-millionth of a bitcoin). Here, fees will take over as the sole reward for mining Bitcoin. There is intriguing discussion about the consequences of this. Of course, it won’t happen till the year 2140.

Zooming in, coinbase compresses into a singularity

2. “Miner 1”

‘By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation…’ (SN)

It is assumed that the first and most of the early blocks mined on Bitcoin were mined by Satoshi Nakamoto. This visualization shows emanation of the first coinbase (50 BTC) sent mostly to Satoshi. We know that Hal Finney, a prominent member of the cypherpunk group, mined block 78 (“1AiBY…”). This network shows the first two characters of Bitcoin mining addresses (at the time, all addresses began with “1”). It also shows the very first Bitcoin transaction, also to Hal Finney (“1Q2TW…”). In the top right, the address that mined block 9 (“12…”) sent 10 BTC to Finney’s address.

This is the beginning of Bitcoin: The first miner, sharing the first node codebase with a handful of others, seeking interested parties to join in. Some early blocks took hours to mine. Patterns in the mining activity suggest Satoshi mined over a million Bitcoin. As the Bitcoin community grew, after it got “slashdotted” and attracted much new attention, Satoshi disappeared.

A screenshot of Finney’s Bitcoin wallet, with miner address “1AiBY…”:

Finney mined several blocks, and first transaction of 10 BTC seen here

The array of unique mining addresses may also illustrate an early principle proposed by Satoshi:

“As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.” (SN)

3. “Security”

“The system is secure as long as honest nodes collectively control more CPU proof-of-worker than any cooperating group of attacker nodes.” (SN)

Bitcoin’s ledger grows by a process of competition among miners. It is sometimes said that miners solve “difficult mathematical puzzles,” but this isn’t quite right. It is more like a unique game of dice that can vary in difficulty. The idea of this “game” is for one miner to win every ten minutes or so. Miners bundle transactions together and plug them into this game of chance. When the data and the dice outcome line up in a certain way, miners can prove it to other miners (and nodes) on the Bitcoin network. The game can be made more or less difficult. Imagine expecting an outcome from 2 dice or 3 dice or 4 dice. The more dice in the game, the more computational power you’ll need to run as many of these games of chance as possible to find an outcome where the combined dice and data yield a certain outcome. The elegance of this “proof of work” is that it is possible to prove to others that you won this game of chance. The network grows the blockchain every 10 minutes as miners around the world broadcast (and coordinate) their victories.

This is a key feature of the security of Bitcoin. Satoshi knew this and described its important security implications in the original 2008 white paper. The more “dice” (or difficulty) required in this mining process, the greater the computational power needed to update the blockchain. So as required computation grows, it becomes more and more expensive even to try to tamper with the blockchain’s past.

This visualization shows this growing computational power, rotating month by month across a decade (with years shown along the “northward” January line). This is known as the “hash rate,” and “hashing” can be loosely likened to “throwing the dice.” It is the rate at which random solutions to this game are pursued by the network. Bitcoin’s hash rate has expanded by several orders of magnitude since its origins. The radius of this orbiting line indicates the relative hash rate of the network (log transformed). The width of the segments grows as the radius grows, connoting a kind of secure shell around the blockchain’s history.

Interestingly, when it began, Bitcoin could be mined on a personal computer. Now specialized hardware devices, designed precisely for this hashing process, are required in droves in order to keep up. This has raised many issues, especially recently with renewed concerns about this energy consumption (such as environmental impact). Despite these concerns, the issue of hash rate has also brought new ideas about monetizing lost or “nonrival” energy sources. New innovations may even see Bitcoin integrated into a power grid which, when demand is low, can put its otherwise wasted energy to use in mining Bitcoin.

This visualization also shows the effects of a series of recent events: China imposing a de facto ban on all Bitcoin mining. Before June 2021, China’s miners had been responsible for over 60% of the hash rate. When these mining farms shutdown in China, hash rate dropped by about 50%. This is visible in the last segment of this plot, a crossover between 2021 and 2020 (it does not appear as 50% because the radial orbit is in log units).

Past 6 years of Bitcoin hash rate, log transformed (Coin Metrics)

4. “Integration”

“I’ve been working on a new electronic cash system that’s fully peer-to-peer, with no trusted third party” (SN)

These are the modest first words of communication from Satoshi. Momentum gathered slowly. But when a robust community of developers had been established, a cascade of changes to Bitcoin’s core codebase made it more efficient, more extensible, more private and so on. The narrative around Bitcoin changed in subsequent years and after some internal battles. These battles further distinguished Bitcoin from other projects, and made this emerging narrative clear: Bitcoin is both a store of value and a settlement layer for an emerging financial system unto itself.

There is no quote on this piece from Satoshi. Satoshi may have remained anonymous because they intended the Bitcoin network to be “spiritually” decentralized, proceeding without a heavy hand of a central governance. Satoshi still has a certain force of spirit, but Bitcoin is no longer theirs or anyone’s in particular.

This piece spirals from January 2010 from month to month, with circle radius mapped onto the square-root of active addresses per month, and the grayscale fill mapped onto the valuation of Bitcoin in USD. The spiral ends on June, 2021 — the month at which the first nation state passed legislation to recognize Bitcoin as legal tender (inadvertently broadcast on Twitter, no less). By the end of this spiral, Bitcoin appears to be departing the page for the world. “Integration” marks this new emergence of Bitcoin from 2020–2021, into institutions and nations and penetrating further into wider cultural awareness and acceptance.

Owner’s guide

Interacting with the_coin

Interacting with the contract is completely free — there is no fee, other than the gas required. MyCrypto and Etherscan, for example, both allow users to connect via web3 wallet and interact with the contract. Here Etherscan is illustrated. Access the changeStyleMode() function here:

Visit the contract on Etherscan and click “Contract.”

After connecting your web3 wallet, you can input the ID of the token you’d like to update, and the style mode. To find your token ID, on OpenSea it will be the number at the end of the URL. For example, here’s token 10. You can also visit your account on Etherscan and look at your ERC-721 holdings and it should show your token numbers for various projects.

The style mode has three options:

  • 1 = light mode (default)
  • 2 = dark mode
  • CSS specification without style tag

For the first two, you simply enter “1” or “2” (without the quotes) to reset to light or dark mode.

Some simple CSS examples you can try:

  • Issuance:
    path{fill:none;}circle {fill:#00000011;}
  • Miner 1:
    path{fill:#ef24;}rect{fill:#025;}text{fill:#fff;}line{stroke-width:10pt;stroke:#29f4;}
  • Security:
    path{fill:#fe24;}rect{fill:#520;}text{fill:#fff;}
  • Integration:
    path{fill:none;}rect{fill:#000;}circle {fill:#fff4;}text{fill:#fff;}

Feel daring? Try animation. Note the 256-byte throttle below, but some basic animation is possible:

  • Miner 1:
    @keyframes bounceIn {0% {transform: scale(0.01);}50% {transform: scale(1);}100% {transform: scale(.01);}}line {animation: bounceIn 2s infinite;}line{stroke:#0005;stroke-width:2pt;}

The CSS is limited to 256 bytes, and it must be simple CSS without any CDATA specification, etc. Once you’ve updated the token, you can revisit OpenSea and click “refresh token metadata.” Your changes should appear (there may be a delay while OpenSea queues the update). You can also use the public reveal() and tokenURI() functions of the contract to check your SVG source directly from the chain.

Troubleshooting

If your changes do not appear, it may be due to a problem with the CSS such as a missing or extra character. This can cause the SVG not to display. One suggestion is to test out your CSS in a text file (*.svg) first before sending the CSS to the contract. Another suggestion is to avoid using any enter characters (carriage returns: \n) because this may interfere with rendering the characters from the chain to OpenSea; put your CSS all on one line. Note: the CSS should not include the style tag — the examples above are exactly what you’d pass to the function.

Own all 4, create a paneled display.

About Takens

I’ve participated in the NFT space since 2018 and shared tools and visualizations of wider crypto data since 2019, primarily through this Twitter account. In 2019, I wrote a couple of blog posts for the wonderful OpenSea. One showed that we can predict ENS name value from applied natural language processing. Another blog post described an experimental NFT recommender system. I also created a series of experimental data-driven interfaces, many of them for NFTs, and contributed a diagram to OpenSea’s great NFT Bible, illustrating how wallets own across NFT projects.

After a tempting call to share some of this work as NFTs, I created the charitable project Ethstory that uses data visualization to illustrate the history of Ethereum. Extensive detail for this project including narrative and explanation can be found on the ENS+IPFS website registered to the year 2043: https://ethstory.eth.link. This series sold out, with more than 30 ETH donated to charity. Proof of giving to public charity addresses can be found on the Ethstory website.

Donations made through Ethstory.

My broader approach can be summed up with the following statement from a Zima Red blog post, built from themes of simplicity, carving through data and research:

‘You could call these visualizations art, if you wish. But I am not an artist; by trade, I am a sort of data scientist. You could also describe Ethstory’s visualizations as “stealth infographs,” in that they look like an artistic production but they are rendered entirely from on-chain and other data.’

16 visualizations of Ethstory.

Dynamic distributed data displays. Intermittent. Friendly.