abortBidTaker() calcualtes depositAmount incorrectly.
While calculating depositAmount in abortBidTaker() using mulDiv, it uses an incorrect order.
Currently, depositAmount will be stockInfo.points * preOfferInfo.points / preOfferInfo.amount which is incorrect.
Possible loss of funds in abortBidTaker() due to the incorrect calculation.
Manual Review
It should be fixed like this.
Valid high severity, due to incorrect computation of `depositAmount` within `abortBidTaker`, when aborting bid offers created by takers, the collateral refund will be completely wrong for the taker, and depending on the difference between the value of `points` and `amount`, it can possibly even round down to zero, causing definite loss of funds. If not, if points were worth less than the collateral, this could instead be used to drain the CapitalPool contract instead.
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.