ENS contest - p_crypt0's results

Decentralised naming for wallets, websites, & more.

General Information

Platform: Code4rena

Start Date: 12/07/2022

Pot Size: $75,000 USDC

Total HM: 16

Participants: 100

Period: 7 days

Judge: LSDan

Total Solo HM: 7

Id: 145

League: ETH

ENS

Findings Distribution

Researcher Performance

Rank: 73/100

Findings: 1

Award: $79.48

🌟 Selected for report: 0

🚀 Solo Findings: 0

Floating Pragma:

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/DNSSECImpl.sol#L2

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/BytesUtils.sol#L1

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/DNSSEC.sol#L2

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/Owned.sol#L1

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/RRUtils.sol#L1

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/ERC1155Fuse.sol#L2

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/NameWrapper.sol#L2

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/INameWrapper.sol#L2

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/Controllable.sol#L2

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/INameWrapperUpgrade.sol#L2

Use fixed compiler versions.

Missing Comments:

This section provides the missing comments on public, external and internal functions.

ETHRegistrarController.sol

rentPrice()
/** * @notice Returns the rental price of an address for a duration. * @param name The name of the address to be rented. * @param duration The duration to rent an address for. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L66

valid()
/** * @notice Checks whether an address is valid, based off string length. * @param name The name of the domain to be validated. * @return bool True if length of 'name' is greater than or equal to 3, false otherwise. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L76

available()
/** * @noticeChecks availability of a proposed address. * @param name The address name to be checked. * @return bool True if 'name' is vaild and available, false otherwise. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L80

makeCommitment()
/** @notice Makes commitment for an address. @param name The name of the address. @param owner The address of the owner. @param duration The length of the commitment. @param secret The secret for the commitment. @param resolver The address of the resolver. @param data The calldata. @param reverseRecord Whether the record should be reversed. @param fuses The number of fuses. @param wrapperExpiry The expiry for the wrapper. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L85

commit()
/** @notice Commits a commitment to the commitments array as long as the timestamp of last commit + maxCommitmentAge are less than current timestamp. @param commitment The commitment to commit to commitments array. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L119

register()
/** @notice Registers an address with an owner. @param name The name of the address. @param owner The address of the owner. @param duration The length of the commitment. @param secret The secret for the commitment. @param resolver The address of the resolver. @param data The calldata. @param reverseRecord Whether the recorde should be reversed. @param fuses The number of fuses. @param wrapperExpiry The expiry for the wrapper. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L124

renew()
/** @notice Renew the ownership of an address. @param name The name of the address @param duration The duration to extend ownership by. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L188

withdraw()
/** @notice Withdraws the balance held in this address, to owner of the contract */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L209

supportsInterface()
/** @notice Checks whether the contract supports a given interface. @param interfaceID The ID of the interface to be checked for support. @return bool True if interface is of type IERC165 or IETHRegistrarController, false otherwise. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L213

_consumeCommitment()
/** @notice Consumes the commitment (internal), given its age and expiry status. @param name The ENS domain name. @param duration The duration to register the ENS domain to an owner for. @param commitment The commitment mapping to be consumed. */ https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L225
_setRecords()
/** @notice Sets the records (internally) in the resolver, for given label. @param resolver The address of the resolver contract. @param label The label whose record will be set. @param data The data associated witht the label owner. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L248

_setReverseRecord()
/** @notice Sets the records for the "reverse registrar". @param name The name of the address. @param resolver The address of the resolver contract. @param owner The address of the ENS domain owner whose records are to be set. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/ETHRegistrarController.sol#L269

ReverseRegistrar.sol

authorised()
/** * @notice Authorised modifier checks whether sender is authorised to act on behalf of an address. * @param addr The address whose authoirsation conditions are being checked against, by message sender. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/registry/ReverseRegistrar.sol#L39

setDefaultResolver()
/** * @notice Sets the default resolver address to an address that is not 0. * @param resolver The address of the resolver. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/registry/ReverseRegistrar.sol#L50

ownsContract()
/** * @notice Checks whether an address owns a contract. * @param addr The address to be checked for ownership by message sender. */

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/registry/ReverseRegistrar.sol#L180

Typos

StringUtils.sol

https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/StringUtils.sol#L8

@return len The length of the input string.

Non-critical

Interface IBaseRegistrar.sol is importing itself for no apparent reason. https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/ethregistrar/IBaseRegistrar.sol#L2

#0 - jefflau

2022-07-26T08:07:30Z

Thanks! This is helpful

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter