Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
Is it necessary to give money if the NFT transaction fails? This article explores how to reasonably optimize gas costs
星球君的朋友们
Odaily资深作者
2022-02-09 03:30
This article is about 4048 words, reading the full article takes about 6 minutes
This article will explore some case studies of how FCFS drops have negatively impacted users.

Original Author: Old Yuppie

This article is from Laoyupi (WeChat public account ID: laoyapi), reproduced and published by Odaily with authorization.

Original Author: Old Yuppie

This article is from Laoyupi (WeChat public account ID: laoyapi), reproduced and published by Odaily with authorization.

In 2021, NFT collectibles will explode into a multi-billion dollar asset class. However, this success has brought some problems."Most NFTdrops use a first-come, first-served (FCFS) mechanism with a fixed price far below the market clearing price (the price at which supply matches demand). What's the problem with doing this? Low prices and excess demand effectively create race conditions. During the highly anticipated drop, only the earliest buyers will have the opportunity to mint NFTs. As a result, the demand for the minting transaction in the next block rises, and the gas fee increases substantially."if you are not familiar with"gas"gas fee

This term, it is the fee that users pay to use the Ethereum blockchain. Specifically,"is the fee required for a successful blockchain transaction. Users pay in ether, the cryptocurrency used on the Ethereum blockchain. The network calculates the amount of gas that users need to pay based on the demand for block space. Typically, the fee is automatically set by the user's wallet. The unit of measurement of gas is gwei, which is 10^(-9)ETH."During the peak period, you will participate in the so-called

gas war

Gas wars that occurred during high-demand NFT drops created a horrible experience for all users on this blockchain. For example, after the breakthrough success of the Loot project, the rush to mint and list Loot derivatives caused several spikes in gas fees, raising transaction prices across the Ethereum network. The chart below shows how gas fees spiked on September 2nd whenever Loot tokens were minted.

This article will explore some case studies of how FCFS drops have negatively impacted users. We also offer advice on how collectibles creators can mitigate these issues.

first level title

Entering the Metaverse: The problem with the adidas drop

Into the Metaverse is a collaborative NFT project between Adidas, Gmoney, Bored Ape Yacht Club (BAYC) and PUNKS Comic. It launches in December 2021. Owning one of the 30,000 NFTs gives holders access to limited-edition Adidas merchandise and future virtual experiences. There is a pre-sale event where only collectors who own an NFT from one of the partnered items can participate, and then there is a public sale where anyone can participate.

There are two main problems that plague public auctions. The first is the high gas cost. The demand to perform minting transactions to obtain the Adidas NFT greatly exceeds the number of transactions that the Ethereum network can process in one block. As a result, the cost of processing an Ethereum transaction rises dramatically.

The diagram above illustrates these dynamics by plotting minting transactions across blocks. Green dots indicate successful minted nfts, red dots indicate failures.

35,000 wallets attempted 39,000 minting transactions, 59% of which failed. The median of successful minting transactions was 0.16 ETH in gas. 680ETH worth of gas was wasted on failed minting. Based on the ETH price at the time, that was $2.6 million.

The second problem with the public sale is that each wallet is allowed to mint a maximum of two NFTs. However, some participants used bots to circumvent the rules. For example, a speculator minted 330 Adidas NFTs in one transaction. This person wrote a custom smart contract that deployed many sub-contracts. All subcontracts participate in minting and sending NFTs to a wallet.

One system that alleviates the issues plaguing Adidas NFT sales is the drop mechanism developed by Parallel NFT Projects. Using this system, the Into the Metaverse project will allow users to pre-order NFTs off-chain. According to the original plan, each user can pre-sell up to two NFTs. After making one reservation, the user has to wait 5 minutes before booking another. That way, the bots can't snatch up all the inventory before a human with normal reflexes can make a purchase.

Finally, NFTs will be minted and distributed to buyers in batches. Adidas will pay the gas costs associated with minting and transferring NFTs from the drop revenue. Note that with this approach, buyers only need to make a payment transaction on-chain once, which has relatively low gas costs compared to minting transactions.

