Johannes Kern - Why is web3 using web2 automation infrastructure? Tackling this with cryptography

EthereumZuri.ch 2024 · April 2024 · 21:23

Johannes Kern examines why web3 projects still rely on centralized web2 infrastructure for the automation and coordination behind good onchain user experience, and what that means for complexity, cost and security. The EthereumZuri.ch 2024 keynote looks at how this plumbing is built today, why decentralizing it is a hard problem, and how threshold cryptography could help solve it in real-life implementations.

Speakers

Topics

From EthereumZuri.ch 2024, hosted by EthereumZuri.ch.

Transcript

[Applause] hi good morning everyone um thanks for showing up on a Saturday with such a beautiful day you kind of stole my phrase here I always say hey I'm Johannes and I'm here to make web3 Su l so I'm just going to say that again so hi I'm Johannes I'm the founder of ner Network and I'm here to make web 3 suass um if you could switch over to my presentation that would be much appreciated sorry no worries um today will be talking a bit about some problems um you'll find in kind of building decentralized applications and uh what are different things you can do to solve

that we live right now in what we call a high value low volume world and what does that mean if you look at and I think or I know that many of you are very very deep in the technical side of web 3 um if you look at applications they have to live in a world where you have very limited throughput and a relatively high cost per transaction and any application you would build need to live under those limitations that's why defi has kind of became dekill app in web 3 because defi what it basically is defined by is that each transaction inherently has a very very large value and you need technically speaking relatively few transactions to you know be able to make

a living and tooling has built has been built for this Paradigm however now looking at new layer 2 is looking at things like Solana a polygon um I'm you know I'm not going to throw dirt here because some other people already did that um change that right and we move into a a world where you suddenly have a lot of throughput you can use and a lot lower fees to do so and that actually kind of aligns with this original vision of web 3 uh to build a internet computer I know that some you know use that term themselves um and have a lot of

different things on chain and to for this world to work and you know here I'm talking about uh decentralized social media gaming um Dows you know governance onchain governance and so on um this world requires new worlds and that's what n is all about that's what we're building now why is this so important and how does this play into uh making3 L if you look at the D app that's how it looks like right uh we have a blockchain which is your back end on top of that blockchain you have your smart contracts which you could say is your business logic and the only thing else you need is some kind of user interface that's a theory practice

looks quite a bit more like that um where you need a lot of kind of surrounding things for the application to work uh starting from often articles you might want to send out notifications uh you um want to do stuff cross chain you might want to do Crown jobs and and and and and all those things they cause some issues um they're not only very hard to build um they're even worse to maintain because you suddenly have a lot of moving parts which need to be working in sync they're so bad that typically you know roughly 20% of total cost of running and then maybe some of you have

actually real world experience with that running your own systems a significant part of cost of running a d app is just in this maintenance of the surrounding Parts um and from a kind of more philosophical or high level perspective what is even worse is platform risk now imagine you want to do a balancing once a week with your D app how would you do that okay you would run a AWS server which triggers that transaction on that you have a private key oh now we have a private key for decentralized Network on a centralized system which is controlled by me so that very much goes against the core of this whole idea of having a decentralized app which is open which is permissionless and you're

forced to do that because we're just not there from infrastructure perspective and that is really much kind of answering that first part of of my task you know why is web 3 using web 2 for automations because there's just no way around that because you need to rely on systems to be able to trigger it now what we're doing and I'm just going to brush it because I don't want to do a tech like a a product presentation here um we've built this platform which allows you to do all those different kind of things now how do we do that um and that's the the BV Tech part um is we're running our own network and this network has um is basically connected to all those

different um blockchains we're working with currently is evm based and that Network um runs its own consensus mechanism uh it's not a blockchain it doesn't really have blocks but what it does it uses threshold cryptography now how could we understand this it's a bit like a dynamic multi-c which with Ever Changing kind of keys and members and if you look a bit on a higher level here is each node which makes up the Nar network is one of the members of the multii and it has a stake um to be able to be part of that and only if all those members of this um

