Skip to content

ERC20 and NFT Allowance Management Feature

pmjanus edited this page Mar 27, 2023 · 2 revisions

Title: ERC20 and NFT Allowance Management Feature

Product Requirements Document (PRD)

Date: 2023-03-24 Prepared by: Julio Peguero

Overview

The goal of this feature is to provide users with an easy-to-use interface to manage their ERC20 token and NFT allowances granted to various decentralized applications (dApps) on the Telos EVM Network. Users should be able to view, track, and revoke allowances as needed to regain control of their assets and minimize potential risks associated with granting permissions to third parties.

Objectives

  1. Allow users to view all their ERC20 token and NFT allowances in a comprehensive list.
  2. Enable users to easily revoke allowances granted to dApps or contracts.
  3. Provide a responsive interface that works well on both desktop and mobile devices.
  4. Display relevant information such as token/NFT icons, tickers, allowance amounts, and contract details.
  5. Support localization, starting with English, and enable easy expansion to other languages.

Functional Requirements

  1. Retrieve and display ERC20 token and NFT allowances associated with a user's address on the Telos EVM Network.

  2. Show the following information for each token/NFT allowance:

    • Token/NFT icon (if available)
    • Token/NFT ticker
    • Token/NFT amount
    • Allowance type (Unlimited, None, Specific Amount)
    • Allowed spender (contract name or address, link to teloscan)
    • Date of allowance change
    • Revoke button
  3. In mobile view, show the following information initially:

    • Token/NFT icon
    • Ticker
    • Allowed spender
    • Revoke button
    • On click, expand to show all data available in desktop view.
  4. Order the list by:

    • Token/NFT amount in fiat (if available)
    • Token/NFT amount (for tokens/NFTs without fiat value)
  5. Implement the revoke functionality to revoke the allowance granted to a specific contract.

  6. Include localization support in the MVP, starting with English, and enable easy expansion to other languages.

Non-Functional Requirements

  1. The feature should be designed with a focus on user experience and ease of use.
  2. The user interface should be visually appealing and easy to navigate.
  3. The feature should provide fast loading times and be optimized for performance.
  4. No data should be stored by the application; most of the code should run on the client-side to support a large number of users.
  5. Ensure security best practices are followed and the code is thoroughly tested to avoid giving users a false sense of security. Include a disclaimer on the site indicating that the application may not track all ERC20 tokens or NFT collections.

Future Enhancements

  1. Add filtering options to allow users to filter the list based on specific criteria such as token type, allowance type, allowed spender, or contract address.
  2. Edit the allowance amount with an edit button next to the allowance.

Conclusion

The development of this ERC20 and NFT allowance management feature will empower users to take control of their digital assets more effectively on the Telos EVM Network. By providing an easy-to-use and visually appealing interface, users will be able to view, manage, and revoke allowances granted to dApps and contracts as needed. With built-in localization support and a focus on performance and security, this feature will enhance the overall user experience and contribute to the success of the web3 application.