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
A transaction was reported where underflow was encountered in FlowEVMBridgeNFTEscrow.lockNFT. This method operates on the assumption that storage usage will increase after locking an NFT in escrow. The reported transaction attempts to bridge a TopShot NFT which given the amount of metadata one would assume certainly increases storage consumption. While there may be instances where withdrawing an object from storage increases storage consumption (see #125), this does not appear to be related as TopShot in this particular instance does not exhibit contract logic that would indicate similar, unintuitive behavior.
After discussing with @janezpodhostnik and @ramtinms, there is a possibility that atree inlining rebalances storage blocks in such a manner that results in a perceived decrease in the storage consumed by an account. Further discovery is required to determine if this is to be expected. Regardless, the practical implication here is that the line where overflow is encountered should be guarded and the lockNFT method should return 0 if underflow would otherwise be encountered.
The text was updated successfully, but these errors were encountered:
sisyphusSmiling
changed the title
Assumptions about storage usage increasing during escrow create are broken
Assumptions about storage usage increasing during escrow are broken
Oct 3, 2024
Description
A transaction was reported where underflow was encountered in
FlowEVMBridgeNFTEscrow.lockNFT
. This method operates on the assumption that storage usage will increase after locking an NFT in escrow. The reported transaction attempts to bridge a TopShot NFT which given the amount of metadata one would assume certainly increases storage consumption. While there may be instances where withdrawing an object from storage increases storage consumption (see #125), this does not appear to be related as TopShot in this particular instance does not exhibit contract logic that would indicate similar, unintuitive behavior.After discussing with @janezpodhostnik and @ramtinms, there is a possibility that atree inlining rebalances storage blocks in such a manner that results in a perceived decrease in the storage consumed by an account. Further discovery is required to determine if this is to be expected. Regardless, the practical implication here is that the line where overflow is encountered should be guarded and the
lockNFT
method should return0
if underflow would otherwise be encountered.The text was updated successfully, but these errors were encountered: