Riff Safety Analytics and Transactions Explainer

Riff Safety Analytics and Transactions Explainer

Safe, Secure, and Understandable Blockchain Transactions

Riff Safety Analytics and Transactions Explainer

Riff Safety Analytics and Transactions Explainer

Safe, Secure, and Understandable Blockchain Transactions

The problem Riff Safety Analytics and Transactions Explainer solves

Our Riff safety analytics snap for Metamask is a solution to a common problem faced by cryptocurrency investors, traders, and users. The problem is that when interacting with smart contracts on the blockchain, users often do not have a clear understanding of the safety and reputation of a particular contract. This can lead to users falling victim to scams or other malicious activity, resulting in significant financial loss.

The snap addresses this problem by providing valuable information and analytics about smart contracts directly within the Metamask wallet. This information includes the total number of transactions, distribution of function calls, and top accounts interacting with a particular contract, as well as a safety tag to indicate the level of risk associated with a contract. By providing this information in an easily accessible format, the snap helps users make more informed decisions about which contracts to use and which to avoid.

In addition, our snap goes further to provide a feature that explains the code for a transaction in simple language, using an OpenAI LLM. This is particularly useful for non-technical users who may not have the expertise to understand the code on their own. By making the code more accessible, our snap helps users avoid scams and malicious contracts, ultimately leading to a safer and more secure blockchain experience.

Overall, our snap provides a valuable service to cryptocurrency investors and users by improving the security and usability of smart contracts on the blockchain. This could potentially attract more users to the Metamask platform, leading to increased usage and adoption, and in turn, potentially benefiting investors and stakeholders.

Note: We would like to bring to your attention that for the EthForAll hackathon, we have updated our snap to use Metamask Snaps UI and have added an explainability feature to it by using OpenAI models. Transaction analytics has been a WIP from before the hackathon.

Challenges we ran into

We've run into several obstacles along the way, including:

  1. When we started building this snap, we found a difference between the example snaps in the mono repo and what the then-current Metamask Flask version supported. This meant we could not use snaps UI in our transaction analytics snap. To solve this, we had to refer to some older tutorials for snaps. However, this changed just yesterday (at the time of writing), when we had to change and incorporate newer changes for the snaps UI. It would be great to have more stability in the snaps development process.
  2. We're also facing a major challenge with the UI and UX of our snap as the capabilities of snaps UI are very limited. We would benefit from custom HTML components supported via markdown or equivalent. This is crucial because our users would understand the analytics easily if they are presented in a more readable way.
  3. Working with OpenAI models has also been challenging as we had to test multiple models and design a prompt that would work with our case. We had to test multiple prompts on models whose pricing fits our budget.
  4. Lastly, we're figuring out a way to cache data fetched from Etherscan and rate limit our APIs such that they remain useful to our users but also help our monthly pricing. We're considering using Redis or MongoDB for contract data fetching.

Despite these challenges, we're making progress in finding solutions to each one. We're committed to delivering a high-quality extension that will help users make more informed decisions about smart contract security.

Tracks Applied (1)

ConsenSys: Metamask Snaps

We believe that it qualifies for the Metamask prize track for several reasons. Firstly, we have leveraged the Metamask w...Read More

ConsenSys

Discussion