Closed 0xean closed 2 months ago
https://shapeshift.notion.site/Two-Smol-Swappers-646613460477490497f91287e4966fbc - just focus on the portals part of this specification
how do we find these assets? / how do we display these tokens / positions after a user has them?
https://api.portals.fi/v2/tokens
is the goer, and we should update the asset generation script to parse and use these as assets. We could start as a low lift with one chain only, and only one page, to validate this!
Edit: done in df17bfeaf456b8ad4b7dc2c5895426767a337009 as a 250 Avalanche assets PoC and follow-up fixes
Once added to generated asset data, these will live as ERC20 tokens in the app, business as usual
Edit: confirmed business as usual after df17bfeaf456b8ad4b7dc2c5895426767a337009 and its follow-up fixes, things just work
ideally: we don't and let Zapper do it
effectively: Zapper isn't so good with all chains and will miss many opportunities. IMO, having them as tokens is a good MVP, but eventually, we could use the DeFi opportunities abstraction to parse and upsert https://api.portals.fi/v2/tokens
list as DeFi opportunities. For all intents and purposes, the shape is very similar to Zapper's, which will make things relatively easy to work with (effectively a lot of copypasta to do the Zapper/Portals translation)
Historical market data isn't going to be available, but that's nothing different than e.g how we used to do UNI-V2 opportunities - we absolutely can and should upsert the current price of all https://api.portals.fi/v2/tokens
tokens in the market-data slice
Actual issues to be created from this, and spike to be closed on Monday if we agree we're there spike-wise
Some Qs
Output from this spike would be