Brian Berman - The Graph: Decentralized Data, web3 APIs, and Use Cases

ETH Latam Talks · 18 Aug 2022 · 20:22

Brian Berman introduces The Graph, the decentralized protocol for indexing and querying blockchain data, and walks through web3 APIs and use cases for developers. The talk was given at ETHLatam in Buenos Aires in August 2022 and shows how applications can read onchain data without running their own indexing infrastructure.

Speakers

Topics

From ETH Latam Talks, hosted by ETH Latam.

Transcript

[Music] hello athlete man they couldn't have picked a better city for this conference regime if you're your first time in buenos aires it's my first time while you're here make sure you have a medialuna just don't call it a croissant they don't like it when you do that my name is brian berman and i work at edunode which is a core developer contributing to the graph i'm here to talk to you about my journey into web3 how i found my niche with decentralized apis with the graph and why decentralized why

decentralization should matter to you so i used to have a career in media i worked in the media industry for eight years and i really enjoyed it to me was really important i thought it was so important to share information and truth with the world and i really enjoyed it i enjoyed it for the longest time especially towards the end of my media career where i got to work in entertainment journalism that was really fun because i got to interview actors directors go to red carpet movie premieres it was awesome a personal highlight of mine uh i got to interview the cast of spongebob and fun fact tom kenney the voice actor for spongebob love spongebob memes so

keep them coming um but it was a lot of fun and i really enjoyed it it was a lot of fun until it wasn't uh two years ago a little thing happened right 2020 absolute dumpster fire of a year uh it it really sucked right um during my deepest cove despair of 2020 i wasn't going anywhere i wasn't interviewing anyone i was stuck at home reflecting on society and i like many of us were scared i um i thought i could turn to the media for answers and i was met with disappointment division ignorance and fear were

abundant and i realized that there was something terribly wrong with the state of the media industry during the biggest global pandemic of our lifetime i found that i wasn't able to rely on the media to find truth and information what i found instead was a dark intricate web that wasn't driven by truth but by greed of monopolies it was a big wake-up call and what you're looking at right here is not a blockchain this is the anti-blockchain of centralization questionable incentives and closed-door decision-making the total opposite of an open and free

blockchain you're looking at the biggest media entities in the world and they're eating up all the other guys all the other media entities the big blue circles represent six giants in media that are just buying everybody else up and you know throughout the pandemic i kept reading variations of the same headline another network another channel another website another newspaper was being acquired by a larger company and these are just a couple examples this just barely scratches the surface of the biggest acquisitions and the biggest names for the tunes of billions of dollars

and i'm not a fan of monopolies across the board but it felt particularly wrong to see monopolization in the media i mean that's that's just a source of power that should not fall into any centralized hands it could be easily abused so this is our reality uh disney amazon 18t own a majority of the world's media almost everything you watch read and see is being owned by less and less companies with more and more influence and what's worse is these companies have no incentive to provide the truth uh in fact their incentive is to make

money and how do you make money well you get more views on your content how do you get more views well you make things sound more exciting or outrageous or agitating than they really are so you get outraged pieces you get clickbait you get disinformation it makes them rich and you ignorant finding trustworthy verifiable information became really difficult in this time and i became really disillusioned i mean what happened to the early dream of the internet what we call web one what happened to the dream of a decentralized pool of many diverse voices that could contribute to the pool

of truth and information monopolistic gatekeepers like these turn that dream into a nightmare and this is a nightmare i had to leave i had to get out i had to get out and work in something i believed in and i was looking everywhere and everywhere i ran into the same problems of centralization um i couldn't find the right values i mean i saw this everywhere in every industry but eventually i did find one small community that really aligned with me that really

got my values i found you i found the ethereum community ethereum showed me that you can have transparency and truth in this future of the internet in web 3. um the blockchain don't lie right i fell in love with how collaborative ethereum is focusing on the user creating abundance reshaping global institutions for the better not creating more monopolies but as i became more familiar with ethereum i then had to find what was really important to me so coming from the media industry i thought that this technology could do a better job at disseminating truth and

