This report identifies a medium-severity vulnerability in the LiquidationPool.sol contract that can cause some tokens to revert on transfer of zero amount.
The vulnerability is located in line 185 where the safeTransferFrom function of the IERC20 interface is used to transfer EUROs tokens from the sender to the contract. This function can revert if the token contract implements a check for zero amount transfer and throws an exception. This can happen if the _amount parameter is zero or the sender has no balance of EUROs tokens.
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L185
The impact of this vulnerability is medium, as it can affect the functionality and usability of the contract. A revert on zero transfer can prevent the execution of the distributeFees function, which can affect the distribution of fees to the holders and pending stakes. This can also cause the sender to lose gas fees and experience a bad user experience.
manual code review
To prevent this vulnerability, it is recommended to add a condition to check if the _amount parameter is greater than zero before calling the safeTransferFrom function.
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.