In relistOffer(), the calculation for the depositAmount to be taken from the user is rounded down, which is inconsistent with the rounding-up logic in listOffer().
In the listOffer() function, if makerInfo.offerSettleType == OfferSettleType.Protected, the protocol calculates the transferAmount required by the user using a rounding-up method, as shown in the code.
In the relistOffer() function, the protocol calls OfferLibraries.getRefundAmount() to calculate the depositAmount required from the user.
In the getRefundAmount() function, we find that usedAmount is rounded up, and if _offerType == OfferType.Bid, the final returned amount (_amount - usedAmount) will be smaller than expected. If _offerType != OfferType.Bid, the protocol rounds down the calculation. This behavior is inconsistent with the logic in listOffer().
The transfer of refund tokens from the user to the capital pool is insufficient.
The recommended fix is to ensure that getRefundAmount() rounds up during relistOffer().
Duplicate of #456, however, for issues noting rounding directions, will be low severity given the impact is not proven sufficiently with a PoC/numerical example and most rounding will not result in significant losses e.g. most examples only proved at most a 1 wei difference when computing `depositAmount/platFormFees` and involves lower amount offers
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.