Open code423n4 opened 3 years ago
0xsanson
In Liquidation.verifyAndSubmitLiquidation(...) we can save the minimumMargin to memory since it's called two times.
https://github.com/code-423n4/2021-06-tracer/blob/main/src/contracts/Liquidation.sol#L171
Manual analysis
Save the result of Balances.minimumMargin(...) to memory.
Also closed by accident
Handle
0xsanson
Vulnerability details
Impact
In Liquidation.verifyAndSubmitLiquidation(...) we can save the minimumMargin to memory since it's called two times.
Proof of Concept
https://github.com/code-423n4/2021-06-tracer/blob/main/src/contracts/Liquidation.sol#L171
Tools Used
Manual analysis
Recommended Mitigation Steps
Save the result of Balances.minimumMargin(...) to memory.