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
The calculation of gainPerSec in the _getCumulatedRewardsIncrement function involves an unbounded for-loop. That might create hard to predict issues whenever the function is called, e.g. upon a massive NFT airdrop.
This issue can be mitigated by increasing the value of gainPerSec in storage in the onERC721Received hook and decreasing it in the reclaimErc721Tokens function and then only reading it from storage within _getCumulatedRewardsIncrement.
The text was updated successfully, but these errors were encountered:
The calculation of
gainPerSec
in the_getCumulatedRewardsIncrement
function involves an unboundedfor
-loop. That might create hard to predict issues whenever the function is called, e.g. upon a massive NFT airdrop.This issue can be mitigated by increasing the value of
gainPerSec
in storage in theonERC721Received
hook and decreasing it in thereclaimErc721Tokens
function and then only reading it from storage within_getCumulatedRewardsIncrement
.The text was updated successfully, but these errors were encountered: