# How ENS Registration Works 

By [Broken Down?](https://paragraph.com/@brokendown) · 2022-10-18

---

> _🧠 Trade_ **_6 min_**_. Get a deep understanding of_ **_ENS Registration_**_._

🔥 ENS, what is it?
-------------------

*   The Ethereum Name System (ENS) is a way of assigning a human readable name to an Ethereum Address.
    
*   For example, the ETH address `0x625e5a7cd2e3beecf0f89b60dfee88097b9b86b2` can also be identified as `brokendown.eth`.
    
*   In many ways it is quite similar to the traditional DNS (Domain Name System) where the IP address `1.1.1.1` can also be identified as `cloudflare.com`.
    
*   For this article, we’ll focus on the `.eth` extension.
    

> 🤩 _I read the smart contract so you don’t have to!_

📖 Registration Steps
---------------------

ENS (.eth) name registration takes place via 3 interactions against the `ETHRegistrarController` contract.

*   #1 is a call to `makeCommitment`. (not written to chain)
    
*   #2 is a transaction to `commit`.
    
*   #3 is a transaction to `registerWithConfig`.
    

The current contract can be found on the ETH mainnet at this address: [0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5](https://etherscan.io/address/0x283af0b28c62c092c9727f1ee09c02ca627eb7f5#code)

🏗️ Make Commitment
-------------------

*   `makeCommitment` bundles your registration details into one “secret” value. This is known as a “commitment”. One purpose is to **obscure the name you’ll register**.
    
*   _An interesting note: The call does not read or write data to the blockchain. No data storage is used. As a result it can be invoked with 0 gas cost._
    

    Registration Details:
    ---------------------
    MyNewName.eth,
    0x625e5a7cd2e3beecf0f89b60dfee88097b9b86b2,
    someRandomSecret
    

    Commitment "Secret":
    ---------------------
    0x83f42c35570687e66e4f63008fa4d7bcc899d98dc656ffd8d6d3cd1d4108a
    

📥 Commit
---------

*   We now store your commitment “secret” on chain. This, so the same name is not registered twice. We do this via `commit`.
    
*   Then we wait 60 seconds (otherwise contract will ignore our attempt to register).
    

    commit('0x83f42c35570687e66e4f63...c656ffd8d6d3cd1d4108a')
    

✉️ Register
-----------

*   _The last step:_
    
*   Finally we make a transaction to `register` and (at the same time) provide ETH as payment. A number of checks are made:
    
    *   ℹ️ was a valid commitment “secret” provided? (prev step)
        
    *   ℹ️ is the name still available?
        
    *   ℹ️ was the correct ETH fee paid?
        
*   Once all checks successfully pass:
    
    *   ✅ A resolver is set. A resolver is another smart contract that handles the “routing” of your name. Often, [ENS handles this](https://docs.ens.domains/contract-api-reference/publicresolver).
        
    *   **✅ The corresponding ERC-721 token (NFT name) is transferred to you.**
        
    *   **✅** Any ETH amount sent over the actual cost of the name is _automatically_ refunded to you.
        

> 💜 _That’s all! Now you know the major secrets to_ **_ENS Registration_**_!_

😊 Fun Facts
------------

*   There is no size limit to an ENS (.eth) name. You could take your ETH address and register it: `0x625e5a7cd2e3beecf0f89b60dfee88097b9b86b2.eth`
    
*   There is no upper limit (number of years) you can register a ENS name for.

---

*Originally published on [Broken Down?](https://paragraph.com/@brokendown/how-ens-registration-works)*
