_max_price_increment
to StableSwap FeeThe function set_max_price_increment
lacks a necessary validation step to ensure that the provided _max_price_increment
remains below the StableSwap minimum fee. This could potentially allow unsafe configurations that might impact price stability.
The function documentation clearly states that _max_price_increment
must be less than StableSwap's minimum fee.
However, the function does not actually check the StableSwap fee before assigning the value.
This could result in setting a _max_price_increment
that is higher than expected, leading to unintended price movement.
Potential Market Instability: If _max_price_increment
is set too high, it could cause excessive price volatility.
Deviation from Intended Behavior: The contract claims to enforce a relationship with StableSwap's minimum fee, but it does not.
Risk of Misconfiguration: Admins might unintentionally set an invalid _max_price_increment
, impacting the pricing mechanism.
Modify the function to include an explicit check against the StableSwap fee:
Ensure that _max_price_increment
is validated against a reference fee stored in the contract or fetched externally from the StableSwap contract.
- Explicitly stated in the docs, so it is presumed that the DAO owning the DEFAULT_ADMIN_ROLE role will not make such a mistake - See [here](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid), where admin input errors can be considered as invalid
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.