Coast - Fiat On Ramp To PulseChain

PulseChain SubGraph Deep Dive


This deep dive into the subgraph infrastructure used by PulseChain is designed to provide Pulsechain users with a clear understanding of data indexing, which is crucial for the functionality and scalability of decentralized applications (dApps) on Pulsechain. This article will cover the core principles of PoS, the role of subgraphs in the PulseChain ecosystem, and how they support efficient, scalable, and user-friendly dApps.

Understanding Proof of Stake (PoS)

Proof of Stake (PoS) is a consensus mechanism used by certain blockchains to validate transactions and create new blocks. Unlike its predecessor, Proof of Work (PoW), which requires computational work to mine blocks, PoS selects validators based on the number of tokens they hold and are willing to “stake” as collateral. This method is seen as more energy-efficient and scalable, with validators being rewarded with transaction fees or new tokens for their service to the network.

Key attributes of PoS include:

  • Energy Efficiency: PoS consumes significantly less power than PoW, addressing one of the major criticisms of cryptocurrencies like Bitcoin.
  • Scalability: PoS networks can potentially process transactions faster than PoW, making them more scalable.
  • Security: Although different, PoS provides robust security mechanisms, where the stake acts as a deterrent against malicious behavior.

The Role of Subgraphs

Subgraphs are essentially open APIs that allow developers to query specific data from the Ethereum blockchain (and other compatible blockchains) efficiently. They are created using The Graph Protocol, which indexes blockchain data into easily accessible formats. This makes subgraphs invaluable for dApps that require real-time data from the blockchain but don’t have the resources to index and manage this data themselves.

Key features of subgraphs include:

  • Custom Queries: Developers can define specific events, entities, and relationships within their smart contracts that the subgraph will index, allowing for highly efficient data queries.
  • Decentralization: Subgraphs operate within a decentralized network, ensuring that the data remains open and censorship-resistant.
  • Scalability: By offloading the heavy lifting of data indexing and querying to subgraphs, dApps can scale more effectively without compromising on performance.

Proof of Stake & Subgraph Synergy

In the context of Pulsechain, subgraphs play a crucial role in enhancing the overall ecosystem. Here’s how:

  • Staking and Validator Data: Subgraphs can index data related to staking pools, validator performance, and reward distribution, making it easier for users and dApps to make informed decisions about where to stake their tokens.
  • Governance: Many PoS blockchains include governance mechanisms that allow token holders to vote on proposals. Subgraphs can index these proposals, votes, and outcomes, providing transparent access to governance actions.
  • Delegation: Subgraphs can track delegation actions, where token holders delegate their stake to validators. This includes tracking the history of delegations, the amount staked, and the returns generated over time.
  • Network Health: By indexing data related to block production, transaction throughput, and validator uptime, subgraphs can provide insights into the health and efficiency of the PoS network.

Who runs PulseChain’s Subgraphs?

Subgraphs are primarily deployed and run by a variety of participants in the Web3 ecosystem, each playing a critical role in the development, maintenance, and usage of these tools. The operation of subgraphs involves several key types of participants:

Developers and Project Teams

The primary creators and users of subgraphs are developers and project teams who are building decentralized applications (dApps) on blockchain platforms. These developers design subgraphs to index and query the data their applications need from PulseChain in an efficient and scalable way. They define the schema for the data they want to index, the events that trigger data indexing, and write the mappings that process and format this data for their dApps.

Node Operators and Indexers

Once a subgraph is defined, it needs to be hosted on a node that runs the Graph Node software (in the context of The Graph protocol, which is a prominent platform for running subgraphs). These nodes, operated by indexers, are responsible for ingesting blockchain data, processing it according to the subgraph definitions, and serving queries against the indexed data. Indexers are typically incentivized through query fees or network tokens, making it a potentially profitable endeavor for those with the necessary resources and expertise to operate nodes at scale.

The Graph Protocol Participants

For subgraphs that utilize The Graph protocol, there are several roles within the ecosystem:

  • Indexers: Individuals or entities that run nodes, indexing data from blockchains and serving queries.
  • Curators: Stakeholders who signal on subgraphs they believe to be of high quality and utility, helping to organize data in The Graph network and ensure that the most useful subgraphs are prioritized for indexing.
  • Delegators: Token holders who may not run a node themselves but delegate their tokens to indexers, contributing to the security of the network and earning a portion of query fees in return.

Data Consumers

While not running the subgraphs themselves, data consumers are an essential part of the ecosystem. These can be dApp users, other dApps, or analytics platforms that query subgraphs for blockchain data. Their usage patterns and demands can influence which subgraphs are developed and prioritized for indexing. 

Community and Open-Source Contributors

In many cases, especially within open-source projects and community-driven initiatives, volunteers or community members contribute to the development and maintenance of subgraphs. These contributions range from adding new features, fixing bugs, updating subgraph schemas in response to smart contract updates, or even running nodes to support the network.

Service Providers

