Some parameters of functions are not checked for invalid values:
TracerPerpetualSwaps.constructor: The addresses can be checked for non-zero. Percentage values like feeRate, _deleveragingCliff, _insurancePoolSwitchStage should be checked to be less than 100% (1e18)
OracleAdapter.constructor: The addresses can be checked for non-zero.
Impact
A wrong user input or wallets defaulting to the zero addresses for a missing input can lead to the contract needing to redeploy or wasted gas.
Handle
cmichel
Vulnerability details
Some parameters of functions are not checked for invalid values:
TracerPerpetualSwaps.constructor
: The addresses can be checked for non-zero. Percentage values likefeeRate
,_deleveragingCliff
,_insurancePoolSwitchStage
should be checked to be less than 100% (1e18
)OracleAdapter.constructor
: The addresses can be checked for non-zero.Impact
A wrong user input or wallets defaulting to the zero addresses for a missing input can lead to the contract needing to redeploy or wasted gas.
Recommended Mitigation Steps
Validate the parameters.