Platform: Code4rena
Start Date: 11/01/2023
Pot Size: $60,500 USDC
Total HM: 6
Participants: 69
Period: 6 days
Judge: Trust
Total Solo HM: 2
Id: 204
League: ETH
Rank: 44/69
Findings: 1
Award: $36.24
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: CodingNameKiki
Also found by: 0x1f8b, 0x52, 0x5rings, 0xAgro, 0xSmartContract, 0xcm, 0xkato, 2997ms, Aymen0909, BClabs, BPZ, BRONZEDISC, Bauer, Bnke0x0, Deekshith99, IllIllI, Josiah, Kaysoft, RaymondFam, Rolezn, SaeedAlipoor01988, Tajobin, Udsen, Viktor_Cortess, adriro, arialblack14, betweenETHlines, btk, chaduke, chrisdior4, cryptphi, csanuragjain, cygaar, defsec, descharre, erictee, gzeon, hansfriese, horsefacts, joestakey, koxuan, lukris02, luxartvinsec, nicobevi, oyc_109, pavankv, peanuts, rbserver, scokaf, shark, tnevler, tsvetanovv, zaskoh
36.2377 USDC - $36.24
During the audit, 6 non-critical issues were found.
â„– | Title | Risk Rating | Instance Count |
---|---|---|---|
NC-1 | Order of Functions | Non-Critical | 9 |
NC-2 | Order of Layout | Non-Critical | 13 |
NC-3 | Typos | Non-Critical | 7 |
NC-4 | Unused named return variables | Non-Critical | 1 |
NC-5 | Missing and extra leading underscores | Non-Critical | 3 |
NC-6 | Missing NatSpec | Non-Critical | 10 |
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:
External functions should be placed before private:
Reorder functions where possible.
According to Order of Layout, inside each contract, library or interface, use the following order:
Events should be placed right after state variables:
Modifiers should be placed between events and functions:
Pragma directive should be placed before import directive:
* `kycRequirementGroup`. In order to sucessfully call this function,
=> successfully
function assignRoletoKYCGroup(
=> RoleTo
* @param addresses Array of addresses being added as elligible
=> eligible
* @param addresses Array of addresses being added as elligible
=> eligible
* BPS_DENOMINAOR (say 9999) and `mintFee` = 1,
=> DENOMINATOR
/// @notice Error for when caller attempts to set the KYC registry refernce
=> reference
* @dev Event for when a price cap is set on an fToken's underlying assset
=> asset
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 immutables should have a leading underscore:
Public constants - should not:
Add and remove leading underscores where needed.
NatSpec is missing for 10 functions in 4 contracts.
Add NatSpec for all functions.
#0 - c4-judge
2023-01-23T13:43:57Z
trust1995 marked the issue as grade-b