The listOffer function depends upon identifiers which may have already been used, assuming them to be unique.
The PreMarkets contract uses unsafe identifier logic resulting in collisions that lead to denial of service for core functionality.
Notice the following flow in createOffer:
In this sequence, it is clear to see that whenever createOffer is invoked, it is possible to inadvertently use identifiers that are already being used in previously-created elements of the offerInfoMap and stockInfoMap.
This is to say that different offers can inadvertently share the same state.
In the sequence below, we demonstrate how two calls to createOffer (i.e. through the nondeterminism of shared access to the blockchain) can result in denial of service:
Inability to listOffer through the action of indepenent actors, resulting in eventual inability to recouperate capital via the intended process of refunding a listing.
Manual Review
Refactor to safely isolate offers from the context of one-another.
I believe this is valid low severity, although there is inconsistency here when using the correct `offerId` for assigning offerIds and generating the unique addresses as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L67-L69), this is purely an accounting error for offerIds. If we generate the offerId using current `offerId - 1`, the appropriate listing/taker orders can still be created against those offers.
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.