The PerMarkets::createOffer
function currently includes a validation check to ensure that the collateralRate parameter is at least 100% by comparing it against a constant (Constants.COLLATERAL_RATE_DECIMAL_SCALER). However, the documentation specifies that the collateralRate must be greater than 100% * @dev collateralRate must be more than 100%, decimal scaler is 10000
. The current implementation only enforces that the collateralRate is not less than 100%, which means a collateralRate equal to 100% would be incorrectly accepted.
Allowing a collateralRate
of exactly 100% when the system requires it to be strictly greater than 100% could lead to inadequate collateralization, potentially exposing the platform to financial risk. Specifically, this could result in situations where the collateral is insufficient to cover the associated risks, undermining the security and stability of the marketplace.
Manual Review
Update the validation logic to enforce that the collateralRate must be strictly greater than 100%. The condition should be modified as follows:
I believe this is borderline informational/low. Despite this off-by-one error of the intended check, the difference between 100% and 101% is minimal, so I believe whether or not 100% is allowed has minimal impact. Ultimately, it still comes down to the risk level that users are willing to take
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.