Pull Data from Compound V3 Easily with Traceye’s Community Subgraph
Tags: subgraphs
Published: 2024-03-27 07:07:53

<p>Web3 developers and innovators heavily rely on subgraphs to query blockchain data back and forth from a range of networks. If you are a DeFi developer or an enterprise focused on DeFi, you might need to access data from Compound V3 protocol as it has emerged as a popular and highly interactive DeFi lending platform. Through this article, we are highlighting the Compound V3 Subgraph offering of Traceye, an exclusive data indexing solution. We will discuss the end-to-end process of pulling data from the Compound V3 protocol using Traceye’s community subgraphs. Let’s start off.</p>
<figure class="wp-block-image aligncenter size-large"><a href="https://app.zeeve.io/auth/signup"><img src="https://www.zeeve.io/wp-content/uploads/2024/03/Use-blockchains-scalable-and-most-reliable-RPC-Nodes-1024x213.png" alt="Compound V3 Subgraph" class="wp-image-63406"/></a></figure>
<h2 class="wp-block-heading" id="h-understanding-compound-v3-protocol">Understanding compound V3 Protocol</h2>
<p>Compound III, or version 3, is the latest version of the Compound Finance protocol launched back in 2018. This platform introduced a novel idea of user-to-protocol collateralized lending &amp; borrowing. Compound V3 is an EVM-compatible protocol that facilitates supply of crypto assets as collateral, allowing the users to borrow base assets against them.&nbsp;</p>
<p>Compound III has a significant focus on maintaining reliable security, and it offers the following unique features:</p>
<ul><!-- wp:list-item -->
<li>A thoroughly revamped risk management or liquidation engine to ensure greater safety of funds while enabling a more borrower-friendly ecosystem.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Imposing market-wide limits for individual collateral assets’ size to reduce risks.&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Decoupling of interest rate models for both earning and borrowing. Now, governance has complete control of economic policy.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>More powerful account management tools are designed to enable improved UX patterns and applications to build on top of the compound protocol.&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Chainlink now enables exclusive price feeds, which is seamlessly portable to diverse EVM chains beyond just Ethereum.&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Governance has become simple and easy to manage as the protocol works as a monolith having parameters set via a single Configurator contract.&nbsp;</li>
<!-- /wp:list-item --></ul>
<h2 class="wp-block-heading" id="h-overview-of-traceye-s-compound-v3-subgraph-nbsp-nbsp">Overview of Traceye’s compound V3 Subgraph&nbsp;&nbsp;</h2>
<p>Compound V3 Ethereum Subgraph is one among the multiple subgraphs indexed by Traceye to make it available for queries via its community subgraph offering. Using the Compound V3 subgraph, web3 developers can seamlessly access all the compound III protocol’s on-chain data into their applications, for example– flash loans data, events, borrows, deposits, etc. <a href="https://www.zeeve.io/subgraphs/">Traceye</a> indexes bulks of Compound V3 protocol’s data through the implementation of GraphQL schema, manifest, ABI files, and other crucial components running in the backend. It allows users to simply query and pull data for their relevant entity. Following is a snapshot of its core benefits:</p>
<p><strong>&gt;One-click subgraph activation: </strong>With Traceye’s community subgraphs, you enjoy one-click activation for all the supported subgraphs, for example- Compound V3 Subgraph in our case.&nbsp;</p>
<p><strong>&gt;Zero complexity:</strong> As community subgraphs do not involve subgraph programming or deployment, anyone with or without technical expertise can pull data using it.&nbsp;</p>
<p><strong>&gt;Affordable subscription plan</strong>: Traceye’s community subgraphs require only $39 per month for data queries. This is an ideal option for projects that do not want a dedicated subgraph or do not require sophisticated web3 data.&nbsp;</p>
<p><strong>&gt;24/7 monitoring &amp; support:</strong> To ensure uptime and performance of all your subgraphs, Traceye offers 24/7 monitoring of your subgraphs. All the logs are presented on the dashboard right away and real-time alerts are produced if anything goes wrong.</p>
<h2 class="wp-block-heading" id="h-how-to-pull-data-from-compound-v3-protocol-with-traceye-s-community-subgraphs">How to Pull data from Compound V3 protocol with Traceye’s community Subgraphs?</h2>
<p>As discussed, the community Subgraph offering by Traceye provides the most simple and reliable way to query data from compound V3 protocol. Community subgraph, as the name says, is shared across various data consumers where everyone can simultaneously query data at ultra-fast speed and significantly lower data lag issues.</p>
<p>Note that, Traceye also allows projects to launch their dedicated subgraphs. First, they need to create their subgraph, for example– writing the manifest and creating GraphQL schema using the subgraph studio. After that, they can launch the subgraph on Traceye for effortless management and scaling.&nbsp;</p>
<p>Need more information on launching Subgraph with Traceye? Refer to the article linked below for a step-by-step guide on: <a href="https://www.zeeve.io/blog/how-to-deploy-subgraphs-on-zeeve-step-by-step-guide/"><strong>How to deploy Subgraphs with Zeeve’s Traceye?&nbsp;</strong></a></p>
<p>Now, let’s discuss how to pull compound V3 data using Traceye’s community compound V3 subgraph.&nbsp;</p>
<p><strong>Step:1</strong> Login to the Zeeve platform if you already have an account. Or else, complete the signup first. Navigate to the ‘Traceye’ located in the dashboard’s left panel and proceed with Hosted Subgraphs. A new dashboard will appear with the Add Subgraph option.</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ix4zgcotauyfgfcv4gm.png)
<p><strong>Step:2</strong> Click on Add subgraph and select ‘Launch Community’ option from the drop-down menu. A list of community subgraphs will now appear, including Compound V3 Ethereum.</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2ppnuc0zw91pvc0aluj.png)
<p><strong>Step:3</strong> For activation, you first need to buy a subscription for this subgraph.&nbsp; Click on ‘Buy Subscription’ that you can see in the above screenshot. This will open a dedicated payment page. Select the quantity of community subgraph you need and proceed ‘Buy Now’.&nbsp;</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03nkswu4lxao4xv75lcy.png)
<p><strong>Step:4</strong> Once you complete the payment, again navigate to the hosted subgraph under Traceye → Add Subgraph → Launch community to activate Compound V3 Ethereum subgraph from here.&nbsp;</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b469ia59bj644o31j9c6.png)
<p>Immediately after you click Activate, a new page will appear showing details about your&nbsp; Compound V3 Ethereum subgraph, such as sync status, total requests, API units consumed, date of subgraph creation, network-type (mainnet or testnet), workspace, and Query URL.&nbsp;</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/puqlgxketq0rtv08bxpe.png)
<p><strong>Step:5</strong> Now, to pull data from Compound V3 protocol, click on the ‘Open’ option provided with the Query URL (shown in the above screenshot). It will redirect you to the GraphQL playground environment where you query a variety of data from Compound V3 protocol.&nbsp;</p>
<p><strong>Step:6</strong> As you may already know, you need to define specific entities for which you want to pull data. Within the GraphQL playground, click on the GraphQL explorer’s icon to see a comprehensive list of entities available to pull data from. Like you can see, there are meta, accounts, borrow, fees, events, etc.</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ulswe77x8vna5xdfubed.png)
<p><strong>Step:7</strong> Let’s say you want to deposit data for the first 10 IDs. To fetch this data, click ‘deposits’ entity and enter ‘10’ in the ‘first’ sub-entity. Plus, enter ‘id’ the orderby sub entity. You have the flexibility to increase or decrease the number of IDS or you can change the values in the orderby. Additional customization are also there, such as orderDirection, skip, account, accountActor, and so on. For this tutorial, let’s simply focus on fetching deposits data about the first 10 IDs. We’ve already the details, and hence the changes have reflected in the query schema.&nbsp;</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3izorjzthll8y10z6peo.png)
<p>Immediately after you click the play button, the data for all 10 IDs will be available on your screen. And, here we are done. As you can see, Traceye’s community subgraphs have made it extremely easy to pull data from Compound V3 Ethereum subgraphs. The same level of ease you will experience while fetching data from the rest of the Traceye-supported subgraphs.</p>
<h2 class="wp-block-heading" id="h-subgraph-monitoring-and-management-nbsp">Subgraph monitoring and management&nbsp;</h2>
<p>Apart from one-click subgraph activation, Traceye’s community subgraphs are optimized to offer aggressive monitoring and management of all your subgraphs. From the subgraph details page, you can check logs on multiple parameters like Info, Debug, Warning, and Error. For each parameter, you will get specific logs. This will keep you updated about the performance of subgraphs in real-time, ensuring there’s no downtime or other performance-related issues.&nbsp;</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ixodpydo8815r6u1yap.png)
<h2 class="wp-block-heading" id="h-wrap-up-section">Wrap-up section</h2>
<p>That's done! Our discussion on fetching data from Compound V3 protocol has reached its end. The motive of crafting this how-to article is to explain the importance and simplicity of Traceye's community subgraphs to web3 developers and data consumers. It doesn't involve a complex process of programming subgraphs, customization, or deployment. However, you can anytime opt for Traceye's other services, which are dedicated indexer setup and the creation of custom subgraphs from scratch, depending on your specific data needs.</p>
<p>For more information on Traceye or Zeeve's blockchain-related services, <a href="https://www.zeeve.io/talk-to-an-expert/">connect with our experts</a>. Send all your queries via mail or schedule a one-on-one call if you want a detailed discussion.</p>