Executive Summary

XX Wallet, a leading Web3 multi-chain platform, faced significant challenges in scaling its data infrastructure, managing multiple databases, and ensuring real-time data processing. To address these issues, they implemented TiDB, a distributed database solution. This transformation simplified their architecture, reduced operational complexity by 60%, and improved data querying capabilities, enabling faster processing of large datasets. TiDB’s scalability ensured that XX Wallet could handle growing volumes of users and data without performance degradation. 

Overall, the implementation resulted in more efficient operations, enhanced real-time analytics, and a seamless user experience, positioning XX Wallet for continued growth.


Company Overview

XX Wallet is a leading multi-chain Web3 platform offering wallet services, Swap, NFT Market, DApp Browser, and Launchpad functionality across 100+ public chains. By aggregating top DEXes and NFT markets, XX Wallet delivers optimal trading prices, supporting a secure and convenient user experience. 

As one of the largest decentralized wallets in Asia, XX Wallet has an extensive NFT Market, boasting over 220,000 collections and $40+ million in trading volume across the BNB Chain and Polygon. Its user-friendly features empower users to interact seamlessly with decentralized applications and digital assets, making Web3 more accessible.

Challenge: Scalability, Query Performance, and Agility in Asset Management

XX Wallet set out to create a robust, multi-chain asset management platform with real-time data tracking. Initially, they used AWS Aurora (for MySQL and PostgreSQL) alongside MongoDB to store and manage on-chain asset data. These databases also powered querying and value-added services for users.

However, they faced several challenges:

  • Scalability: With the rapid increase in Web3 data and user numbers, the existing databases struggled to scale effectively.
  • Data Querying Capability: When dealing with large volumes of Web3 data, Amazon Aurora’s performance in querying large datasets was not ideal. A system capable of processing extensive data queries quickly and accurately was critical.
  • Complex Technology Stack: Using different database solutions to store various types of data increased the cost of data management.
  • Agility: During rapid business growth, maintaining multiple databases with the existing setup compromised business agility and required adaptations at the database level, leading to inconsistencies and inefficiencies in development.
  • Data Flow Timeliness: Originally, data analysis and processing relied on big data technology stacks, which delayed the data flow to business operations, affecting timeliness.

Solution

XX Wallet implemented TiDB, a next-generation distributed database, to address these challenges by streamlining real-time data processing, enhancing scalability, and simplifying architecture.

  • High Throughput Writing: TiDB enables real-time on-chain data recording and transformation into address balance data. XX Wallet achieved a 100K write throughput during testing after scaling to 3 TiDB nodes and 6 TiKV nodes, accommodating large-scale data requirements.
  • Efficient Business Migration: XX Wallet seamlessly migrated data to TiDB using a dual-write method, completing the process within two weeks with minimal application-side changes. Adjustments to primary keys ensured smooth data migration and prevented writing hotspots.

Results

XX Wallet leverages TiDB to store on-chain asset data, significantly reducing data management costs, a simplified technology stack, and improved operational efficiency. The key benefits include:

  • Streamlined Architecture: By consolidating multiple databases (Aurora for MySQL, PostgreSQL, and MongoDB) into a single TiDB instance, operational complexity and costs were reduced, lowering management expenses by 60%.
  • Enhanced Computing Power: TiDB’s distributed computing pushdown capability efficiently executes large-scale SQL queries, delivering fast and accurate computation results to meet business demands.
  • HTAP Capability: TiDB’s HTAP (Hybrid Transactional/Analytical Processing) functionality supports both OLTP (Online Transaction Processing) and OLAP (Online Analytical Processing) within a single cluster. This has shortened the data processing cycle from T+1 to T+0, enabling real-time analytics and expanding data exploration possibilities.
  • Rapid Scalability: TiDB’s horizontal scaling ensures that XX Wallet can quickly expand to handle increasing data and user volumes without sacrificing performance, supporting the company’s growth needs.

Conclusion

By implementing TiDB, XX Wallet has streamlined its data storage architecture, significantly lowering operational and development costs. TiDB’s real-time analytics provide users with faster, more accessible insights. Moreover, its elastic scalability ensures that the underlying infrastructure remains robust and reliable as the business grows, consistently delivering a seamless user experience.

Elevate modern apps with TiDB.

Book a Demo