claim
can run out of gas
#633
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-552
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/Quest.sol#L104
Vulnerability details
Impact
If the
claim
function runs out of gas, the caller can never claim any rewards without transferring the nfts to another address firstProof of Concept
Currently, the
claim
function loops over themsg.sender
s NFT's. If this list ever becomes too large, the function will run out of gas.Tools Used
VSCode
Recommended Mitigation Steps
Consider implementing pagination for reward claiming.
The text was updated successfully, but these errors were encountered: