code-423n4 / 2022-01-sherlock-findings

0 stars 0 forks source link

Sherlock: Revert for non-existent ID in viewRewardForArbRestake #225

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

GreyArt

Vulnerability details

Impact

Other relevant view functions like lockupEnd(), sherRewards() and tokenBalanceOf() revert for non-existent IDs, but viewRewardForArbRestake() doesn’t.

Recommended Mitigation Steps

Include the existence check in viewRewardForArbRestake().

if (!_exists(_tokenID)) revert NonExistent();