TechScape: Why can’t crypto exterminate its bugs?

‘Provenance hashes’ and bug bounties are supposed to protect platforms. Why do so many flaws in crypto and open-source projects fester for years?

In February, Twitter user Brodan, an engineer at Giphy, noticed something odd about Bored Ape Yatch Club (BAYC), the premiere ape-based non-fungible token collection. A record intended to cryptographically prove the trustworthiness of the bored apes contained 31 identical entries, a situation that was supposed to be impossible. “There’s something super-suspicious about some of your apes,” Brodan wrote.

Six months later, when the newsletter Garbage Day brought it to wider attention, Brodan’s query still hadn’t been answered. The situation is all too common in the crypto industry and the wider open-source community, and raises the question of whether there’s something fundamentally wrong with the idea that a crowd of amateurs can effectively hold large projects to account.

The issue lies with an obscure record called the “provenance hash”. This is a record, published by BAYC’s creators Yuga Labs, that is intended to prove there was no monkey business (sorry) in the initial allocation of the apes. The problem the team had to solve is that some apes are rarer – and more valuable – than others. But in the initial “mint”, they were allocated randomly across the first 10,000 to apply. To prove they were distributed randomly, rather than a few valuable ones distributed to insiders, they published a provenance hash: a list of cryptographically generated signatures for each of the 10,000 apes, showing that the apes had been pre-generated and pre-assigned, without revealing what their characteristics were.

So far so good, except that 31 of those signatures were identical. Since the 31 apes they were assigned to were distinct, that means the provenance record for those apes was broken – and they could, theoretically, have been changed to match the desires of the person who bought them.

Earlier this summer I asked Yuga Labs about the duplicates, and the company initially pointed to the circumstantial evidence that it hadn’t pulled a fast one: none of the 31 apes had gone to anyone with insider connections, nor had they been generated with particularly desirable traits. Which is true – but also unsatisfactory. If you learned that your burglar alarm had never been wired up by the company that installed it, “Nothing’s gone missing, has it?” would only be a partial answer.

When pushed, the company examined the problem further, and found the cause of the problem: when it was preparing the provenance hashes, it triggered a rate-limiting error from the server storing the images of the apes. That error meant that, 31 times, rather than generating a cryptographic signature of a picture of a monkey, the company unknowingly generated a cryptographic signature of the error message “429 Too Many Requests”. Oops.

A Bored Ape Yacht Club NFT billboard in Times Square in June.
A Bored Ape Yacht Club NFT billboard in Times Square in June. Photograph: Noam Galai/Getty Images

I asked Yuga Labs co-founder Kerem Atalay, who works under the handle Emperor Tomato Ketchup, whether he felt the multi-year gap between the problem and its resolution undercut the justification for provenance hashes. If no one is checking these things, what’s the point? “I think in this case, perhaps the reason it went unnoticed for so long is that this is such a heavily scrutinised project to begin with,” Atalay said. “The provenance hash became a less important feature of this whole project the moment it exploded. If a single pixel had changed in the entire collection after that point, it would have been extremely glaringly obvious.”

In that telling, provenance hashes are useful to rebut accusations of favouritism – but if there are no accusations, it’s not surprising that no one checks the hashes. Yuga Labs made a similar defence for another years-long oversight, spotted a few months ago: the company had kept control of the ability to create new apes whenever it wanted, despite promising to destroy it. Unlike the provenance hash, that ability was noticed rapidly: in June 2021, Yuga Labs said they would be fixing the oversight “in the next day or two”.

In fact, it took over a year. “While we’d been meaning to do this for a long time, we hadn’t out of an abundance of caution,” Atalay tweeted. “Felt comfortable doing it now. All done.”

Such issues are by no means confined to Yuga Labs, or the crypto sector at large. Last week, Google’s cybersecurity team, Project Zero, announced the discovery of a new security vulnerability in Android. Well, it was new to them: the exploit had already been used by hackers “since at least November 2020”. But the root cause of the bug was older still, and had been reported to the open-source development team in August 2016 – and a proposed fix had been rejected a month later.

That is years of meaningful security weaknesses for almost every Android phone on the market, despite the problem being visible in the public record for anyone to see.

It’s unclear how long that vulnerability had been present in the code, but in other situations that time can be the source of major problems. In April, a flaw was discovered in a command-line tool called Curl that had been present for 20 years.

And last December, a weakness in a logging tool called Log4j was discovered that was, the National Cyber Security Centre said, “potentially the most severe computer vulnerability in years”. The bug was hardly complex, and an attacker would barely have had to try before potentially taking control of “millions of computers worldwide”. But it had sat, undiscovered, in the source software for eight years. That oversight was not only embarrassing for people who believed in the security model of open-source software, but also catastrophic: it meant that affected versions of the software were everywhere, and the ongoing cleanup process might never be completed.

