gas

Double checks

Reward

Total

6.40 USDC

0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
0.44 USDC
Selected
0.62 USDC
Selected Submission

Double checks

Severity

Gas Optimization / Informational

Relevant GitHub Links

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DecentralizedStableCoin.sol#L51

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DecentralizedStableCoin.sol#L58

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DecentralizedStableCoin.sol#L61

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DecentralizedStableCoin.sol#L48

There are four checks in DecentralizedStableCoin contract which already exists in another parts of the project. These two checks are already in the inherited ERC20Burnable contract:

51:        if (balance < _amount) {

58:        if (_to == address(0)) {

These two checks are already in the moreThanZero modifier of the DSCEngine contract:

48:        if (_amount <= 0) {

61:        if (_amount <= 0) {