The repay
function in the Lender.sol
file has a potential reentrancy vulnerability because it makes multiple external calls to transfer tokens before updating its state variables.
A reentrancy vulnerability occurs when a contract makes an external call to another contract before updating its state variables, potentially leading to unexpected behavior.
If exploited, this vulnerability may allow an attacker to manipulate the state of these variables in unexpected ways, potentially leading to loss of funds or other unintended consequences.
The vulnerability was identified through manual review of the code.
To mitigate this issue, it is recommended to use a reentrancy guard modifier such as the one provided by the OpenZeppelin library. This modifier can be applied to functions to prevent reentrant calls and reduce the risk of unexpected behavior.
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.