What is RNS
Ronin Name Service (RNS) is a distributed naming system based on the Ronin blockchain that lets you assign a human-readable
.ron domain name to your long Ronin address:
By using the RNS name instead of the Ronin address, users can interact more easily with blockchain apps. RNS also works in reverse, where the user enters their Ronin address, and the system looks up the name associated with it.
RNS is integrated with Ronin Wallet, Sky Mavis Account service, App.Axie, Mavis Market, Origins, Homeland, and other apps in the Sky Mavis ecosystem.
Looking for RNS end-user docs? Visit docs.roninchain.com.
When users want to obtain a
.ron domain for the first time, they must interact with a controller. This is a smart contract that has approval for the top-level
.ron domain and specifies rules for allocating second-level domain names, such as
RNS domain names must conform to the following guidelines:
- Domains can contain the English-language letters a-z, and the digits 0-9.
- Hyphens can also be used but not at the beginning and at the end of a domain name. Two hyphens together aren't permitted either.
- The minimum length is three characters.
- Domain names are case-sensitive and can only contain lowercase letters.
An owner of a
.ron domain name also receives a
.ron.id domain name for apps compatible with the Ethereum Name System (ENS), such as Metamask. For example,
Architecturally, RNS has two main components: the registry and resolvers. This page provides an overview of each.
The RNS registry is located in a combined smart contract called RNS Unified, which also has the capability of the registrar. The contract operates as an ERC721 standard, wherein each unique ID corresponds to a distinct RNS domain. This contract also stores critical pieces of information about each domain:
- The owner of the domain.
- The resolver of the domain.
- The label of the domain, such as
- The expiry of the domain.
- The parent domain, such as
Owners of domains in the RNS registry can do the following:
- Set the domain as their primary name to represent the 42-character address across dApps.
- Transfer domain ownership to another address.
- List the domain on the Mavis Market for sale.
- Extend domain ownership.
Resolvers are responsible for translating RNS names into Ronin addresses.
The process of resolving a name in RNS consists of two steps: first, ask the registry which resolver is responsible for the name, and then ask that resolver to answer your query.
In the following example, an app is trying to find the Ronin address pointed to by
axieinfinity.ron. The app first asks the registry which resolver is responsible for
axieinfinity.ron. Next, it queries that resolver for the address of
A smart contract's resource constraints make it inefficient to interact directly with human-readable names, so RNS uses 256-bit cryptographic hashes instead. A process called Namehash is used to generate the hash from a name while preserving its hierarchical properties. For example, the namehash of
0xf3b9e034ea07d5b34e2ae5b85144910ad9de59f7dfd654ded27441c7ea941594. This is a name used exclusively within RNS.
Namehash produces a unique hash for every valid domain name via a recursive process. Using the namehash of any domain, such as
.ron, you can calculate the namehash of any second-level domain like
axieinfinity.ron, without knowing the original human-readable name. It's thanks to this property that RNS can provide a hierarchical system without using human-readable text strings directly.
Try RNS as a user
You can try RNS out for yourself now by using the RNS app.
Use RNS in an example app
Check out the RNS quickstart guide to quickly install an example app and see RNS name resolution in action.
Add RNS support to your dApp
Follow the integration guide to support RNS in your dApp.
Learn more about RNS
Read the following explanation articles covering each part of RNS in greater detail: