You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should always store layerId for base tokens upon binding, since they may be re-bound or rearranged, and the extra 100-200 gas to read the extraData from warm ownership slot is going to be cheaper than the layer seed calculation + lookup.
Since layer tokens are burned upon being bound, they should not store their layerId during the binding process.
It may be worth looking into calculating+storing the layerId for any token when transferring. The ownership/extraData storage slot will already be warm, but calculating will add at least 5000 gas on first transfer after reveal in worst cases (max 2 SLOADs for packed distributions, plus all comparison and calculation overhead - unsure on specific gas usage).
Minimizing gas usage during binding+arranging for end-user experience may be worth the added gas overhead during transfer - but a better gas analysis should be done.
The text was updated successfully, but these errors were encountered:
We should always store layerId for base tokens upon binding, since they may be re-bound or rearranged, and the extra 100-200 gas to read the extraData from warm ownership slot is going to be cheaper than the layer seed calculation + lookup.
Since layer tokens are burned upon being bound, they should not store their layerId during the binding process.
It may be worth looking into calculating+storing the layerId for any token when transferring. The ownership/extraData storage slot will already be warm, but calculating will add at least 5000 gas on first transfer after reveal in worst cases (max 2 SLOADs for packed distributions, plus all comparison and calculation overhead - unsure on specific gas usage).
Minimizing gas usage during binding+arranging for end-user experience may be worth the added gas overhead during transfer - but a better gas analysis should be done.
The text was updated successfully, but these errors were encountered: