Closed jacobcreech closed 1 year ago
@jacobcreech can you provide some examples where the current behavior is incorrect, or unacceptably slow?
Explorer currently uses @solana/spl-token-registry which has a scary large bundlesize of 1.1MB gzipped, adding up to 23s on slower network speeds. Doing these legacy token-list lookups on a backend is much faster.
Searchbar token logos seems to have since been removed when searching.
Coingecko as a first choice when looking up metadata can be added to unified token-list as well, removing issues with certain protocols trying to update their now locked token metadata and pushing liability to coingecko. Example: Kin can't update their logo anymore and is incorrect on our explorer, while solanafm and coingecko have the updated logo.
Will come back to this once we've migrated the website to Next JS
Problem
Currently the explorer queries the following to get token-metadata:
This has the following problems:
getProgramAccounts
(nor recommended)Proposed Solution
Solflare created a Unified Token API that manages caching, searching, and verifying tokens via coingecko, legacy token-list, and Metaplex Fungible token metadata.
Proposal is to use it to create a faster experience for users on the explorer searching and viewing their tokens.
We have two options:
Proposing we use option 2 for speed to ship. Happy to work on it if consensus is met.
cc: @steveluscher @jstarry