The Graph

Nick Sawinyh on 06 Oct 2020

Yaniv talks about how The Graph Protocol is helping to make building on Web3 accessible to anyone.

Hello! What’s your background, and what are you working on?

My name is Yaniv Tal, the Co-Founder and Project Lead of The Graph.

After Co-Founding a web startup, I became passionate about application development and making it easier for people to build apps. I started focusing my career on developer tools. I worked at MuleSoft which makes API developer tools for enterprise and started a React developer tools startup with my co-founders Brandon and Jannis to make it easier to build user interfaces. I was interested in Bitcoin and the idea of decentralization back in college but it was really when Ethereum started taking off that I knew I had to get involved.

My Co-Founders and I saw first hand how difficult it was to build applications on Ethereum, and that is why we built The Graph.

The Graph is an indexing protocol for querying data from blockchains and storage networks. Developers build and publish open APIs, called subgraphs, that applications can query using GraphQL. There is a hosted service in production that makes it easy for developers to get started building on The Graph and the decentralized network will be launching later this year. The Graph currently supports indexing data from Ethereum, PoA, and IPFS, with more networks coming soon. To date, over 2,300 subgraphs have been deployed by thousands of developers for applications like Uniswap, Synthetix, Aragon, AAVE, Gnosis, Balancer, Livepeer, DAOstack, AAVE, Decentraland and many others.

What’s The Graph backstory?

At our last startup, the Co-Founders and I started building dApps on Ethereum and realized there wasn’t a decentralized way to index and query data. dApps need a way to get and transform data from underlying data sources. IPFS provides cheap storage and Ethereum enables atomic transactions but data is rarely stored in a format you can consume directly in your applications. It was difficult to get data to power web or mobile apps directly from an Ethereum node. dApp developers were having to reinvent the wheel for each use case and build a custom backend to handle data processing for their dApps. The situation was similar to the beginning of the internet when people were building their own servers in C++. We decided to focus our efforts there and on helping to make building on Web3 accessible to anyone - and that’s how we started The Graph.

What went into building The Graph?

We have been working on The Graph for almost three years. During this period, the market cooled off and many speculators left the space, but teams like ours that were truly committed to the vision of Web3 and decentralization kept building. Strategically, we decided to build a hosted service first in order to bootstrap demand for the network before fully decentralizing. This allowed us to get a product in users’ hands right away, and as a result, we could test, iterate, and add key features based on their feedback. It also allowed us to stabilize the codebase and put it through its paces as we were powering live production environments for large projects. In June of 2020, we hit over a billion queries in a month as DeFi traffic grew exponentially. By August we were doing over 4 billion. On a parallel track, we were designing and developing the decentralized network.

Early on, we decided to build the node in Rust over Go, and we were very satisfied with our decision. Rust has a more reliable type system, doesn’t suffer from memory management and garbage collection issues, and creates super fast rock solid executables. We also standardized on AssemblyScript for our mappings which compile to a WASM runtime. WASM has emerged as a standard for safely running user-defined code in a safe way with high performance. Data is stored in a PostgresDB, but we’d love the community to work on a next generation database in the future.

What’s your business model?

The Graph is an open marketplace and doesn’t collect fees for itself. GRT is a work token model. There are two types of stakers. Indexers stake GRT in order to perform work and collect fees in the network. They’re incentivized to stake tokens in proportion to the fees they collect in the network in order to maximize profits. Curators signal GRT in order to tell Indexers which subgraphs to index and to tell dApp developers which API’s to use.

Developer costs in The Graph ecosystem are incurred as query fees. Query fees are the cost per query that is paid by the developer/dApp that’s querying the subgraph, and earned by indexers and curators who process the queries and curate the subgraph being queried. Any user can subsidize the query fees for a specific subgraph or dApps will be rate-limited and will pay for their specific queries.

Costs on The Graph differ significantly from Web2 costs where developers would have to pay a server, cloud or database provider (eg. AWS) and incur the cost of engineers building and maintaining servers.

What are your goals for the future?

The Testnet launched late July. We saw an influx of node operators register and over 200 have successfully deployed Graph Nodes. We want to build and nurture our community of 3rd party Indexers who will be replacing our hosted service. After that, we will be launching the decentralized network.

The Graph’s mission is to make serverless applications possible and to make building on Web3 accessible to anyone. We believe that decentralization is going to radically reshape how humans cooperate and organize and that these tools of empowerment will help more people find their place in this world and contribute their best selves.

What are your future thoughts for the DeFi market?

DeFi is a radical movement that will reshape large parts of the economy. Smart contracts on blockchains enable arbitrarily large groups of people to quickly trust each other and engage in financial transactions without needing to have prior trust, brand, or expending capital on legal protections. I think that in 10 years the majority of technologically active people will have a large part of their networth in crypto assets, using their economic power to grow and help shape things that are important to them.

Where can we go to learn more?

DeFi is coming. Don't get left behind

About the author
Nick Sawinyh
Nick Sawinyh is a crypto entrepreneur based in LA. He founded DeFiprime in 2019 to offer information on emerging DeFi ecosystem. He owns small amounts of different cryptocurrencies.

The Latest: