Snapshot Snap: Custom Notifications For On-chain Activities

“MetaMask 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

MetaMask 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 MetaMask 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: https://github.com/iamminci/snapshot

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 MetaMask 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 MetaMask Snaps with MetaMask is like for you and your team.

Frankly, building with MetaMask 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 MetaMask Snaps mean to you?

MetaMask Snaps is the obvious future of web3.

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

MetaMask 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 MetaMask Snaps.

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

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

Building with MetaMask Snaps

To get started with MetaMask Snaps:

  1. Checkout the developer docs
  2. Install MetaMask Flask
  3. Check out a MetaMask 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: MetaMask Snaps are generally developed by third parties other the ConsenSys Software. Use of third-party-developed MetaMask Snaps is done at your own discretion and risk and with agreement that you will solely be responsible for any loss or damage that results from such activities. ConsenSys makes no express or implied warranty, whether oral or written, regarding any third-party-developed MetaMask Snaps and disclaims all liability for third-party developed MetaMask Snaps. Use of blockchain-related software carries risks, and you assume them in full when using MetaMask Snaps.

Receive our Newsletter