The Graph, why it exists, and why it forever will.
Tags: GraphQL, Web3, Ethereum, Blockchain, The Graph

There used to be a time when blockchains were simply “transaction ledgers”, where the entire goal of cryptocurrency was providing a means to transact and exchange value through agreed upon tokens. But then Ethereum came, and the portal to an entirely new paradigm was opened : “A transaction is data, any data.” Since then, the power of this paradigm has clearly been reflected in Ethereum’s value, but fast-forward a few years, and the real value lies in the ecosystem that has flourished on its blockchain.

Today, The Graph finally introduces this missing piece, by opening the portal to the usage of these “data transactions”. Developers were extremely limited when trying to build things based on Ethereum transactions, as any sort of “history” required going through all transactions of a smart contract since birth, extracting data from each one, and storing the relevant datum yourself. In addition to this, each new transaction has to go through this “pre-processing”, so you’d have to re-do all of these operations with each new transaction on the contract you’re watching (or even multiple ones in most real world use-cases…). With subgraphs, all of this is done for you. As a developer, all you have to do is plug into this structured & indexed data by hundreds of indexers that provide stability and uptime to the network (by storing an archive of the entire Ethereum blockchain and processing every block to serve you only the relevant information you’ll need through a GraphQL endpoint), at a cost which is competitive by design, because as more people use the same subgraph, it generates more fees, and as long as they can offset server costs, indexers will accept lower query fees, saving YOU; the developer; the cost of setting up such a solution on your own.

Now, to answer the question : What next? How do I see this technology evolving in the future?

I personally think this “structured blockchain” is something a lot more powerful than it lets on. Not only to Web3, but to the entire DeFi ecosystem. For Web3 the potential is fairly obvious, based on projects like Everest, which is an “on-chain project index”, you could similarly build an on-chain “twitter”, or “reddit”, etc.. You could build Crypto utility tools like Zapper.fi, token tracking and aggregation tools like Coingecko, etc..

Everest, an on-chain project registry

But this isn’t something new, these things already exist. What in my opinion is revolutionary, is that the availability of this data can change the way we think about accessing blockchains. Knowing that this sort of data is now easily available, Solidity developers can now start to think completely out of the box, this marriage between UI and smart-contract is only made stronger: They will no longer have to worry about the accessibility of the on-chain data to them, no matter the complexity of this smart-contract, they WILL bend this data through a subgraph, effectively embedding TheGraph as a new cornerstone of the entire stack of a “blockchain developer”.

In fact, why stop there? Through solutions like Chainlink, we can create things that would have absolutely never been possible before : Imagine a self-aware smart-contract, a smart-contract that can fetch the list of every own token holder, with a simple oracle request rather than an impossibly gas-expensive transaction. Imagine a smart-contract that can fetch structured data from different chains, simply through a subgraph. The sheer power of these examples in my opinion is something that will open up an entirely new “DeFi”.

Especially with the inevitable rise of cross-chain solutions (“CroFi”? you heard it here first!), since The Graph is inherently chain-agnostic, as long as it manages to keep up with the upcoming chains, I think it can become much more than just a “data indexing” mechanism, it becomes a reverse oracle, a bridge, and basically a swiss-army knife of providing data on the fly from every chain, to every chain.