[vc_row full_width=”stretch_row” css=”.vc_custom_1531732107238{background-color: #fcc118 !important;}”][vc_column]

[/vc_column][/vc_row][vc_row css=”.vc_custom_1531730959461{border-bottom-width: 1px !important;background-color: #f9fafb !important;border-bottom-color: #eef3f7 !important;border-bottom-style: solid !important;}”][vc_column css=”.vc_custom_1531891416301{margin-bottom: 0px !important;}”][bsfp-cryptocurrency style=”widget-6″ align=”auto” columns=”2″ scheme=”light” coins=”top-x-coins” coins-count=”8″ coins-selected=”” currency=”USD” title=”Cryptocurrencies” show_title=”0″ icon=”” heading_color=”” heading_style=”default” bs-show-desktop=”1″ bs-show-tablet=”1″ bs-show-phone=”1″ css=”.vc_custom_1531730265600{margin-bottom: 0px !important;}” custom-css-class=”” custom-id=””][/vc_column][/vc_row]

BAYC Otherside sales cost an unnecessary $100M in gas fees due to badly optimized code

1

Syndicate DAO co-founder Will Papper said on May 1 that inefficiencies in the Yuga Labs Otherside land sale caused $100 million to be needlessly wasted on gas fees.

In a Twitter thread, Papper explained how the smart contract used to mint the BAYC metaverse land was missing key optimizations. The smart contract follows the ERC721 standard, which Papper argued contains some functions and extensions that are “annoying and unnecessary.”

To combat the inefficiencies, he proposed three changes.

Remove the ERC721Enumerable extension

The first change Papper proposed is to remove the ERC721Enumerable extension, which is used to track owners of NFTs on-chain.

Papper argued that there is no need to record owners on-chain since anyone can query the blockchain through an off-chain front end to pass the data into a smart contract. He said removing the extension alone could save 70% in gas fees by removing a single word.

Use ERC721A… a standard developed by the Azuki

Papper said the ERC721A standard developed by the Azuki team is a better choice as it allows users to mint multiple NFTs during the same transaction for close to the cost of minting just one.

He added that ERC721A makes mints “dramatically cheaper,” which offsets the fact that it makes “transfers slightly more expensive.”

Based on Papper’s analysis, most users mint more than one NFT. He estimates this could have lowered the overall gas fees by $10 million.

Switch from _safeMint() to _mint()

The last optimization that Papper recommended is to replace the _safeMint() function.

He argued that this only helps ensure that a wallet can accept NFTs and since most of the community is likely using compatible and known wallets like Metamask, TrustWallet, Coinbase Wallet, and SafePal; this function wastes gas fees.

Papper goes on to clarify that he is not attacking Yuga Labs for incompetence and acknowledged their contributions to the industry. He said:

“[I have] spent countless hours on gas optimizations and wanted to share a few tricks. This thread is to educate and doesn’t take away from the work that Yuga does for the ecosystem.”

He also shares a methodology that SyndicateDAO uses for the minting process to ensure that no one is trying to mint at the same time, thus driving up gas fees.

1 Comment
  1. Cheapest Digital Books says

    constantly i used to read smaller content which
    as well clear their motive, and that is also happening with this article which I
    am reading here.

Leave A Reply

Your email address will not be published.