shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
162 stars 180 forks source link

Simulate FOX discount caching previously connected wallets balances #6128

Open purelycrickets opened 5 months ago

purelycrickets commented 5 months ago

Overview

Currently in production, connecting multiple wallets to the app that have a FOX balance will result in the 'simulate FOX discount' FOX balance caching and adding the previously connected wallets FOX balance. This can result in a user thinking they have more FOX available for discounted trades than they actually do.

Operations does not currently have a testing balance with over 1k to see if actual trades would be discounted with this bug.

References and additional details

https://github.com/shapeshift/web/assets/94998097/ad2e47cc-9d6c-408b-823f-2d974a68f1cc

Acceptance Criteria

Wallet FOX balance of previously connected wallets are not cached and added to FOX discount simulation modal (or actual trade discounts).

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

0xean commented 5 months ago

@twblack88 to determine next steps on this to find the right solution that isn't gameable but also doesn't cripple user experiences for wallets that cannot be connect simultaneously.

twblack88 commented 4 months ago

We discussed Sign in with ethereum as the best path here. We want to get some user feedback that signing a message to apply discounts accross different wallets.

gomesalexandre commented 4 months ago

@twblack88 @reallybeard if going with SIWE, we will want to have some UX flow for this as this will effectively be a new user action, and trades will be impossible to do with FOX discounts unless the user has signed in with ethereum already. Perhaps at wallet connection time? This also means users connecting non-EVM accounts only on Ledger won't have FOX discounts, though that may be an edge-case.

gomesalexandre commented 3 months ago

@twblack88 bump - do we want to go with only using the current wallet accounts for FOX power as a simple ☕ solution for now to avoid the bleed of FOX discounts being game-able? Feels like the whole SIWE (or other similar solution) is a stretch and (maybe) nice-to-have, that will require more product work and eng. effort and will keep this issue stale forever in the meantime.

twblack88 commented 2 months ago

I think current connected wallet is the best path. Even though cold storage of FOX is good if they want reduced fees it's all about having it on the wallet your'e trading with. Is the point.

Sorry to miss your ?? gomesie