#DappCon22: Day 1 - Introducing Gelato‘s Off- Chain Data & Computation Network, Hilmar Orth
DappCon 2022 · September 2022 · 20:35
Gelato co-founder Hilmar Orth introduces Gelato's off-chain data and computation network at DappCon 2022. The talk covers how the protocol lets smart contracts automate execution and pull external data without relying on centralized infrastructure, extending Gelato's role in Ethereum's automation and oracle tooling.
Speakers
Topics
From DappCon 2022, hosted by Dappcon Berlin.
Transcript
welcome back to main stage for the last afternoon session excited to introduce Hilmar Earth from gelato with some exciting updates so take it away hi everyone I think the audio is working well thanks a lot for coming to today's talk my name is Salma I work at a project called gelato and gelato aims to build the back end that empowers the world to run smart contracts and what that means is I think I will get into that later on but specifically today I want to touch upon a new service that we've been developing that is helping projects to leverage off-chain data and computation to
augment their web free applications um and yeah this is this is me and I want to give a quick shout out to to noses as well for inviting us over we actually gave our first talk about gelato uh exactly three years ago here at Devcon as well that was actually before we had our first version live so it's definitely awesome to be back here um to talk more about what I've been up to since then from an agenda point of view um I want to start sort of like high level and then go a bit more deep into certain examples we'll also show some code but I want to start with sort of okay where are we today in terms of web free adoption what has changed since uh
I gave my last presentation here three years ago um and then a touch upon why we are not at Mass adoption yet in web 3 and then touch upon the the current problems especially from a web 3 developer experience that contribute to that and then how we are gelato try to help projects overcome these limitations and then go deeper into this new service that we have developed over the past weeks which is the off-chain data and computation service that I mentioned in this very easy to read title of this presentation um so yeah starting off sort of high level where are we now in terms of where free adoption what has changed and I think
um going back to like 2019 and at the far left you can see that uh in the in the bar charts right there that the the volume and the the transaction volume and and web3 has increased of course significantly there has been a lot of tvl flooding the system a lot of trading activity happening and it sort of peaked uh in Q2 2021 and it has been sort of going down but of course still considerably up compared to where we were back then um and what I think is super interesting here is that that sort of line shot actually shows the number of transfers and transactions that is happening um and it actually has been keep it has been keeping um increased considerably still since the market peak of Q2 and
only sort of recently saw like a 10 dip from the from the all-time high and this is mostly due to the fact that right now we don't only have D5 applications anymore it's not only trading it's not only lending liquidations it's you have and you see that on the on the sort of left side you have Brands coming in you have nfts getting adoption games they're better getting adoption and even though trading volumes and asset prices might decline usage is actually still very high and this is very positive and three years ago that wasn't the case at all there were only default applications and now there's a whole new set of use cases which is exciting to see but if you sort of look in the long term where are we when we compare we're free
adoption and this is now ethereum's user base to that of the internet and there you can see if we make an assumption that a active use on ethereum is an address that is uh transacting on ethereum at least once a month which of course is a very optimistic way of seeing users on ethereum then what is sort of visible is that only one 0.1 percent of the entire world's population is actually using ethereum and I would arguably say much less than that because an address is not a user and that means that we are sort of on the same sort of same progression line as the internet was in 1995 and uh basically what this should tell you is we're still very early
um and it is still it will still take some time it took the internet another 10 years to reach the first 1 billion users um and uh I think we all hope that it will go a bit faster uh for our web free in general so why are we not at math adoption yet right I think there are a bunch of reasons of course some of them are regulatory but I want to focus more on the user experience and the technical limitations of today's systems and what I would like to argue is that there are really like two foundational things that is uh currently preventing that from happening at first it's that public blockchains today are still incredibly bad in terms of user experience if you ask your grandparents
to try out this new gap on ethereum or even polygon they will still probably not be able to do that because they have to set up a wallet by the network token deposit into the wallet set a gas price resubmit a stack transactions and all of these things that just make it very hard for regular people that are just used to clicking buttons and stuff working um to function and other other than that and other than the user experience you also have a lot of limitations in today's systems and that make it so that you need a lot of external services to actually provide a scalable feature-rich and user-friendly web free experience and two of the major reasons here are that smart contracts are actually not
smart they are quite dumb they only store certain logic and and state arguably and that logic can Define how that state can be manipulated but they don't actually manipulate it by themselves they rely on external actors to actually facilitate their state changes um and I cannot communicate with any sort of external data and if you look at what data is available on chain right now it's super limited and most people in the world don't don't care about crypto asset prices or interest rates they want um a social data they want a gambling data they want sport data they want all sorts of data that you you don't have in on on these chains right now and so what
projects have to do in order to actually bring it and provide the users with these functionalities they had to like build and run and maintain a lot of custom back-end server infrastructure for each specific application that we're building which was not only unscalable and very costly for them prohibiting a lot of them from actually doing that it also created single points of failure and sort of your debt not being decentralized anymore and this is if you zoom out this is sort of like the web free middleware stack there are arguably a bunch of other services like storage and stuff that is not listed here but this is sort of like it's not only the smart contract in the user interface that you have to care about you have to care about the automation arguably called like keepers you have to talk about
um making your Trend making your application guest lists relayers you have to talk about enabling your application to be off chain aware where oracles come in and then of course this is the right side on the read side you need to index all of these information that you have and provide them to not only your UI but maybe also others so there's a bunch of stuff you have to do which is not just smart contracts and user interfaces to build good applications and this is sort of what we at July to focus on we we try to provide all this all these missing services that are not natively supported on on public blockchains and smart context today um and and provide them to developers in a cost-effective decentralized and scalable manner and um and and basically enabling to them to build automated guest lists and
off-chain aware applications and uh users of this of these services are end users that want to programmatically interact with smart contracts themselves for example claiming like weekly synthetic Rewards or something then dapps or protocols themselves that need certain processes to be made gasless or automated or off-chain aware and then also dials which is also sort of like a protocol it's a smart contract that you need to interact with and we do that via our services and we call services and these are our automate relay and fetch service um this is this is for like what we call the augmented web free stack you've got smart contracts and then you've got Individual Services that do certain parts where the automate service is
basically process Automation and use cases there are um compounding of yield harvesting walls or algorithmic stable coins such as ohm being rebased and inflated and deflated every half an hour limit orders on am such as pancake swap or so that are executed or just lending market operations like debt ceiling updates and make a dollar that have to happen over and over again and then even gaming projects needing to automate the closure of nft renting agreements or all these sort of things whereas relay is more focused on just making processes gasless and efficient such as like a Conex or Nomad integrating it to relay
transactions across 18 different evm chains without having to build like infrastructure for 18 different evm chains that will take you probably alone and a year to do from scratch and now also what this talk will be more focused about is this sort of off-chain computation service which we now release from private beta it's not public yet and this just enables a whole new array of use cases that developers can just easily build up without having to deal with all sorts of the back-end complexities for example automatically cruelty management strategies which require access to volume data price sentiment different indicators that traditional market makers use and now will apply on concentrated amps such as universal V3
or games that need to decide based on off-chain things who will win a race for example a whole like order book experiences and and many many more use cases um this is sort of how July works on the hood and we got two main actors in the system and we have on one side validator knows on the other side executor nodes um well what validator nodes do is basically they have to stake the the governance Talk of the system gel and what they do is they are running these sort of micro services within their client and these are for example the fetch or the automated microservice and what these do is they they run certain scripts and these scripts determine when
they should execute a transaction and what data they should use to execute these transactions with and depending on where this data is coming from sometimes it can be verified on chains sometimes it it cannot be verified on chain and it cannot be verified on chain then you need to come to like an agreement on okay what data should be used here right and then you have multiple nodes with different stake and then you need a certain stake threshold to determine which data should be used to then execute transactions and then this is where where validators have to gossip between each other this data to find out if they come to an agreement on it and if they do they will basically sign off of the data send it over to these executive nodes and these executor nodes are basically connected to 18 18 different chains and
they get the transaction mined uh reliably and efficiently on on each of them and then a transactions basically be placed and it will hit the smart contract of gelato the on-chain protocol that does a certain validation of different things and then a transaction will be routed to a protocol like pancake swap to make a dial or uni Swap and then be mined on chain and then this is sort of like the end of the of the life cycle and how does how does how does this sort of fetch service work in detail and if you if you basically thought about okay I need to fetch certain data from apis and I need to automate and send
transactions programmatically based on them then this uh will be very relevant for you and if you um have ever used the graph for example then you will find it a very similar developer experience so what you will have to do is you have to write what we call an off-chain resolver and an option resolver is basically an assembly script file and I will show you one in a second and that assembly script file can read from the chain and it can do any sort of arbitrary API requests to external servers and from there you can get data and that data you can do computation on and on that data you can then see okay when should I execute a certain transaction and with what data should I
execute that transaction and we can go into like examples later where you can actually be a bit more granular in terms of what security you actually want around that and then what you do is you uh compile down this assembly script to Walzem code and then you deploy that wasn't code to ipfs or like an RV or something and then you have to go to gelato there's a smart contract where you can call a function where you can create a task you can put that ipfs hash for example in that transaction and then an event will be emitted and gelato notes will be able to query that script and they will load that script in into like a secure execution environment and run it for you and then execute these transactions on your behalf this is how it roughly looks like I
think it's it's big enough from from a text perspective if we if you look at the bottom basically this is where you tell gelato um first of all if it should execute for you or if not if it's if can exact is true then gelato should execute it and the exact data is basically the data it should use and the data that is defined above here is just a smart contract function they would like to encode and the sort of last argument of that argument array the swap data you actually see one line above is generated by the get swap data internal function which does an HTTP request to in this case a DEX aggregator that will then be used to execute a limit order and for
example if you go one line above you see that in this case we actually don't want the transaction to execute because the amount that we determined out of this API call that we would get out of the trade is actually not sufficient so we would like to only execute the trade when we get enough out amount out and this is how the get swap data this internal function will look like you have an API that you can Define you could Define any sort of API and you can do a get requested API and query it and then you get an object return that you have to parse and then you have to return this data that you want and then of course you can Define certain edge cases that you can then also return and then you actually see on
our web app the logs of what these nodes are seeing in real time and can debug it and see if maybe some apis are failing you or whatnot and it is really up to you what sort of apis you use and how secure they should be um and then once you did that the only thing you have to do is you have to run the yarn deploy command that will that will compile down the assembly script it wasn't deploy it on ipfs and then you get like this nice ivfs hash out of there and then you have to run another command or go to the web app put in that ipfs hash run young create task and then gelato nodes will load in that logic at runtime and run it for you and then you're sort of sorted and it just works
um one cool thing that I want to want to focus on here a bit is that what this actually enables you to do is sort of like a plug and play and modular dating Integrity system where it's sort of up to you how what what security you want around the data you're fetching from these apis so um let's say you want a certain um first party blockchain Network you want a first party Oracle to actually return you the data of like a coin gecko price feed right so you can go to like a coin gecko server where they provide you with a signature on that data and you could use that to not have to rely on gelato's trust
assumptions to then take that data and then submit them on chain where you then validate that signature of that particular server for example or you can use these sort of Next Generation Oracle networks that don't just aggregate API requests from multiple nodes and then just dump them on chain every 10 minutes but they actually aggregate them and then put them into like an ipfs or a an R weave where then anyone with an HTTP request can take them on demand and only get the mind whenever they need to get their mind and that way you can basically Define any sort of arbitrary conditions upon which you want to get that data from an R weave that is signed by whatever
validator set you feel comfortable with and get it on chain out of the box we won't have our own validation set at the beginning but in the near future probably would also want to provide that but you can literally plug in any sort of system you want you can also have your private server that has an endpoint where you sign messages to make sure that the data has integrity and then once this data is deposit of like in an ipfs or weave gelato will fetch that data via the API run the computation on it and then submit it to whatever chain you want to have it submitted so you need so like three parts here oracles signed data storage and then the off-chain computation execution pillar
yeah and this is so like a small overview of the different projects that are already using us today if you're interested in these sort of things definitely uh let me know you're also in good hands and in Good Company um and uh this is sort of like a fetch of chain computation service is still in private beta right now so um if you if you would like to give it a spin let us know in the chat or or here and we can we can give you some access and you can play around and see if it would work for your um this particular use case and um yeah that's already it we've got a awesome gelato Booth outside by the way it's the best gelatin Berlin so you should definitely try it out um yeah thanks a lot for listening
foreign any question was there a question now thanks so much for the talk um my question is the executors there's a white list right now are there any plans to get rid of that in the coming future so right now there's a white list of executors um why because right now we want to
enforce certain ways of how transactions get actually submitted on chain that is a bit hard to enforce within smart contracts for example we want some use case to only submit via flashbots on ethereum because there's a lot of risk of front running a sandwich attacks for example for a lot of the protocols that are using us so and that's why it has as a white is right now and different node operators are operating these executors but this is actually in our decentralization the first part that will be fully made permissionless with staking soon and then you have the validation system which is a bit more complex to make fully permissionless without a white list but this I would assume sort of like in in a Q2 Q3 next year should be
should also be the goal is said to be completely fully permission is without any whitelist obviously think we're good cool all right yeah thanks so much thanks [Applause]