information i realized i really wanted to zero in on open data in the ecosystem i left media because i was tired of misinformation rage clicks division i disagreed with the manipulation of information i really thought that open data should be a public good easily accessible and secured by decentralization when you're in ethereum and you're looking at the blockchain you don't have fake news my beef with the media's anti-blockchain was solved by the blockchain in

all its open and transparent glory but the blockchain is messy finding the data that you need is difficult and a lot of companies try to do it themselves or try to build centralized indexing nodes and quite often they find that it's expensive inefficient and slow i thought there had to be a better way so the blockchain has all the raw ingredients to solve a lot of the qualms that i had with the media industry but it's not really organized enough to create great user experiences in this new form of the internet

um after all the blockchain is optimized to write data not read it so i had to find my niche and as with anyone who builds in ethereum i eventually found the graph and i knew i was in good hands so what is the graph and how does it work sorry uh what's the graph let me dial back for a minute so i've been working at edunode the initial team behind the graph for about a year now uh we're working on the graph in a decentralized way with seven other teams and here's how i like to explain what the graph does so

this is the blockchain this is the blockchain in its raw form uh looking for information in the blockchain is like looking for a needle in a haystack it's easy to get overwhelmed by raw data even if you used a block explorer it's still not easy raise your hand if you've ever been down an etherscan rabbit hole right clicking through transaction trying to follow it a to z i mean it's exhausting almost as bad as the wikipedia rabbit hole that kept me up last night but if we want to have decentralized applications or dapps that have snappy front-end user interfaces that are really a joy to interact with

if we want great user experiences we have to organize blockchain data and that's where the graph comes in the graph takes this mess of blockchain data and turns it into this neat little piles of delicious organized data and you can use it for many different use cases this all works because of a key technology in the graph called subgraphs sub graphs are decentralized open source apis that allow you to query blockchain data if you're using a subgraph you can define a couple of things you can say i need this specific blockchain data organized this specific way

and serve to me the specific way and because they're open source anyone can publish a subgraph or query or fork an existing one to build their own projects so subgraphs sit at the indexing and query layer of the web3 stack i assume many of you are developers right and if you're trying to pull information from the blockchain and create a great application you don't want to waste your time sorting through data you want to create a really good experience you want to focus on your ui and your time is valuable you can't waste it sorting through candy

on the blockchain you want to make an amazing user experience and that's why you want to use subgraphs because you might be approaching it from many different angles everyone needs a little different slice of the blockchain when they're building web3 applications uh and if you look at it sequentially block by block you're going to end up with a lot of irrelevant data so what subgraphs do is take that data and organize it into neat little buckets of just the data you need for your dab so i want to take a moment to uh show a more like technical explanation of how subgraphs work uh like real gigabrain stuff over here

uh so yeah that's that's it in action this is what goes through there sorting it i mean you get the idea what you need is easy to find thanks to subgraphs so subgroups have a lot of use cases you can build any dap you want because you're we're all accessing the same blockchain we just need to access it in a different way whether you're building an nft project working in d5 creating defy analytics even exploring new forms of media like music with audios or streaming with live peer hundreds of dapps use the graphs decentralized network and that means there are hundreds of subgraphs that you

can get to work with right now they're already out there they're open source you don't have to start and build one from scratch you can use one that already exists and i want to walk through a couple of use cases that people have created that are powered by subgraphs so one that i like to go through is called east side each sign is like a decentralized docusign you can send pdfs contracts to an ethereum address and you can sign those contracts with your ethereum address the way each sign uses a subgraph is they track the history of the blockchain of state changes right as events are

emitted by their smart contract they can create a summary of how each pdf each contract has changed who's opened it who's forwarded it who's signed it that's all recorded on the blockchain and they can reconstruct all that information really easily and quickly using a subgraph and it creates a lightning fast experience and it saves them a lot of guys too another example nfts this is an nft collection called nifty league it's actually an nft gated gaming platform so the way they use subgraphs is first they authenticate whether or not you own the nft in this collection

