[TEP-92] Establishing a Wallet Registry on TON Blockchain for Dynamic Wallet Integration

Introduction

In the rapidly evolving TON ecosystem, the establishment of a wallet registry represents a significant advancement towards streamlining the integration of various wallet providers with decentralized applications (DApps). This document introduces a standardized approach to maintain an on-chain registry that holds a list of wallet providers, such as TonKeeper and TonHub. The primary goal is to enable DApp clients, such as those for decentralized exchanges (DEX) or NFT marketplaces, to query this list dynamically for populating the “Connect Wallet” interface, thereby enhancing user experience and fostering a more inclusive and competitive wallet ecosystem.

Motivation

Currently, TON DApp developers face challenges in integrating multiple wallet providers due to the diverse connection methods supported by each wallet. This fragmentation necessitates bespoke integrations for each provider, hindering the adoption of new wallets and potentially centralizing the wallet landscape, as observed in the Ethereum ecosystem with MetaMask. The proposed wallet registry aims to democratize wallet integration, allowing for easier inclusion of new wallet providers and facilitating seamless wallet updates and rebranding without disrupting existing DApp functionalities.

Implementation Overview

The wallet registry is envisioned as a smart contract deployed on the TON mainnet, which stores a list of TON DNS names for participating wallet providers. Wallet providers are required to register their TON DNS names with the registry and advertise their connection details, such as backend servers or deeplinks, as TON DNS records. This approach ensures that DApp clients can access a current and comprehensive list of wallet providers, along with their connection information, to populate the “Connect Wallet” interface dynamically.

Technical Specification

Wallet Registry Contract

  • The wallet registry contract maintains a list of TON DNS names in its storage, accessible through specific contract actions for registration and retrieval.
  • A deposit mechanism is proposed to mitigate spam, requiring wallet providers to lock a certain amount of TON Coin upon registration, refundable upon deregistration.
  • The contract supports querying the registered wallets, potentially implementing efficient storage and retrieval mechanisms such as dictionaries or linked lists.

Wallet Provider Records

  • Wallet providers must register their TON DNS names and specify connection details through TON DNS records, including name, description, logo, and supported platforms.
  • Additional attributes may be required for different connection protocols, such as TonConnect and ton-x, including server URLs and mobile deeplinks.

Comparative Analysis

Feature Proposed Wallet Registry Traditional Integration Approach
Integration Effort Low; DApps query a single on-chain registry High; DApps must individually integrate each wallet
Wallet Inclusion Dynamic; New wallets can be easily added to the registry Static; Adding a new wallet requires DApp updates
Update Flexibility High; Wallets can update their details without affecting DApps Low; Updates may require DApps to redeploy clients
Ecosystem Centralization Reduced; Facilitates competition and diversity Increased; Favours dominant wallets like MetaMask in Ethereum

Conclusion

The introduction of an on-chain wallet registry on the TON blockchain represents a forward-thinking solution to the challenges of wallet integration faced by DApp developers. By centralizing wallet information in a dynamically queryable registry, the TON ecosystem can foster a more competitive and decentralized wallet landscape, improving user experience and promoting innovation. The proposed registry not only simplifies the integration process for developers but also ensures that users have access to a broad and up-to-date selection of wallet providers, marking a significant step towards a more open and accessible TON ecosystem.