Open code423n4 opened 2 years ago
TomFrenchBlockchain
Potential DOS on swaps on VaderPool
VaderPool
BasePool makes 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-12-vader/blob/fd2787013608438beae361ce1bb6d9ffba466c45/contracts/dex/pool/BasePool.sol#L292
https://github.com/code-423n4/2021-12-vader/blob/fd2787013608438beae361ce1bb6d9ffba466c45/contracts/dex/utils/GasThrottle.sol#L8-L22
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 as is done in VaderPoolV2.sol
Handle
TomFrenchBlockchain
Vulnerability details
Impact
Potential DOS on swaps on
VaderPool
Proof of Concept
BasePool makes 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-12-vader/blob/fd2787013608438beae361ce1bb6d9ffba466c45/contracts/dex/pool/BasePool.sol#L292
https://github.com/code-423n4/2021-12-vader/blob/fd2787013608438beae361ce1bb6d9ffba466c45/contracts/dex/utils/GasThrottle.sol#L8-L22
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 as is done in VaderPoolV2.sol