POC based on state channel technique / Jayaditya Gupta

EthPrague 2023 · June 2023 · 7:16

Jayaditya Gupta shares what his team learned about the state channel technique and how it can be used on layer 2 to reduce gas fees and optimise transactions. The short ETHPrague 2023 talk presents a proof-of-concept app built with state channels and includes a demo of it.

Speakers

Topics

From EthPrague 2023, hosted by ETHPrague.

Transcript

you can call me Jay for short and I'm going to present today on my project uh State channels and what are we trying to do with State channels the project is called Channel 4 and it's an POC demo and introduction to what we are trying to do and researching on state channels so a bit about me uh who am I I'm a software engineer at privacy and scaling team at ethereum Foundation part of ethereum before that I used to work at CERN European Organization for nuclear research I was a software engineer in the cloud team and I'm also a gamer game developer I love to travel and a big time open source contributor so just a quick uh overview of the what is State Channel we won't go too deep

it's a lightning talk so we'll go fast so State channel is an off-chain technique where you do transactions instead of main net on you take a separate chain and you do the transactions on it so two participants can part take part of multiple participants can take part in it and they can do n number of transactions until they reach uh on a state a concluding state that they both decide upon so once that state is reached uh they can just submit the end State or the transaction to the main net and thus saving the cost uh on the main net so as you all know mainnet is expensive to do very small uh transactions so we the idea behind State channel is just to take all of that small transactions it can be any kind of transactions mostly

those transaction where you have some kind of counter so you can just move them into the off chain and once you have reached a concluding State you can send it to the main net so once the state is reached you send it to the state so why use State channels like it's on layer to optimization technique it's slightly it allows you for lightning funds transactions uh mainly because you do the transactions on off chain you don't have to wait for the block to be mined and then reflect on the main chain you can do everything on the off chain it has low transaction fees compared to main net a quite low transaction I will

show you later like what what the fees we were getting on the off chain and compared to the main chain and you can scale quite big with the state Channel techniques mostly on the sense if you have a mesh Network or a low cost transaction networks at those places State channels really shine so in my opinion from what I have researched so far any kind of application that has some kind of counter like games or any application that can use counters is a perfect place where you can apply State China techniques so channel for POC uh it's the channel 4 is the code name for my project it started in early January as a grantee with ethereum Foundation now it's a full-time project with the EF and the

goal of the project is to research about State Channel techniques and in the end make a protocol and framework that people can use on So currently we are researching by making small proof of Concepts and showcasing it to the community and getting feedback from them so there's already some work on web regarding State channels but most of them are based on the games or like tic-tac-toe or any kind of counters like uh sending messages that's it so we wanted to try a bit different approach uh make a web app if you are from early to adopter of internet from the 2000s you might have heard about the stumble upon website it was a very popular website before search engines were popular so we made a POC based around that

so I will quickly demo the proof of concept for that if we can load it up okay it won't play it's fine uh you can try the POC uh by scanning the QR code and also you can remember the URL it's very simple so the POC is basically demonstrating how you can submit the URLs to a central repository it's on blockchain you can upload or download the URLs and if you select tags for example gaming retro technology it

will show you all the random websites based on that and then you can afford a downward on them so it's useful if you hit all the algorithms like which keep on recommending you same stuff like for example YouTube if you watch let's say funny skateboarding videos it will keep on recommending you funny skateboard videos so with this it's not like that it's completely random you just choose a topic and you just start discovering new content there's no algorithm even though we use upwards and downwards but there's no recommendation algorithm behind it so things that we learned from poc1 from the community feedback was uh first thing I was the cost was extremely less with using State channel the when we were doing Simple tasks such as just

submitting a URL or just submitting a single URL of voting or downwarding it was costing us 0.00100 for it but this is now the total cost for n number of operations so it doesn't matter if you do do 100 upwards 100 downwards or some 100 urls every single one of them uh will cost the same amount so faster transactions again I mentioned in the beginning you don't have to wait for the block to be mined it's automatic it's off change so it's faster and then it will go to the main net so challenges with the POC uh we saw were security uh since everything was off chain on the client side it was easy

to tamper with that's why a solution was to implement a central Hub or Central server like a proxy which will take which will interact directly with the smart contact instead of user so user will only interact with the channel for server and then everything will be done to this on the smart contract reason for this is uh we cannot do every validation on Smart contact because it will be too expensive so to reduce the cost we are using a central server so the roadmap is uh for poc2 we are trying to aiming at end of June and then pos3 we will actually working on the framework and the protocol for this it's a poc2 is in work in Progressive so goal of the project is making a protocol uh making Lightning Fast

payments a framework for this and hopefully making a mesh network from it so the team initially was just Charlie and me I'm at the end and Charlie is in the beginning now we are team of six people everyone in everyone from EF foundation and specializing in their own fields so you can join us uh by scanning the QR code and we'll be happy to welcome the community and if you want to contribute there are guidelines for it thank you [Music] no