Platform: Code4rena
Start Date: 16/12/2022
Pot Size: $60,500 USDC
Total HM: 12
Participants: 58
Period: 5 days
Judge: Trust
Total Solo HM: 4
Id: 196
League: ETH
Rank: 35/58
Findings: 1
Award: $43.54
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: yixxas
Also found by: 0x52, 0xAgro, 0xSmartContract, 0xhacksmithh, Aymen0909, Bnke0x0, Bobface, Breeje, Diana, Franfran, HE1M, HollaDieWaldfee, IllIllI, Jeiwan, RaymondFam, Rolezn, SaharDevep, Secureverse, SmartSek, ak1, bin2chen, brgltd, chrisdior4, gz627, imare, ladboy233, lukris02, oyc_109, rvierdiiev, shark, tnevler, unforgiven, wait
43.5439 USDC - $43.54
During the audit, 1 low and 6 non-critical issues were found.
â„– | Title | Risk Rating | Instance Count |
---|---|---|---|
L-1 | Unsafe unchecked | Low | 1 |
NC-1 | Order of Functions | Non-Critical | 2 |
NC-2 | Typos | Non-Critical | 4 |
NC-3 | Unused named return variables | Non-Critical | 1 |
NC-4 | Unused variable | Non-Critical | 1 |
NC-5 | Maximum line length exceeded | Non-Critical | 4 |
NC-6 | Missing NatSpec | Non-Critical | 18 |
unchecked
It is not safe to use unchecked
block for int56 delta = endTick - startTick;
in timeWeightedAverageTick() function in OracleLibrary.sol because startTick
can be larger than endTick
. There is no guarantee that the input data will always be correct.
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.
/// @return selector indicating succesful receiving of the NFT
=> successful
/// @param auction The defintion of the auction
=> definition
/// @dev Derived from the auction. Identitical auctions cannot exist simultaneously
=> Identical
/// @notice if liquidations are currently locked, meaning startLiquidationAuciton will revert
=> startLiquidationAuction
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;
param uint256 id
is not used in the _auctionCurrentPrice() function
According to Style Guide, maximum suggested line length is 120 characters.
Make the lines shorter.
NatSpec is missing for 18 functions in 4 contracts.
Add NatSpec for all functions.
#0 - c4-judge
2022-12-25T16:28:34Z
trust1995 marked the issue as grade-b