DappStats: DApp Ranking Platform with Blockchain Data Collectors
A statistics site for decentralized apps: a front end, a Laravel rewrite and collectors for Ethereum and TRON data
About the project
- Project: DappStats (earlier Dapptrack), a statistics and ranking site for DApps
- Industry: Blockchain data
- Timeline: May 2018 – March 2020
- Technologies: PHP, Laravel, MySQL, Etherscan and Tronscan APIs, cron and queues
- Team: a front-end developer, two backend developers and a project manager
DappStats is a statistics and ranking website for decentralized apps, known as DApps. Visitors compare apps by users, transactions and volume, and DApp owners submit their own apps and buy ad placements. The site began as Dapptrack in 2018 and grew into DappStats in 2019, with a redesign and a second blockchain, TRON.
So the product needed two things that are hard to combine: a fast interface and numbers that people can trust. We worked on it in three stages over almost two years, from the first front end in May 2018 to the last fixes in March 2020.
What we delivered
THE CHALLENGE
- Legacy PHP code without a framework.
- A lost repository and no specification.
- Two blockchains with different APIs.
- Numbers checked against DappRadar.
THE SOLUTION
- A front end built from the client's designs.
- A rewrite on Laravel.
- Collectors for Ethereum and TRON.
- A daily table for unique users.
THE OUTCOME
- A live site since June 2018.
- A public release in September 2019.
- Stable statistics by November 2019.
- More than 1,600 DApps listed.
A ranking site lives on trust: one wrong number, and visitors compare it with a competitor.
Stage one: the front end
In May 2018 the site already ran on plain PHP. The client supplied ready designs, and we built the front end on top of the existing code: header and navigation, a responsive grid, the Top 100 table with sorting, the Submit DApp page, the Global chart page, the single-DApp page and the mobile menu.
The charts needed the most care. We set up the charting libraries and moved the data of single-DApp charts out of hardcoded JavaScript into PHP and the database. In addition, the design showed 8 bars, but the data came per hour, so we agreed with the client to show the last 12 hours. The first version went live on 2 June 2018, and client feedback fixes followed during June.
Stage two: a rewrite on Laravel
By autumn 2018 the legacy code had become hard to support. For this reason, we estimated a rewrite on the Laravel framework, although no specification existed. We derived the scope from the code and from calls with the client.
The backend developer started on 5 November and had the rebuilt site on staging by 16 November. The rewrite brought models, controllers, routes, loading of data for tables and charts, an admin panel with banner settings and a votes feature. Earlier, in October, we had already fixed table sorting by rewriting how the table is filled.
Stage three: collecting the data
In June 2019 the client asked for a "remake" of Dapptrack with a new design and TRON support. We received only a code archive and a database dump, because the old repository had been lost. We deployed the base project, restored the database and rebuilt it step by step in a new repository.
Our part was the backend and the data. Collectors read the Etherscan and Tronscan APIs, run on cron and queues, and write hourly and daily aggregates. The interface, the admin panel and the DApp list parser came from the client's side.
In addition, we researched how TRON users log in with a wallet and passed a working prototype to the front-end developer. The public release of DappStats took place on 5 September 2019. After that, we kept fixing and tuning the numbers until March 2020.
Numbers that match the market
The client compared the site with DappRadar, so every figure had to match. In August 2019 TRON showed 7 to 10 times fewer transactions than DappRadar. As a result, we found two causes: the TRON API throttled requests and returned errors, and some collector runs overlapped.
We reworked the TRON scanner in early September 2019. A full run now took about 20 minutes instead of several hours, thanks to indexes and a clean-up of raw data. We keep 30 days of raw TRON transactions and aggregate the rest.
Unique users were a separate problem. You cannot sum unique users across hours, because the same person appears in many hours. So we added a daily table and used it for the 24-hour and longer periods. By late November 2019 the statistics were stable.
What turned out to be hard
- No history. The old repository was lost, so we rebuilt the project from an archive and a database dump.
- A memory leak. The inherited collector command grew in memory for two weeks, until we rewrote it with parallel requests.
- Rate limits. Etherscan allows about 5 requests per second per key, so a run took about 30 minutes, and we used several keys and proxies.
- Zeros on the front. The site showed zero statistics several times between August and November 2019 because of stopped jobs, API errors and blocked proxies, and we fixed each cause.
- Two blockchains, two units. Volume in TRX and ETH cannot be added together, so the site shows each chain in its own unit.
Result of the project
The first version of the site went live in June 2018, and DappStats launched publicly in September 2019 with Ethereum and TRON. The site listed more than 1,600 DApps by November 2019.
Looking for a similar data product? See our custom web app development or read how we built a marketplace with an interactive map. The collectors read the Etherscan API and the Tronscan API.
Need a platform that collects and ranks blockchain data? Tell us about your task.
SEE MORE OUR CASE STUDIES
Contact us
Please fill out the form, and we will get back to you once your request has been processed.
You can also send your request directly to our email: info@24gen.space
We will respond as soon as possible after receiving your message.



