In the case of a partial settlement in the DeliveryPlace.settleAskMaker() function, the Maker will transfer Points tokens to settle their Ask offer.
Unfortunately, this will have no effect on reducing their collateral based on the settled amount.
As a result, the Maker will lose all deposited collateral and the Points tokens transferred as settlement, as the offer will be updated to the status Settled, preventing them from settling in full.
In the DeliveryPlace.settleAskMaker() function, there is a check:
This indicates that _settledPoints can range from 0% to 100% of offerInfo.usedPoints. However, if the Maker of the Ask offer decides to settle only partially (0 < _settledPoints < offerInfo.usedPoints), all transferred Points tokens will be lost. Additionally, they will not be able to settle the offer in full, which will lead to the distribution of all their collateral for the offerInfo.usedPoints to Takers as compensation.
This is due to the fact that after calling the DeliveryPlace.settleAskMaker() function, the offer status will be set to Settled, and in the DeliveryPlace.closeBidTaker() function, the settled Points tokens will be distributed proportionally to Takers, but the Maker’s collateral will not be reduced in the same proportional way.
Loss of Maker’s funds in the form of Points tokens and collateral tokens proportional to the settled Points tokens.
Manual review.
Do not allow partial settlements by requiring either 0 _settledPoints or the full amount of offerInfo.usedPoints.
OR
If partial settlements are allowed, reduce the collateral used for compensation and refund a portion of it to the Maker proportional to the transferred _settledPoints amount.
Valid high, in settleAskTaker/settleAskMaker, if the original offer maker performs a partial final settlement, the existing checks [here](https://github.com/Cyfrin/2024-08-tadle/blob/main/src/core/DeliveryPlace.sol#L356-L358) and [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/DeliveryPlace.sol#L230-L232) will cause an revert when attempting to complete a full settlement, resulting in their collateral being locked and requiring a rescue from the admin. To note, although examples in the documentation implies settlement in a single click, it is not stated that partial settlements are not allowed, so I believe it is a valid user flow.
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.