Omniscia DAFI Protocol Audit
Data Code Style Findings
Data Code Style Findings
DAT-01C: System Optimization
Type | Severity | Location |
---|---|---|
Code Style | Informational | Data.sol:L7-L127 |
Description:
The way the demand factor history is established is via multiple sequentially named variables instead of a statically sized array of values.
Example:
31struct dTokenRecord{32 uint256 day1;33 uint256 time1;34 uint256 day2;35 uint256 time2;36 uint256 day3;37 uint256 time3;38 uint256 day4;39 uint256 time4;40 uint256 day5;41 uint256 time5;42}
Recommendation:
We advise the latter to be utilized to greatly optimize the legibility of the codebase.The development team has acknowledged this exhibit but decided to not apply its remediation in the current version of the codebase citing time constraints.
Alleviation:
The development team has acknowledged this exhibit but decided to not apply its remediation in the current version of the codebase citing time constraints.
DAT-02C: Visibility Specifiers Missing
Type | Severity | Location |
---|---|---|
Language Specific | Informational | Data.sol:L10, L11 |
Description:
The linked variables contain no visibility specifier explicitly set.
Example:
9uint256 public reward = 50000000000000000000;10uint256 reduction = 5000000000000000;11address[] platformUsers;
Recommendation:
We advise one to be set so to avoid compilation discrepancies as in its current state a visibility specifier is assigned automnatically by the compiler which can change in a future version.
Alleviation:
Visibility specifiers were properly introduced to the linked variables.