Turbo mode allows subsequent Ask offers to be created without a need for collateral to be deposited, relying on the collateral provided by the original offer maker.
DeliveryPlace::settleAskMaker
however does not verify the mode of the offer to be settled and blindly refunds the offer maker the amount of the offer.
If offerSettleType
is Turbo collateral is not required as seen here, so the amount set is up to the caller and can be arbitarily large(since they don' have to deposit collateral).
DeliveryPlace::settleAskMaker
does not verify the settle type of the offer
https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/DeliveryPlace.sol#L275-L307
From the code ,assuming _settledPoints
== offerInfo.usedPoints
== 0 (in reality, amount/point ratio will be too large for the offer to be taken anyways) and offerInfo.offerStatus == OfferStatus.Virgin
then makerRefundAmount
= offerInfo.amount * collateralRate
and the attacker can completely drain contract funds with the right amount * collaterate
HIGH/CRITICAL - An attacker can set a large enough amount (as offer.amount) to drain contract funds
Manual Review
Add check to disallow settling of turbo offers if not the originOffer.
Valid high severity, this allows resellers listing offers via `listOffer/relistOffer` to game the system. Based on the inherent design of Turbo mode not requiring takers making ask offers for the original maker offer to deposit collateral, the wrong refund of collateral to takers even when they did not deposit collateral due to turbo mode during settleAskMaker allows possible draining of pools.
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.