The listOffer function in the contract is intended to allow the owner of a stock to list a new offer. According to the function's NatSpec documentation and comments, the function should only allow offers of type Ask to be listed. However, the function does not include a necessary check to ensure that the offer type is indeed Ask. This oversight could lead to the incorrect listing of offers that are not of type Ask, potentially violating the intended logic and causing unintended behavior in the marketplace.
The listOffer function is designed to list an offer associated with a stock, ensuring that the marketplace is online and that only Ask offers are listed.
The impact of this issue is that the function could inadvertently list offers that are not of type Ask, violating the business logic and potentially leading to incorrect behavior in the marketplace. Specifically, this could allow for the creation of offers that do not meet the intended criteria, which could have several negative consequences
Implement Offer Type Check: Add the following check to the listOffer function to ensure that only Ask offers can be listed:
Invalid, explicit check not required. listOffer is for subsequent makers that want to sell points again. Based on the original maker creating offer as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L137-L138), if offerType is ASK, the stockType will default to Bid type, so the check [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L330-L332) is sufficient in ensuring only ask offer can be listed
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.