The TracerPerpetualSwaps.LIQUIDATION_GAS_COST should be upgradeable as the gas costs of liquidations are likely to change with upcoming hardforks.
Impact
After a hardfork that increased the gas cost, the hardcoded LIQUIDATION_GAS_COST might not be enough and the liquidation and min. margin balances are not accurate anymore.
Handle
cmichel
Vulnerability details
The
TracerPerpetualSwaps.LIQUIDATION_GAS_COST
should be upgradeable as the gas costs of liquidations are likely to change with upcoming hardforks.Impact
After a hardfork that increased the gas cost, the hardcoded
LIQUIDATION_GAS_COST
might not be enough and the liquidation and min. margin balances are not accurate anymore.Recommended Mitigation Steps
Allow the owner to change
LIQUIDATION_GAS_COST
.