The UpdateWeightRunner::setQuantAMMSwapFeeTake function includes a check to ensure that the _quantAMMSwapFeeTake parameter is less than 100%. However, the use of <= operator in require(_quantAMMSwapFeeTake <= 1e18, "Swap fee must be less than 100%"); allows the swap fee to be set to exactly 100%. This could lead to scenarios where the protocol charges an astronomically high swap fee, potentially causing user dissatisfaction, lack of trust in the protocol, and decreased adoption.
The setQuantAMMSwapFeeTake function allows an administrator (quantammAdmin) to update the quantAMMSwapFeeTake value, which represents the swap fee in a scaled format (e.g., 1e18 represents 100%).
The check require(_quantAMMSwapFeeTake <= 1e18, "Swap fee must be less than 100%") permits the fee to be set to exactly 100%, which is likely unintended given the expectation of a fee being "less than 100%."
A 100% swap fee effectively prevents meaningful use of the protocol, as users would lose all their assets in any transaction.
Protocol Trust: Users may lose trust in the protocol if a 100% fee is charged, especially if done maliciously or by mistake.
Financial Damage: If set to 100%, any swap transaction would effectively confiscate users’ assets, leading to severe financial losses.
Adoption Risk: A protocol perceived as unsafe or poorly managed would face reduced adoption and diminished reputation in the market.
Modify the Condition: Change the require statement to use the < operator instead of <=, ensuring that _quantAMMSwapFeeTake cannot equal 100%.
Set Reasonable Limits: Consider imposing a maximum fee threshold (e.g., 5% or 0.05e18) to ensure fees remain reasonable and user-friendly.
By implementing these changes, the protocol will prevent unintended or malicious configuration of the swap fee, preserving user trust and ensuring operational integrity.
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.