Tiny bugs, big problems

Open-source software such as Log4j underpins much of the modern world. But over time, the basic assumptions of the model have started to show their weaknesses. A small piece of software, used and reused by thousands of programs to end up installed on millions of computers, should have all the eyes in the world scanning it for problems. Instead, it seems, the more ubiquitous and functional a piece of software, the more people are willing to rely on it without checking. (There is, as ever, a relevant cartoon from the web comic XKCD).

In a perverse way, crypto has solved some of these problems, by putting a tangible economic benefit on finding bugs. The idea of a “bug bounty” is nothing new: a large software developer like Apple or Microsoft will pay people who report security vulnerabilities. The idea is to provide an incentive to report a flaw, rather than build malware that abuses it, and to fund the sort of crowdsourced investigation that open-source software is supposed to encourage.

With crypto projects, there’s effectively an in-built bug bounty running 24/7 from the moment they’re turned on: if you are the clever person who finds a bug in the right crypto project, your bug bounty can be … all the money that project holds. So when hackers from North Korea found a hole in video game Axie Infinity, they made off with more than half a billion dollars. The downside of such an approach, of course, is that while bugs are discovered quickly, the project tends not to survive the experience.

For Yuga Labs, the saving grace is that the only people who could abuse the oversights were Yuga Labs employees themselves, who rapidly came to be seen as trustworthy enough to not worry about. But investors in the broader crypto ecosystem would be good to be wary: even if someone says they’ve published proof they are trustworthy, experience shows that there’s no reason to believe anyone has checked it.

If you want to read the complete version of the newsletter please subscribe to receive TechScape in your inbox every Wednesday.


Alex Hern

The GuardianTramp

Related Content

Article image
TechScape: How do you slice a billion-dollar crypto bankruptcy pie?
The 50 biggest claims against FTX total $3.1bn. Now a US court has to determine who gets what – if anything. Plus, what will be more valuable by the end of the year: Musk’s stake in Twitter, or a lettuce?

Alex Hern

22, Nov, 2022 @11:57 AM

Article image
TechScape: Inside the $8bn FTX crypto scandal – and its real-world impact
Sam Bankman-Fried was what everyone wanted a crypto billionaire to be – until things began to go very, very wrong

Alex Hern

15, Nov, 2022 @11:55 AM

Article image
TechScape: How a major change to ethereum could change cryptocurrency forever
In this week’s newsletter: Ethereum turning off its mining rigs and slashing the currency’s carbon emissions should be good news. But not everyone agrees

Alex Hern

24, Aug, 2022 @10:45 AM

Article image
TechScape: What the crypto big freeze means for your money
In this week’s newsletter: Crypto giant Celsius is freezing out users as it tries to solve a mammoth lending crisis. So what happens if money in the bank isn’t really there?

Alex Hern

22, Jun, 2022 @10:45 AM

Article image
TechScape: Four stories that sum up the state of tech in 2022
In this week’s newsletter: Crypto self-destructed (twice) and Twitter got a new, CEO-shaped main character– but what else happened this year?

Alex Hern

27, Dec, 2022 @11:45 AM

Article image
TechScape: Why Twitter ending free access to its APIs should be a ‘wake-up call’
In this week’s newsletter: The social media network is putting its APIs – the under-praised tool that keeps the internet as we know it going – behind a paywall. And the ramifications are huge

Chris Stokel-Walker

07, Feb, 2023 @11:45 AM

Article image
TechScape: I’m no longer making predictions about cryptocurrency. Here’s why
If you’d bought or sold bitcoin every time I wrote about it over the last decade, how much would you have made? Let’s do the maths

Alex Hern

03, Aug, 2022 @10:45 AM

Article image
TechScape: How a cryptocurrency project lost $180m to a get-rich-quick scheme
In this week’s newsletter: Beanstalk held hundreds of millions of dollars’ worth of stable assets – until one lone attacker quickly, maybe even legally, bankrupted the scheme in minutes

Alex Hern

20, Apr, 2022 @10:45 AM

Article image
TechScape: the taxman is starting to take notice of the NFT gold rush
In this week’s newsletter: as UK tax authorities seize their first NFTs, is government scrutiny finally on the way for the booming crypto market?

Chris Stokel-Walker

16, Feb, 2022 @11:45 AM

Article image
TechScape: want to ‘be your own boss’ online? Here’s why it’s not so simple
In this week’s newsletter: the ‘Creator Economy’ is billed as a way for artists to directly monetise their work – but in reality it simply puts more power in the hands of big tech

Hussein Kesvani

16, Mar, 2022 @11:45 AM