Open code423n4 opened 2 years ago
Dravee
Increased gas cost (1 MSTORE and 1 MLOAD)
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/PoolTemplate.sol#L552 There's no readability or gas gain from copying incident.payoutNumerator to a variable as it's used only once in the method.
incident.payoutNumerator
VS Code
Do not store this data in a variable
Handle
Dravee
Vulnerability details
Impact
Increased gas cost (1 MSTORE and 1 MLOAD)
Proof of Concept
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/PoolTemplate.sol#L552 There's no readability or gas gain from copying
incident.payoutNumerator
to a variable as it's used only once in the method.Tools Used
VS Code
Recommended Mitigation Steps
Do not store this data in a variable