The First Blockchain Domain Smart Escrow

Team
Unstoppable Domains
3 min readOct 7, 2019

Earlier this week, we released our Smart Escrow feature. The Smart Escrow is a first of its kind open sourced tool that allows users to transfer a .zil domain in a trustless manner to a specific party and receive funds in return. This feature protects both the buyer and seller and allows both users to transfer a blockchain domain without a centralized third party.

We decided to open source the Safe Escrow to provide a free, safe and transparent feature for the blockchain domain community. ZNS domains can now be trustlessly transferred, peer to peer without the use of an escrow company, within minutes, in a permissionless fashion. This is a major improvement from the traditional system which requires forms, charges high fees, and has up to a 60 day waiting period to transfer domain names.

How It Works

We want to share with the community what is happening behind the scenes and how you can execute a Smart Escrow directly from the command line.

For a tutorial on how to use the Smart Escrow with the friendly user interface on our website please see this video.

Let’s dive in…

Installation

First install the cli package from the npm registry.

yarn global add zns-escrownpm install --global zns-escrow

Please note there is a --help flag if at any point along the way you want further customization or are confused.

How to Sell a Domain

The first step is to define the parameters of the exchange. Define the buyer, the price in ZIL, the domain for sale, the seller, and then deploy the contract to Zilliqa. After the contract is deployed, send the address over to the buyer for them to deposit ZIL into the contract.

zns-escrow deploy any.zil \
--buyer zil1zg69v7yszg69v7yszg69v7yszg69v7ysrug0xt \
--price 1 \ # In ZIL
--private-key $(cat seller_private_key.txt)

Deposit domain onto the escrow contract using the contract address that was returned from deploy.

zns-escrow deposit zil \
zilrug0xt1zg69v7yszg69v7yszg69v7yszg69v7ys any.zil \
--private-key $(cat buyer_private_key.txt)

If you forgot the address, or cleared your terminal, use the history command to get the address.

How to Buy a Domain

Once the seller sends over the escrow address, you can get information about the contract before depositing — use the info command.

After you feel comfortable, you can deposit ZIL on contract.

zns-escrow deposit zil \
zilrug0xt1zg69v7yszg69v7yszg69v7yszg69v7ys any.zil \
--private-key $(cat buyer_private_key.txt)

Finalize the escrow by sending ZIL to the seller and claiming the domain.

zns-escrow execute zilrug0xt1zg69v7yszg69v7yszg69v7yszg69v7ys \
--private-key $(cat buyer_private_key.txt)

If you are interested or find an issue, feel free to check out the github or find us on Telegram.

--

--