SlideShare a Scribd company logo
1 of 34
Graph Protocol
for accessing information about
blockchains and dApps
By Gene Leybzon
9/2/2021
What is THE Graph?
The Graph (GRT) seeks to facilitate the seamless exchange of data between
blockchains and applications. The platform is among the first decentralized indexing
and querying software available in the market
The Graph is the indexing and query layer of the
decentralized web. Developers build and publish open APIs,
called subgraphs, that applications can query using
GraphQL. The Graph currently supports indexing data from
Ethereum, IPFS, and PoA with more networks coming soon.
To date, over 10,000 subgraphs have been deployed by
~16,000 developers for applications, such as Uniswap,
Synthetix, Aragon, Gnosis, Balancer, Livepeer, DAOstack,
AAVE, Decentraland, and many others.
The Graph is a query protocol for blockchain data
using GraphQL
Q: What problem(s) solved by the
GRAPH?
Traditional way
• https://etherscan.io/
The Blockchain Way
• https://thegraph.com/explorer
A: Access to Blockchain Data
Vocabulary
•Graph is a decentralized protocol for indexing and querying data
from blockchains
Graph
•A subgraph defines which data The Graph will index from Ethereum,
and how it will store it. Once deployed, it will form a part of a global
graph of blockchain data.
Subgraph
•GraphQL is a query language for your API, and a server-side runtime
for executing queries using a type system you define for your data.
GraphQL isn't tied to any specific database or storage engine and is
instead backed by your existing code and data.
GraphQL
•Graph (GRT) coin is the native token of the network. Its main use is
coordinating the work on The Graph. GRT is an ERC20 token.
GRT Coin
Graph QL
Graph Fetching Data with Queries
{ allPersons { name } }
{ "allPersons": [ { "name": "Johnny" }, { "name": "Sarah" }, { "name": "Alice" } ] }
{ allPersons { name age } }
{ allPersons(last: 2) { name } }
Delivering data to CONSUMERS
Who is using graph?
DeFi makes up 57% of queried
subgraphs. Meanwhile, 11% of subgraphs serve NFT
marketplaces, arts, and gaming. 7% of subgraphs are
related to cross-chain use cases like synthetic bitcoin
and protocol bridges, signifying an increase in
interoperability between dapps
1 Billion Monthly Queries
10,000+ cryptocurrencies
10% of Google Search Request
GRT Token
The Graph Foundation
The Graph Foundation oversees The Graph Network. The
Graph Foundation is overseen by the Technical Council.
Edge & Node is one of the many organizations within The
Graph ecosystem.
Represent: Indexers, Users, Researchers, Backers and Initial Team
Grants
1. The Graph Foundation Operations
2. Grants and Ecosystem Funding
3. Protocol Upgrades
4. Protocol Parameterization
5. Emergency Protocol Operations
HOW THE GRAPH
WORKS?
BIG PICTURE
ROLES AND RESPONSIBILITIES
Consumer
•End-users of The Graph that query subgraphs and pay query fees
Developer
•Create subgraph
Indexer
•Index Data & Serve Queries
•Run Nodes
•Earn query fee
Curator
•Assess and signal Indexers on the subgraphs that should be indexed
•Deposit GRP into bounding curve
•10% of all query fees goes to the Curators
Delegator
•Delegating GRT to Indexers
•Earn a portion of query fees and indexing
Tools
Graph Explorer
Subgraph Studio
Playground
Graph Explorer 1
Graph Explorer 2
Subgraph Studio
Playground
ACCESSING THE
GRAPH
Demo time
Query with API
1. Get API KEY
https://thegraph.com/studio/apikeys/
2. Get Query URL
https://gateway.thegraph.com/api/{KEY}/subgraphs/id/0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0
Query from Graph Explorer
From the code with a library
Apollo client https://www.apollographql.com/docs/
URQL https://formidable.com/open-source/urql/
From code with Assemblyscript API
Demo
Query Sushi (Mainnet Exchange)
Explorer
Available Entry Types
User
Bundle
Factory
HourData
DayData
Token
TokenHourData
TokenDayData
Pair
PairHourData
PairDayData
LiquidityPosition
LiquidityPositionSnapshot
Transaction
Mint
Some users and some tokens
Query Response
{
users(first: 5) {
id
liquidityPositions {
id
}
}
tokens(first: 5) {
symbol
name
}
}
"data": {
"tokens": [
{
"name": "Chi Gastoken by 1inch",
"symbol": "CHI"
},
{
"name": "TrueUSD",
"symbol": "TUSD"
},
{
"name": "Tokenlon",
"symbol": "LON"
},
….
Low volume pairs
Query Response
{
pairs(orderBy: volumeUSD,
orderDirection: asc, first: 5) {
id
name
totalSupply
}
}
{
"data": {
"pairs": [
{
"id":
"0x00040a7ebfc9f6fbce4d23bd66b79a603ba1c323
",
"name": "TUSD-Xi",
"totalSupply": "0"
},
{
"id":
"0x0013df4ec514d5839ad4f535e4987498ebb58bf5
",
"name": "ORANGE-WETH",
High volume pairs
Query Response
{
pairs(orderBy: volumeUSD,
orderDirection: desc, first: 10) {
id
name
volumeUSD
totalSupply
}
}
{
"data": {
"pairs": [
{
"id":
"0x397ff1542f962076d0bfe58ea045ffa2d347aca0"
,
"name": "USDC-WETH",
"totalSupply": "2.566388461708481722",
"volumeUSD":
"19215716701.97130473095498336638286"
},
{
"id":
"0xc3d03e4f041fd4cd388c549ee2a29a9e5075882f
",
Latest Transactions
Query Response
{
transactions(first: 3, orderBy: timestamp,
orderDirection:desc) {
id
blockNumber
timestamp
}
}
{
"data": {
"transactions": [
{
"blockNumber": "13143929",
"id":
"0xfa1b36a1b05b9581e419d1d653599a6687cf83e
64ba59a04026852e11ec197d8",
"timestamp": "1630553981"
},
{
"blockNumber": "13143929",
"id":
"0x3a4edefc1cf38e5d818afdb504b748798fecde8c1
5e6d599067c87d5f5925b98",
"timestamp": "1630553981"
Latest Transactions
Query Response
{
transactions(first: 30, orderBy:
timestamp, orderDirection:desc) {
id
blockNumber
timestamp
swaps {
id
pair{
token0 {
name
}
token1 {
name
}
{
"data": {
"transactions": [
{
"blockNumber": "13143959",
"burns": [],
"id":
"0x0a41938b670043db07c022e3f5c7e53183242a4
f5e110653fcb75f97147c1f37",
"swaps": [
{
"amountUSD":
"7317.440460051526149065106622302379",
"id":
"0x0a41938b670043db07c022e3f5c7e53183242a4
f5e110653fcb75f97147c1f37-0",
Questions?
Stay in Touch
Gene Leybzon https://www.linkedin.com/in/leybzon/
https://www.meetup.com/members/9074420/
https://www.leybzon.com

More Related Content

Similar to Graph protocol for accessing information about blockchains and d apps

Neo4j Database and Graph Platform Overview
Neo4j Database and Graph Platform OverviewNeo4j Database and Graph Platform Overview
Neo4j Database and Graph Platform OverviewNeo4j
 
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j
 
Algorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandAlgorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandTinaBregovi
 
10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About 10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About Jesus Rodriguez
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCTim Burks
 
Real-World, Open Source, End-to-End JavaScript in IoT
Real-World, Open Source, End-to-End JavaScript in IoTReal-World, Open Source, End-to-End JavaScript in IoT
Real-World, Open Source, End-to-End JavaScript in IoTAll Things Open
 
How has netflix embraced graph ql for rapid application development
How has netflix embraced graph ql for rapid application developmentHow has netflix embraced graph ql for rapid application development
How has netflix embraced graph ql for rapid application developmentjenniferCarnel1
 
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...Altinity Ltd
 
GraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewGraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewNeo4j
 
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j
 
Leveraging Graphs for Better AI
Leveraging Graphs for Better AILeveraging Graphs for Better AI
Leveraging Graphs for Better AINeo4j
 
Monitoring federation open stack infrastructure
Monitoring federation open stack infrastructureMonitoring federation open stack infrastructure
Monitoring federation open stack infrastructureFernando Lopez Aguilar
 
Making Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxMaking Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxTrayan Iliev
 
OGCE TeraGrid 2010 Science Gateway Tutorial Intro
OGCE TeraGrid 2010 Science Gateway Tutorial IntroOGCE TeraGrid 2010 Science Gateway Tutorial Intro
OGCE TeraGrid 2010 Science Gateway Tutorial Intromarpierc
 
Full Stack Graph in the Cloud
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the CloudNeo4j
 
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)Jason Dai
 
REST API Graph API GraphQL GraphiQL Presentation
REST API Graph API  GraphQL GraphiQL Presentation REST API Graph API  GraphQL GraphiQL Presentation
REST API Graph API GraphQL GraphiQL Presentation Atharva Jawalkar
 
Introduction to Nebula Graph, an Open-Source Distributed Graph Database
Introduction to Nebula Graph, an Open-Source Distributed Graph DatabaseIntroduction to Nebula Graph, an Open-Source Distributed Graph Database
Introduction to Nebula Graph, an Open-Source Distributed Graph DatabaseNebula Graph
 

Similar to Graph protocol for accessing information about blockchains and d apps (20)

Neo4j Database and Graph Platform Overview
Neo4j Database and Graph Platform OverviewNeo4j Database and Graph Platform Overview
Neo4j Database and Graph Platform Overview
 
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
 
Algorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandAlgorand Educate: Intro to Algorand
Algorand Educate: Intro to Algorand
 
10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About 10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
Real-World, Open Source, End-to-End JavaScript in IoT
Real-World, Open Source, End-to-End JavaScript in IoTReal-World, Open Source, End-to-End JavaScript in IoT
Real-World, Open Source, End-to-End JavaScript in IoT
 
How has netflix embraced graph ql for rapid application development
How has netflix embraced graph ql for rapid application developmentHow has netflix embraced graph ql for rapid application development
How has netflix embraced graph ql for rapid application development
 
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
 
GraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewGraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform Overview
 
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
 
Leveraging Graphs for Better AI
Leveraging Graphs for Better AILeveraging Graphs for Better AI
Leveraging Graphs for Better AI
 
Monitoring federation open stack infrastructure
Monitoring federation open stack infrastructureMonitoring federation open stack infrastructure
Monitoring federation open stack infrastructure
 
Opentracing 101
Opentracing 101Opentracing 101
Opentracing 101
 
Making Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxMaking Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFlux
 
OGCE TeraGrid 2010 Science Gateway Tutorial Intro
OGCE TeraGrid 2010 Science Gateway Tutorial IntroOGCE TeraGrid 2010 Science Gateway Tutorial Intro
OGCE TeraGrid 2010 Science Gateway Tutorial Intro
 
Full Stack Graph in the Cloud
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the Cloud
 
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
 
REST API Graph API GraphQL GraphiQL Presentation
REST API Graph API  GraphQL GraphiQL Presentation REST API Graph API  GraphQL GraphiQL Presentation
REST API Graph API GraphQL GraphiQL Presentation
 
Dev Ops Training
Dev Ops TrainingDev Ops Training
Dev Ops Training
 
Introduction to Nebula Graph, an Open-Source Distributed Graph Database
Introduction to Nebula Graph, an Open-Source Distributed Graph DatabaseIntroduction to Nebula Graph, an Open-Source Distributed Graph Database
Introduction to Nebula Graph, an Open-Source Distributed Graph Database
 

More from Gene Leybzon

Generative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlowGenerative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlowGene Leybzon
 
Generative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second SessionGenerative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second SessionGene Leybzon
 
Generative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First SessionGenerative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First SessionGene Leybzon
 
Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Gene Leybzon
 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxGene Leybzon
 
Ethereum in Enterprise.pptx
Ethereum in Enterprise.pptxEthereum in Enterprise.pptx
Ethereum in Enterprise.pptxGene Leybzon
 
ERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptxERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptxGene Leybzon
 
Onchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptxOnchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptxGene Leybzon
 
Onchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptxOnchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptxGene Leybzon
 
Web3 File Storage Options
Web3 File Storage OptionsWeb3 File Storage Options
Web3 File Storage OptionsGene Leybzon
 
Web3 Full Stack Development
Web3 Full Stack DevelopmentWeb3 Full Stack Development
Web3 Full Stack DevelopmentGene Leybzon
 
Instantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standardInstantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standardGene Leybzon
 
Non-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceNon-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceGene Leybzon
 
The Art of non-fungible tokens
The Art of non-fungible tokensThe Art of non-fungible tokens
The Art of non-fungible tokensGene Leybzon
 
Substrate Framework
Substrate FrameworkSubstrate Framework
Substrate FrameworkGene Leybzon
 
OpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainOpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainGene Leybzon
 
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of BlockchainsChainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of BlockchainsGene Leybzon
 

More from Gene Leybzon (20)

Generative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlowGenerative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlow
 
Chat GPTs
Chat GPTsChat GPTs
Chat GPTs
 
Generative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second SessionGenerative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second Session
 
Generative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First SessionGenerative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First Session
 
Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Non-fungible tokens (nfts)
Non-fungible tokens (nfts)
 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptx
 
Ethereum in Enterprise.pptx
Ethereum in Enterprise.pptxEthereum in Enterprise.pptx
Ethereum in Enterprise.pptx
 
ERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptxERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptx
 
Onchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptxOnchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptx
 
Onchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptxOnchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptx
 
Web3 File Storage Options
Web3 File Storage OptionsWeb3 File Storage Options
Web3 File Storage Options
 
Web3 Full Stack Development
Web3 Full Stack DevelopmentWeb3 Full Stack Development
Web3 Full Stack Development
 
Instantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standardInstantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standard
 
Non-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceNon-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplace
 
The Art of non-fungible tokens
The Art of non-fungible tokensThe Art of non-fungible tokens
The Art of non-fungible tokens
 
Substrate Framework
Substrate FrameworkSubstrate Framework
Substrate Framework
 
Chainlink
ChainlinkChainlink
Chainlink
 
OpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainOpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chain
 
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of BlockchainsChainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
 
Dex and Uniswap
Dex and UniswapDex and Uniswap
Dex and Uniswap
 

Recently uploaded

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Graph protocol for accessing information about blockchains and d apps

  • 1. Graph Protocol for accessing information about blockchains and dApps By Gene Leybzon 9/2/2021
  • 2. What is THE Graph? The Graph (GRT) seeks to facilitate the seamless exchange of data between blockchains and applications. The platform is among the first decentralized indexing and querying software available in the market The Graph is the indexing and query layer of the decentralized web. Developers build and publish open APIs, called subgraphs, that applications can query using GraphQL. The Graph currently supports indexing data from Ethereum, IPFS, and PoA with more networks coming soon. To date, over 10,000 subgraphs have been deployed by ~16,000 developers for applications, such as Uniswap, Synthetix, Aragon, Gnosis, Balancer, Livepeer, DAOstack, AAVE, Decentraland, and many others. The Graph is a query protocol for blockchain data using GraphQL
  • 3. Q: What problem(s) solved by the GRAPH? Traditional way • https://etherscan.io/ The Blockchain Way • https://thegraph.com/explorer A: Access to Blockchain Data
  • 4. Vocabulary •Graph is a decentralized protocol for indexing and querying data from blockchains Graph •A subgraph defines which data The Graph will index from Ethereum, and how it will store it. Once deployed, it will form a part of a global graph of blockchain data. Subgraph •GraphQL is a query language for your API, and a server-side runtime for executing queries using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data. GraphQL •Graph (GRT) coin is the native token of the network. Its main use is coordinating the work on The Graph. GRT is an ERC20 token. GRT Coin
  • 6. Graph Fetching Data with Queries { allPersons { name } } { "allPersons": [ { "name": "Johnny" }, { "name": "Sarah" }, { "name": "Alice" } ] } { allPersons { name age } } { allPersons(last: 2) { name } }
  • 7. Delivering data to CONSUMERS
  • 8. Who is using graph? DeFi makes up 57% of queried subgraphs. Meanwhile, 11% of subgraphs serve NFT marketplaces, arts, and gaming. 7% of subgraphs are related to cross-chain use cases like synthetic bitcoin and protocol bridges, signifying an increase in interoperability between dapps
  • 9. 1 Billion Monthly Queries 10,000+ cryptocurrencies 10% of Google Search Request
  • 11. The Graph Foundation The Graph Foundation oversees The Graph Network. The Graph Foundation is overseen by the Technical Council. Edge & Node is one of the many organizations within The Graph ecosystem. Represent: Indexers, Users, Researchers, Backers and Initial Team Grants 1. The Graph Foundation Operations 2. Grants and Ecosystem Funding 3. Protocol Upgrades 4. Protocol Parameterization 5. Emergency Protocol Operations
  • 14. ROLES AND RESPONSIBILITIES Consumer •End-users of The Graph that query subgraphs and pay query fees Developer •Create subgraph Indexer •Index Data & Serve Queries •Run Nodes •Earn query fee Curator •Assess and signal Indexers on the subgraphs that should be indexed •Deposit GRP into bounding curve •10% of all query fees goes to the Curators Delegator •Delegating GRT to Indexers •Earn a portion of query fees and indexing
  • 21. Query with API 1. Get API KEY https://thegraph.com/studio/apikeys/ 2. Get Query URL https://gateway.thegraph.com/api/{KEY}/subgraphs/id/0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0
  • 22. Query from Graph Explorer
  • 23. From the code with a library Apollo client https://www.apollographql.com/docs/ URQL https://formidable.com/open-source/urql/
  • 24. From code with Assemblyscript API
  • 28. Some users and some tokens Query Response { users(first: 5) { id liquidityPositions { id } } tokens(first: 5) { symbol name } } "data": { "tokens": [ { "name": "Chi Gastoken by 1inch", "symbol": "CHI" }, { "name": "TrueUSD", "symbol": "TUSD" }, { "name": "Tokenlon", "symbol": "LON" }, ….
  • 29. Low volume pairs Query Response { pairs(orderBy: volumeUSD, orderDirection: asc, first: 5) { id name totalSupply } } { "data": { "pairs": [ { "id": "0x00040a7ebfc9f6fbce4d23bd66b79a603ba1c323 ", "name": "TUSD-Xi", "totalSupply": "0" }, { "id": "0x0013df4ec514d5839ad4f535e4987498ebb58bf5 ", "name": "ORANGE-WETH",
  • 30. High volume pairs Query Response { pairs(orderBy: volumeUSD, orderDirection: desc, first: 10) { id name volumeUSD totalSupply } } { "data": { "pairs": [ { "id": "0x397ff1542f962076d0bfe58ea045ffa2d347aca0" , "name": "USDC-WETH", "totalSupply": "2.566388461708481722", "volumeUSD": "19215716701.97130473095498336638286" }, { "id": "0xc3d03e4f041fd4cd388c549ee2a29a9e5075882f ",
  • 31. Latest Transactions Query Response { transactions(first: 3, orderBy: timestamp, orderDirection:desc) { id blockNumber timestamp } } { "data": { "transactions": [ { "blockNumber": "13143929", "id": "0xfa1b36a1b05b9581e419d1d653599a6687cf83e 64ba59a04026852e11ec197d8", "timestamp": "1630553981" }, { "blockNumber": "13143929", "id": "0x3a4edefc1cf38e5d818afdb504b748798fecde8c1 5e6d599067c87d5f5925b98", "timestamp": "1630553981"
  • 32. Latest Transactions Query Response { transactions(first: 30, orderBy: timestamp, orderDirection:desc) { id blockNumber timestamp swaps { id pair{ token0 { name } token1 { name } { "data": { "transactions": [ { "blockNumber": "13143959", "burns": [], "id": "0x0a41938b670043db07c022e3f5c7e53183242a4 f5e110653fcb75f97147c1f37", "swaps": [ { "amountUSD": "7317.440460051526149065106622302379", "id": "0x0a41938b670043db07c022e3f5c7e53183242a4 f5e110653fcb75f97147c1f37-0",
  • 34. Stay in Touch Gene Leybzon https://www.linkedin.com/in/leybzon/ https://www.meetup.com/members/9074420/ https://www.leybzon.com

Editor's Notes

  1. https://thegraph.com/blog/one-billion-monthly-queries
  2. https://etherscan.io/ https://thegraph.com/explorersubgraph?id=0x3c3cab03c83e48e2e773ef5fc86f52ad2b15a5b0-0&view=Playground
  3. https://graphql.org/ https://www.howtographql.com/basics/3-big-picture/
  4. https://www.howtographql.com/basics/2-core-concepts/ type Query { ... } type Mutation { ... } type Subscription { ... }
  5. https://thegraph.com/
  6. https://thegraph.com/blog/one-billion-monthly-queries
  7. https://thegraph.com/blog/one-billion-monthly-queries
  8. https://coinmarketcap.com/currencies/the-graph/
  9. https://thegraph.com/blog/announcing-the-graph-foundation https://www.notion.so/The-Graph-Foundation-e822e66d7b614fdd899a647f5db51a68 https://streamingfastio.medium.com/the-graph-foundation-awards-60-million-grant-to-streamingfast-to-join-the-graph-as-a-core-e36be45f8d49 Indexers, Users, Researchers, Backers and Initial Team
  10. https://www.securities.io/investing-in-the-graph-grt-everything-you-need-to-know/
  11. https://thegraph.com/docs/about/introduction
  12. There were more than 2K Curators from over 90 different countries and over 170 Indexers from more than 50 countries in The Graph’s testnet. The Graph community is globally distributed, with over 4,500 GRT holders from more than 99 different countries world-wide. Delegation can happen by anyone who holds GRT. Today, there are over 5K Delegators on The Graph Network.
  13. https://www.securities.io/investing-in-the-graph-grt-everything-you-need-to-know/
  14. https://thegraph.com/explorer/
  15. https://thegraph.com/explorer/profile?id=0x981528a11acef6b0b5020cc7a0c7f83f11ca8db1&view=Overview
  16. https://thegraph.com/studio/
  17. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground pairs(first: 5) { id name totalSupply } { dayDatas(first: 5) { id txCount factory { id volumeUSD } } } pairs(orderBy: totalSupply, orderDirection: asc, first: 5) { id name totalSupply } { pairs(orderBy: volumeUSD, orderDirection: desc, skip: 10) { id name totalSupply volumeUSD } } pairs(where:{id: "0x34d7d7aaf50ad4944b70b320acb24c95fa2def7c"}) { id name totalSupply volumeUSD } { tokenDayDatas(orderBy: volumeUSD, orderDirection: desc) { id date token{ id symbol } volumeUSD priceUSD } }
  18. https://thegraph.com/docs/developer/assemblyscript-api
  19. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground
  20. https://thegraph.com/docs/developer/assemblyscript-api
  21. https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Overview
  22. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground
  23. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground
  24. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground
  25. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground
  26. https://thegraph.com/explorersubgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground