Re-sellers in turbo mode can use their offer structs to settle tokens and retrieve collateral they never deposited.
In a turbo chain of sellings, only first seller deposits collateral, next dont.
During this events, Offer structs are created for re-sellers. Problem is these offer structs can be used in settleAskMaker() during settlement. If the re-sellers also owns tokens, they can use their own tokens to withdraw collateral from the system they never deposited in the first place.
If the collateral that can be drainned is worth more than the tokens they got they will do it. Even if it was unprofitable this is still really bad as they are getting free collateral therefore undercollateralizing the system which, when all is settled will result in someone not being able to retrieve his full collateral amount.
Paste this test in the PreMarkets.t.sol file, import import "forge-std/console.sol";, and run forge test --mt "test_settle_docs_freecol" -vv:
Manual review.
Do not allow Offers that come from a turbo maker to be settled as they do not relate to any collateral being deposited. For that you can just check the maker member of an Offer struct.
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.