Minters Burned By Pak Project's Out-of-Gas Errors
Metamorphosis, the second drop in @muratpak’s burn.art series, sold out 7,200 editions Monday in less than 20 minutes. The mint price was 50 $ASH, but the real winners were ETH miners, as more than 2,000 ETH was burned through transactions.
Pak said there were “issues” including “out of gas errors that we are looking at.” The drop’s developers, @manifoldxyz (and its co-founder @richerd), said in a tweet that the “handful of transactions that failed” were due to botting and MetaMask issues.
We've identified a handful of transactions that failed due to 1) gas spikes caused by aggressive botting, 2) poor MetaMask gas estimation issues, and 3) buyers manually changing gas fee estimations (gas limits)
— manifold.xyz (マ,マ) (@manifoldxyz) March 28, 2022
Around 808 ETH (about $2.7 million) of the total burned was due to those out of gas transactions, according to this Dune Analytics query (generated by Lucky Trader’s chanzero). More than 2,600 transactions encountered out-of-gas errors, including one wallet which lost almost 2 ETH.
One developer opined on Twitter that the issues with the drop could have been due to “non-deterministic computation needed to select which creator to mint the token from” or the code which randomly determines which of the 30 artists’ work was selected.
might have something to do with the non-deterministic computation needed to select which creator to mint the token from. (while loop)
— Chef Bud (@jguthrie7) March 28, 2022
This concerned me when i reviewed the contract but I assumed a reasonable gasLimit recommendation would be provided
Since it's non-deterministic, the call to estimate gas for this function doesn't know how long it will take to randomly select an artist (the more loop iterations it takes to select an artist causes more and more gas to be used). This can result in a lower estimated amount than what is necessary, and can explain why some transactions with the same amount of gas succeeded while others failed.
While the team investigates the issues, Manifold has said it plans “to provide gas refunds to individuals who have been harmed by the drop.” The secondary market is also paused on the sales of Metamorphosis.
Manifold is familiar with out-of-gas errors. Earlier in the NFT boom, richerd cautioned project developers to bump up front-end gas estimations by 20 percent to avoid similar issues.
To every developer who is doing an NFT drop:
— richerd.eth ᵍᵐ (マ,マ) (@richerd) August 31, 2021
The following lines of code could save your customers millions of dollars in gas fees.
1) Technical explanation to follow: pic.twitter.com/Bs3EG5zkA1
Update: On Tuesday, March 29, Manifold detailed its “mistakes” that lead to those out-of-gas errors. In response, the company said it will redeploy a new version of the contract where minters (except botters) will be airdropped NFTs. Also those who were among the top 430 highest out-of-gas errors will be sent an NFT from the new version. The other roughly 2,200 will be fully refunded lost ETH.