Account Alerts
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join Patrick Ho for a talk titled, "Account Alerts," all part of the Compound Grants Summit. The Summit is taking place during ETHOnline, a month-long virtual hackathon with over 1,000 engineers, designers, and creators building new protocols, learning at summits and workshops, and gaining valuable feedback from ecosystem professionals along the way. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
[Music] [Applause] [Music] and for that i'd like to invite patrick who is going to be talking about account alert so uh patrick welcome uh feel free to get started whenever you're ready hey guys uh yeah it's it's great to be here uh let me let me share my presentation and then i'll get started okay uh so uh stake signal um so this is a project uh that i built with compound grants uh dao as well as with um paperclip labs as they mentioned before um and uh the really cool thing about how it all started was that compound grants was and larry uh actually got me in touch with um paperclip labs and and because uh basically there was a a skill set uh compliment that they could provide so part of uh i think what grants does and the community does is uh even if your skill set is very particular um you can contribute a lot and you'll be sort of uh able to find people that complement your talents uh and that will help you uh contribute to the doubt even if you know you think i'm really good at doing x well then x will be super helpful and uh in a sort of decentralized way we can uh get get your skill set uh into interesting projects um so you can find my github at centuryape on twitter as well centuryape so uh i'm gonna cover uh basically five topics today um first is just working for a dow um and then uh i'll demo stake signal and then i'll uh cover a couple of topics um just in terms of the code mechanics of of interacting with compound getting data building apps uh for adapts uh with compound uh and then a little bit of a road map for the future of stake signal so the first thing about working for a dow is it really you can choose your level of involvement quite a bit so i'm still working my day job um and if you are working your day job you can still hang out on discord and you can get paid in crypto to do a real project and it truly is that easy you just need to be able to take the leap and you you get in there um you say well for me like my strength is mainly in in back end uh uh with like some front end and like let's say you need to have uh someone help you with design or you need someone to help you with solidity or something like that you can find someone to help you or if you're good at solidity then you need someone who can do the front end or do integrations or something like that for you um that all exists and and that's this is sort of what compound grants exist to do is to enable you uh to to do cool projects so uh compound is a protocol that's handling billions of dollars but for a protocol handling billions of dollars uh it's really uh you know you think how much work that that entails it requires a lot of work in a lot of fields so whether you're a solidity developer a front-end back-end a designer ui ux a data scientist um a hacker or test engineer or if you're just good at project management that's incredibly needed um right now and then if you're good at integrating with third-party tools for example flip side crypto or for me um uh integrating with the uh sendgrid and twilio for sending email sending text alerts you know that that's that is all work that needs to be done and uh for me really focusing on what i was good at and being able to hook up with paperclip labs to provide um a lot of help on the the design side was super helpful um and i think if you have something that you want to build or if you want to look at the rfps that are there then you're you're gonna find quite a lot of success uh working and i i highly encourage you to you know to make the leap and and to try uh so how did steak signal get started it was actually started with uh a tweet uh by robert um basically um we need someone to build a margin call system and then how's it going well uh now stakesignal.app is live and you can go uh to the website right now and you can also uh check it out and set up alerts via email right now so uh compound as a as adapt you can uh save money you can uh borrow crypto but it doesn't contact you in any sort of way you know it's an entity sort of existing on the blockchain uh but there are events uh for example when i started uh basically the day i i got my grant uh was was in may when uh the the market was crashing and there were like tons of liquidation so that was that was a day when stake signal was needed but not no project of that sort existed then uh and then the day i got my grand you know i started getting cracking on making it so that a website can react to events like price changes or health changes and then uh send send you a message uh so that that's sort of the need for for stake signal um so i'm gonna share the the app uh uh so i'm gonna switch over for a second [Music] okay so here's stake signal basically you can connect your wallet uh with metamask you log in uh it shows you alerts so here are all sorts of rules that you can set um i'm borrowing more than 70 165 percent uh email me when obvi is below a certain number a cop is above a certain number so she's above a certain number and uh the way that state single is going to message you is it's only going to message you once per day it's not going to spam you or anything like that um but you get in uh you can create an alert so you can set a price alert for example set a price target for each uh at you know 30 uh 200 uh and then you can create the alert uh so then we've got a new alert for eth right down here at the bottom okay so i'm gonna that that's sort of what was built let me let me go back to the presentation so basically uh right now for sake signal we've got email contact um and i wanna sort of talk about uh getting started uh basically because for me i i was a developer only working in web two i've never done uh i don't i haven't written or deployed a smart contract i haven't done anything in web3 before but it was really helpful for me that entry-level ethereum is almost entirely in javascript and much of the development experience and tooling is in javascript and for building an app there's so much stuff that you can do just using javascript or python or whatever you know and you don't have to touch solidity because there's tons of work that doesn't require actually getting into the guts of the smart contract and decentralized protocols like compound need a lot of talented developers and will pay for you to do interesting work in crypto um and one for example one super high priority right now is to maintain uh an open source and javascript uh front end and and do other types of uh apps for the protocol uh so just a quick note about sort of how a stake signal was built uh first of all um login with metamask so that's something that a lot of websites will be needing to use getting forward i've included a link here a login with medmasdemo this is how i learned how to implement login with metamask for stake signal so if you're looking to do something on your own uh if you're looking to do something on your own you know this is exactly what you can do to get started it's got an example front end app it's got an example backend app and you can take what exists there and just turn it into your app so the second part here uh is uh sorry about that um so for for signed log in with metamask um the important part here is uh the web3 uh personal sign uh and you just have that in there your users will sign the message it'll send the signature to the back end you're backing [Music] your backend can check the message and then return a jwt to authenticate the user next the working with data from compound on the backend so compound.js.api is super helpful um so how do i get health information back from compound uh well it's this request here so require compound finance compound.js and then you just await a compound api account and that will give you uh basically a list of addresses all of their health statuses things like that so you can just pull this and get account health from compound compound.
js.api and then use that data for your own your own app and then the next one is uh how do you get prices and query on-chain data so there's public code that i have at my github compound oracle util basically uh it's the same as interacting with any uh eth smart contract using web3.js uh you basically pass in the contract api you pass in the contract address and then you'll be able to grab uh read functions from the date uh the contract or if you're building a more advanced app then you can actually interact with various contracts so for example with compound you can supply or take out loans or do something like that um and then um here's just a laundry list of what i found was useful in building stake signal um like this as a developer this is something you want to learn in terms of building something that interacts with compound so uh compound.js uh all the data from the protocol is there uh web 3 so basically being able to interact with metamask and with uh inferior and other data sources and the blockchain for logging with metamask um check out the github that i posted but also um these are this is how i implemented it with uh sig util ethereum jsutil and json web token for state signals api uh with node.js express and jwt decode uh for automation uh for like javascript automation i used bull um and then for securing things like secret environment variables ius.
n and then other useful tools to learn sort of as a blockchain developer building apps uh use infra for on-chain data um use firebase to rapidly deploy and uh redeploy your app uh and then bull um and redis uh for your worker processes so that's how i got the automation uh that drive stake signal in is uh by learning bull uh by using it managing the the automated polling the automated triggers all that stuff um so it's super helpful in terms of building out an automated system and then sort of a road map for where state signal is going uh so i don't have too much time left but i'd like to conclude uh here text alerts is the next major thing so i have the text alerts i need to work out sort of all the things with subscribing unsubscribing things like that i'd like to provide public data on protocol health so basically a downloadable csv just consume the data from my website turn it into a csv provider for the users and then i think last and but most important is um the way safety tools originally envisioned with email and text i think is not quite right i think for crypto uh lots of people value their privacy uh and you know having a service that is consuming your email and your phone uh even though for me i'm i'm encrypting everything there's no way for somebody reading the database to get it or link that the unencrypted email or phone to your account i still think that a lot of people prefer to have a higher level of privacy so i'd love to get um suggestions uh feedback things like that on what sort of api i can build uh that will let people get secure but also timely notifications on their account uh and i think that's sort of like for the next year um where i want to take uh state signal um so yeah thank you guys very much um and that is it i highly recommend people work for compound you know whatever you know how to do um there there is a place for you a super open community and literally it's as easy as just log into discord and and say what's up i'm here to help uh thank you amazing thank you so much patrick that was a such a good presentation and it was a cool utility i mean this is clearly something that compound and so many other projects need to um i think you kind of brought up one interesting point which i want to highlight for everybody watching it's it you don't necessarily need to know how to write smart contracts to be part of this uh so much of what we're doing integrates and still works really well with the web 2 world so if you're a back-end developer front-end developer you just understand how to work with apis to do certain things those are still valid options and utilities and exactly what you're just building on is a perfect example of that you can still tie this into how emails work and people still need this so that's that shouldn't be barrier to entry and you're kind of proven that with that excellent product um so that's amazing i was gonna say i think one obvious thing that you can think about is just having web workers in the background so instead of running and tying into different services you can just have what workers do a push notification um directly you know just be a cool one because then you can also offload the infrastructure on the client side uh but that's awesome but uh cool so great thank you so much [Music] [Applause]
Automatic transcript — names and jargon may be misspelled.