the listOffer
function allows users to list the stock they have purchased, if the mode set to protected
, they can choose their own collateralRate
by passing in the _collateralRate
they prefer.
however, they calculate the collateral that need to be transferred to the protocol by the origin offer collateralRate
, which might calculate a different collateral, and wlll lead to user's loss of funds.
the users call listOffer
and specify and _collateralRate
:
however, the protocol calculates the collateral to be transferred by the original offer's collateralRate
and not the user's input:
and then the additional calculations are being made on the _collateralRate
the user's chose, therefore, if the mode is protected
, and the user chose a different collateralRate
, the original collateralRate
will be taken into account when transferred, however, the stored info will include the user's _collateralRate
this might lead to user's loss of funds, or unexpected errors and differences in the tokens balances.
manual review
use _collateralRate
instead of offerInfo.collateralRate
.
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.