Liquidity pool position analysis (Fees, Rewards, Transaction cost, Impermanent loss, Simulations)
We built a web application that harvests information about Balancer and Uniswap pools and presents them in a sleek format. Our main focus with the project is to compute the returns on liquidity provision as precisely as possible. To achieve that we process historical fee data, returns from yield farming, transaction gas costs, and plenthy of other pool-related statistics.How it's made
The project is built mainly with frontend web technologies (React.js + typescript). To get all the data we are heavily relying on thegraph.com. To speed up our requests we are using the Marlin cache. The existing subgraphs were not accommodating our needs sufficiently so we have created 2 of our own. The first one is a fork of the official uniswap-v2 subgraph: https://github.com/Uniswap/uniswap-v2-subgraph/pull/46 https://thegraph.com/explorer/subgraph/benesjan/uniswap-v2 and the other we was built from scratch: https://github.com/croco-finance/dex-rewards-subgraph https://thegraph.com/explorer/subgraph/benesjan/dex-rewards-subgraph The dex rewards subgraph allows us to easily get the data about returns from yield farming on Balancer and Uniswap. To get the information about the unclaimed rewards on Uniswap we are calling the contract directly using web3 and infura. The most demanding part of the project was to combine the data from various sources to a unified structure. In our project we are also using Portis and ENS to provide our users with more ways how to interact with our application.