contract CrossMarginLiquidation, here the same calculations are done twice:
(peg2targetCost * (100 + MAINTAINER_CUT_PERCENT)) / 100
it would be better to extract it into a variable and use it instead. Same here:
emit LiquidationShortfall(liquidationTarget - liquidationReturns);
Lending(lending()).haircut(liquidationTarget - liquidationReturns);
Vulnerability details
Gas optimization suggestion:
contract CrossMarginLiquidation, here the same calculations are done twice: (peg2targetCost * (100 + MAINTAINER_CUT_PERCENT)) / 100 it would be better to extract it into a variable and use it instead. Same here: emit LiquidationShortfall(liquidationTarget - liquidationReturns); Lending(lending()).haircut(liquidationTarget - liquidationReturns);
Email address
pauliax6@gmail.com
Handle
paulius.eth
Eth address
0x523B5b2Cc58A818667C22c862930B141f85d49DD