Platform: Code4rena
Start Date: 14/04/2023
Pot Size: $90,500 USDC
Total HM: 7
Participants: 59
Period: 14 days
Judge: LSDan
Total Solo HM: 3
Id: 232
League: ETH
Rank: 29/59
Findings: 1
Award: $59.79
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Sathish9098
Also found by: 0x73696d616f, 0xAgro, 0xSmartContract, 0xTheC0der, ABA, ArbitraryExecution, Aymen0909, BRONZEDISC, Bauchibred, Dyear, Eurovickk, IceBear, Jerry0x, Jorgect, Josiah, MalfurionWhitehat, MohammedRizwan, RaymondFam, Recep, Rickard, SAAJ, Shubham, Udsen, auditor0517, brgltd, catellatech, chaduke, codeslide, eierina, favelanky, j4ld1na, lukris02, matrix_0wl, naman1778, pontifex, schrodinger, tnevler, urataps
59.7928 USDC - $59.79
Issue | Risk | Instances | |
---|---|---|---|
1 | Immutable state variables lack zero address checks | Low | 6 |
2 | Named return variables not used anywhere in the functions | NC | 4 |
3 | Constant redefined elsewhere | NC | 2 |
4 | Unsed imports | NC | 1 |
Constructors should check the values written in an immutable state variables(address) is not the address(0).
Instances include:
File: DNSRegistrar.sol Line 62-64
previousRegistrar = _previousRegistrar; resolver = _resolver; oracle = _dnssec;
File: DNSRegistrar.sol Line 67
ens = _ens;
File: OffchainDNSResolver.sol Line 44-45
ens = _ens; oracle = _oracle;
Add non-zero address checks in the constructors for the instances aforementioned.
return
statement when the function defines a named return variable, is redundant :Instances include:
File: DNSRegistrar.sol Line 204
File: BytesUtils.sol Line 183
File: DNSSECImpl.sol Line 127
File: DNSSECImpl.sol Line 173
Either use the named return variables inplace of the return statement or remove them.
Consider defining in only one contract so that values cannot become out of sync when only one location is updated. A cheap way to store constants in a single location is to create an internal constant in a library. .
Instances include:
File: DNSClaimChecker.sol Line 16-17
File: OffchainDNSResolver.sol Line 29-30
uint16 constant CLASS_INET = 1; uint16 constant TYPE_TXT = 16;
Contracts or libraries that are imported and not used should be removed.
Instances include:
File: DNSClaimChecker.sol Line 4
import "../dnssec-oracle/DNSSEC.sol";
#0 - c4-pre-sort
2023-05-02T04:31:31Z
thereksfour marked the issue as low quality report
#1 - thereksfour
2023-05-02T04:31:34Z
only L1
#2 - c4-judge
2023-05-09T09:56:36Z
dmvt marked the issue as grade-b