the taker cant call settleAskTaker()
function because it requires caller must be a maker so taker lose collateral
in the settleAskTaker()
function needs to be called by taker but there is check that prevents taker calling this function
offerInfo.authority
is set during offer creation to maker address
if maker call this function needs to add point to capitalpool which is wrong logic because obviously the maker himself is buyer not seller taker needs to fulfil those tokens by adding them to capital pool
add this poc to PreMarkets.t.sol
contract
run with forge test --mt test_settleAskTaker_access_control_poc -vvv
taker will lose collateral because they would not be able to call the settleAskTaker()
function which they have to call
manually/ vs code
consider not preventing taker from adding tokens in settleAsktaker
by not reverting if its not authority address which is maker address
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.