Inspiration

In the web2 world where everyone can log in with Google/Facebook and use their emails as an identification layer (that doubles as a communication one), we have come used to receiving important emails for stuff that matters to us (reset passwords, new listings, alerts we setup, new features, etc.).

On Web3, we respect privacy so much that we have completely disconnected all forms of communications between users, which isn't great as people can't message each other, and they have to constantly refresh their dashboard to see their current positions and be alert about their potential liquidations, see if the validators have increased their commissions, check about new governance proposals and NFT projects launching their mints soon, and so on and so forth.

What it does

The main idea for the project is that after users register for an account with their wallet (by signing a transaction that gets sent to our APIs), they can connect their Discord and/or Telegram accounts in order to use those platforms to receive the notifications (in the forms of DM's from our bots, or channel messages) and this way we build a communication bridge. People choose what on-chain actions they'd like to trigger notifications (validator profile (commission, name, etc.) changes, price alerts, NFT sales/listings, governance proposals, etc.), and then whenever they happen (in real time, without any delay), the users get notified! For this proof-of-concept, we were only able to sign up, log in and confirm the identity of the wallet, log in with discord, and make the alert type called "wallet watcher" functional. For the platform to work the user needs to go to the sign-up page and create an account with a testnet wallet address. All the other notifications still need further adaptation but the repositories for tokens, and NFT collections are already made and available which allows the owners or fans of the NFT collections to submit a pull request to add them to the supported NFT collections to track.

How We built it

We started by building a simple Discord bot that subscribed to new blocks whenever they happened, and then filtering all the TXs and understanding them so we can parse them into actionable data. We eventually decoupled those responsibilities into a more micro-services-oriented architecture, so that we can have multiple bots on multiple platforms all work independently from each other without running the same code.

Challenges We ran into

The first day was complicated to organize ourselves since the rain didn't give us many conditions to program. With no place to plug in our laptops to charge, in the afternoon the entire team went home to program and only one member stood in the building asking questions to the mentors. We spent tons of time looking for a solution to log in and confirm the identity of the wallet without associated costs. Only with the support of the mentor was that possible. It was very hard to find documentation about that part (signing data with the wallet without broadcasting on-chain). Building as much as possible on the Cloudflare Workers platform (which uses Kubernetes), we were extremely limited in which features we could run on the cloud's edge network and spent a significant amount of time arranging workarounds.

Accomplishments that We are proud of

Having a lot of data cached on the edge efficiently allows us to build a ridiculously fast web app that is unprecedented for most Web3 applications that rely on slow infra (or aren't as efficient at least). We truly built a web app that has multiple front-ends (the web app and all our bots serve the same capabilities and are in sync in terms of user settings), and almost feels magical.

What We Learned

DO NOT RUSH! It's hard, especially during hackathons, but early mistakes can have a big cost over time. Trying to innovate everywhere you can makes you actually develop much slower as you are finding bugs on other people's beta software that you are relying your project on. Pick your battles, don't try to be the best at everything, or at least not all at once. Iterate through different steps and technologies.

Final notes

We are applying for the Web2 to Web3 track where we use the advantages of web2 social platforms to empower the DeFi world. We received a grant from Terra to develop this platform and it is now in the audit phase there. We decided to use this hackathon to start the implementation on NEAR.

Notes about open-source repos

We have a few open-source repos on our Github organization, however, we were not able to open-source everything we built during the hackathon, as we are aware of some weaknesses in the code that can potentially dox users and we prefer to not release the code until we have a security audit and fix the issues found. These are the repos we recommend taking a look at:

We also updated these components (which we, unfortunately, can't open-source yet):

  • Middleware layer running atop of Cloudflare Workers;
  • The web-app front-end itself;
  • Discord bot;

See our demo videos here (it's a playlist), and the presentation video we made for the hackathon here.

Built With

Share this project:

Updates