code-423n4 / 2021-06-tracer-findings

1 stars 0 forks source link

`TracerPerpetualSwaps.LIQUIDATION_GAS_COST` should be upgradeable #101

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

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.

loudoguno commented 3 years ago

closing to reflect judges findings sheet as duplicate of #48