In the Turbo settle type logic, originOfferInfo is declared as memory instead of storage. This means any changes to originOfferInfo (like setting abortOfferStatus) will not persist.
The function updates offerInfoMap and stockInfo.offer, but doesn't update any state in makerInfo or the original offerInfo. This could lead to inconsistent state across related entities. In the Turbo settle type logic, originOfferInfo is declared as memory instead of storage. This means any changes to originOfferInfo (like setting abortOfferStatus) will not persist.
The function declares originOfferInfo as a memory variable. It then attempts to update abortOfferStatus on this memory variable. The line originOfferInfo.abortOfferStatus = AbortOfferStatus.SubOfferListed; appears to update the offer's status, but this change is only made to the temporary memory copy.
This means that despite the code's intention, the abortOfferStatus of the original offer is never actually updated.
Manual Review
Change the declaration to use storage instead of memory
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.