Consider checking that the sended value is not zero. Example: https://github.com/d-xo/weird-erc20#revert-on-zero-value-transfers.
During our analysis, we identified a potential vulnerability related to the absence of checks for zero-value transfers. Specifically, in the _redeemCollateral
function and the depositCollateral
function, there is no verification to ensure that the amountCollateral
being sent is not zero. This vulnerability may lead to unintended behavior or reverts when interacting with tokens that do not support zero-value transfers.
In the _redeemCollateral
function, the amountCollateral
parameter is not checked for zero before proceeding with the transfer. Similarly, in the depositCollateral
function, there is no validation to prevent the transfer of zero amountCollateral
.
In this depositCollateral function there is no check of sending zero value of amountCollateral
Some tokens (e.g. LEND) revert when transferring a zero value amount.
Manual Review
Implementing checks to verify that the amountCollateral
being sent is not zero before proceeding with the transfer.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.