Some companies and organizations specialize in providing subgraph development and hosting services for projects that prefer not to manage their infrastructure. These service providers can help with everything from subgraph creation and optimization to running high-availability nodes that ensure reliable data access for dApps.

What about Coast?

Coast does not run a custom Subgraph for Pulsechain. Our fiat onramp to Pulsechain does not currently require this level of indexing as the vast majority of our data is not stored on-chain. 

What happens if nobody runs Subgraphs for Pulsechain?

The lack of subgraphs in PulseChain has the potential to create significant challenges affecting both developers and users. Subgraphs, in the context of blockchain, are particularly associated with The Graph protocol, which indexes blockchain data to make it easily accessible and queryable via GraphQL. This indexing and querying capability is crucial for decentralized applications (dApps) to efficiently retrieve the data they need from the blockchain. Here are some of the implications of not having subgraphs:

  1. Reduced Query Efficiency: Without subgraphs, dApps would have to query raw blockchain data directly, which can be inefficient and slow. Blockchains are not optimized for complex queries, which can lead to increased load times for applications and a poor user experience.
  2. Increased Development Complexity: Developers would need to implement their own indexing mechanisms or query and process all data on-the-fly, which is significantly more complex and resource-intensive. This could slow down the development process and increase the cost of building and maintaining dApps.
  3. Scalability Issues: As a dApp grows, the volume of data it needs to process can become vast. Without an efficient way to query this data, the application might face scalability issues, struggling to serve its user base effectively.
  4. Data Accessibility and Interoperability Challenges: Subgraphs make it easier for developers to access and use blockchain data in a standardized way. Without them, there could be more fragmentation in how data is accessed and used across different applications, leading to interoperability challenges.
  5. Potential for Increased Costs: Implementing custom data indexing and query solutions can be costly. Not only does it require more development effort, but it also can lead to increased operational costs, such as the need for more powerful servers to handle the data processing workload.
  6. Limitations on Analytics and Insights: Subgraphs facilitate complex queries that can be used for analytics and gaining insights into blockchain transactions and trends. Without them, it would be harder for developers and analysts to extract meaningful information, limiting the potential for optimizations and improvements in dApps.
  7. Impacts on User Experience: Ultimately, the technical implications boil down to user experience. If a dApp cannot efficiently query the data it needs, users might experience slow load times, limited functionality, or even errors, which can deter adoption and usage.

How are PulseChain’s SubGraph providers compensated?

Subgraph providers, particularly in the context of The Graph protocol, are compensated through a combination of fees and network incentives designed to ensure the decentralized and efficient functioning of the network. Here’s how the compensation mechanisms typically work:

Query Fees

Subgraph providers, known as Indexers in The Graph ecosystem, earn query fees for serving data queries to users. When a decentralized application (dApp) or an end-user queries a subgraph for data, the Indexer that processes and responds to the query can charge a fee. These fees are usually paid in the native cryptocurrency of the network or in the specific tokens of the protocol (e.g., GRT in The Graph). The cost per query can vary based on the complexity of the query, the demand for the data, and the agreement terms set by the Indexer.

Indexing Rewards

In addition to query fees, Indexers may also earn indexing rewards. These rewards are distributed by the network to incentivize the indexing of data on the blockchain. In The Graph, these rewards come from the network’s inflationary token mechanism, where new tokens are minted and distributed to participants who contribute to the network’s security and efficiency. The amount of indexing rewards an Indexer receives can depend on factors such as the amount of stake they have in the network (their own tokens plus any delegated to them) and their performance in terms of accurately and efficiently serving data.


Delegators are token holders who do not run their own Indexer nodes but wish to participate in the network by delegating their tokens to an Indexer. Delegators earn a portion of the query fees and indexing rewards earned by the Indexer they delegate to. This mechanism incentivizes the delegation of tokens to Indexers who contribute positively to the network, thus securing and scaling the network’s data indexing and query processing capabilities.

Curator Signal

Curators play a role in signaling which subgraphs are of high quality and should be prioritized for indexing. Curators stake tokens on subgraphs they believe are valuable, and this “signal” helps direct Indexers to prioritize certain subgraphs. While Curators primarily influence the network rather than provide indexing services directly, they can earn a portion of query fees generated from the subgraphs they signal on, based on the protocols of specific networks like The Graph.

Economic Dynamics

The compensation for running subgraphs is designed to create a self-sustaining economic model where the interests of all participants are aligned towards the growth and health of the network. Indexers are incentivized to provide high-quality, efficient data access; Delegators support the best Indexers; and Curators help ensure that the most useful and high-quality subgraphs are indexed and available.

These mechanisms encourage the ongoing development, maintenance, and operation of subgraphs, ensuring that the PulseChain remains robust, decentralized, and capable of serving the needs of a growing number of dApps and users in the Web3 space.

Need more info on PulseChain’s Subgraphs?

If you have any subgraph issues on PulseChain, you’re welcome to reach out to our support team.

What's Next?