-
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
Add external tokens to the Tokens section #1598
Comments
The solver needs to build an endpoint that returns the capabilities and limitations of the solver. and also basic token information.
|
The solver cannot fulfil this requirement as it just does not work like this. The solver does not know about ticker or chain, it only work with addresses and xCall chain ID. For example, if you need some ETH information, you need to tell the solver that you want information about address 0x0000000000000000000000000000000000000000. But this address can also be POL token on Polygon for example, so you need to also specify which chains we are talking about, so 0x0000000000000000000000000000000000000000 on 0xa4b1.arbitrum. When an address and an xCall Chain ID is given to the solver, it then does not know the ticker, so ticker Information cannot be given. The MaxTradeInDollar and maxTradeInToken is also a tricky data to get as it depends on the path of the swap. For instance, the solver has a hard cap of 5000$ per trade right now for any token on any chain. But, that cap can be lower depending on the bridge capabilities, so it is linked to the path the user wants. Let say the user wants to swap ETH on Arbitrum to bnUSD on ICON. In that case, the max will always be the hard cap as there is no limitation on how many tokens we can send from Arbitrum to ICON. But the other way around is different, if a user wants to swap bnUSD to ETH on Arbitrum, the limitation depends on the xCall limitation about how many tokens can be sent to ethereum. There's even the Stability fund limitation to take into account in this example. So what I suggest is : We only show the hard cap as max trade, so it simplifies everything. The solver can have an endpoint and return you the hard cap as a dollar amount (5000 for instance right now). |
We need an endpoint that returns all your solver's supported tokens. endpoint path: /tokens
Could you return the all supported tokens in this format? |
We're gonna need to update the Tokens section to support external tokens and make it clear what the limitations are:
EDIT: Let's omit the market cap column to keep it consistent with the changes made in #1600:
And if trendline support is possible, let's try to add that in.
The text was updated successfully, but these errors were encountered: