MetaMask News

Snapshot Snap: Custom Notifications For On-chain Activities

“Snaps is the obvious future of web3.” thinks Minci, an independent developer who built the Snapshot, a MetaMask Snap that allows users to set up their own custom notifications for on-chain activities.

by MetaMaskOctober 28, 2022
snapshot feature

Snaps is the roadmap to making MetaMask the most extensible wallet in the world. As a developer, you can bring your features and APIs to MetaMask in totally new ways. Web3 developers are the core of this growth and this series aims to showcase the novel Snaps being built today.

Snapshot Snap With Minci

We chat with independent Web3 developer Minci who built the Snapshot Snap at the ETHWarsaw Hackathon—a proof-of-concept application to set up custom notifications for on-chain activities.

Snapshot: Demo Video

Snap Repo:

Why did you build it?

I find the idea of wallet notifications for on-chain events fascinating. We see it everywhere in web2 with PayPal and Venmo, but the fact that indexing makes it such a challenging feature for web3 is an interesting technical problem to think about. I wanted to try creating a proof of concept application that allows any user to set up their own custom notifications for on-chain activities. I used Metamask Snaps' implementation of notifications in order to build out my prototype.

Can you walk us through the technical implementation?

The technical implementation involved first setting up a notification snap by triggering an installation through a client-side application. Then, the user configures the snap to listen to the on-chain events of their preference. The vision here was that the user would be able to whitelist any contract address and their associated events such that they would prompt not only a notification but also automated on-chain actions such as sending a transaction or executing a DEX trade based on the trigger. The automated send was made possible by deriving the user’s private key from a BIP44 Address Key Deriver (shoutout to Olaf for his workshop using this library) such that the action would go through without an explicit confirmation from the user. My proof of concept was limited to an example of bidding on Opensea and was actualized using Opensea’s API on Rinkeby testnet.

What are the next steps if you would implement this?

The demo video was based on a proof of concept that only worked for a handful of pre-configured use cases (bidding on Opensea, automating a send of ether). Next steps to actualize this vision would be configuring some type of storage to be able to dynamically update the events that the snap listens to without having to re-install the notification snap. Also showcasing a dashboard for users to monitor their existing snaps and visualizing the events that were triggered in a single-view would be useful. Also, providing a much more customized range of automated trigger actions beyond just sends but enabling a set of more complex contract calls like setting limit orders or arbitraging.

When were you first introduced to MetaMask Snaps and what was your experience like?

I was first introduced to Snaps when I visited a Metam]Mask booth at the Miami Permissionless conference. The idea that this could become a plugin ecosystem for MetaMask made me really excited.

What makes MetaMask Snaps different from other wallets?

No other wallet has customizable plugins tailored towards developers. I believe this is singular to Metamask in the entire ecosystem.

Tell us about what building Snaps with MetaMask is like for you and your team.

Frankly, building with Snaps wasn’t a walk in the park. I think the lack of proper documentation was the biggest drawback. Thankfully, there were enough interesting examples to be able to derive my own innovation from those building blocks, so I could strongly recommend any developer interested in building with snaps to dive straight into the examples repo.

What does Snaps mean to you?

Snaps is the obvious future of web3.

What opportunities do you see with MetaMask Snaps and the possibilities it unlocks for the Web3 space?

Snaps could unlock a boundless world of possibilities in web3. Just like Chrome has now become the go-to browser with the extensions ecosystem and VSCode similarly with their own extension marketplace. I could totally see Metamask Snaps taking Metamask to the next level by allowing developers to onboard onto the tooling and wildly innovate to customize the wallet to their liking (and in turn, attract users who find those tools useful). An interesting tokenomics would be built around the developers who offer the most compelling Snaps.

Any advice you would like to share with developers keen to try MetaMask Snaps?

I’d urge anyone interested in Snaps to dive straight into the example repo, fork it, and play around with it!

Building with Snaps

To get started with Snaps:

  1. Checkout the developer docs
  2. Install MetaMask Flask
  3. Check out a Snaps guide
  4. Stay connected with us on Twitter, GitHub discussions, and Discord

Keep an eye out for our team at the next hackathon in an area near you! Happy buidling ⚒️

Disclaimer: This Snap was built at a hackathon and is a proof of concept and prototype.

Receive our Newsletter