Skip to content

Latest commit

 

History

History
38 lines (20 loc) · 1.12 KB

007.md

File metadata and controls

38 lines (20 loc) · 1.12 KB

Precise Zinc Corgi

Medium

{SETTER_ROLE} will {update validRangeWidth to 999999} {in the SolidlyV2AMO.sol contract}

Summary

The absence of validation for setting minimum and maximum values in the validRangeWidth variable in the SolidlyAMOV2.sol contract will allow adding liquidity in an unfavorable price range with variations of +-99.9 percent of the price of 1 USD.

Root Cause

  1. in SolidlyAMOV2.sol:118-145, the validation of the minimum and maximum values for validRangeWidth is incorrect.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. SETTER_ROLE needs to call setParams(), and update validRangeWidth to 999999
  2. After that, AMO_ROLE will be able toсall addLiquidity() when market conditions are unfavorable. When the price changes by +- 99 percent of 1,000,000

Impact

No response

PoC

No response

Mitigation

No response