Please describe your proposed solution.
What is MetaMask? What are Snaps?
MetaMask is the most-used cryptocurrency wallet in the world. It has a reported 30 million monthly active users, and around 8 million daily active users. MetaMask has native support for all EVM (Ethereum-based) blockchains.
Recently, the MetaMask team released MetaMask Snaps: community-built extensions that add support for non-EVM chains (like Cardano) to MetaMask wallet, and allow MetaMask users to connect to non-EVM dApps using just MetaMask (no need to install any new wallet).
What is Cardano MetaMask Snap?
Cardano MetaMask Snap is the infrastructure used to create a Cardano wallet from a MetaMask wallet identity, but the Snap itself isn’t a full wallet – its functionality will be similar to a hardware wallet, so it will derive keys, sign transactions, and parse information from transactions to show the user information about the transaction they are going to sign.
For full wallet functionality (to show asset balances, construct transactions, etc.) it would be necessary to know the blockchain state and this is not possible in the current Snap version. For full functionality, the Snap needs to be combined with an external tool.
We decided to follow a similar approach as the popular Solana wallet Solflare which built a widget for dApps that enables MetaMask users to use Solana dApps. If you have MetaMask installed, you can see this work on popular Solana dApps such as Jupiter, Solend or Jito. Additionally, you can see the user experience in an enclosed video showcasing the prototype of our NuFi widget in combination with our prototype of the Cardano MetaMask snap. The NuFi widget that will utilize Cardano MetaMask Snap is not part of this Catalyst proposal.
Is this already in development?
Yes, it is. We are already working on a “blind signing” beta version of Cardano Snap. We plan to have it audited and released in January-February 2024.
However, the current solution is not ideal or future proof because, when a user signs a transaction, MetaMask will serve as a ‘blind signer’ and the user won't be presented with transaction details, making it impossible to confirm the contents of the transaction they are signing in MetaMask (the user will be able to do it in the NuFi widget but they have to trust the NuFi widget).
What is this Catalyst proposal for?
This Catalyst proposal is for the implementation of transaction parsing functionalities into Cardano MetaMask Snap, so a user is able to see detailed transaction information in the MetaMask wallet interface and can independently verify that the transaction they are signing is not malicious.
Why is this important?
Once this audited snap is released, it can be forked and easily used by other Cardano wallets or dApps. The user won’t have to trust the wallet or dApp with the details of a transaction, rather the content and details of the transaction will be visible directly in the MetaMask wallet interface.
The Cardano MetaMask Snap will mimic the logic of Ledger and Trezor hardware wallets and support all the transaction types currently present on HW wallets and display at least the same information about the transaction as HW wallets are displaying (with better UI than HW wallets).
Therefore users will be able to see:
- details about the ADA or tokens they are sending
- the fee
- destination address
- information about staking-related transactions and more
We will include support for:
- all used Cardano certificates (including voting-related certificates)
- off-chain message signing
- multi-sig transactions
- smart contract transactions
We will not include the support for Stake Pool operation transactions as we don’t expect this to be a real use case for Cardano MetaMask Snap users. But these transactions will still be executable in a blind signing mode.
As the Snap does not have any information about the external world, we will have to hard-code the supported token list and token decimals into the Snap. This is a bit inconvenient because this will have to be updated from time to time but we commit to do this at least quarterly for the following 24 months.
These Snap token list updates are immaterial and do not impact security, therefore they won't require external audits (and shall be audited just by the Consensys team for free). The formula for the content of the hard-coded token list is yet to be determined but it will be probably similar to the hard-coded list for Ledger wallet (Top 100 tokens by market cap).
Using the solution
Initially, the Snap can be utilized with NuFi widget that is currently in development. Dapps that want to support MetaMask users can implement NuFi widget SDK. The implementation will be trivial for any dApp with CIP-30 support.
We expect that in the future other wallets can create their widgets or even dApps can implement their own integrated wallet functionalities to accommodate MetaMask users.
See Cardano MetaMask Snap in action here
You can see the Cardano MetaMask Snap user experience in the video below showcasing the prototype of our NuFi wallet widget in combination with our prototype of the Cardano MetaMask Snap. The NuFi widget that Cardano MetaMask Snap will utilize is not part of this Catalyst proposal.
<https://www.youtube.com/watch?v=GdNXyh33YLs>You can also try our prototype here.