.btc and .citrea domains. It is an implementation of the ERC721 non-fungible token standard, and provides functionality for registering and renewing domains.
Domain Registration
Domains are registered via theETHRegistrarController, which acts as a controller for the BaseRegistrarImplementation.
Registration Process
- Commit: To prevent front-running, users must first submit a commitment hash (e.g.,
makeCommitment). - Wait: After submitting the commitment, users must wait for at least
minCommitmentAge(usually 1 minute) before revealing their request. - Register: Once the wait period is over, users can call
registerwith the original parameters to complete the registration.
Cost
The cost of registration is determined by the length of the name and the duration of registration.- Shorter names are more expensive to prevent spam.
- Longer names are cheaper.
- Registration fees are paid in cBTC.
Expiry and Grace Period
Domains are registered for a fixed period. After expiry, there is a grace period (usually 90 days) during which the original owner can renew the name.Base Registrar Implementation
TheBaseRegistrarImplementation is the contract that actually owns the .btc and .citrea TLDs in the ENS registry. It issues subdomains to users who register via the controller.
It implements standard ERC721 functionality:
ownerOf(uint256 tokenId): Returns the owner of the specified token ID (label hash).transferFrom(address from, address to, uint256 tokenId): Transfers ownership of a name.approve(address to, uint256 tokenId): Approves another address to manage a specific name.setApprovalForAll(address operator, bool approved): Approves an operator to manage all of the user’s names.
Renewals
Domains can be renewed at any time before expiry (and during the grace period) by callingrenew on the controller.