-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define Standard for Token List #22
Comments
As a quick note: I think tackling this issue is much more feasible than #23 for various reasons that I'll get into over on that issue, so I'll be focusing a majority of my effort this week on adding context to this issue. Problem StatementI see two different issues in L2 land that can be solved with standardized token lists. First, there's the obvious issue of coming to consensus over the "canonical" token on chain B that corresponds to some token on chain A. When we want to bridge token X from chain A to chain B, we fundamentally must create some new representation of the token on chain B. It's worth noting that this problem is not limited to L2s -- every chain connected via bridges must deal with the same issue. I therefore think it's a very obvious candidate for standardization. Second, there's the less obvious but still important issue of standardizing around lists of bridges and their routes across different chains. Optimism is currently trying to design a system that describes the various bridges that support transfers to/from Optimism, the routes that those bridges will take, and the tokens those bridges support. Both of these issues are fundamental problems that would be highly valuable for the multi-chain world. Existing SolutionsFor lists of canonical tokens, L2s currently maintain their own customized versions of the Uniswap token list. Arbitrum maintains a token list with various custom extensions. Optimism also maintains a custom token list, but with different extensions. You should note that both of these custom extensions refer to the bridge that these tokens can be carried through. However, these are not the only bridges that the tokens can be carried through, which makes me strongly believe that the bridges and token lists should be separated. I'll get into a proposed strawman design in a second. Currently, both Optimism and Arbitrum base "canonicity" on the token name + symbol pair. I think this is reasonable, but there's room for the argument that we should assign some unique identifier instead. Strawman ProposalHere I'll quickly sketch out a proposal for what a good token list could look like. Canonical Token Listinterface CanonicalTokenList {
name: string
logoURI: string
keywords: string[]
timestamp: string
version: {
major: number,
minor: number,
patch: number
}
tokens: Array<{
chainId: number
address: string
name: string
symbol: string
decimals: number
logoURI: string
extensions: {
rootTokenChainId: number
rootTokenAddress: string
}
}>
} Where Bridge Token Listinterface BridgeTokenList {
name: string
logoURI: string
keywords: string[]
timestamp: string
version: {
major: number,
minor: number,
patch: number
}
tokens: Array<{
chainId: number
address: string
name: string
symbol: string
decimals: number
logoURI: string
extensions: {
routes: Array<{
fromChainId: number
toChainId: number
}>
}
}>
} We'll really need to chat to some bridge teams to figure this out. I think we can actually make these two token lists work together, which would be great. I designed the above Similarly, a project like Optimism could then use various ConsiderationsI think there's an interesting trade-off here between sovereignty and composability. It would be much, much easier if L2 teams all worked together to maintain a unified representation of every possible asset. However, this will inevitably create problems down the line with small/unproven teams attempting to add new items to the list. Unless someone is willing to create a whole governance process around this token list, it seems much more viable for individual teams to maintain their own list of tokens on their own networks. Same thing for bridge token lists. I need to think about this a little bit more. |
@smartcontracts awesome stuff. Love it A couple of points to consider apply to both lists:
As to governance -> use an approach similar to the DID registry as a possible starting point. the list could be maintained on IPFS using IPNS and updates could be included as a Verifiable Credential. We could anchor the IPFS hashes of the list on e.g. Ethereum Mainnet so we hve good versioning. cc @tasdienes |
Hi! Just wanted to give some thoughts from the Arbitrum side here: the "arbed" list you linked has some additional, outdated fields that we're only keeping for backwards compatabiltiy; a "fresh" list is this one, which uses this extension of the fields in uniswap's schema, i.e., {
logoURI: "https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",
chainId: 42161,
address: "0x6314C31A7a1652cE482cffe247E9CB7c3f4BB9aF",
name: "1INCH Token",
symbol: "1INCH",
decimals: 18,
extensions: {
bridgeInfo: {
1: {
tokenAddress: "0x111111111117dc0aa78b770fa6a738034120c302",
originBridgeAddress: "0x09e9222e96e7b4ae2a407b98d48e330053351eee",
destBridgeAddress: "0xa3A7B6F88361F48403514059F1F16C8E78d60EeC"
}
}
}
} In terms of canonicity, we don't use name + symbol, we do use top-level address (i.e., a list could theoretically repeat a name/symbol pair), similar to what you propose. I like the idea of allowing for a "canonical" list vs. lists for different bridges; I believe our current schema is compatible / serves a similar purpose to the "canonical token list" schema. R.e. "bridge token list," it seems like there's an additional address field needed; i.e., if it only includes the address of the root token, that leaves out the address of the token created via the bridge (which is presumably the point of the list in the first place). |
@DZGoldman ... what are your thoughts on resolvable unique identifiers and a resolver that I am proposing above such that users are not solely dependent on the providers (L2s, L1s, and bridges) to provide it? |
Merging comments above into a new Token List proposal:
cc @DZGoldman @smartcontracts @tasdienes PS: added |
Proposal for List Governance (as simple as possible):
|
Draft standard merged with PR #26. Closing issue for now. |
Define a standard way to define a token across L2s (L1s too) -> identify, discover and address a token for different L2s.
A possible inspiration to starting point could be ITSA.
The text was updated successfully, but these errors were encountered: