Nearly $100M has been spent on gas for the BAYC land sale in one hour. This is money that could have gone to Yuga or stayed in user's pockets.
The contract had nearly zero gas optimizations. I'll explain a few gas optimization tricks that could have saved many millions below 👇
Co-founder of @Syndicateio. Prev Philosophy @Stanford. ETH since the 2014 presale. Tweets about appchains + rollups. Creator of $AGLD, Core Team ConstitutionDAO
- Replying to @WillPapperImplementing these gas optimizations would be as simple as: 1. Change the word "ERC721Enumerable" to "ERC721" 2. Import ERC721A 3. Change the word "_safeMint()" to "_mint()" Modifying a few words would have saved $80M+. This is why knowing the underlying system is so important.
- Replying to @WillPapperGas optimization 1: Remove the ERC721Enumerable extension. The ERC721Enumerable extension is used to track the owners of an NFT on-chain. Mints that remove the ERC721Enumerable extension save around 70% in gas costs. This tiny change would have saved around $70M this hour.
- Replying to @WillPapperI have the utmost respect for @yugalabs and their work on @OthersideMeta. I've 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.
- Replying to @WillPapperGas optimization 2: Use ERC721A (erc721a.org). ERC721A is a standard developed by the @AzukiOfficial team. This extension means that minting multiple NFTs to the same wallet is nearly the same price as minting a single NFT. This would save money for every multi-mint.
- Adventure Gold is now available for @lootproject! Claim 10,000 $AGLD per Loot bag. 🎉🔥 Go here to claim: etherscan.io/token/0x32353a… Most people will want to use "claimAllForOwner" unless they want to leave some Loot unclaimed.
- The CFTC is claiming that all participants in DAO governance can be held liable for a DAO's actions. This is a horrible precedent. It means that both on-chain governance voters AND multi-sig signers have liability, but on-chain governance spreads liability to many more people.
- Replying to @WillPapperThe ERC721Enumerable extension is mostly unnecessary. In the majority of cases, tracking ownership on-chain is not useful. Why? You can just grab the data off-chain on the front-end and pass it into smart contracts instead! Every front-end is able to handle this easily.
- Replying to @WillPapperGas optimization 3: Switch from _safeMint() to _mint() _safeMint() checks every address to ensure that it can handle NFTs. If the address is not able to handle NFTs, it ensures that the transaction will fail. This is unnecessary. Every address minting can likely handle NFTs.
- The most overconfident projects in this space are the ones that are pre-launch The most humble projects in this space are the ones that are post-launch
- Replying to @WillPapperERC721A makes transfers slightly more expensive but mints dramatically cheaper. In this case where the gas fees on the mint are so high, this is clearly worth it. The vast majority of the mints were multi-mints. All of these incurred 2X or more in unnecessary costs ($10M+)
- Very excited about the introduction of 3074! It'll be a massive improvement for transaction bundling and permission delegation
- Replying to @WillPapper_safeMint() is one of the more annoying and unnecessary parts of the ERC721 standard. In theory it ensures that mints are going to wallets that can handle NFTs, in practice it adds gas and makes mints less safe! This condition is only hit for very non-standard smart contracts.










