Cointime

Download App
iOS & Android

What Is Sleepminting And Will It Ruin NFT Provenance?

published 2021-04-22 by timdaub

Today, while browsing /r/ethereum, I stumbled upon an impersonation attack using NFTs called "sleepminting." I ended up taking a closer look as I wanted to understand the idea of the attack. Here's how it works.

The Bait

Oh, look, it's beeple's multi-million dollar piece "the first 5000 days" for sale on rarible. Check the screenshot, It clearly says "Creator: beeple." Wow, Metakovan must have gotten badly rekt having to sell that $69M combo-breaker for a handful of WEIs.

Please don't fall for it! It's a scam. Or shall I saw an art piece? That's right! Its creator, Monsieur Personne, that also goes by the self-proclaimed alter ego The Banksy of NFTs, deliberately minted the piece under beeple's name using a technique he calls sleepminting. Why? Because Monsieur is disappointed in NFTs. So how did he do it?

The Basics

NFTs are created using ERC-721 smart contracts. They the ownership record of NFTs as a list of pairs. One address and a piece's serial number make up a pair. Like this (I replaced "Bob" with "Booble"):

  • Alice: 1
  • Booble: 2
  • Malory: 3

Upon a sale, Alice can transfer her piece to Boople by:

  • transfer 1: Alice ==> Booble

Now, the list of pairs is updated as follows:

  • Alice:
  • Booble: 2, 1
  • Malory: 3

In Ethereum, we don't use clear names for identification but addresses. And we need to sign transfers to authorize them. But in the examples provided in this post I'll use clear names to simplify explaining.

Now, usually developers implement ERC-721 contracts in a reasonable way. As we expect Alice can then only transfer a piece if she owns it and can deliver a valid signature. But what happens if a developer doesn't respect this convention?

See, the ERC-721 standard is just a social contract that defines a interface to allow art platforms to interoperate. There's no criteria for what's a good and what's a bad implementation. As long as a contract's interface matches that of an ERC-721 contract, any machine is considering it as valid.

But, as we've now seen, that can lead to safety issues with NFTs' provenance on Ethereum. It can be tampered with!

The Attack

As I said, any reasonable ERC-721 contract would allow a minter only to mint to themselves and to only transfer the pieces they own.

But say we customize our ERC-721 contract such that we can mint to other accounts. And say that we adjust the transfer function so that our account can, in a minor exception, also transfer another person's pieces. Well then, we can build a contract that allows us to sleepmint pieces. So as the attacker Malory, we'd do the following: We'd mint a piece with the serial number 1 to Booble:

  • mint 1: address(0) => Booble (executed by Malory)

Now our pairs look as follows:

  • Alice:
  • Booble: 1
  • Malory:

Then, since Malory has adjusted the contract to transfer the piece with serial number 1 from Booble's account to any other account, she can offer it for sale on an NFT platform like rarible.

As she minted from address(0) to Booble as "Creator: Booble" is displayed.

Once Malory successfully deceived a buyer, she receives her Ethers and transfers the piece to the buyer:

  • transfer 1: Booble => Buyer (executed by Malory)

The updated ownership record now reads:

  • Alice:
  • Booble:
  • Malory:
  • Buyer: 1

And with that, Malory has successfully tampered with the NFT's provenance record to sell her piece for more than it's worth.

The Specifics

So is this attack breaking NFTs? Should you panic sell your collection of crypto punks? What about poor Metakovan. He rekt now?

I'd say no. Sure, rarible and Etherscan state wrongly that beeple has minted a piece that genuinely he didn't. However, that's more of an interface issue than it is a security vulnerability. Nobody ever had access to beeple's account.

Also, the impersonater can be spotted when taking a closer look at the origin transactions:

Let's take a closer look at these transactions.

For the mint transaction, we can see that Etherscan displays two "From" fields: One for which msg.sender sent the transaction and another one to state the NFT's sender.

For the transaction's from field, the msg.sender, it cannot be manipulated as it requires a valid signature from the sender's private key. The authorization of the "From" field for the NFT's sender is, however, subject to the smart contract's implementation and, hence, may not display authenticated information.

Simply put, the NFT's sender field could display any data an attacker picks.

Hence, to spot a sleepminted piece from an original, one has to check if both the mint transaction's sender and the NFT's sender match beeple's correct address. If not, it's a fake.

Conclusion

I love this attack. It's similar to rug pulling in that it also plays with the user's trust towards an online identity. We think, now that we use blockchain, all our web2 problems are gone. Every piece of data is authenticated and checked for authorization. But the truth is that these problems aren't gone. They've just shifted somewhere else.

We humans cannot reproduce cryptographic verification in our brains. Sure, we can be extra careful and only trust green checkmarks and lock symbols in user interfaces. But can we recompute hashes of files or the validity of a digital signature? No.

And so the rise of new attacks on web3 is inevitable. I for one am looking forward to learning from them.

NFT
Comments

All Comments

