Platform: Code4rena
Start Date: 03/03/2023
Pot Size: $90,500 USDC
Total HM: 4
Participants: 42
Period: 7 days
Judge: 0xean
Total Solo HM: 2
Id: 219
League: ETH
Rank: 24/42
Findings: 1
Award: $72.43
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: rbserver
Also found by: 0x6980, 0xAgro, 0xSmartContract, 0xmichalis, 0xnev, BRONZEDISC, DevABDee, IceBear, RaymondFam, Rolezn, SaeedAlipoor01988, Sathish9098, arialblack14, brgltd, chrisdior4, codeislight, descharre, imare, lukris02, luxartvinsec, matrix_0wl, tnevler, yongskiws
72.4344 USDC - $72.43
During the audit, 5 non-critical issues were found.
â„– | Title | Risk Rating | Instance Count |
---|---|---|---|
NC-1 | Order of Functions | Non-Critical | 4 |
NC-2 | Order of Layout | Non-Critical | 2 |
NC-3 | Unused named return variables | Non-Critical | 4 |
NC-4 | Missing leading underscores | Non-Critical | 21 |
NC-5 | Maximum line length exceeded | Non-Critical | 69 |
According to Style Guide, ordering helps readers identify which functions they can call and to find the constructor and fallback definitions easier.
Functions should be grouped according to their visibility and ordered:
External functions should be placed before public:
Reorder functions where possible.
According to Order of Layout, inside each contract, library or interface, use the following order:
Place modifiers before constructor/functions.
Both named return variable(s) and return statement are used.
To improve clarity use only named return variables.
For example, change:
function functionName() returns (uint id) { return x;
to
function functionName() returns (uint id) { id = x;
Internal and private constants, immutables, state variables, and functions should have a leading underscore.
Constants:
Immutables:
State variables:
Functions:
Add leading underscores where needed.
According to Style Guide, maximum suggested line length is 120 characters. Longer lines make the code harder to read.
Make the lines shorter.
#0 - c4-judge
2023-03-12T15:40:31Z
0xean marked the issue as grade-b
#1 - c4-sponsor
2023-03-22T10:30:03Z
novaknole20 marked the issue as sponsor acknowledged