MinaMap - Transaction flow visualizer

This topic is to discuss the proposal submitted by @wzqs .Please see below for the details of the proposal and discussion.

29th Aug ,2024
Current status: Funded.
This proposal is approved for funding. Opensource tooling for transaction analysis is a public good for the ecosystem. This tooling should help researchers and the community to investigate on-chain activity. There is also interest shown by mature ecosystem projects to integrate this into their stack on completion. The funding requested is in line with the work proposed. We expect the risk to be low for this project and the impact to be medium

20th Aug ,2024
Current status: Under Consideration.
Opened for community discussion on :20th Aug, 2024.

Title

minamap: Chrome Extension for Tracking Transaction Flows on the Mina Blockchain Explorer

Project Background

This proposal aims to develop a Chrome extension that enhances user interaction with the Mina blockchain explorer. The extension will allow users to track transaction flows and conveniently display address labels. It will be compatible with common Mina blockchain explorers, such as Minascan and Minaexplorer. The extension will add a query button to the address page you visit, and when you click it, the extension will call the Mina blockchain explorer’s API on the current active page to generate a graphical interface for transaction flows.Currently, there are no dedicated Chrome extensions tailored for Mina(similar product: https://chromewebstore.google.com/detail/metasuites-builders-swiss/fkhgpeojcbhimodmppkbbliepkpcgcoo?pli=1) that provide such functionality, making this initiative both novel and necessary.

Proposal Overview

Problem

There is a lack of user-friendly tools for users to analyze fund flows and display address labels directly within the Chrome browser for the Mina blockchain.

Solution
Develop a Chrome extension that calls the Mina blockchain explorer’s API, then generates a user interface graph with popular Mina blockchain explorers. This extension will provide users with the ability to efficiently track fund flows and display address labels.

just like this:

Audience
The target audience includes Mina blockchain users who require easy access to analyze fund flows and address labeling functionalities directly from their Chrome browser.

Architecture & Design

Detailed Design/Architecture
The extension will consist of frontend components for user interfacing with Mina blockchain explorers’ APIs. It will utilize modern web technologies and adhere to Chrome’s extension development guidelines for seamless integration.

Vision
Our long-term vision is to evolve the extension into a comprehensive suite of tools that not only track transaction flows and display addresses but also integrate additional features based on user feedback and technological advancements.

Existing Work
N/A

Production Timeline
Expected production timeline: 3 months post funding approval.

Budget & Milestones

Deliverables

  1. Functional Chrome extension for tracking transaction flows and displaying address labels.Regarding transaction flows, the API request will query all incoming and outgoing addresses, which will be visualized. Address labels will also be added if they exist.
  2. Documentation and user guide.

Mid-Point Milestones

Completion of frontend development and initial Mina BlockChain API integration.

Project Timeline: 2M - 2.5M

  1. Month 1: Detailed design and frontend development.
  2. Month 2: Mina BlockChain API integration and initial testing.
  3. Month 2 - 2.5: Final testing, documentation, and release.

Budget Requested: 6,000 MINA

Budget Breakdown

  • Development and Design: 2,000 MINA
  • Testing and Quality Assurance: 2,000 MINA
  • Documentation and User Guide: 2,000 MINA

Wallet Address
B62qmdhpUCA8fy6oFeMY41XS5EN7ad2RVKamSkmrfYcn2zWWLrJW1b5

Team Info

Proposer Github: wzqs (wzqs) · GitHub

Proposer Experience: Cryptocurrency Exchange

Team Members: vv

Risks & Mitigations

Risks

  1. Dependency on external APIs and data sources.
  2. Compatibility issues with future Chrome updates.

Mitigations

  1. Implement robust error handling and fallback mechanisms.
  2. Maintain active development to address compatibility issues promptly.

By addressing these aspects comprehensively, we aim to create a valuable addition to the Mina blockchain ecosystem, enhancing usability and expanding its user base through accessible tools and intuitive interfaces.

3 Likes

The analogous extension works on etherscan website. On what domains are you going to overlay the interface ?

My initial plan is to support the following browsers:

I can also support other popular Mina blockchain explorers if needed.

2 Likes

Hey, I’ll be happy to include the extension part in pallad.co, and add the visualizations for Minascan. CC: @Ducca @vhorba

3 Likes

Minascan team would be interested in integrating the TX flow visualizer into our services.

1 Like

This proposal is approved for funding. Opensource tooling for transaction analysis is a public good for the ecosystem. This tooling should help researchers and the community to investigate on-chain activity. There is also interest shown by mature ecosystem projects to integrate this into their stack on completion. The funding requested is in line with the work proposed. We expect the risk to be low for this project and the impact to be medium.

1 Like

As an idea for the second stage of this project, it would be great to visualize all AccountUpdates in the transaction in 2 modes:

  • List of AccountUpdates as it is seen on the sent transaction after tx.send() and displayed in the explorer
  • Tree of the AccountUpdates (including visualizing parent-child relationships, labels, callDepth, authorization status, etc) for the transaction produced by Mina.transaction before flattering.
2 Likes

Good Idea. I’ll take your suggestion under advisement.

1 Like

Here’s an update on the current progress and some issues (it’s been a while since the last update):

repo: GitHub - wzqs/minamap at dev

  1. Chrome Extension Homepage Completed
    • Implemented functionality:
      • Supports input of MINA wallet addresses (limited to 55 characters, allowing only letters and numbers)
      • allow users to jump directly from the extension to the blockchain explorer.
      • Displays currently supported blockchain explorers and features

  1. Fund Flow Tracking
    • Currently supports MinaExplorer, but some details still need improvement. For example:
      • The fund flow lines
      • Date and number of transactions need to be added…
      • UI Optimization

some issues
Generating the fund flow chart relies on the web API of the currently accessed blockchain explorer. This works fine with MinaExplorer, but I noticed that when querying Minascan, I easily trigger the API access restrictions. I suspect this is due to Minascan’s Cloudflare, which would prevent me from allowing users to call Minascan’s web API during use. This could easily result in the users’ IPs being banned, making it impossible to access Minascan properly.

My current idea is to use Minascan’s free OpenAPI interface, which, according to the documentation, allows for 5 million free calls. However, this introduces a new problem: since the extension doesn’t have its own backend service, I would have to hard-code the API key for accessing the OpenAPI in the extension’s front-end code. Is this acceptable? In principle, API keys should be stored securely.

2 Likes

Hey @wzqs - would it be possible for extension to take a user input for their own API key? Also tagging @vhorba for any minascan insights.

2 Likes

That’s a great idea! I can support this feature! However, users may need to register for an account on the Minascan Open Platform. For regular users, they can choose to use MinaExplorer instead. Thanks for your suggestion!

1 Like

Hi. We are ready to assist as always.
What about using the “use server” nextJS module to keep this key?

Thank you for your suggestion! First of all, this extension is essentially a frontend project, and I developed it using native JavaScript, HTML, and CSS, so I don’t think I can use the “use server” Next.js module you mentioned (if I understood correctly). I think @hgedia ’s suggestion is pretty good—users who want to view fund flow graph on the Minascan block explorer can manually enter their own API key, which I think is reasonable. Those who don’t want to input an API key or don’t know how to use it can continue using MinaExplorer. Thanks again for your help!

2 Likes

Let me know if you need any assistance; we’ll create a Discord or Telegram group to help you promptly and guide you on how best to utilize our services.

1 Like

I recently made some minor optimizations to the fund flow display interface and provided a small usage example alongside it.

As an example of phishing address analysis, many of us have likely received micro-transactions from phishing addresses. These phishing addresses are typically flagged as scam-related in common Mina blockchain explorers and wallets.

For example, the address B62qp2TDMr9Sj4gBzNeSoKvZns3ob3kQNhHwrCVKN1WzomHxHF8b9EV has been flagged as a phishing address in MinaExplorer. Let’s check its fund flow. (let’s ignore the outgoing addresses on the right side.)

It is clear that the addresses transferring funds to this address are also phishing addresses. We can simply click on the address, which will redirect us to its page on MinaExplorer. Then, we can continue by clicking the “Fund Flow” button.

It is evident that the addresses on the right side are all phishing addresses because this wallet needs to provide funds to these phishing addresses, enabling them to send mass micro-transactions, each with memo labels containing phishing characters.

However, some phishing addresses identified through Minamap are not universally labeled as scams by common blockchain explorers and wallets.

I have an idea to provide an API interface through Minamap for querying current phishing addresses, allowing other explorers or wallets to address any gaps in their scam detection. Additionally, I will integrate this feature into my plugin, which will also provide addresses of known phishing websites for other services to call. Furthermore, the plugin will include pop-up alerts when accessing these phishing sites.

1 Like

If it is integrated into Explorers, I think it will provide a nice user experience.

Done, please check READEME.md

Now released on the Chrome Web Store.

2 Likes