Description

The existing interface to explore Balancer pools is limited and doesn't clearly convey the important data that should be highlighted in order to better parse the pools. This project is an attempt to present balancer pools in a clearer more parsable way. It also includes a trending list that is generated by calculating how much liquidity has been added to pools in the last 24 hours. The idea being that a trending list can show which pools are growing quickly and perhaps expose good investment opportunities.

Balancer FYI showcase

How it's made

This project is primarily a UI / frontend project built with Vue / Nuxt. The app uses the Balancer subgraph to extract interesting data about pools and asset swaps. The default list of pools is simply ordered by the market cap of the pools combined assets. The trending list is calculated by the following: 1. Fetching the maximum amount of Swaps (for a single query) in the last 24h, which seems to be 1000 (I guess this is a per query limit, I haven’t paginated to get more at this point). 2. After fetching, each swap is serialised with totalIn/totalOut values converted to USD and an amountChange in USD is stored. 3. A list of unique Pool ids from the swaps is generated. 4. The Pools ids are ordered by amount change and only kept if the change is positive, i.e. totalIn is more than totalOut. 5. The list is further reduced to the top 10 amountChange pools. 6. Using the remaining pool ids, a second query is sent to fetch those pools. 7. The returned pools are re-sorted by the amountChange list. The result is a trending list ordered by total volume of liquidity provided to the pool within the last 24h.

Technologies used

EthereumThe Graph