If ask-offer makers fail to settle their points, the collateral corresponding to the unused points remains stuck in the contract and cannot be withdrawn or utilized because the liquidation process only addresses the collateral tied to used points, leaving the unused portion permanently inaccessible.
Ask-offer makers deposit collateral equal to at least 100% of the offer amount. This collateral acts as a security measure and will be liquidated if the makers fail to settle their points to the buyers.
If an ask-offer maker does not settle their points during the settlement period, the contract owner can call settleAskMaker
to forcefully settle the offer, allowing buyers to liquidate the offer maker's collateral:
Subsequently, offer takers can call closeBidTaker
to liquidate the offer's collateral and be refunded the value they deposited to buy the points:
In the case that an ask-offer maker does not settle their points, the function calculates the collateral amount to be liquidated based on the offer's used points:
The buyer is then refunded proportionally to the total collateral amount to be liquidated, based on his deposit:
The problem is that neither the contract nor the offer maker can withdraw or use the collateral corresponding to the unused points, as this collateral will never be liquidated. Consequently, if offer makers do not settle their points, the portion of the collateral corresponding to the unused points will remain stuck in the contract and can never be withdrawn.
Note that the ask-offer maker can not call PreMarket::closeOffer to reclaim the collateral associated with the unused points because the offer status is already Settled
Consider the following example:
Alice, a market maker, lists 1,000
points for sale at 1,000` as collateral.
Bob, a buyer, purchases 500
points from Alice for $500
.
Cathy buys 200
points from Alice for $200
.
The market owner updates the market and sets the TGE, initiating the settlement period.
Alice, for whatever reason, fails to settle her points during the settlement period.
After the settlement period ends, the owner calls settleAskMaker
to forcefully settle Alice's offer. This action updates the offer's status without actually settling the points.
As a result of Alice’s failure to settle her points, only $700
of her collateral is used for liquidation according to the following logic:
7.1 Bob and Cathy then call closeBidTaker
to receive refunds of $500
and $200
respectively, as calculated by:
However, the collateral corresponding to the unused points ($300
) is now stuck in the contract. Neither Alice nor the contract can withdraw or utilize this amount, rendering it inaccessible.
If offer makers do not settle their points, the collateral corresponding to the unused points will remain stuck in the contract and cannot be withdrawn or used.
Manual Review
For cases where ask-offer points are not settled, consider adding a function that allows ask-offer makers or the contract owner to withdraw and utilize the collateral corresponding to the unused points.
Invalid, the makers are incentivized to settle offers to earn maker bonuses when subsequent takers and makers make trade using the original collateral put up for points as well as get back their initial collateral. Additionally, if they do not settle on time, they will lose all their initial collateral, forcing the `owner` to come in and perform the settlement and retrieving that collateral. This is noted as a design decision [here](https://tadle.gitbook.io/tadle/how-tadle-works/features-and-terminologies/settlement-and-collateral-rate) If all else fails, the `owner` can come in to settle as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/DeliveryPlace.sol#L254-L256) and [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/DeliveryPlace.sol#L365-L367) offers to allow closing offers and subsequently allowing refunds. I acknowledge that perhaps a more decentralized
Invalid, the makers are incentivized to settle offers to earn maker bonuses when subsequent takers and makers make trade using the original collateral put up for points as well as get back their initial collateral. Additionally, if they do not settle on time, they will lose all their initial collateral, forcing the `owner` to come in and perform the settlement and retrieving that collateral. This is noted as a design decision [here](https://tadle.gitbook.io/tadle/how-tadle-works/features-and-terminologies/settlement-and-collateral-rate) If all else fails, the `owner` can come in to settle as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/DeliveryPlace.sol#L254-L256) and [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/DeliveryPlace.sol#L365-L367) offers to allow closing offers and subsequently allowing refunds. I acknowledge that perhaps a more decentralized
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.