When user manages to settle points via DeliveryPlace::settleAskTaker, he will face Unauthorized revert, due to bad msg.sender validation
Here common scenario:
Alice creates bidOffer with PreMarkets::createOffer, then Bob creates askOrder by calling PreMarkets::createTaker, which corresponds with Alice's offer and now Bob becomes taker.
Now Alice is authority in offerInfo type Bid and Bob is authority in stakeInfo type Ask.
After some time block.timestamp reaches provided token's tge value and as we know from the docs after the tge (during the settlementPeriod),now Bob is supposed to settle Alice's points by calling DeliveryPlace::settleAskTaker
Docs scenario:
As the Original Offer Maker, Alice posts a buy offer for 1,000 points with a unit price of $1 and pays $1,000 in advance to the platform's smart contract.
Bob accepts Alice's buy offer and sells 1,000 points to Alice. This transaction results in Bob having a sell-type inventory in his account.
Bob will settle 1000 points to Alice after the Token Generation Event (TGE) of the token.
But unawares, during the DeliveryPlace::settleAskTaker execution, the function call is going to revert Unauthorized, due to msg.sender(stockAuth) != offerInfo.authority, which is not expected to happen, due to provided invariant
Note that a comment above settleAskTaker says: * @dev caller must be stock authority and confirms the invariant
Core functionality broke, DoS when taker manages to settle points from an order
Manual review
Valid high severity, when taker offers are created pointing to a `offer`, the relevant `stockInfoMap` offers are created with the owner of the offer aka `authority`, set as the creater of the offer, as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L245). Because of the wrong check within settleAskTaker, it will permanently DoS the final settlement functionality for taker offers for the maker that listed the original offer, essentially bricking the whole functionality of the market i.e. maker will always get refunded the original collateral, and takers will never be able to transact the original points put up by the maker. This occurs regardless of market mode.
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.