Grant Proposal : Token Approvals

Conflux token Approvals – TIER 1

APPLICATION INTRODUCTION

As explained on the Conflux Grant Propositions file (https://confluxglobal.notion.site/f0d66afcd95f4f9ebfb61e142252ea1d?v=e739ccd4ae3c41d6b0c8386293d02659), an essential part of interacting with dapps that use ERC20/CRC20 or other digital assets is the token approval step.

The usual flow is

  1. User calls token.approve(dapp, limit),
  2. User calls dapp,
  3. dapp calls token.transferFrom(user, amount). Token approvals let the dapp manage your funds and as such they are a source of risk. We need a simple website that allows the user to check their current outstanding approvals on Conflux Core and Conflux eSpace, and reduce/cancel them if they wish.

Purpose of the system : This project improves users’ security by helping them become aware of the amount of funds in their wallet that might be operated by other actors. It is essential infrastructure that improves the overall UX of Conflux.

Scope of the system: The application will be public and accessible to all, deployed on a CDN. Users can check token approvals of any adresses and connect their wallet to revoke any token contracts.

Requirements:
- The user can input one or more addresses to check.
- The site should check the current balance and approval limits for all commonly used tokens (e.g. top n here: https://confluxscan.io/tokens/crc20) and display it to the user.
- The user then can adjust their token approvals conveniently through this site.
- The site should support both Conflux Core and Conflux eSpace.
- The project should be a static site with no backend, and it should be open-sourced.

Definitions, acronyms, and abbreviations : Conflux token Approvals

TEAM :
I would be alone on this project, I have been a JS developer for over 8 years: https://www.linkedin.com/in/crabiller/
I have participated in the development of many large-scale projects as well as several open source projects. I have the experience to lead a project alone from development to production.
I’m also the creator of https://www.conflux-pos-validators.com/
Link to my github : https://github.com/Charlie85270

TOTAL BUDGET AND FUNDING TIER

The approximative budget is 100$ x 38h (6 full days) = 3.800$ (TIER 1)

CURRENT FUNCTIONALITY

This project improves users’ security by helping them become aware of the amount of funds in their wallet that might be operated by other actors.

The UI/UX will simple and pleasant (same style as https://www.conflux-pos-validators.com/)

We’ll retrieve the same functionalities as https://bscscan.com/tokenapprovalchecker

Performance : The site will be generate with NextJS (SSG)
Supportability : Supported by all browser
Packaging : Source code + documentation = Github (open source)
Legal / Licensing : MIT

DEVELOPMENT ROADMAP

Initialization of the project (Github, CI, Documentation) : 4 hours
Development of the project (SDK integration, user wallet integration, UI/UX): 30 hours
Release of the project (hosting, domain configuration, ect …) : 4h

Specification of the software

ReactJS (last version)
NextJS (last version)
Tailwind CSS (last version)
Typescript (last version)
useWallet Fluent Hook (https://use-wallet.fluentwallet.dev/#/api/function)

I’ll use the Static site generation feature from NextJS to improve performance and SEO of the application.

MAINTENANCE CONSIDERATIONS

I can maintain the project or delegate the owner role of the repo to a conflux member team maintain the source code.

4 Likes

Hi @Charlie, thanks for applying for this grant!

Can the site also list NFT approvals? Or only ERC20?

You mention the “useWallet Fluent Hook”. Keep in mind though that on eSpace most users will use MetaMask. So you need to make sure useWallet works with eth or add a wallet abstraction layer.

1 Like

Hey Peter !

As a first step I’ll start with ERC20 approvals. In a second step I will add the support of other tokens (NFT). Right I forgot to specify this part, I will use the fluent hook for the coreSpace and ether.js (https://docs.ethers.io/) for the connection with Metamask for the eSpace :+1:

1 Like

Ethereum also has a 'use-wallet' package, I think it’s the same API as the Fluent one.

Overall your grant application looks good to me. This is a relatively simple but very useful dapp, especially once we have more DeFi projects and capital on eSpace. Let’s wait for some feedback from other grants committee members.

1 Like

Hello Charlie, thanks for applying for this grant!
I have a couple of questions:
1 - Will the app detect all ERC20 approvals a user has automatically, or will you need to add the tokens manually?
2 - In your proposal you mention this: “The site should check the current balance and approval limits for all commonly used tokens (e.g. top n here: https://confluxscan.io/tokens/crc20) and display it to the user.” So my question is how do you decide which is this “n” variable?

Hey Nico !

1 - Will the app detect all ERC20 approvals a user has automatically, or will you need to add the tokens manually?

The app will automatically detect all ERC20 approvals

2 - In your proposal you mention this: “The site should check the current balance and approval limits for all commonly used tokens (e.g. top n here: https://confluxscan.io/tokens/crc20 1) and display it to the user.” So my question is how do you decide which is this “n” variable?

I consider “All commonly used tokens” all tokens with at least 50 holders. All these tokens will be supported.

1 Like

Support for top 50/100 ERC20, ERC721, and ERC1155 tokens on Core and eSpace basically covers everything important. The main functions are simply listing the current approvals (with a dollar equivalent from a free API like CoinGecko when applicable), and allowing the user to cancel/reduce their approval.

As an optimization, you can check out the MultiCall contract. It allows you to get all the approvals in a single request.

This all looks good so far, we can formulate the details after the grant is approved. As for me, I approve this application. (fyi: 2 approvals are required, and we will follow up with you after that about the next steps.)

2 Likes

Hello Charlie, I approve this application as well. With this two upvotes we are ready to move forward with the next steps. Thanks again for applying for this grant. Regards.

3 Likes

Hi Charlie

How are you doing I send you a connection on linkden I will like to have a little discussion with you

My name is Abdulsalam I’m from Nigeria :nigeria: I will like to be helpful in one way or the order I’ve been in crypto space since 2017 I can set up a community do management and generate real user :bust_in_silhouette:

Thanks