Giveth / impact-graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom token donation verification issue

aminlatifi opened this issue · comments

Donations made with custom tokens flow will be incomplete (stays in the pending state forever) if we haven't listed the token in our supported tokens.
In other words, the custom token support isn't open to accept donations in any new token.
We have two options:

  1. Restrict custom token donation to the list of tokens we support
  2. Update our donation verification process to verify custom token donations. If we go for that, we still won't have the price and we must either consider it as unknown or again think about a way to fetch the price.

I write here to just dont forget myself, if we want to do it instead of throwing an exception in

const provider = getProvider(networkId);

we should get decimals and token's symbol from chain like below comment (and do the same for solana)

https://stackoverflow.com/a/67806822/4650625

I don't think we have to support custom token for solana!

@divine-comedian @aminlatifi @mohammadranjbarz whats the status of this task? Do you need any help or business/product/tech confirmations here?

@divine-comedian @aminlatifi @mohammadranjbarz whats the status of this task? Do you need any help or business/product/tech confirmations here?

I think first of all we need to know what we want to do, because if we verify the donation we still could have problem on filling price, do we want to keep this feature?

@aminlatifi can we detect if we can support the price or not when the user pastes the address, then if we can't we through error.
If it's possible I vote for the 2nd suggestion you provided.

For now, what is important and P0 is to remove this feature from prod if it's buggy.

I'm okay if we can not show the price if it isn't in our list of supported tokens - so we can verify the donation, show the donation on the project's list of donations received but we're not responsible for fetching a price for a token we don't support.

Do we know how often this happens? If we choose to support the token later will the price be fetched retroactively?

Many custom tokens have prices close to 0. The list of custom tokens should be something we maintain actively. What do you say @laurenluz @MoeNick @mohammadranjbarz @aminlatifi

This is the suggested UX:

  • User paste the address of custom token
  • App detected it and user can starts donation
  • in donation modal we show the user that we can't detect the price but you can donate so the value won't show up in the total donation value of the project.
  • We saved a donation and we verify it without the price
  • The donation will be visible in projects, and in user's my donation sector

If you can verify, that is possible, let's make it happen only on EVM compatible chains. @jainkrati @aminlatifi

@MoeNick are you saying that we accept donation even if the token price is 0?

Why is this part of the epic "Improve Dapp Performance & Resolve Tech Debts#3672" @divine-comedian . It is not a tech debt or perf issue. It is more of a user journey edge case. Can you please delink?

@MoeNick are you saying that we accept donation even if the token price is 0?

Yes according to @divine-comedian comments and others commet this is the best approach.

The reason it was under DApp performance was the users reported on polygon round due to save donation error

@mohammadranjbarz pls take this up next

commented

@RamRamez - Is there any progress on this one?