Internet-Draft Abbreviated Title September 2024
Chin Expires 21 March 2025 [Page]
Workgroup:
Internet Engineering Task Force
Internet-Draft:
draft-chins-dnsop-web3-wallet-mapping-00
Published:
Intended Status:
Standards Track
Expires:
Author:
SC. Chin, Ed.
D3 Global Inc

DNS to Web3 Wallet Mapping

Abstract

This document proposes a standard for mapping wallets to domain names using TXT records. The goal is to provide a secure and scalable way to associate wallets with domain names, enabling seamless lookup as well as assisting in authentication. The proposal heavily uses DNSSEC to ensure security. We also will propose a mechanism for mapping a wallet back to a domain name.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 21 March 2025.

Table of Contents

1. Introduction

There is fragmentation in the mapping of Web3 Wallets to Domain Names [RFC1034] as well as the reverse lookup process. This document is putting forth a standard to map Web3 Wallet addresses to Domain Names and investigates the associated security and technical concerns.

As the use of digital wallets and online services grows, the need for a standardized way to lookup wallet addresses in an human readable format becomes increasingly important. This proposal aims to provide a solution that is easy to implement, scalable, and secure.

The proposed solution involves creating a TXT record with the record extension "_w3addr" to map a wallet to a domain name. The TXT record will contain a object that maps the wallet address to the registered coin type token [SLIP-0044]. It is assumed that the record will be part of a DNSSEC [RFC4033] [RFC9364] signed zonefile and that users of this service will verify the signatures to ensure that the record has been returned without alteration in flight.

On the reverse mapping, we propose that we allow a singular coin type/address be mapped to a domain name in DNS. This will also be protected by DNSSEC. We encourage users to use a more centralized registry for this.

1.1. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2. Domain to Wallet Mapping

2.1. Record Format

The TXT record SHALL have the following format:


    _w3addr IN TXT "coin1:address1,coin2:address2,..."

_w3addr
is the TXT record name
IN
is the class of the record
TXT
is the type of the record
coin1:address1,coin2:address2,...
is the value of the record, containing a comma-separated list of coin:address pairs

2.2. Grammar for the record in EBNF format


          record_list = item ("," item)*
          item = (coin_name ("|" coin_name | "*")*) ":" address
          coin_name = [a-zA-Z0-9_]+
          address = [a-zA-Z0-9]+

record_list
represents the entire list of coin-address pairs
item
represents a coin-address pair
wildcard
is the symbol representing the default match
coin_name
represents the Symbol of a chain represented in [SLIP-0044]
address
represents the public wallet address associated with a coin (e.g., "0xabcdefg", "0x12345", etc.)

The * symbol indicates zero or more occurrences of the preceding element. The + symbol indicates one or more occurrences.

This grammar can be used to parse the input string and extract the chain identifier and addresses.

2.3. Example

Suppose a user wants to map their wallet with the public key 0x1234567890abcdef to the domain example.com using the registered coin type tokens BTC and ETH. The TXT record would be:

          _w3addr IN TXT "BTC:0x1234567890abcd,ETH:0x987654321098765"

2.4. Wildcard Support

To support multiple wallets and chains, the TXT record SHALL allow for a solitary wildcard * to substitute for the default chain name. For example:


          _w3addr IN TXT "*:0x1234567890abcd,ETH:0x987654321098765"

The lookup will return the most specific record for a chain.

2.5. Multiple Records

To support multiple records, the TXT record SHALL allow for multiple coin:address pairs separated by commas. If the record exceeds the 2048 character limit, it MAY be continued on additional TXT records. There is no guarantees on ordering the records so overlapping records MAY ordered at the resolver's discretion. In the event of duplicate chains it is RECOMMENDED that multiple records be returned dedupped for identical addresses.

2.6. Implementation

Implementations of this RFC SHALL:

  1. Support the creation and retrieval of TXT records with the _w3addr name for any given level of the DNS system.
  2. Order the lookup of the wallet address based on the returned records.
  3. Provide the wallet's public key for addressing by chain.

3. Wallet to Domain Reverse Mapping

3.1. Solution

A wallet owner has the OPTIONAL ability to setup a reverse lookup using DNS in a similar manner for IANA in-addr.arpa and ip6.arpa against a centralized service. Queriants will be able to query a CNAME record with wallet information, to get a domain mapping, they have the OPTIONAL ability to query with a chain designation using the registered coin type defined in SLIP-0044.

Until IANA decides to provide this service, this MAY be offered by outside parties.

3.2. Limitations

DNS is case insensitive, but some wallet addresses are case sensitive. Because of the vast namespace available in Web3 Addresses, it is unlikely, but MAY result in a collision.

3.3. Reverse Wallet Mapping Example

There is currently no IANA support lookup path, but a user will be able to lookup from a reverse mapping provider until there is a centralized body.

It can be qualified as a chain designation


          0x1234567890abcd.eth.wallet.vana IN CNAME _w3addr.test.vana

or

Default


          0x1234567890abcd.wallet.vana IN CNAME test.vana

3.4. Multiple mappings

It is NOT SUPPORTED for a wallet / network pair to point to multiple domains. The CNAME record does not support returning multiple records.

3.5. Potential Implementation

  1. A service will take a signed message telling the reverse lookup service for the wallet to point to a domain. OPTIONAL with chain information.
  2. The service SHALL validate the signed message.
  3. The service SHALL validate the domain to wallet mapping using the above Domain to Wallet Protocol.
  4. The service SHALL update the DNS record acting as a registry for Wallet to Domain mapping.
  5. OPTIONAL the service should validate the Domain to Wallet mapping on a periodic basis.

4. Security Considerations

To ensure the security of the mapping, the following measures will be taken:

  1. The TXT record SHALL BE stored in a secure location, such as a DNSSEC-signed zone.
  2. The implementation SHALL validate the DNSSEC record.
  3. The wallet record SHALL be protected from replay attacks via DNSSEC time invalidation.

If the source of the DNS zone is compromised, the wallet address mapping is compromised, it is imperative that this not occur.

5. IANA Considerations

This proposal requests that IANA support reverse mapping of wallet addresses to domains.

6. References

6.1. Normative References

[RFC1034]
Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10.17487/RFC1034, , <https://www.rfc-editor.org/info/rfc1034>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC4033]
Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, DOI 10.17487/RFC4033, , <https://www.rfc-editor.org/info/rfc4033>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC9364]
Hoffman, P., "DNS Security Extensions (DNSSEC)", BCP 237, RFC 9364, DOI 10.17487/RFC9364, , <https://www.rfc-editor.org/info/rfc9364>.

6.2. Informational References

[SLIP-0044]
"Registered coin types for BIP-0044", <https://raw.githubusercontent.com/satoshilabs/slips/master/slip-0044.md>.

Appendix A. Appendix 1: Example code

Here is an example of how to create and retrieve a TXT records using the _w3addr name:


        import dns.resolver.wallet
        # Retrieve the TXT record
        record = dns.resolveWallet("example.com", "BTC")

        print(record.value)  # Output: "0x1234567890abcdef"

Contributors

Thanks to all of the contributors for contributions to security and clarity.

Yevhenii Andrushchak
Kai Sung

Acknowledgements

Reviewed by:

Jothan Frakes

Author's Address

Shay Chin (editor)
D3 Global Inc