PreMarkets.sol#listOffer function uses mistakenly offerInfo.collateralRate instead of _collateralRate to calculate transferAmount in the Protected mode.
This vulnerability causes the protocol insolvency.
PreMarkets.sol#listOffer function is the following.
As can be seen in 349, in Protected mode, the function uses offer.collateralRate to calculate the collateral amount which will be transferred to the CapitalPool
However, the function records the collateral rate of the listed offer as _collateralRate in L379.
Therefore, when settle the listed offer, protocol refund the collateral amount based on _collateralRate.
If attacker set _collateralRate bigger than offer.collateralRate, he can drain the protocol as much as he/she want.
Using this vulnerability, attacker can drain CapitalPool.
This can cause the protocol insolvency.
Manual Review
Modify PreMarkets.sol#listOffer function as follows.
Valid high severity, because the collateral rate utilized when creating an offer is stale and retrieved from a previously set collateral rate, it allows possible manipilation of refund amounts using an inflated collateral rate to drain funds from the CapitalPool contract
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.