After maker aborts an offer with abortAskOffer there should be no need for settlement as he gets his collateral refunded back and all other offers invalidated. That is not the case whenever a taker calls closeBidTaker because he gets back the collateral fee even though the money should be settled.
Here is a coded POC of the problem:
Ran 1 test for test/PreMarkets.t.sol:PreMarketsTest
[PASS] test_abortAskOffer_closeBidTaker_exploit() (gas: 1020631)
Logs:
The balance of maker in makerRefund is: 6000000000000000
The balance of user 1 in RemainingCash: 7200000000000000
As we can see the fee is assigned to the user.
High
Manual review
Add a check in closeBidTaker if offer is aborted.
Valid high, for unsettled ask offers by the original maker, the initial remaining maker collateral is already refunded as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L624-L629)
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.