The closeBidOffer
function is vulnerable to reentrancy attacks, allowing malicious users to drain funds from the capital pool. This occurs because the function does not properly follow the Check Effects and Interaction pattern.
The closeBidOffer
function does not follow the Check Effects and Interaction pattern. Upon calling the function, the refundAmount
is calculated, and then this amount is added to the token balance of the msg.sender
before the offer status is updated, as shown below:
The pool can be drained, leading to a loss of protocol and user funds.
Manual Review
Change the above code to the one below or use a reentrancy guard from OpenZeppelin:
Invalid, all [vague generalities](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#vague-generalities) talking about possible reentrancies 11and afaik, reentrancy is not possible and not proven.
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.