-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployer wallet Transfer fee too high? #422
Comments
Gas usage for users: 95,970 |
How many tokens does the deployer wallet hold? If the deployer wallet minted a relatively large amount of tokens, upon calling |
Minted about 350 total |
if you didn't create any "bundle" mechanism (forcing ownership to actually be written every X items minted) this is totally normal to have that kind of costs. When transfering item 349, the contract will have to do a lookup that goes through all items until the first minted (so reading 349, 348, 347, 346, ... 3, 2, 1) in order to find the ownership. |
This is the biggest downside to ERC721A, the "algorithm" for finding the owner of a given token searches linearly backward until if finds the owner. This makes it highly inefficient for "selling" tokens on something like OpenSea where someone can purchase any item in the collection. We ended up transferring every 50th token to normalize the gas cost for selling tokens across the whole collection. What this really needs is a more efficient algorithm for determining the ownership of a given token, probably at the expense of more storage and higher upfront cost I would guess. |
Sorry for the noob question but curious why the deployer wallet is paying about 40$ gas fee vs everyone else paying a 5$ gas fee to make a safeTransfer.
Is there any solution to it?
The text was updated successfully, but these errors were encountered: