configure
function in the Market.sol ) contract lacks minimum and maximum boundary checks for the autoDeleverageStartThreshold
, autoDeleverageEndThreshold
, and autoDeleverageExponentZ
parameters. This can lead to improper configuration, especially in volatile markets, potentially causing excessive collateral liquidation.The issue is located in the following code snippet:
The function sets the auto-deleverage thresholds and exponent without checking if they fall within acceptable ranges. This can lead to improper configuration, especially in volatile markets, potentially causing excessive collateral liquidation.
The impact of this issue is that improper configuration of the auto-deleverage parameters can lead to excessive collateral liquidation, making it difficult to manage positions in volatile markets. This can result in significant losses for users and destabilize the market.
Manual code review
autoDeleverageStartThreshold
, autoDeleverageEndThreshold
, and autoDeleverageExponentZ
parameters. This can be achieved by implementing the following changes:Define minimum and maximum values for the parameters.
Add require statements to enforce the boundary checks.
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.