Wrong validation of owner/authority
while settling askTaker in deliveryPlace:settleAskTaker()
When an user creates a bid/buy
offer using preMarket:createOffer(), then sellers can create sell/ask
taker using preMarket:createTaker(). Once the marketPlace is updated then seller
should call deliveryPlace:settleAskTaker()
, which transfers pointsToken from msg.sender
to capitalPool which is then added to buyer address
.
Now the problem is, settleAskTaker() verifies the authority/owner of offerInfo(ie offerInfo.authority)
with msg.sender instead of verifying msg.sender with stockInfo.authority
OfferInfo.authority
is the buyer's address whom we are adding pointsToken
using tokenManager:addTokenBalance(). stockInfo.authority
is seller's address who is transfering
pointsToken to capitalPool using tokenManager:tillIn()
//Here is PoC which shows above situation
Seller will not be able to settle the askTaker
Manual Review
Use stockInfo.authority
instead of offerInfo.authority
in deliveryPlace:settleAskTaker()
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.