![](https://storage.googleapis.com/papyrus_images/cf1d902fc9add1c94b651de208c05429.jpg)
Whether you are a DeFi developer or a liquidity provider, you will need access to Uniswap v3 liquidity pool data, such as global, pool, and position data, to make well-informed decisions. While there can be several ways to fetch Uniswap data, this article explains the most simplified way of indexing Uniswap data using Traceyeâan innovative, low-code tool for creating subgraphs for Web3 data indexing.
Demystifying UniswapV3 and its liquidity pool
Uniswap v3 is the latest version of non-custodial AMM (automated market maker) implemented on the Ethereum Virtual Machine. Compared to previous iterations of Uniswap protocol, Uniswap V3 offers increased capital efficiency, improved accuracy and accessibility of oracles, more flexibility in fee structure, and fine-tuned control for all liquidity providers. Anyone- individual users, high-frequency trade firms, or investment banks- can become an liquidity provider for Uniswap v3 pool, enabling the protocol to accommodate instant buying, selling, and exchange for the traders.
Uniswap v3 has already introduced a bunch of unique features and it continues to make add-ons over time.
Letâs highlight some of its significant features:
Concentrated liquidity:
Liquidity providers in Uniswap V3 have the flexibility to concentrate their liquidity through âboundingâ within an arbitrary price range. This helps Uniswap improve the poolâs overall capital efficiency while allowing liquidity providers to get approximations for their desired reserve curve and maintain aggregation with the rest of the pool.
Flexible fee model:
Uniswap v3 doesnât lock the swap fee at 0.30%. Instead, the fee tier on each pool is based on initialization. The fee tiers supported at initial stages are 0.05%, 0.30%, and 1%.
Protocol fee governance:
UNI governance has even more flexibility for setting up the fraction of the swap fee that the Uniswap protocol collects as a whole.
![Indexing uniswap data](https://storage.googleapis.com/papyrus_images/0665bc262a52584d1fd79799a1128dfc.png)
Improved price fee oracles:
Uniswap v3 offers powerful price feed oracles that allows users to real-time price accumulator values, which eliminates the need of checkpointing the accumulator value during the beginning and end of the period for which a Time-Weighted Average Price (TWAP) is measured.
5. Liquidity oracle:
Liquidity oracles are integrated with minting contracts, introducing average, time-weighted liquidity to enable users to get comprehensive data such as trading pairs and liquidity-related stats.
Now, letâs brief Traceye
Traceye is a web3 data indexing solution designed to support quick deployment and end-to-end management of custom subgraphs for a comprehensive range of blockchain networks and dApps.
With Traceye, web3 projects and enterprises get the flexibility to deploy shared data indexes and dedicated indexersâ depending on their requirements. All your subgraphs will be deployed and managed on a reliable enterprise-grade infrastructure to ensure their performance and uptime.
How to index and query UniswapV3 Liquidity Pool Data with Traceye?
With Traceye, you have the following two different options to index Uniswap data:
Launch your own UniswapV3 Subgraph.
Fetch data through ready-to-use community subgraphs.
Option:1 Launching your own Subgraph.
If you decide to go with the first option, you need to create a Subgraph and then deploy it to Traceyeâs hosting infrastructure. For this, you need to write a subgraph manifest, get the necessary ABI files from Etherscan, and a GraphQL schema.
Hereâs an example of basic Subgraph manifest for indexing data from Uniswap V3 pools:
specVersion: 0.0.5 |
And, hereâs the example of GraphQL Schema:
type PoolData @entity { |
Once you build the Subgraph, you can go to Traceye and launch your Uniswap v3 Subgraph to start indexing data from its liquidity pool. For a step-by-step process, follow our dedicated guide.
While launching your own Subgraph can have additional benefits, this option may not be suitable for a range of users who seek an easy and simplified method to retrieve Uniswap data. Hence, letâs discuss another way.
Option2: Launch community Subgraph
The community subgraph option offered by Traceye is a means to provide an abstraction layer to the complex and tech-intensive process of creating subgraphs. If you launch Uniswap v3 subgraph with Traceye, it will offer you the following main benefits:
Faster deployment: community subgraphs on Traceye are launched within a few seconds, enabling you to start indexing data immediately from any protocol. For example Uniswap protocol, in our case.
Wider accessibility: community subgraphs are not at all complex, hence developers of all levels can leverage them to fetch relevant data and build sophisticated dApps.
Significantly lower cost: querying data with Traceyeâs community subgraphs requires only $39 per month. This is significantly lower than having a dedicated subgraph.
Improved performance: Hosted on an enterprise-grade, highly optimized infrastructure, your subgraphs escape from performance bottlenecks such as downtime or inefficient queries.
24/7 support: With responsive support, all your queries or subgraph-related issues will be addressed in real-time so that it can not impact the performance.
Now, letâs deploy Uniswap V2 Subgraph with Traceye:
Login to Zeeve and navigate to Traceye located at the left-side panel. Click on âHosted Subgraphsâ. A new dashboard similar to the below will open.
![](https://storage.googleapis.com/papyrus_images/a4d78b1d3e3d4fc932b6bb211ca0250c.png)
Click on âBuy Subscriptionâ to get started with the payment process. Select the number of community subgraphs you need. For example, we are opting for 1 unit as of now. Proceed with Buy Now to complete your payment and activate community subgraph access.
![](https://storage.googleapis.com/papyrus_images/241be7ccc052d53f6fb78368b81ff99f.png)
Upon successful payment, you will see instructions similar to the below screenshot on your dashboard:
![](https://storage.googleapis.com/papyrus_images/0a87aaab87d97eb652a092fc715466c0.png)
From here, you can start setting up your community subgraph. Again, navigate to âHosted Subgraphsâ under Traceye and click âAdd Subgraphâ. A drop-down menu will open, allowing you to create new, import existing, and launch community subgraphs. Click on âLaunch Communityâ to see the community subgraphs currently supported on Traceye.
![](https://storage.googleapis.com/papyrus_images/0f42009c7256a5dda84ce5b2675bfe66.png)
As you can see, Uniswap-V3 is available for Polygon, Optimism, and Ethereum on Traceye. Whichever is your preferred option, select that and click on âActivateâ. Upon this, your Uniswap will be deployed instantly.
![](https://storage.googleapis.com/papyrus_images/b2e69a77180d79272ec5f917a3e7d7b3.png)
Now, you will be redirected to a dashboard where you can check the details of your subgraph, such as Sync Status, creation date, total requests made, total API units consumed, workspace type, and Query URL.
![](https://storage.googleapis.com/papyrus_images/73d969e66e39c414d36029084a426315.png)
From the same dashboard, you can check logs, entities, add-on services like webhooks, and settings.
![](https://storage.googleapis.com/papyrus_images/8c354cbbeb526c9c0f41d928cb52e71c.png)
Now, to index and query Uniswap v3 liquidity pool dataâ you need to click on âopenâ located with the Query URL (visible in the previous screenshot). It will redirect you to a playground environment where you can query Uniswap data.
![](https://storage.googleapis.com/papyrus_images/2ea22ba3fe2f613a29c64dc417927bb9.png)
As you know, you need to define entities for Uniswap v3 liquidity pool to be able to fetch specific data. Within the above playground, if you click on the GraphQL explorer icon on the left panel, it will open a comprehensive list of Uniswap v3 entities, including the pool-specific entities like pool, poolDayData, poolHourData, pools, etc.
![](https://storage.googleapis.com/papyrus_images/98cc4ba67d089263a59b5d7d789467c7.png)
Letâs say you want to fetch data for the first 15 pools. To do this, click on âpoolsâ entity and enter â15â in the âfirstâ subentity. You can increase or decrease the number of pools as required. Also, within the pools data, you have multiple options such as orderby in which you can select order id for the data. For now, letâs move to fetching data for the first 15 pools. We have already entered the details, which are reflected in the GraphQL query.
![](https://storage.googleapis.com/papyrus_images/834c485950131660fd57b82b81f5ffe0.png)
Now, execute the query by clicking on the play button, and data for all the 15 pools will be fetched instantly.
![](https://storage.googleapis.com/papyrus_images/b6a1a10905726bd3cdcf397972add21a.png)
Similarly, you can fetch data for all the other entities available for your Uniswap v3 subgraph. As we can see, indexing and querying the Uniswap v3 subgraph is extremely simple and effortless using Traceyeâs community subgraph. Thatâs because Traceye already keeps bulks of indexed data, allowing subgraphs to fetch any type of data without hassle.
Wrap up!
And with that, our discussion around Indexing and querying Uniswap V3 liquidity pool data reaches the end. This article has been crafted to help dApp developers, web3 projects, and data consumers understand the simplicity and effortless approach of Traceye for indexing Uniswap data. Also, as we discussed, if your application requires a dedicated subgraph, you launch this with Traceye. On top of that, you will get support from Zeeveâs highly experienced web3 developers, who will build custom subgraphs for your project at a lower cost and in significantly reduced time for faster time-to-market.
If you want more information on Traceye or Zeeveâs blockchain services, connect with our experts. Send your queries via mail or schedule a one-on-one call for detailed discussion.
![Zeeve logo](/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fpapyrus_images%2F2ac15cc3731a36514ed6598e67c8808a.png&w=384&q=75)