Connect with us

Hi, what are you looking for?

MaKeitART.xyz

NFT

Gas optimization in the ERC721a implementation

Article from: NFT Culture

ERC721 is the standard for Non-Fungible Tokens, NFTs, and it’s the commonly accepted one. Most NFTs you encounter adhere to this standard. It’s tried and tested. However, there’s always room for improvement, which brings us to the new realization of this standard with the name ERC721a. The project’s GitHub repository already has 1.4k stars, so today we are looking into this version.

 

What’s the difference?

 

ERC721a is said to be an improvement over the current most popular implementation of ERC721 ERC721Enumerable from OpenZeppelin and allows minting multiple tokens for nearly the price of minting one. 

So the main feature and difference between ERC721a and ERC721 is the former’s optimized gas spending. The project owners emphasized gas efficiency, noting that constantly growing fees affect the market. 

If you look at the website of the standard, it actively invites users to try ERC721a specifically if they are looking to save gas. There’s, however, an issue within the code that has to be considered. HashEx auditors took the time to study the standard and present the findings. 

 

The Findings

 

The main feature of the current implementation of the standard is optimized gas usage. However, despite the initially stated advantage, most gas-related optimizations actually affect the functions that are called by the project owners — for instance, batch minting of the tokens. 

For the user any interaction with the contracts be it transfer, marketplace transactions with the check of the token owner, or any other actions, may actually consume more gas than a typical OpenZeppelin implementation (Enumerable version) during the creation of large batches of tokens (over 100 tokens per batch). 

Saving on gas is achieved mostly through restricting the maximum number of tokens from 2256 to 264. It’s because of this, that the developers using this implementation have to consider possible issues with integer overflow and underflow.

 

 

Several issues, of different severity, have been found during the audit. 

HashEx has discovered 1 medium severity and 3 informational severity issues. 

The post Gas optimization in the ERC721a implementation appeared first on NFT CULTURE.

source
Article from: NFT Culture

Click to comment

Leave a Reply

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

You May Also Like

Art

Article from: This is colossal   In addition to his ongoing Chinatown series, King’s recent works also include a few pieces of more personal...

Art

Article from: Art News At the Courtauld, two activists with the group affixed themselves to Vincent van Gogh’s Peach Trees in Blossom (1889), which...

Graphic design

Article from: Envato Tuts+ In this tutorial, you’ll learn how to design a billboard in InDesign, and we’ll go over some essential tips that...

Graffiti

Article from: Montana World sourceArticle from: Montana World