the abortBidTaker
is calculating how many tokens need to be refunded to the bid taker, however the way it is being calculated will calculate a complete different result.
the function abortBidTaker
calculates the depositAmount
wrong, and therefore the refund amount will be wrong, and usually much lower:
the deposit amount, in most of the cases will be 0:
points * points / amount. (amount is with decimals), therefore, the calculated refund amount will most likely be 0, or a different number.
the wrong math might lead to severe loss of funds.
manual review
fix it to:
points * amount / points
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.