PoolBase.sol: Consider returning 0 instead of reverting in LockToToken() #42
Labels
0 (Non-critical)
bug
Something isn't working
sponsor acknowledged
Sponsor acknowledged, but not resolving
Handle
hickuphh3
Vulnerability details
Impact
In the
LockToToken()
function, should either the stake balance or the lockToken total supply return 0, the function reverts withNO_DATA
.However, in the (hopefully) rare scenario where the entire stake balance is used for a payout, the function should return 0 instead of reverting.
Recommended Mitigation Steps
Consider returning
0
in the case wherebalance == 0
. Perhaps a zero value can be returned in the case wheretotalLock
is zero as well.The text was updated successfully, but these errors were encountered: