Metamask Snaps for Zenon

After a quick dive into these snaps they seem pretty cool.

The snaps are completely open and permissionless, meaning that we don’t need to worry about having to publish anything to an “app store”. We just publish an npm package.

I suspect there will be a ton of development & hype happening around snaps in the near future since the barrier for devs to start building is very low, and you don’t have to worry about lots of the annoying complexities of building a complex extension because MetaMask handles that for you.
And like Aliencoder said, you get access to the MetaMask userbase of millions of people so you don’t need to onboard them into your own extension.

EVM <> Zenon dapps like the bridge can build a full experience for the user, only requiring MetaMask to be installed. Nothing stopping us from adding Bitcoin functionality into the snap as well.

For the purpose of allowing low effort, maximally easy onboarding into our network, I think this is a good option for that.

Some technical aspects and ideas to consider:

  • I think being able to send PoW transactions with the snap is crucial for an easy onboarding experience. The need for gas in EVM networks is such a UX painpoint.
    Apparently WASM can be used with snaps, but there seem to be limitations to how long a background process can be executed for on the snap: https://docs.metamask.io/snaps/concepts/lifecycle/
    60 seconds may not be enough to send a PoW TX but we’ll need to investigate this some more.

  • It would be nice to allow the user to use a local node with the snap. The snap could work as a proxy between a webapp and a local node. We would have to define an RPC interface that webapps could use to make RPC calls to the node through the snap.

  • Cron jobs could possibly be used to automate the receiving of TXs in the background (among other stuff): https://docs.metamask.io/snaps/reference/exports/#oncronjob

  • The snap could be used as just a simple keystore & node provider for dapps. UIs for basic NoM functionality (like staking, delegating, etc.) and the EVM bridge could be provided by webapps (that anyone can build) and the snap would just be used to sign & send transactions and provide a node connection. Of course all this functionality could be built directly into the snap as well.

I’m impressed at what MetaMask is doing here.

Yes exactly. Could probably make a smooth experience between ETH <> ZNN <> XZNN.

10 Likes