Skip to content

Commit

Permalink
Report for issue #4 updated by Praise
Browse files Browse the repository at this point in the history
  • Loading branch information
code423n4 committed Feb 16, 2023
1 parent e8b5947 commit 6a51a7a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions data/Praise-G.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
### [G-01]- There is no need to initialize state variables to '0'.
### [G-01] There is no need to initialize state variables to '0'.
If a variable is not set/initialized, the default value is assumed (0, false, 0x0 … depending on the data type). You are simply wasting gas if you directly initialize it with its default value.

## Proof of Concept
```
uint16 private constant LENDER_REFERRAL_CODE_NONE = 0;
```
Affected Source code:
https://github.com/code-423n4/2023-02-ethos/blob/73687f32b934c9d697b97745356cdf8a1f264955/Ethos-Vault/contracts/ReaperStrategyGranarySupplyOnly.sol#L35
https://github.com/code-423n4/2023-02-ethos/blob/73687f32b934c9d697b97745356cdf8a1f264955/Ethos-Vault/contracts/ReaperStrategyGranarySupplyOnly.sol#L35

### [G-02] setting the constructor to 'payable'
Saves ~13 gas per instance

https://github.com/code-423n4/2023-02-ethos/blob/73687f32b934c9d697b97745356cdf8a1f264955/Ethos-Vault/contracts/ReaperVaultERC4626.sol#L16-L24

0 comments on commit 6a51a7a

Please sign in to comment.