grants-stack icon indicating copy to clipboard operation
grants-stack copied to clipboard

research new workflow / api calls to update Avalanche scorer

Open gravityblast opened this issue 11 months ago • 0 comments

When users go to the passport site and update their stamps, their new scorer is updated automatically in the global scorer we use; that's because it's also the Passport's default scorer.

It looks like it's not the same for any other scorer, including the new one for Avalanche.

When users update their stamps, a new call to the passport API needs to be sent to be sure the user's score is updated in the Avalanche scorer.

We can do it automatically when users add an Avalanche application/project to the cart, but there are scenarios where it's not so easy.

Let's say a user doesn't have any stamp:

1 - the user adds a project to the cart 2 - Explorer sends a request to update the avalance score for the user's address 3 - The user doesn't have stamps, so the score is updated from non-existing to 0 4 - The user sees the passport badge with score 0, he goes to the passport website and adds some stamps 5 - the user comes back to Explorer but the score is still 0

At this point we can't send the request automatically to the passport API since we don't know what the users did in other tabs/pages. The best option I see is to have a button somewhere that users can click to update their score, but it might be very difficult for users to have a good UX.

Background on the first passport implementation:

We integrated passport a year ago, and the initial process was very similar, users had to go to a different page to learn more about passport, and they had a "Recalculate Score" button to perform this action.

Later passport made our scorer the default one, so this action was not needed anymore. Some months ago we removed that page and created the passport widget without that button cause it wasn't needed anymore.

Given that the Avalanche scorer is not updated automatically, we need something similar to the old process. The technical implementation is not difficult, the function to call the API is already implemented and we just need to use it, but we need some input from product and design for the new UX

(if users don't click that button to update their score, their donation won't be counted in the normal QF calculation)

gravityblast avatar Mar 08 '24 10:03 gravityblast