Selling subdomains

The SubdomainRegistrar is a companion contract that lets you sell subdomains under a name you own. Buyers pay your price, get their subdomain instantly, and the proceeds are yours. The protocol takes nothing.

Setting up a sale

From your name’s manage page, open Sell subdomains and configure:

  • Price: in ETH, or in any ERC-20 token you choose.
  • Payout address: where proceeds go (defaults to you).
  • Token gate (optional): require buyers to hold a minimum balance of some token or NFT. Useful for community-only drops.
  • Enabled: sales can be switched on and off at any time.

Escrow mode vs flash mode

To mint a subdomain, the registrar must momentarily control the parent name. There are two ways to allow that:

Escrow mode: you deposit the parent NFT into the registrar. Sales work with no further setup, and you can withdraw the parent at any time (which disables the sale). While escrowed, you remain the controller: you keep configuring the sale, and only you can pull the parent out.

Flash mode: you keep the parent in your wallet and give the registrar approval. Each purchase pulls the parent in, mints the subdomain, and returns the parent to you in the same transaction. You keep custody, at slightly higher gas per sale.

Escrow is simpler if you sell often; flash if you want the NFT in your own wallet.

Withdrawing proceeds

  • ETH sales accumulate in the registrar under a pull-payment ledger. Withdraw your balance any time from the same tab.
  • ERC-20 sales transfer directly to the payout address on each purchase, so there is nothing to withdraw. Buyers approve the token before purchasing.

Safety properties

The registrar was designed to make rug-pulls structurally hard:

  • Configurations are bound to the current owner and epoch of the parent. If the parent expires, is re-registered, or is sold, stale configurations stop working automatically.
  • The buyer’s purchase mints directly to the buyer in the same transaction as payment, so there is no window where the seller holds both the money and the goods.
  • Anyone can clear a stale escrow record once the registrar no longer owns the parent.

One caveat buyers should understand: the parent owner can later reclaim any subdomain by re-registering its label (see Subdomains). A subdomain purchase is trust in the parent’s owner, priced accordingly.