Closed code423n4 closed 2 years ago
TomFrench
Potential DOS on swaps
BasePool and BasePoolV2 make use of a validateGas modifier on swaps which checks that the user's gas price is below the value returned by _FAST_GAS_ORACLE.
validateGas
_FAST_GAS_ORACLE
https://github.com/code-423n4/2021-11-vader/blob/429970427b4dc65e37808d7116b9de27e395ce0c/contracts/dex/utils/GasThrottle.sol#L9-L20
Should _FAST_GAS_ORACLE be compromised to always return zero then all swaps will fail. There is no way to recover from this scenario.
Either remove GasThrottle.sol entirely or allow governance to turn it off
Handle
TomFrench
Vulnerability details
Impact
Potential DOS on swaps
Proof of Concept
BasePool and BasePoolV2 make use of a
validateGas
modifier on swaps which checks that the user's gas price is below the value returned by_FAST_GAS_ORACLE
.https://github.com/code-423n4/2021-11-vader/blob/429970427b4dc65e37808d7116b9de27e395ce0c/contracts/dex/utils/GasThrottle.sol#L9-L20
Should
_FAST_GAS_ORACLE
be compromised to always return zero then all swaps will fail. There is no way to recover from this scenario.Recommended Mitigation Steps
Either remove GasThrottle.sol entirely or allow governance to turn it off