Skip to main content

Ronin Name Service

Overview

Ronin Name Service (RNS) is a distributed naming system based on the Ronin blockchain that lets users assign a human-readable .ron domain name to their Ronin address.

turn-this-into-this

By using an 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, App.Axie, Mavis Market, Axie Infinity Origins, Axie Infinity: Homeland, and other apps in the Sky Mavis ecosystem.

RNS is deployed on the Ronin mainnet and Saigon testnet. If you use a library such as rnsjs, or an end-user app, it automatically detects the network you're interacting with and uses the RNS deployment on that network.

info

Looking for RNS end-user docs? Visit docs.roninchain.com.

Registration

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 axieinfinity.ron.

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, axieinfinity.ron and axieinfinity.ron.id.

Registering new RNS domains is possible via the RNS app on id.roninchain.com. For a name that's already registered, a user can make an offer to its owner on Mavis Market.

Architecture

Architecturally, RNS has two main components: the registry and resolvers.

RNS registryron- owner: 0x1234...axieinfinity.ron- owner: 0x2345...- resolver: 0x3456...kingofthepirates.ron- owner: 0x4567...- resolver: 0x5678...Resolvers

This page provides an overview of each.

Registry

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 ERC-721 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 axieinfinity in axieinfinity.ron.
  • The expiry of the domain.
  • The parent domain, such as .ron.

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

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 axieinfinity.ron.

Name processing

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 axieinfinity.ron is 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.

Next steps

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.