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

Loading player…

EPNS 🛠 How to build Web3 communication in your protocol

ETHGlobalSun, Oct 9, 2022, 12:00 AM

Join Harsh Rajat of EPNS for a workshop titled "How to Build Web3 Communication in Your Protocol." The EPNS team is ready for ETHAmsterdam and can’t wait to meet you all. We’ll be conducting a workshop on the native Communication layer of Web3 - Etherum Push Notification Service (EPNS), developer & user journey, and how to integrate web3 native communication into your project. This workshop is part of ETHAmsterdam, the first in-person hackathon for ETHGlobal since ETHLondon in 2019. Join over 800 likeminded engineers, designers, and creators to build and learn over one full weekend at the Beurs Van Berlage in Amsterdam. ETHAmsterdam is taking place as part of Devconnect, the week-long in-person gathering in Amsterdam. We're back to build, we hope you'll join us. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Music] [Applause] okay hello hi guys welcome my name is fabio i am a developer pms um in today's goal of this talks one of our workshop right the day is to see uh to talk about how to contribute an essential one protocol write out the same option location how you can monitor all chain advantages and applications how you can integrate vpns from and to between notifications and screen notifications to your users right from your tab right um okay so in factory communication happens all over the place right you know the communication happens on discord on twitter on this course they're everywhere and it's funny because we went free um what happens is protocols expect users to go directly to their data for all to that information right and funny enough that's not how we do in web 2 right for example let's say i have a meeting 10 minutes it's not like a calendar pressing a or one during all the events now we can't understand the event like a reminder ten minutes before like hey you have a meeting ten minutes uh prepared or the same thing for whatsapp whenever i receive a call whatsapp there is a push notification so will so let's say an example let's say i'm on average and i'm about to get them today s formation right so what is the solution so what you can actually you can ask the communication layer for web3 right so the communication is open which means that any back-end any front-end smart contract can send notifications to other others the communication is dynamic which means that you can say anything you want you can send a notification whenever someone updates you on openc um you can send a song so basically we don't impose any restrictions for the type of notification thank you alex addresses um the communication way we are building atms is multi-chain but even though the e for eps stands for ethereum we're gonna very soon later on finals marching harmony across all your jews are from optimism decay scenes star plants um and also all clear ones they're not edm so evm and low medium chains the notifications are guestless they can't be casually so you simply sign the transaction using ip712 to send notifications and the last part is the notifications are platform agnostic which means that any crypto front end can uh can fetch information from the our protocol not like we need to use our mobile app or our chrome extension order that to fax the notifications any crypto front end can get those notifications and speak to their users on their tab and we're going to do a demo of this explaining this um how this platform agnostic works how we can display notification to users in your in any app actually so what are the applications for you can ask right um one pretty useful is for dowels i think a lot of people here are part of multiple dials and we get can get lost on discord and discourse on twitter whenever it is in their proposed vote right um so what can happen for a tower let's say you swap tower or avatar they can send a push notification says say hey there's a um expired in seven days please read it and vote accordingly and that's something we're working on is right from the push notification you can read the proposal you're going to have three actions whether you can close on the proposal before against or staying in the proposal right from the verification so there's no the goal is to increase user gain engagements on dials uh to increase the quality of those right so people they get guests with the proposals before him apologize for some we hope to improve them um fortifying applications right when they're about casualties they don't have it i mean it's good to know beforehand about losing money whether you for you farmers out there when you want to there's an inform whether or not the protocol gets interested when you start putting your phones on protocols for for nfts um let's say someone plays of being on your entity someone by once by your nft well get a notification like based on what's interested in ft um when you're part of uh someone you're part of on the nfc are showing someone i'll beat you well if you really want this ft it would be a nice way to get notifications so you can i'll be the first possibility for metaverse let's say you're playing a game and there are two users and two users in inventory means id wallet terms so we can chat back and forth using you can add this communication here that will be so sending back and forth messages between wallet services so we're very fortunate to have a lot of people to remember we call them friends of kins they give show us how the feedback so we can improve the protocol and build this chain agnostic open provisionless communication layer 4.3 um screen hackathon i'll just tell you guys what we have about this um we have 4k uh 4k about this frame with anyone who is building on top of pns we have backhand sdks front sdk so if you interview your players in any way in your project please apply for a bounty or if you are interested in applying using your lessons in your project but i have no idea please talk to us we're here literally 24 hours if 2 am 3 am 11 am doesn't matter there's always going to be someone here to help like people 10 years like 5am and people are talking to hackers at 5am so please talk to us and any questions about it about the purple please reach out to us and also this assignment we released our push grants program so we have one billion dollars for anyone who views on the topic you can ask we're going to do tutorials or vlogs of what you can ask please open the proposal it's open and the community is going to approve or you know all the the current programs it's transparent that's me that's the influence of actually so i have a video just for people to see how those peoples actually are so um just one the idea of this video to show how notifications are but by any means you need to use our mobile app to get this notification right so any crypto front-end can affect those notifications um we just showed our mobile app because it's an example we have this actually mobile app for building once received push notifications you can use our mobile app but notifications are not tied to any epns uh front end just really sure so how this protocol works on a technical level so um the protocol um is made up of three main components right so the first component is what we call ep and s4 so ps4 is a smart contract that is on ethereum um [Music] addresses you must do something called you must create a channel which means activate yourself in your code and the analogy i always use is click on youtube right so if you're on youtube uh you create a youtube channel and users who are interested in your protocol on your youtube channel is subscribe to your youtube channel to receive notifications that's the same analogy so if you want users to receive notifications for yourself or your define app of a marketplace platform you create a channel and users opting for this channel and the options for the standalone i mean users don't pay great fees at all so guess less yeah i want to take no money waste it don't waste it but no money he falls for user-received applications um this is on ethereum so these are responsible for activating channels that is on ethereum the last part the second part is our epns communicator layer and dependency military layer is made of two parts so the first part is the communicator sdk so which allows sending of chain notifications guestlessly and the second part for epns communicator are our set of smart contracts that are going to be everywhere every chain evm and non-indian chain that's going to allow any of our contracts to call our communicators in our contract to send legislation and third but not least you have a peer-to-peer network officials there are validators that are going through their monitoring communications emitted from the pns communicator layers whether they're off-chain or on-chain notifications and they're going to index the notifications so any crypto content can simply fetch those notifications and spread those notifications in any way they want to thanks for the channel um yeah so i'm on the staging app um here so i create a wallet here i've refunded it so that's so basic those are the channels i mean that's this taking we can go to productions that we have so let's say um i'm a user i'm looking at this as my perspective so let's say once you get to swap your skills for you swap v3 okay opt-in send a transaction okay that's it i'm going to receive notifications for you as well i mean alpha alphamore let's say okay um that's how young defined when that's snapshot of decentralized partnerships yeah where does the signature go it is a centralized registry somewhere or it goes to the nodes when i say when i subscribe when i've been in one of these channels yes we go for our future network of those so we are there commissioners we're working on uh decentralizing those nodes and yes you'll see on this network yeah okay thank you super network yeah we have some good news person about this good um yeah so let's create a channel so developer go here and create a channel um yeah let me just minimize this um yeah let's come here i need an image for my channel so i gotta see this image right um i need to stay free to die to activate myself as a child continue let's create a channel um this is a channel for east amsterdam communication communication our course action link is on our channel list here we see that a lot of channels so call traction for our channel is to use a few users want to get more information on your channel you can put your website here or your protocol or anything you're just going to eat answer them but if this was here you want to receive [Music] approve myself in the channel on this website open notification layer okay oh yes good yeah let's do something now so i have to edit myself in protocol so whoever subscribes to this channel are going to receive notifications so let's send notifications to whoever is subscribed to this channel um i have a promoted channel here that i have our mother's wallet that's already subscribed to this channel um this one here yeah so let's notificate so as a creator of the channel that's the webpage okay so okay next notification to whoever is subscribed to this channel so we have three types of notifications right so the first one is the broadcast notifications notification which means that anyone who's subscribing to this channel they're gonna receive notifications the second one is a target publication that is you can specify in particular like hey send a modification to these qualifiers the third one is a subsetting application we've got an array of wallets addresses and the notification hello amsterdam hey there right so and as i said the notifications can be anything so i'm going to come here that's our song and a song here put the link notifications assign assignment transaction that's it so i come here to my inbox since i'm subscribed to my own channel i received the notifications so i'm gonna hear that notification i received okay so it's fresh here that's not here but the data if you click here i'm gonna go to the contract link and you like the calls actually can be for example a proposal so user receives a notification if you click notification you are redirected to the snapshot or uniform governance tab where you can catch your boots right from there or if you're what can you do you click on notifications google directly to the audio or compound or whatever to putting more collateral let's go to our second demo with the phone and sdk so this one part of things are important which is the set before this reinforced any cryptophantom front end and space of notification so the demo that i have here so i have 14 swap front end and we have a front-end sdk so before the sdk we have a react component that is listed right so it says that i have six notifications here click here on the notification here that's notification the same here see when it's blue here it means the contraction so all the notifications that have this watch has ever received it's going to be right on june swap or whatever app you want to illustrate right and we also have one feature that i have talked about here is the users don't need to go to our epns dab to subscribe to channels we have another react component that's like hey you want to like maybe for mini swapping or i don't know i'm using support whatever i need to have i'm going to like right from your adapter it's like hey want to get notified for any event of on this protocol the user click opt-in send transaction that's it the user never ever leave your app to receive notifications or to obtain through simplification i think that's uh powerful actually so make sure you like everything very seamlessly seamlessly to users i mean that's a normal pretty famous thing last but not least just a backhand sdk as i said before the notifications they can be sent by any logic i mean that we don't impose any restrictions by house and notifications or how the education was sent so just be like a very simple uh node like chrome job but basically what it's doing i mean having my private keys here everything's recorded here the idea is um i'm just doing like a pretty simple ball test that is calling one market cap to get the bitcoin price and some risk like same notification like hey that's the summary of the movement between last 24 hours last week or last month so i mean so two tablet destinations that's the k1 i mean just a problem my project key my channel we just need two parameters which is the private key what we created the the channel and the channel that you will receive as soon as you activate yourself in purple after sticking to that and last but not least let's go here sdk3 the if i refresh here you should see three things here or four notifications which are here so you see like the back end that's the case in a way that any person any craft can tap into this peer-to-peer network network of pushing those to get notification with this example he was complicated and this is another thing that i said see those things was the last notification from the tab and these are the notifications i sent using the backhand sdk yeah that's it what i have for today what they're going to know um to just to say um we are very excited to score the entire community the team is here so we have office hours on this store like every week if you want to talk to us reach out to us give us feedback please feel free to reach out to us um everything to come here you want to ask questions to ask questions if you want to meet us on steroids and coffee or whatever feel free to do something [Applause] so all the data is it encrypted we can send an encrypted notification as well okay the private key can be clarification and see the notifications you can see that it has another notification and also notification okay and it's encrypted with the private key you said the public okay it's symmetric so anyone can decrypt it if you have your work no so you've been encrypted for the public key yeah anyone who has a private key campaign and my other question is can we build a peer-to-peer message messaging app on top of epns or would you have limitation in terms of storage if i want to rebuild whatsapp on epns what is the limitation today to do so an infrastructure project we are building we're monitoring notifications on changing of chain we're indexing it and what to do with the notifications it's all up to you okay um yeah so we have a selectograph we have a virgin period network of those we're going to have a purity network of nodes that we're working on there's going index notifications and yeah and if you want to build anything on top of it you're more than welcome i have another question about privacy and are the lists of the uh all the subscribers of a given channel public or their private that's a good question so yeah so uh these are like the wallet address like it's all right i love this queue in here so yeah these these are uh these are the wallet addresses that are giving their uh opt-in or intent so uh of course you know uh that's something which is public that you do know that this wallet address has opted into this channel one of the reason is that let's say if you're a smart contract then you need to send a notification out so you have to check if the user is subscribed or not that's how we prevent spam but yeah they are public okay thank you awesome let's work with like an app notification so sorry like how do you integrate like sending notifications on hyper devices tomorrow yes so we have a component on the push nodes of the fish node what does it actually communication so we have a component that we have this but we're trying to refactor the code so it's modular it's not uh another part but the thing is um you can send like uh you can use firebase notifications so when you run uh in push mode um i mean you can do it yourself as well so you can just tap into the network and like oh there's a new network there's a new um communication property address that i'm interested in so i can just push this to firebase or anything you want to to send them to the app um yeah i have a mobile app here for international staging so all the notifications that i sent on this demo they're being pushed i mean right they're being pushed to my please is it feasible to send your push notifications based on events that happen in the smart contract yes yeah of course when someone place yes you can create your own uh bot for the demo that i did here i was getting information from market cap but you can monitor monitor on-chain events and um send notifications based on engine events and then also uh select which users to notify or yes so we have three types of notification the first one is a broadcast notification so the same to everyone the second one is target which means you have to do like a one cent notification judge for the just for this wallet others and the third one is our subsidies of notification so we have like all three flavors to everyone to one wallet or like a subset of wallets thank you please another one ah i want to not be thank you i want to talk about the price for the service i know i maybe arrived just a minute after so maybe i missed it i thought that we needed to stake like 50 die and stake me say we also get that back how how does it work and this has a price pad not that push notification yeah i have this answer for this but i would love to for a horse transfer please because it has a clear vision for this i i think you and then we'll just talk to you guys so uh yeah so the price which you saw that's like the activation price a part of it like in 50 diet goes to a people but the rest of it you can of course written back so the idea is uh to punish the user or channel just a little bit but not the entire time and to keep that tie-in state so that in case they do something wrong we are able to penalize them as and when the time comes uh but yeah you can basically get back the diet so that was your first question the second question was uh what is the charge for the service so right now of course is completely free uh we are plan is to keep it free for like a year or two years or uh until whatever time it takes to get the net of effect but once that happens uh there will be a fee that will be charged uh that will be a monthly or a yearly fee and again it will happen to the protocol it will flow through the protocol uh so it's like a circular ignomine which we'll have uh at that point dive will be replaced by push tokens uh but yeah it's something that will come later on once nighttime network effect is there and then of course it will be around fifty two hundred dollars is what we are going to propose to the committee but eventually they decide have you thought about putting the stake died into a uh an interest bearing like yes yeah it's more sustainable yes yes so the the the version zero uh which was just for ethereum the plan was that this is state time it will not even be 50 it can be any number and the state die uh goes into our way it starts generating interest and the people who opt in they are able to get their interest out but when we went multichain we had to basically balance that out because we will not be able to do that on polygonal or anyone anywhere else uh so yeah that that was the initial plan so awesome awesome idea too thank you so yeah yeah please go ahead just one last question about the node what are the requirements to run the node if like next week i want you to run a push node yeah is it possible or what would be the requirement in terms of hardware sure and what's the plan on decentralizing the booster so i don't know have one node that is run by us we have a lot of people working on centralization of this and um so probably i can give you a better answer in a couple of months okay uh but yeah the nodes are going to be distributed distributed and we're working on the tokenomics for make people incentive create incentives for people to run this uh communication layer for web3 and we have the ideas for you're going to be getting incentivized to run this uh web3 communication layer and yeah to help like distribute this communication layer that is cross chain open changing the massive yeah but we have we are working on economics and the entire engineering team working on decentralization of these push nodes that's good thank you so yeah guys if we're downstairs 24 hours a day please reach out to us asking the question we want thank you so much [Applause] [Music] [Applause] [Music] you

Automatic transcript — names and jargon may be misspelled.