Recommended for you

  • Ethereum Foundation Sells 2,785 ETH Worth Approximately $6.42 Million

    On October 26, according to monitoring by Onchain Lens, the Ethereum Foundation sold 2,785 ETH through CoW Swap for approximately $6.42 million in exchange for USDS.

  • Qatari Mediators Arrive in Tehran to Alleviate Regional Tensions

    According to an official familiar with the situation, Qatari mediators arrived in Tehran on Sunday with the aim of easing regional tensions. Qatar's mediation efforts are being conducted in coordination with the United States.

  • Musk: Future Phones Will Have No Apps or Operating Systems, Just AI Generation

    On October 25, Musk predicted that in the next 5 to 6 years, smartphones may undergo a complete transformation: traditional operating systems and apps will gradually disappear, and phones will become dedicated terminals for running AI. At that time, users will no longer need to download applications or open software; instead, they will simply tell the AI what they want, and the phone's AI will collaborate with cloud AI to generate videos, images, and various interactive content in real-time.

  • Iran: Tehran's Stance Unchanged Despite Potential New U.S. Strikes

    On October 25, Iranian Foreign Minister Zarif stated on Sunday that Iran's position will not change even if a new round of conflict erupts between Israel and the United States. This comes amid escalating tensions between Tehran and Washington. U.S. President Trump had mentioned on Friday that Washington "might come back for another small-scale 'epic fury'" military operation. Zarif remarked, "Recently, some have talked about the possibility of a new war, but I am already considering the post-war situation. Our policies will not change whether or not war occurs. They have tried twice before and have seen the results. If they want to try again, they should understand that the final outcome will be no different from the past." (Golden Ten)

  • Russia Ready to Supply Any Amount of Diesel to the U.S.

    On October 25, Russian Deputy Prime Minister Novak stated that Russia is prepared to supply any amount of diesel to the United States.

  • Egypt's Benchmark Stock Index Declines by 5%

    Egypt's benchmark stock index has expanded its decline to 5%.

  • Yemen Conflict Escalates, Saudi and Egyptian Stock Markets Decline

    On October 25, Sunday, the stock markets in Saudi Arabia and Egypt experienced declines. This followed a statement from the Saudi-led coalition indicating that, amid escalating conflicts with the Yemeni Houthi forces, the coalition intercepted several drones and missiles over Riyadh and southern Saudi Arabia. Under pressure from widespread sell-offs, the Saudi benchmark index (TASI) fell by 2.6%, marking its worst intraday performance since April 2025, with major stock Saudi Aramco dropping by 1.1%. Outside the Gulf region, the Egyptian blue-chip index (EGX30) plummeted by 2.5%, nearing its lowest level in about seven months, with all constituent stocks declining. The Egyptian parliament is expected to vote on October 26 to decide whether to authorize the armed forces to provide support for Saudi Arabia in its conflict with the Houthi forces upon request.

  • SemiAnalysis CEO: Substrates are the 'Biggest Bottleneck'

    On October 25, the CEO of SemiAnalysis stated: 'I believe that in the semiconductor industry, the biggest limiting factor, aside from memory, is substrates. Substrates, PCB materials, and substrate materials are all severely under-invested. Many companies in the supply chain that produce these materials in Japan are relatively conservative and unwilling to make significant investments in capacity. As a result, there is a huge bottleneck. In terms of what can be produced in the next two years, whether it’s accelerators, CPUs, or any other component in the supply chain, I believe substrates are the biggest bottleneck.'

  • Keystone Hardware Wallet Website Hacked, Customer Information Leaked

    On October 25, Hong Kong-based self-custody hardware wallet brand Keystone, known for its full isolation and QR code signing, disclosed that its official website was unauthorizedly accessed on October 20, exposing customer names, contact information, shipping addresses, and order details (including purchased products and prices). The company confirmed on October 23, after verifying API activity with Shopify, that a third party obtained customer shipping information. Keystone emphasized that payment card and bank information, mnemonic phrases, private keys, and wallet passwords were not leaked. The company has blocked access, patched vulnerabilities, initiated an investigation, and notified affected customers via email, warning that scammers may impersonate Keystone to deceive customers under the pretext of refunds or device exchanges. Customers are advised not to click on suspicious links and not to disclose mnemonic phrases and private keys, with plans to release a detailed report within a few days. Other companies in the industry, such as Trezor (which experienced a leak from logistics provider ShipMonk in August) and Ledger (which had a security incident this month involving modified devices stealing mnemonic phrases), have also faced security issues.

  • Goldman Sachs Lowers 12-Month Target for South Korea's KOSPI Index by 25%

    On October 25, strategists at Goldman Sachs Group lowered their target for South Korea's KOSPI index by 25%. Previously, they had raised the target multiple times this year, but with increasing market concerns over AI-related trades, they have now opted for a downgrade. Led by analyst Timothy Moe, the team reduced the 12-month target for the KOSPI index from 12,000 points to 9,000 points. They noted that, given the benchmark index has fallen more than 35% from its peak in June, valuation assumptions need to become more cautious. These strategists believe that the current sell-off has left the South Korean stock market significantly undervalued; even after the target downgrade, the index still has over 60% upside potential.