The downside of this approach is that the user will have to trust the centralized, off-chain pre-sale system -- and the team members who blacklisted the bot, to prove that the user is a unique user without compromising decentralization. A human rather than a robot is still a developing field in the web3 space.

first level title

The Problems That Come Up With Doodles

Doodles is a collection of 10k pfp NFTs launching in October 2021.

There are two phases in the distribution of Doodles: the FCFS minting phase with only the whitelist and the public FCFS minting phase. In the whitelist stage, users can mint at will, the basic gas remains reasonably stable, and there are few failed transactions. Once the public sale starts, the demand for block space rises as people rush to mint the remaining Doodles and gas costs skyrocket.

During the pre-sale period (before the gray vertical line), failed transactions accounted for only 0.2ETH in fees.

During the public sale (after the gray line), 13,000 mint transactions were attempted by 10,000 wallets. 12,000 of these attempts failed, representing a failure rate of over 90%. The median gas of successful minting transactions is 4.0ETH.

Gas worth 335.2 ETH was wasted due to transaction failure. Based on the ETH price at the time, this equates to $1.26 million. The Etherscan entry for block 13,439,104 is a perfect microcosm of the carnage — it has over 1,000 failed Doodles transactions, costing nearly 100 ETH in failed transaction fees alone.

The ticketing period should last for multiple days to ensure that the gas price is not affected. Once the ticketing period is over, the winner is selected using Chainlink VRF to provide robust randomness. Each ticket has an equally random chance of being selected. Finally, users can claim their NFT or refund at any time.

Only at this time can the project team be able to withdraw funds from the contract in accordance with the provisions of the code.

first level title

Stoner Cats drop

Stoner Cats is an animated short film produced by an all-star cast, including Mila Kunis and Ashton Kutcher. Buying one of the 10,420 NFTs entitles holders to various episodes and perks, such as conceiving with the creators and behind-the-scenes content .

During the launch period, 35,000 wallets were minted 5,000 times. 51% of minting attempts failed. Each successful mint costs 0.22ETH of gas. 345ETH worth of gas was wasted on failed minting. Based on the price of Ethereum at the time, this was equivalent to $794,000.

As minting of Stoner Cats begins, gas costs skyrocket. In addition to this, the writing of the minting contract is inefficient, resulting in insufficient calculation of the gas limit. Therefore, users who do not manually adjust gas limits in their wallets are more likely to experience failed transactions.

Thankfully, the Stoner Cats team decided to reimburse participants for gas after the incident.

This approach will help stagger the timing of minting, and those who have not completed a series of challenges by the time all NFTs are minted will not have the opportunity to submit a minting transaction.

Using puzzles and games to gate mint NFTs is a fun way to filter participants, selecting those who are most committed and interested in the project - without inadvertently filtering out those with the biggest wallets and highest skills , which is how it currently works. In the long run, this could have a positive impact on the community.

first level title

How TIMEPieces can be improved

In September 2021, Time Inc. dropped an NFT project called TIMEPieces. The collection includes 4,676 NFTs, featuring works by more than 40 artists. Perks for holders include unlimited access to the Time website until 2023 and exclusive invitations to future personal events.

TIMEPieces drop has a horrible 96% failure rate. NFTs sold out in as little as 2-3 minutes, thanks to “scientists” who discovered the contracts ahead of time and deployed the bots ahead of time.

first level title

Other ways to solve the NFT drop problem

text

In addition to the distribution mechanism discussed above, NFT projects can also explore routing minting transactions through Flashbots RPC during the distribution process. This brings two main benefits.

If the transaction fails, the user will not have to pay gas for it.

Bots don't see users' mint transactions in the public mempool.

One way a project can take advantage of Flashbots RPC is by adding an informational popup on the drop website explaining to users how to use Flashbots RPC to mint coins.

Another approach is to design delivery sites to detect users who are not using Flashbots RPC and prompt them to add it to Metamask before minting.

NFT
Welcome to Join Odaily Official Community