New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

The Graph Protocol: A Deep Dive - Brandon Ramirez

Ethereum DenverSat, Oct 9, 2021, 12:00 AM

This talk is from ETHDenver & ColoradoJam , the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Learn more: ethdenver.com Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: Brandon Ramirez, The Graph This talk was recorded Friday, February 5th, 2021 ETHDenver 2021’s content themes included DeFi & Money Legos, NFTs & the Creator Economy, ColoradoJam & the Next Frontier of Statehood, Protocols & Interoperability, Open Source & Public Goods, The Ownership Economy & Digital Orgs, Usability Design & Adoption and Legal, Privacy & Identity. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2021 event was February 5-12 and hosted virtually in 2021 with 5000+ blockchain enthusiasts, developers and community members from 80 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/AxFmNdCVnU 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenver/

Transcript

all right so wrapping up this uh wrapping things up we have brenda ramirez from the graph so i'm assuming we're going to talk about subgraphs and things what do we think is that a good guess that's the plan can everyone hear me okay we can hear you perfect perfect let's do it yeah so like you said i'm brandon ramirez i'm one of the co-founders of the graph and i'm a research lead at edge and node and today i want to talk about delegating in the graph and specifically how to get to know the indexers that are participating in the network uh and you know how to choose between them but before we get into that let's do a quick recap of what the graph is just in case anyone on the call is new to the graph the graph is a indexing and query layer that sits on top of block change and storage networks like ipfs and it exposes data to decentralized applications in a way that it can be queried really efficiently so the graph is now powering most of the prominent uh decentralized applications in ethereum uh a bunch of names that you know and love and apps that i'm sure you use all the time if you're you know in the d5 space uh most of those apps today are running on what we call the hosted service so that's kind of been this um you know centralized infrastructure that we've run hosting like open source graph node for the last year and change um and this is so these are some of this growth staffs on the hosted service uh but the next stage of the network you know a milestone actually that we just hit this past december is actually launching the decentralized network so that's always kind of been this vision from the get-go of you know progressive decentralization so we started back in you know july 2018 by open sourcing the graph node you know we did the hosted service we this past summer uh during the peak of covid we did the uh the mission control test net uh and then just this past december we launched the decentralized network uh so since the network's launched uh the main activity in the network has been around staking and delegation so we've already seen almost 2 billion of the graphs at 10 billion uh token supply already staked now those 10 billion aren't liquid right now so these two those two billion are actually quite a large share of what's uh what's circulating and we've seen about 13 million uh grt paid out in indexing rewards and we've seen over 30k grt paid out in query fees and those query fees at this point in the network are more around giving indexers something that they can keep testing and refining their uh their index or software with so it's probably out of the scope of this talk but one of our big focuses for the you know the next few months is migrating over all the apps uh from you know the hosted service to uh you know the decentralized network and there's a lot of work that's kind of going into that right now to make that you know stable and a good experience for uh for those developers uh but in the meantime the main activity is you know this interaction in the marketplace between indexers and delegators and the primary activity of you know indexers is uh sort of uh participating in the mechanics of you know submitting proofs of indexing and collecting indexing rewards for the subgraph that's uh deployed to the network at the moment so in this talk i want to focus on learning a little bit about what those indexing and delegation economics are see how some of that stuff is playing out in the network over the last uh you know few months or month month and change define what makes a good indexer and kind of give you some resources for getting started so let's jump in so i'm not going to cover the whole protocol but just a quick recap is you know the core of the graph is kind of this query marketplace where consumers you know which would be users of decentralized apps uh pay indexers uh query fees in exchange for acquiring specific sub graphs and so sub graphs are these you know data sets there might be one uh there's you know ones for unit swap there's one for synthetics one's for moloch um so you actually have like many smaller very markets you know where indexers are competing to serve queries on a specific data set one of the ways that indexers choose which subgraphs to index in the first place is uh in response to what we call the curation market so we have this role as a curator curators signal graph tokens on specific subgraphs that they think would be valuable for the network uh to index uh in exchange for making good predictions curators earn a share of the query feeds generated by those generated by those subgraphs we call them curator royalties and those that signal that they provide uh on the subgraph actually plays into the incentives that uh affect the the indexers that's that's the only reason i bring it up in the context of of this talk i'm gonna leave this on the screen for a second i'm not gonna walk through all of it but it's just a good it's a good screen to have to go back and pause on on youtube but uh some things i will mention are that delegators and indexers stake into the protocol as a whole that's a pretty important concept and then once a delegator stake delegates stake to an indexer it's up to the indexer to actually allocate that stake towards individual subgraphs and those allocations are where rewards are calculated so the query fees and the indexing rewards that we just mentioned excuse me so the indexing rewards are paid out in proportion to the signal on each subgraph so you we don't need to go into all the symbols here but uh basically you know if you have uh if you're indexing on a subgraph that subgraph signal proportional to the rest of the subgraphs in the network is going to determine what share of indexing rewards the indexers on that subgraph can claim now once you allocate the indexing rewards to that sub graph it's distributed according to proportional stake that's allocated by each indexer on that subgraph so that's kind of this term that you see on the left here is the indexer stake relative to other indexers on a subgraph the term in the middle is the sub subgraphs share of signal relative to total signal that's in the network and then those things are parameterized by the issuance rate so right now for example the graph network has the issuance rate of three percent uh annual uh tokens minted the other major incentive for indexers are uh the query fee rebates so uh the rebate mechanism in order in order to support both civil resistance and economic security requires that indexers i shouldn't say requires it incentivizes indexers to supply stake in rough proportion to the amount of work that they're doing in the network um and we borrow this uh cobb douglas function that's widely known in in economics and was first introduced as far as i'm aware into like kind of the blockchain space for the 0x protocol rebates um but the effect that it has is that indexers are they earn a greater share of their query fees back as rebates when they successfully allocate stake in proportion to their uh their share of fees so that's kind of the that's the decision problem that indexers have to solve here now all of this i'm kind of showing these these are like uh snapshots of you know a function but obviously these things are playing out over time so the way that the protocol is set up is that we break uh the protocol rewards down into uh epochs so epochs are basically discrete units of protocol time uh right now they're parameterized such that one epoch is about 24 hours and then allocations that end on the same epoch are grouped for the purpose of these rewards calculations so like all allocations that end on uh you know like epoch 3 they're going to be in the same pool of rebates in the same pool of index and rewards as far as the calculations are concerned allocations are basically like the duration in which like an indexer allocate stake towards a specific subgraph and that can last up to 28 days um we haven't seen most allocations go as long as 28 days most indexers choose to collect their rewards sooner but we've you know we kind of have that high upper bound if you know ethereum gas prices uh you know continue to shoot up then indexers can choose to wait longer to kind of submit on-chain transactions to uh collect their rewards but the economic incentives are the same regardless if they if they close their allocations sooner rather than later so how do delegators fit into this uh well first of all delegated stake is not slashed so the purpose of delegated stake is to support uh civil resistance um but it's not to support uh economic security in the sense of it being something that's slashable for an index or fault and the reason for that is mainly that we didn't want to require too much trust between the delegator and the indexer role we kind of want you to be able to go off um you know publicly available signals that wouldn't um that wouldn't require you to have like a trust relationship which could which could be centralizing uh uh you know towards a specific indexer that has enough resources to create you know a large brand and a large awareness so that's the main reason that delegated stake is not slashed um delegated stake in the protocol economics what it does for the indexer is all those functions that i just showed for the query few rebates and the indexer rewards that's actually that allocated stake that's in those formulas that comes from the combination of the indexer's own stake and the delegated stake to that indexer so delegators actually give indexers they're basically lending indexers state that they can use for the purpose of participating effectively in the network according to the incentives defined by those reward functions because delegated stake is not slashed it's important that there is a delegation capacity this kind of limits the amount of stake proportionally in the network that is not slashable it guarantees that indexers are still supplying some amount of their own stake that is slashable for faults that they might commit in the protocol right now the delegation capacity is set at a 16 to 1 ratio of the indexer's own stake so for each grt that an indexer stakes themselves they can productively accept 16 grt and productively it's kind of a key word there i'll get to that in a later slide but uh i'll just make a note of that for now um and the last thing i'll say is because delegators uh because indexers rather can allocate stake for up to 28 days uh delegators also have a 28-day unbonding period that prevents delegators from basically unbonding rebounding to another indexer and then have their delegated stake be double counted towards multiple overlapping allocations uh so delegation parameters are what determines how much of an indexing reward how much of an indexers query fees and indexing rewards are actually shared with a delegator as commissions so we have these parameters called indexing index or reward cut query fee cut that's the part that the indexer keeps for themselves and these things can be updated freely by the indexer according to a parameter cooldown and right now there's no protocol minimum parameter cooldown so this is something that indexers can opt into to basically signal to delegators that this is a more stable option so they could say you know set attractive parameters and set a long longer cooldown and that kind of gives delegators confidence that uh that this index is not gonna uh rug pool so to speak so i'd mentioned before the delegation capacity uh indexers can become over delegated so just because there's a capacity it doesn't mean that the indexer can't continue to receive delegation uh it's just that that additional delegation can't be used productively so the indexer won't have that extra delegation available to allocate furthermore that over delegation will dilute the rewards earned by the existing delegators the goal with over delegation is to provide a market signal to the indexer that their parameters are probably too attractive or that they should supply some more of their own stake so it's kind of a market signal to the indexer that they should kind of take one of two actions if you saw a indexer that's over delegated for the long term that's probably an indication that they're not managing their stake effectively so let's look at some of the activity that we've seen in the market so far one thing that's kind of interesting right off the bat is just to see the the ratio of participation that we've seen in the protocol um so we've seen about uh currently we're at about 423 million grt staked by indexers and we're about 1.53 billion grt staked by delegators and you see that we're actually quite a bit below on average we're quite a bit below that 16 to one uh delegation ratio so that was actually something that was kind of surprising to us you know we set that ratio based on some calculations around you know who we expected to index versus who we expected to delegate um and it turned out some of the groups of token holders that we were expecting to delegate actually ended up being active indexers and so that kind of threw off the uh the dynamics a little bit in in favor in this case in favor of delegators because now there's all this uh additional capacity that is kind of going unused it's kind of a delegator's it's kind of a delegator's market so to speak uh and you can kind of see that playing out in the share of rewards so of the rewards that have paid out in the network so far uh 13 million have gone to uh indexers 22 million have gone to delegators so uh that's about 63 percent of the rewards have actually been going to delegators rather than to rather than to indexers so again you can kind of see that market dynamic of the delegators currently having a little bit more market power when it comes to influencing how indexers set their parameters and forcing indexers to compete and set attractive parameters to attract that limited amount of proportional delegation uh here we can see the the indexing reward cut this chart definitely hides some stuff and that's kind of hard to show in a succinct view but we've been kind of seeing this bimodal distribution of indexing reward cuts you know we've seen a a grouping that's kind of towards the upper range closer to like 80 90 percent and then we've kind of seen another grouping uh that's closer to like the 10 to 20 percent um some caveats here is that some of these indexers that are at different parts of this range are at different or varying degrees of over delegation so even though this is like the reward cut that that you're seeing in like the histogram this is like what they've set um some of the effective rewards or commissions being earned by delegators are a little bit different than would be indicated by this um but it's been interesting to see that you know we don't have a neat bell curve here we've been kind of seeing these sort of two camps or two um sets of approaches and strategies to to setting these things and there can be you know a whole host of reasons for that that uh that we could dig into the other thing that's interesting to take a look at and we'll get to this in in the quality metrics is indexing reward cut volatility so most so this is basically a standard deviation of uh over the last uh month and change of data uh so most indexers haven't been setting their haven't been changing their indexing reward cuts too dramatically and that's generally as a delegator if you're looking at an indexer that's generally what you would consider to be like desirable behavior because you know you're going to have this 28 day on bonding period you're going to lock your graph tokens up with an indexer the last thing you want is to you know lock your tokens up for 28 days with an indexer with really attractive rates and then suddenly they hike it up you know quite a bit um that being said looking at the histogram you can see that there are some indexers here that have quite a bit of volatility it's not it's by no means a majority but uh you know we have seen from at least uh anecdotally we've seen you know in discord folks talking about you know some indexers um you know rug pooling delegators basically setting attractive parameters and then uh you know and then changing it on them we've we've also seen some evidence of perhaps you know an indexer that was delegating to themselves and then change the parameters dramatically just when it was time to withdraw rewards so that they could withdraw rewards through the delegator rather than the indexer so there's some interesting um you know once you like drill down there's some interesting behaviors and dynamics at play here that you know don't show up in the top view but it's kind of a starting point for for asking questions you know why are we seeing these um sorts of aggregate statistics on on the indexer behavior so what makes a good indexer um first of all you know just a full caveat for this whole talk none of this is like financial or investment advice but these are just kind of for educational purposes some things you might look at you know if you're assessing whether to delegate to an index or in the graph um i think most people you know here are familiar with defy and so obviously like apy is kind of the big thing that people are looking at it's a really good measure to look at not just within you know indexers within the graph but assessing the opportunity of delegating to an indexer versus you know some other opportunity costs that you could be putting you know capital to work in uh whether it be in another protocol or or even through another activity in the graph like you know curating or indexing i definitely you should be looking at the indexers delegation parameters we've talked a lot about that one that uh we didn't really touch on much but uh i can try and give you an intuitive sense for is like what we might call staking effectiveness so you know the whole um the general principle behind a lot of the incentives and mechanisms for indexers in the graph is to generally reward indexers in rough proportion to the amount of stake that they're uh you know locking up in the network both the indexing reward and the query feed rebates kind of have that dynamic that when the indexer is doing their job well they should be receiving rewards in rough proportion to their stake so you could actually define a metric for that if you wanted to see like okay you know how much does an indexer deviate from that right so if an indexer had a certain amount of take over a certain amount of time are they receiving a share of total rewards in the network that are proportional uh to that share of stake and you could i say that some indexers will be probably receiving a greater share of rewards in which case those are very effective indexers and then some indexers would be receiving uh less than that you know proportional share of rewards and they would be ineffective uh indexers uh one that we covered already was delegation parameter volatility um and the other one that we also covered was over delegation so uh you know if an indexer is over delegated for a you know a long period of time that could be a sign that you know they're sort of passively participating but not really doing things like changing the their delegation parameters or uh or providing their own stake as they should on the qualitative side you know this is um i'd say a lot of this stuff is much more in the category of norm setting than like something that's gonna necessarily affect your bottom line but like as someone who's delegating grt and holding grt in the graph like you should be you know thinking about your role is not just like this financial role but also like you have a chance to promote and support the indexers that you feel will be best for the long-term health of the network uh so obviously like the incentives are what they are and you can you know you can delegate to anyone um but if you want to be valuable you know values aligned with the you know the long-term health of the network i would you know recommend looking for indexers that are honest uh and this one actually does impact you as well for for reasons i'll get to in a minute but you want indexers that are going to do what they what they uh what they say they're going to do you know and that includes conversations that are happening off extra like off the protocol in places like discord where indexers and delegators are actually interacting um and discussing you know like what how they plan on setting you know their parameters and so on and so forth um look at indexers that participate in the test net so this isn't just actually because uh you know they're supporting developers that want to build on the graph and supporting the growth of the network um the indexers that participate in the test net are going to be the first ones to be using you know the latest version of the software they're going to be don't be the ones that are actively participating in like an ongoing you know test bed for how to you know test out strategies and test out uh test out new ideas like they're gonna absolutely have an edge when it comes to uh participating on mainnet and we've already seen that that the most successful indexers on mainnet thus far have been many of the uh the sort of names that you know we were seeing at the top of the leaderboard in the graphs test net uh look for indexers that participate in the forums look for indexers that write docs blog posts build software tools generally like look for indexers that are going to be good citizens you know of the graph like we're all kind of uh you know building this thing together and like you wanna you know we wanna bring as many people into this community that are gonna continue you know abiding by you know standards of high integrity and good work ethic and kind of you know lift up everyone who's participating in the space so some tools that you can use to get started delegating in the graph one that our team at edge and node have been working on is uh we just called it the network explorer so you can check out this dashboard you can look at kind of epochs that have happened recently you can see the indexing rewards and uh query fees that have been collected in those epochs you can kind of see some of the staffs that we've been looking at the break breakdown of stake uh you can check out some of the protocol parameters that i that i mentioned so like here we see like a three percent issuance rate uh the share of indexing awards and like the total token supply you can also browse the list of indexers so indexers in the graph show up by their ens names and so you can you know here you see a lot of the top indexers on the graph right now teams like protofire here's rihabina who will mention in a second sunsue who will mention in a second and you can see a lot of the metrics that we've talked about you can see their delegation parameters you can see uh their owned and delegated stake and how much of that they've actually allocated to earn rewards on subgraphs you can see their capacity the query fees and if you connect your wallet you can go ahead and you know delegate to um to these indexers another tool you could check out is this one built by the the riabina team called graph scan a little bit more information dense in some areas just kind of a different focus they've got like a rewards calculator built in uh you can also connect your wallet and take some actions from here you can browse around so i highly recommend you checking this out see a lot of the same indexers that we were just looking at and the last one i'll show for right now is this one by uh one of our indexers sun tzu and it's just another one with a little bit more of an emphasis on rewards uh rewards calculations so you know one thing uh one number of things that we've learned um since we launched the network is just like what are the kpis and what are the metrics that uh you know indexers and delegators care about most to kind of go about you know managing their daily operations in the network and it's been amazing to see like these things have just kind of sprung up to to fill that need you know so if there was a metric or kpi or calculation that was missing from like the explorer that the engineer team had built um you know we've seen just a cambrian explosion of community projects uh and then the last plug that i'll give just while we're looking at uh tools for interacting with the network is just the subgraph itself so the sub graph that's powering a lot of these tools uh is running on the graph it is a it is a sub graph uh and so a lot of the metrics even some of the ones that we don't expose in the edge node uh network explorer you can still find a lot of that data in the sub graph because you know teams in the community and ecosystem are collaborating to define what uh what metrics are important to people so you can browse the schema of the network you can see a lot of like the top level network stats um this is actually like where i pulled the data to to build a lot of the trucks that i showed in the deck uh you can browse like allocations you can browse indexers so a lot of the same a lot of the same um uh data that you see in in the uh you know the uis but in like a little bit more of a low-level kind of comprehensive uh you know manner if you you know if you're comfortable writing graphql um i enjoy pulling these things into tools like observable hq it's kind of like a hosted jupiter notebook for javascript so you can kind of just really go wild with exploring the data that's available in the network and available in the graph and you're using the graph while doing it which is amazing um so some final thoughts it's you know we're only a month in and we've already learned a ton you know from uh seeing the way that indexers and and delegators are interacting you know on the graph um the discord has been uh absolutely insane it's just like non-stop activity you know so i highly recommend if you want to connect with people that are participating uh you know go there we have a specific channel set up that's actually just for indexers and delegators to uh to communicate and so we've been seeing stuff like there we've been seeing stuff there like holiday specials right like and these are things that like you know we didn't even see in our test net right like they're just sort of emergent behaviors that um you really only see them show up when when it's a live network and and it's the kind of stuff that you really have to like drill past the data to kind of see like at the individual level what are what's motivating people so we've been talking to a lot of indexers talking to delegators seeing the chat seeing those interactions and it's been really amazing to kind of see these things play out and see like the micro interactions that form you know the kind of uh or that respond to like the larger scale incentives that we've you know designed into the graph um the next place i'll give a plug for is the graph forum which we just launched like a week or two but it's already got a ton of activity uh one thread that i'll just plug right now since we're talking about delegation as i i started a uh a roll-up thread for just a lot of feedback that we've been getting on delegation and it's already got a ton of people who have been delegating over the last month piping in with their experiences so uh if after this talk you feel so motivated to go try delegating in the graph which would be fantastic uh you know please check out the discourse like let us know what that experience has been like for you whether it's the protocol level or the or the ui um and uh yeah and add your voice to the conversation because like these you know these conversations are the things that are going to drive the next you know set of changes and improvements you know that the community kind of works on uh you know to improve the network uh and then the last one apologies for the notion link here but uh someone uh one of i think our community managers threw us together recently um but just a resource for a lot more of the the tools that then i had a chance to show in the the um the talk today but you know already in the last month we've been seeing a bunch of you know third-party dashboards rewards calculators uh unofficial guides um uh and it's yeah it's been really fantastic to see you know obviously our team's been super busy and you know we can only be in so many places at once so seeing just the way that people are stepping up and like if they see a problem that needs to be solved they're just kind of building the tool right like it's it's kind of uh it's kind of you know what crypto is all about it's like permissionless innovation right um so that's been really fantastic and so please go check those tools out and you know if you see something that could be improved help help those developers out and uh i guess we can stop there i'll pause for uh some questions do we have someone moderating the the chat all i can see is my my deck well we we uh do jonathan do we have anything in the chat for questions i'm gonna take a look here real quick uh just a lot of comments i don't see any real clear questions yeah you're getting a lot of praise over here yep i love this keep it going cool thank you yeah well team's team's been working super hard so uh one one thing i'll just say just i guess while we're on the thank you screen is like it's been um it's been so obviously it's been a lot of hard work for the you know the initial team that built this stuff but it's also just been absolutely incredible to see the amount of like community work that's been happening you know obviously during the test net but just in like the last month and a half uh you know just on a scale that like we couldn't have imagined um so thank you to everyone who's watching this that's been a part of that that's been in the discord that's been helping people out that's been writing docs blog posts uh it's been really great to see now you guys are a great success story i think it's i think it's excellent so congratulations on all that we look forward to seeing your team around the ether space this week and uh we appreciate it i'm gonna i don't know if you got one of these yet but like i'm i'm like getting ready to go play some minecraft so well thanks a bunch i don't think we have any questions so um brandon thank you very much for that and um yeah we'll see you uh we'll see you around cool thanks a lot everyone enjoy your conference you got it

Automatic transcript — names and jargon may be misspelled.