code-423n4 / 2022-02-concur-findings

2 stars 0 forks source link

Gas Optimizations #233

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago
  1. Tittle Changing memory to storage can safe gas.

Impact

Bye changing memory pointer to storage pointer and delete line https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L206. https://github.com/code-423n4/2022-02-concur/blob/main/contracts/USDMPegRecovery.sol#L105., can safe gas.

Proof of Concept

https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L206. https://github.com/code-423n4/2022-02-concur/blob/main/contracts/USDMPegRecovery.sol#L105.

GalloDaSballo commented 2 years ago

Would recommend the warden articulate their findings so that they don't fall under scrutiny.

The code updates storage that's a necessary part of the code. Removing it would break the functionality.

In lack of POC am setting this to 0 gas saved