Omniscia Euler Finance Audit
GenericFactory Code Style Findings
GenericFactory Code Style Findings
GFY-01C: Generic Typographic Mistake
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | GenericFactory.sol:L26 |
Description:
The referenced line contains a typographical mistake (i.e. private variable without an underscore prefix) or generic documentational error (i.e. copy-paste) that should be corrected.
Example:
26uint256 private reentrancyLock;Recommendation:
We advise this to be done so to enhance the legibility of the codebase.
Alleviation (fb2dd77a6ff9b7f710edb48e7eb5437e0db4fc1a):
The Euler Finance team evaluated this exhibit, opting to accept it as valid and acknowledge it.
GFY-02C: Ineffectual Usage of Safe Arithmetics
| Type | Severity | Location |
|---|---|---|
| Language Specific | ![]() | GenericFactory.sol:L133, L134, L135 |
Description:
The linked mathematical operation is guaranteed to be performed safely by surrounding conditionals evaluated in either require checks or if-else constructs.
Example:
129function getProxyListSlice(uint256 start, uint256 end) external view returns (address[] memory list) {130 if (end == type(uint256).max) end = proxyList.length;131 if (end < start || end > proxyList.length) revert E_BadQuery();132
133 list = new address[](end - start);134 for (uint256 i; i < end - start; ++i) {135 list[i] = proxyList[start + i];136 }137}Recommendation:
Given that safe arithmetics are toggled on by default in pragma versions of 0.8.X, we advise the linked statement to be wrapped in an unchecked code block thereby optimizing its execution cost.
Alleviation (fb2dd77a6ff9b7f710edb48e7eb5437e0db4fc1a):
The Euler Finance team evaluated this exhibit, opting to accept it as valid and acknowledge it.