Network agree that a certain outcome of an automation is correct it can be written on chain so the beauty of this is that the whole security relies on the specific chain you want to automate you know if you want to run something on polygon it's on polygon if you run something on ethereum it's on ethereum so we're we're kind of basing our security on the security of the specific chain but then have this MTI which is once again secured by the proof of stake [Music] meaning you can't really game the system unless you have a lot of money that goes into discussions of you know how how how proof of steak how secure proof of steak is or or how insecure proof of steak is

um what time is it actually beautiful now I always like to build stuff um and I'll actually use the Blackboard real quickly to to show you what different stuff you can actually talk about so do we have some chalk somewhere actually or do do we only have the Blackboard a there I got it found it found it found it found it you know I haven't I haven't been at the University for a long time so it's kind of a first for me um when when talking about automating stuff in the web 3 world there's kind of three ways you can do it or you have to do it um

the first one is the most common one that is web 3 to Web Two now this is in a sense the simplest use case um this means you take some kind of Trigger or data in the web 3 world and you do something in the web2 world with it an example for this might be sending out notifications as actually we're going to build that because it's the easiest one which I can build in just 5 minutes here um so example here would be a notification okay second

one which is pretty powerful and that is actually where narrative really starts to play out is web 3 to web 3 now why is this relevant and and what what is an example here let's assume in there's two big ones cross chain stuff you want to take certain things on one chain let's say ethereum main net and you want to move that to another chain like polygon call a bridge right um or another example because and that is because smartronics Ute itself even on the same chain let's assume you want to buy eth whenever uh vitalik posts something on lens or

farcaster and that's all on chain so you can literally take that data on chain listen to the event happening and then directly without having to go through any unsecure SL centralized environment trigger a transaction which buys some e or sells some e or does whatever you want that is web3 to [Music] web3 let's call it Dynamic it's a very bad word social buying I'm not sure if I'm writing large enough actually but uh okay and then the third one and that's where it's getting getting a bit murky

is web two to web three um you could say this is you know known as oracles um the problem you have with this is that as long as you're in the web 3 world everything is nice and tight and tight like tidy right you can kind of be more more less sure that the data you get is secure is correct Web Two world you don't have any of those guarantees you have no idea if that data you're actually consuming right now is actually correct and um but still you you need to use it right because that's this big Oracle problem you have so what you

would need to do here is uh you want to for example have some error correction and um or reckles and basically narrative covers with the setup we have with the threshold cryptography we cover all three of those use cases um and uh let's actually build one of the first one because this is really really easy to do and uh you'll just kind of see immediately and and think for yourself you know what what else would be able would we be able to build with this okay that more time so what I have here that's theary

fap it's this if you can actually try it out yourself I'll I'll just show you a link afterwards um so I'm going to log in here let's hope internet works okay so now here I'm on on Nar um I also have a webbook site which is just a very simple tool which allows me to get kind of a place where I can collect web books or you know um posts or done on web books so what we're going to do now is we're going to create a new workflow um the idea of this is we want to receive a notification whenever someone is doing the transaction with stable coins with d so uh D tracker we going to call it good what we want to do is we want to

listen to the die stable H sorry the die contract and listen to the transfer events so we select event is trigger now we're going to Ether scan and we're getting the dice Mark contract dice stable coin um so you can see here this is not a stable Co we actually need the contract the token contract um what you see here is like all those transfers happening so we're just copying this address we're going back to narrative and now we say hey this is on ethereum mainnet um and we are going to post or just paste this contract in here

it will automatically load the AI so the event we have here we want this transfer right which is whenever something is sent it's transferred um we have source and destination and W which is kind of the where it comes from where it goes to and how much it is we could filter it here we're not really going to do that and the only thing we also need to do whenever we want to have that event in this case um we want to send this that's why I'm saying this is web 3 to web two we want to send this to some kind of endpoint centralized endpoint right so I'm going to select web hook here and um in here we going do a post and now I go to my web hook site right I

have this unique URL I'm going to copy I'm just pasting it in here and now what we want to have we actually want to also know what kind of data we're sending right so we have I said we have to source which it basically pulls so this is the source as you can see we have the destination which is the DST on from the smart contract from the API and we have the wad which is kind of the size which we have here okay cool that's all we need to do we close the workflow I mean I could now add a lot of filters and

