The enum status will be updated in the memory loaction instead of storage which leads to the offer which are turbo status will not be updated as sub offer Listed.
The function listOffer() will be called whenever the createTaker() function is to make the economic activity in the protocol like BUY/SELL. Lets look into the code
In the above we can confirm that ,if the offer is turbo then have to change the abort offer status of it. State variable makerInfo.originOffer will be called in the state mapping offerInfoMap to get the originOfferInfo the main issue lay here instead of storage location it updated in memory location leads to update will only in local memory. This issue will create the discrepancy between the turbo offers and non- turbo offers.
Scenario :-
Offer will be created as Turbo
Will called to listed but not updated because of memory location.
User got event emitted consider that Abort status will changed but in reality it will not.
Please check this code which returns the status of whether originOffer abort status changed to the AbortOfferStatus.SubOfferListed or not.
Below we can see the output 1 when the update is in memory loaction
Output 2 :-
Below we can see the output 2of the update status when we change the memory location to storage location. In the line :- https://github.com/pavankv241/Tadle-ICP/blob/main/src/core/PreMarkets.sol#L337
Due Enum updation in the memory location the which are on all created as Turbo which will not updated to the SubOfferListed and leads to against the protocol activity.
Foundry , Manual View
Change the memory location to the storage location in the line
https://github.com/pavankv241/Tadle-ICP/blob/main/src/core/PreMarkets.sol#L337
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.