The hook should only accept fee values that are within the protocol’s expected range and representation (dynamic LP fee rates are encoded as parts‑per‑million where 1_000_000 = 100%). Proper validation guards configuration against accidental or malicious values that could break swaps, overcharge users, or render pools unusable.
The admin function ChangeFee() allows the owner to set any uint24 value for buyFee and sellFee without checking upper/lower bounds or semantic validity. This enables setting extreme values (e.g., > 1_000_000 or values that protocol does not support) that can cause economic harm or operational disruption.
Likelihood: Low
Occurs during routine governance/operations when an operator sets fees (e.g., testing, hotfixes, or reacting to market conditions).
Manifests whenever arbitrary values are used, especially in environments with multiple admins or scripts, since there is no contract‑level safeguard.
Impact: Medium
Economic harm: Setting sellFee very high (e.g., >= 1_000_000) can make sells effectively impossible or confiscatory; setting buyFee unintentionally high can overcharge users on buys.
Functional breakage / DoS: Unsupported or out‑of‑range values may cause swap reverts, disable liquidity usage, or break assumptions in off‑chain systems that compute fees.
This test that demonstrates setting an out‑of‑range fee (e.g., 200%):
Add explicit bounds checks aligned with parts‑per‑million representation and protocol constraints:
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.