The PreMarkets::abortBidTaker
function currently checks whether the msg.sender
(the caller of the function) is the authority of the stock (stockInfo.authority
). However, according to the function's NatSpec, only the offer owner (offerInfo.authority
) should be able to abort a bid taker. This inconsistency allows the stock owner to abort the bid, but not the actual offer owner, as intended by the function's design.
The impact of this inconsistency is two fold:
Security Risk: Unauthorized abort actions can occur if the stock owner (stockInfo.authority) is different from the offer owner (offerInfo.authority). This could lead to scenarios where bid takers are unfairly aborted by an entity not intended to have that authority.
Business Logic Violation: The intended logic of the contract, where only the offer owner should have the ability to abort a bid taker, is violated. This could lead to unexpected behavior, trust issues with users, and potential financial losses if the wrong party aborts bids.
Manual Review
To mitigate this issue, modify the authority check in the PreMarkets::abortBidTaker
function to ensure that the msg.sender
is the offer owner (offerInfo.authority) instead of the stock owner (stockInfo.authority). This aligns with the function's intended logic and ensures that only the rightful authority has the power to abort a bid taker.
Invalid. 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). Hence, we should verify `stockInfoMap`, regardless of the taker order being a ASK (selling points) or BID (buying points) taker order, so there is no issue here, other than documentation error
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.