you know funky stuff in here I'm not going to do any of that because we don't have time and Publishing it now this is basically going to be registered on chain it's on polygon actually we register those things it's going to cost me a bit of gas because I'm actually doing a state change um and that is it really so now we have to wait and then what we should see happening is that we have we will see requests flowing in here right because you have that workflow um and exactly now it's published so we can go see the die tracker which just did which is actually now live it hasn't been executed yet always takes a while

until everything is registered and starts collecting data um but as soon as you see now we see it okay that's the first trigger right that's the first notification it basically sent out so you can see here that this was sent from sorry from 0x b95c to 0x1 71 with this amount um and now obviously we could very easily just plop kind of an simple email service or something on top which then does something consumes that web hook data this is just like a short and I think we're actually running out of time yeah no we're good u a short example of how you would then build that

and in the back end it's all secured not that relevant in this case to be honest because we're not really doing any change on chain but imagine if we would do like a web 3 to web 3 automation now then you want to be sure that no one can go and change your workflow with not being you cool um and basically like that I would like to open up for questions and um you know you can try it out yourself uh this is don't let me move that bit down um so you will with this ref Code E Sur you will get Whit listed immediately and so you can just start building if if you have any interest in ideas

questions yes being app sorry where is being applied um there's a lot of different things we see happening um one place would be maintenance tasks in the background um that use case I just actually showed the notification one is the the simplest one right that's there's a bunch of people using it for either projects or for for their own purposes you know if they want to just see something happening on chain it's a very very quick way to to get notifications op running um we also see that's a quite an interesting use case I didn't actually have on my radar is um for kind of Point systems so where for example you have a

d app which is uh hotel bookings and then people book hotels and then like every two weeks or so uh you don't want to do that like real time but every two weeks people acrw loyalty points so they can automate loyalty points like this automatically for example they would want to issue those loyalty points on a different chain which is cheaper right they have the actual transactions happen on on Main net but then the loyalty points are being aced in polygon that would be one example which is I I find quite fascinating because it's got like nothing to do with defi really we still have a couple of minutes we can

take okay thank you thanks for the presentation and I have a question regarding this web 3 to web3 flow how do you take care of the gas fees okay let me show you so the gas fees is um paid by by the user but by the network so if if I want to use it I have to kind of like recharge um the my balance It's a prepaid gas fees if you will which is Nar is using those to to cover the gas fees really now if you're using this in a large application you can also push it to the user for example depending how you want it's it's a relayer really um because you you know could like this is

a smart contract call so you could say okay I'm just going to basically put something on top of what I'm charging to the user and then whenever user is doing a certain thing certain action which is not synchronous so this is async that is a beauty of it uh this just acres in in um this prepaid account now maybe one one comment here on like what we're thinking about here because this is also quite relevant let's say if you want to buy I made that example for you know dynamic social buying right this money needs to come from somewhere right now what you would do you would kind of pre-charge it pre-load it but we're we're thinking hard to to like how

can we build efficient Integrations with some something like safe right where you would just have like a safe plugin um which allows you know to pull the money so you don't have to move money all around exactly any further questions I supp at some point you're going to have a token and I guess you're going to be using that token for paying for all these transactions right or how is that wor going to go yes no no the main the main uh use case for the token is actually the network stability so it's proof of stake because we need that token so you can be sure or you have an

economic incentive that the nodes which are participating don't have incentive to basically change the workflows right um yes we can use token to basically pay for the fees however we want you know Nar is really all about usy experience or developer experience at the end so we don't want you to have to hold a token to be able to use a network we want you to just be able to use kind of the Native token and and what we're actually very recently released before that you had to had it's actually still the old version you see here um with you know you have to have all the different kind of tokens of the networks if you want to automate different stuff you don't need to do that so the network automatically rebalances and make sure there's like

enough tokens and you only can have basically one currency in locked in and then you can still use all of the different networks and we came to the end of our talk actually thank you very much it was quite interesting thank you very much for coming oh one one more thing one more thing I'm not not jobs but um so tonight we're hosting a little side event uh with Chronicle Labs um we're actually we're doing this thing called tacos with n around the world it's not tacos today but it's something really really cool so if you like schnitzel you should really join it's like we're we're actually

there's a wait list but we're running a bit of a contest so we still have a handful of spaces to give out so see you all tonight h