Variety. “the_coin” visualization examples.

Token Update: 2084

Imagining an NFT that updates for a century, and the role of “semantic contracts”

Takens Theorem
7 min readMar 31, 2022

--

This post describes a “semantic contract” that modifies a token on another NFT contract. It is a simple extension of the composability concept, but motivated by simplifying contract interaction into a kind of “on-chain dApp.” I then show a working proof of concept on the project the_coin.

But first, to frame this post, a very brief and playful story:

The Halving Ritual

You summon the family near the fireplace. You light a fire. Not a fire, really. It’s a tokenized asset implementing 3D-animated fire in a wall inset. It’s compelling, flickering and crackling like a cozy campfire. You have enough $FIRE tokens loaded into it that it even generates heat (using a token burn process of course).

On this date in 2084, you are awaiting block number 3,990,000. It marks the nineteenth Bitcoin Halving. Every four years you have this little celebration. Your family rolls their eyes, as always, but you exclaim, “The halving is now observed by many around the world, it’s fun!”

So you like to celebrate it. And you have a special way to do so.

Whoever they were, they left instructions on how to use a little piece of code, a “smart contract” in archaic terminology. All you have to do is give it your token number, the Bitcoin block number, and click a button. The token — now 63 years old — is updated with a new ring that marks the passing of another halving. You show it on the screen for a few minutes to celebrate.

Your kids, now teenagers, space out on their Neurolinks. You hope they’ll find it fun to update this antique digital artifact. It will continue to be updatable until the last satoshi is issued, around 2140.

the_coin

This post is primarily intended for collectors of my mid 2021 project called the_coin (see here), and especially for those who own one of the Issuance tokens. In this post, I describe a kind of smart contract that is superimposed on top of the main NFT contract. This simpler contract, below I’ll call it a “semantic contract,” is designed to make it easier to update the_coin tokens. It opens up the main contract to easier use by “interpreting” its main functions and inputs according to a particular meaning.

But why would we want such a semantic contract in the first place? A “dApp” would typically be used to interact with contracts in this way. Although some dApps use web2 architecture, a dApp is often conceptualized as a smart contract (or set of contracts). A “semantic contract” is one designed to be more interpretable, easier to use, akin to an interface—but it will live forever on chain, or as long as Ethereum does. If its functions and arguments are available to users, it will facilitate interaction with a main contract in perpetuity, such as with the_coin. On the_coin, token owners can restyle their tokens using 256-bytes of CSS. But this can be somewhat complicated. So the semantic contract interprets the main contract in a simple way, giving owners a simple function to update their pieces.

Top: Base layer of “Issuance”. Bottom: Modifications using contract.

This post is also inspired by stories I heard during the 2020 “pandemic” Bitcoin halving. Many were posting about it on Twitter, some even meeting up online as a fun reason to celebrate something that inspires many of us — a new form of money, of digital value, uncensorable self-custody and more.

By using the_coin contract, Issuance can be restyled to be a halving clock marking these epochs. But these halvings happen about each four years, and they will continue for more than another century until the last satoshi is issued on the Bitcoin network. Could you imagine passing this digital artifact across generations so others can ritualistically update this “clock,” marking each halving?

Semantic Contracts, “Forever dApps”

On-chain NFTs are forever. Several of my projects are dynamic, on-chain NFTs, variously visualizing the data substrate of crypto. Gaussian Timepieces (summer 2021) update to your wallet and block number on Ethereum’s network. They become a kind of functioning clock that ticks not to human time but to blockchain time. The Mesh (early 2022) also adapts to your wallet’s holdings, and it depicts your connectivity to other wallets on the project (called “nodes”) using data from its contract and other NFT holdings you have.

Like these, the_coin is also built by its contract, rendering SVG raw from the chain. It is a stylized visualization of Bitcoin’s history and future through precise math and code:

“…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.”

But each token can be updated, restyled, a technical symbolism of the sort of “base layer” quality of Bitcoin itself (see here).

The first visualization on the_coin is Issuance. It depicts issuance of bitcoins across halving periods in layered circles. Around each circle is text specifying the block height of the halving, the likely year (using approximate 4-year increments) and cumulative bitcoins issued. The circles are mapped onto actual issuance using a log function, which gives the diminishing issuance across halvings precise linear intervals, from halving to halving as the issuance shrinks into the center.

“Issuance” base layer

Because you can revise the styling of the_coin you can turn Issuance into a kind of “halving clock,” marking the ring of the current halving epoch (shown in the story above). You just have to specify some CSS described here. But as modifiable and interactive NFTs like these become more widely used, it might be useful to build what could be called “semantic contracts.” These contracts specify a particular ontology or “semantics” of a more complex contract, opening up a specific set of functions or ideas that can be implemented.

So I rendered a semantic contract designed for the 21 Issuance tokens on the_coin. A proof of concept. It is very simple. Its main function has only about 20 lines of code. To use the contract, you first have to give it permission to modify your token (see below). Once you’ve done this, you can update your Issuance token as a halving clock forever (or as long as Ethereum is alive and EVM processes it correctly).

Halving Clock Semantic Contract (TCTTMOD1)

✅ 0xb186b51588dbefcfb0f4aa44c36…

For our purposes here in 2022, you can use Etherscan’s contract interaction interface. This is shown here. You give the “semantic contract” your Issuance token number, and the Bitcoin block number you wish to use. You can also specify the color of the base circles and whether you want your piece to be in light (1) or dark (2) mode. This contract call requires about 800,000 gas. If you can find an affordable 25 gwei moment, the token update will cost about 0.02 ETH.

So an eternal semantic contract can update your Bitcoin halving clock. It’s a convenience function, a helper tool. I like “semantic contract” because this is a bit more abstract and general—“semantic” signifies that the contract is “interpreting” the base contract according to a particular meaning, in this case a halving clock.

No need for CSS coding of any kind, you just plug in some simple values and go. In principle, and as a fun thought, it could be used across generations as an updatable vintage visualization marking next epochs of crypto history.

How-To Notes / Terms & Conditions

If you own an Issuance token on the_coin, then the first step is to approve the semantic contract as an operator on the base contract here:

The operator to approve is the contract address linked above (the semantic contract). Here is its full address:

Giving permission to the semantic contract on the_coin’s base contract

(Note that you can also revoke this permission on Etherscan itself, or by entering “false” and running the transaction again.)

Once that transaction goes through, you can now request that the semantic contract (0xb186b…) revise your token for you. Go to the semantic contract on Etherscan and enter the following details:

Blockchain.com or plenty of other websites can get you the exact block height to use, if you wish (just don’t use any commas in the textbox — only the numeric form). You can use a specific HTML color (illustrated here with BTC orange).

In tokenId enter your Issuance token number (this can be found at the end of OpenSea’s URL, or in Etherscan’s inventory listing for the_coin). This should be a simple numeric form too.

Terms & Conditions of the Semantic Contract

Experimental, use at your own risk. Contract and tokens are as-is and as-available without any and all warranty. By using this contract you accept sole responsibility for any and all transactions involving the_coin, including this updater contract.

--

--

Takens Theorem

Dynamic distributed data displays. Intermittent. Friendly.