In listOffer(), the core function of the protocol are damaged because mapping variable is set to memory
User calls listOffer() to create a new offer, typically for selling points. This is done by the owner of the stock (_stock parameter).
As you can see, originOffer was defined to memory, as a result, even though originOfferInfo.abortOfferStatus was set to AbortOfferStatus.SubOfferListed, offerInfoMap[originOffer].abortOfferStatus was not changed and maintained original value. so the core function of the protocol is damaged. For example let's look at abortAskOffer().
As you can see above, even though abortAskOffer() should be reverted, it is not being reverted.
The core function of the protocol are damaged
Mannual Review
listOffer() is modified as follow.
Valid high severity, because the `abortOfferStatus` of the offer is not updated and persist through `storage` when listing an offer for turbo mode within the `offerInfoMap` mapping, it allows premature abortion given the `abortOfferStatus` defaults to `Initialized`, allowing the bypass of this [check](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L552-L557) here and allow complete refund of initial collateral + stealing of trade tax which can potentially be gamed for profits using multiple addresses
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.