Technical Post — How we breached The Worm

The Worm NFT
Ambition.wtf
Published in
4 min readSep 17, 2021

We’ve removed on-chain artwork from an NFT — here’s how

The Worm is an NFT on a mission to visit every wallet on the Ethereum blockchain. It recently got stuck in a scammer’s wallet for 30 days (read more about what happened).

Then on Friday, Sept. 17 the Worm disappeared out of its NFT.

The Worm NFT before the breach (left) and after (right)

We call this amazing achievement by The Worm a breach, since it escaped its NFT.

(P.S. We aren’t aware of any other on-chain NFTs that have mutated or changed in this way. If you know of one please share in the comments!)

How we did it — we set up a system for the art, not just a single design

The Worm project uses on-chain SVGs, which means The Worm NFT and its Holograms use the SVG file format (as opposed to JPG or PNG like most other projects) and the SVG code is stored on the Ethereum blockchain.

The Avastars collection works the same way. You can read more about the concept of on-chain art in this great overview by Ricard Stuven: On-Chain Artwork NFTs.

The way our on-chain SVG for The Worm (and our other project, FUCK YOUs) works is like this:

There are variables & sequences.

You can think of them like lego blocks & the instructions on how to put them together.

While the code for how it works is more complicated, the advantage is that we can upload MUCH (factor of 100) less data to the blockchain, both saving money and being responsible users.

Another advantage is that we can make the art a little more dynamic. This is how The Hologram SVGs display the Disciple number. It’s the same sequence, but we just insert the NFT ID as one of the variables.

We also created a way to update the variables and the sequences

It’s a very happy / lucky / fateful coincidence that we were able to breach The Worm. Here’s the developer behind The Worm, Felix Green, to explain more:

I struggle with perfectionism. It’s the thing that has kept me from shipping most of my projects for most of my life. But a few years ago, while watching Wintergatan videos on YouTube I came across this quote:

“If you can’t make it perfect, at least make it adjustable.” — Jer Schmidt

He said this in the context of machining, but I’ve found it applies equally as much to programming. This simple idea has helped me time and time again, because if I just make it adjustable, then I’m not worried about making it perfect. I can come back later and improve it.

When we got the idea for The Worm, we wanted to move fast. After iterating on the art for a week, we couldn’t wait any longer. I minified the SVG code, and added some functions to The Worm contract in order to update the variables & sequences later, just in case.

I wasn’t sure what I would need them for. I thought maybe we’ll want to improve the art later, or maybe it didn’t render properly on a browser and I’d need to fix it.

I never anticipated that we’d use it as a story-telling element.

The innovation here is updating the art elements (variables) and how they’re assembled into the NFT (sequences)

There are several NFT collections that use the variables and sequence approach to using on-chain SVGs (Avastars, Luchadores.io, etc.). But what we’ve built here is not just a system of variables and sequences but also a way to edit them!

We can update our on-chain art whenever we want by calling a function to the contract.

That’s how we were able to edit The Worm to help it escape its NFT. And it’s also how in the near future we’ll be able to give owners of our other project, FUCK YOUs, tools to edit their on-chain art as well!

Follow The Worm on Twitter @TheWormNFT and at TheWorm.wtf.

Keep up with the team behind The Worm and check our our other projects on our Discord, on Twitter @ambition_wtf and online at ambition.wtf.

--

--

The Worm NFT
Ambition.wtf

The Worm is the 1st Social NFT gathering followers on the ETH blockchain. Step 1: Obtain The Worm NFT then pass it to another wallet. Step 2: Receive blessings.