---
eip: 2193
label: ERC-2193
title: dType Alias Extension - Decentralized Type System
status: Stagnant
type: Standards Track
category: ERC
created: 2019-07-16
requires: 155, 1900, 2157
official: https://eips.ethereum.org/EIPS/eip-2193
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2193.md
canonical: https://eips.huatuo.xyz/eip-2193/
lang: en
tldr: Proposes human-readable aliases such as alice@socialnetwork.profile for any on-chain data record, built on the dType type registry rather than DNS-style names.
tags: [naming, alias, registry, dtype]
---

# ERC-2193: dType Alias Extension - Decentralized Type System

> We are proposing Alias - a semantic standard for identifying on-chain resources by human-readable qualifiers, supporting any type of data.

**TL;DR:** Proposes human-readable aliases such as alice@socialnetwork.profile for any on-chain data record, built on the dType type registry rather than DNS-style names.

## What problem does it solve?

[ENS (EIP-137)](/eip-137/) gives human-readable names to accounts and contracts, but not to individual pieces of data inside a contract, such as one user's profile or one payment channel. ENS also uses DNS's leaf-to-root order (`sub.domain.eth`), the opposite of how a dot works in most programming languages.

ERC-2193 proposes an **Alias** registry that names any record stored through the dType system ([ERC-1900](/eip-1900/) for type definitions, [ERC-2157](/eip-2157/) for storage contracts), using separators that carry meaning.

## How it works

- An alias combines a dType type identifier, a separator, a `name`, and the `identifier` of the record in that type's storage contract.
- Separators and their reading order:

| Separator | Meaning | Example |
| --- | --- | --- |
| `.` | general domain, root to leaf | `domain.subdomain.resource` |
| `@` | actor-related data, leaf to root | `alice@socialnetwork.profile` |
| `#` | concepts, root to leaf | `topicX#postY` |
| `/` | resource path, root to leaf | `resourceRoot/resource` |

- Anyone may set an alias if they own the underlying record in the dType storage contract. They prove this with a signature over the type id, identifier, name, separator, a `nonce`, the Alias contract address and the chain id ([EIP-155](/eip-155/)), which prevents replays.
- Owners can update or delete aliases. A record can have several aliases with different names or separators.
- Content can be addressed either by raw `bytes32` identifiers or by the human alias; both resolve to the same record.

## Sample code

The interface from the spec:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface Alias {
    event AliasSet(bytes32 dtypeIdentifier, bytes1 separator, string name, bytes32 indexed identifier);

    function setAlias(
        bytes32 dtypeIdentifier,
        bytes1 separator,
        string memory name,
        bytes32 identifier,
        bytes memory signature
    ) external;

    function getAliased(bytes1 separator, string memory name) external view returns (bytes32 identifier);
}
```

Resolving an alias from a script (ethers v6):

```ts
const id = await aliasRegistry.getAliased("0x40", "alice"); // "@" separator
```

## Things to know

- Status: **Stagnant**, as are the dType proposals it depends on ([ERC-1900](/eip-1900/), [ERC-2157](/eip-2157/)).
- The exact signature encoding, backwards compatibility and test cases are not specified ("will be added").
- It only works for data stored in dType-linked contracts; it is not a general replacement for ENS in practice.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-2193