that's one way once you open up the the actual dap another thing that sub graphs power for not only nifty league but tons of other dapps is really fast search and filter features so if you want to integrate like a search bar up there and you want to make it really easy to sort through a lot of information that you're showing your user you can use sub graphs and it makes it lightning fast and you can add filtering features too there's defy implications too you can build defy analytics with beautiful charts graphs and you can create a dashboard of just information you need right so this is a capital dex it's tracking information from curio's

automated market maker they're tracking your c20 tokens trading pairs trading volume you can display this data in an easy to see way really quickly and beautifully thanks to subgraphs again focusing on the ui and creating great user experiences and so the graph is useful for a variety of use cases and it'll stay that way because it's decentralized the graph is powered by thousands of participants all over the world it's a stark contrast to the six media giants i showed you earlier and a big reason i'm i really love contributing to this ecosystem

um indexers run indexing nodes around the world and they actually process information that subgraphs are organizing uh curators identify which subgraphs are really useful and delegators stake with indexers to secure and decentralize the network delegators and curators don't even have to run a node to contribute it's a community that's open to everyone the graphs decentralized data economy keeps access to the blockchain keeps access to blockchain data robust secure and reliable in my immediate career i was worried about centralized powers controlling information

uh all over the world um i found the antidote in the ethereum community and i found my home with the graph but i want to make sure that web3 doesn't repeat the mistakes of centralization that we've seen in web 2. so why does my journey matter to you well again you're most likely building dapps you're interested in building out ethereum you really think this web 3 thing is going to change the world uh a bold cause but in order for it to work we have to make sure we don't repeat the mistakes of centralization in web 2.

here's what i like to show a lot this is go to killedbygoogle.com if you want to see a graveyard of every project google has ever shut down over 270 of them to date i mean i used to love using google hangouts and they just shut off support for that dead next month um google chrome apps was really useful to people for a long time dead last month uh i mean that it was a live for 11 years but google can just pull the plug any time it wants in twitter we've seen we've seen how shutting down apis and key features of apis can really hurt people hundreds of people built entire businesses and communities off of

twitter's api a couple years ago they killed a bunch of or most of the most useful features of that api and when jack dorsey wised up to web3 he called it the worst thing twitter ever did facebook's guilty too uh how many of you guys remember vine i miss vine a lot um and when facebook was trying to build out instagram mark zuckerberg personally wrote a message and said shut down the integration with vine vine was using facebook's api to make it easier for folks to find their friends and add their friends i mean they're your friends right you should be able to see who you can

connect with but in mark zuckerberg's eyes they're facebook's friends not yours tic-toc's not the same by the way even in web 3 we've seen reflections on centralization earlier this year moxie marlin spike founder of signal uh played around with web3 and he published a piece called um my first impressions of web3 and he was shocked that there wasn't all that much uh decentralization um a lot of folks building in web3 were relying on centralized apis and centralized infrastructure but if you're if you've built your business your

dream using centralized apis well i've got news for you whoever runs that api at any moment in time can just shut you down just like that why should anyone be able to flip the light switch on your dab on your dream on your business on any app this is why we need decentralization this is why web3 needs the graph the graph puts the d in depth and by that i mean your dap isn't decentralized unless it's running on decentralized infrastructure

and decentralized apis i want to encourage you all to get involved in the graph ecosystem the eight core developer teams are hiring uh you can join with a permissionless job on the graph network contributing to decentralization uh there is an advocates program and you can get involved in various community roles so i encourage you guys to scan this and check out different ways to keep in touch with us and even apply to a couple of jobs working at edge and node contributing to the graph was my first web3 job and it's completely changed my life and all the qualms and issues and frustrations i had with the media

industry were solved by ethereum and the graph and i couldn't be more grateful for this community so thank you so much [Applause] [Music] [Applause] [Music]