-
Notifications
You must be signed in to change notification settings - Fork 653
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
Token price not being displayed or accounted #412
Comments
Now I am suspecting that this bug is on TheGraph, as their results are used on these sites |
This issue was moved to info-v2 but it is happening on v3 And indeed, the values already come zeroed from the TheGraph API, from the
The token value is zeroed on Example: When sending this request: {
"operationName": "tokens",
"variables": {},
"query": "query tokens {\n tokens(\n where: {id_in: [\"0x1559fa1b8f28238fd5d76d9f434ad86fd20d1559\"]}\n block: {number: 13199668}\n orderBy: totalValueLockedUSD\n orderDirection: desc\n subgraphError: allow\n ) {\n id\n symbol\n name\n derivedETH\n volumeUSD\n volume\n txCount\n totalValueLocked\n feesUSD\n totalValueLockedUSD\n __typename\n }\n}\n"
} The API returns: {
"data": {
"tokens": [
{
"__typename": "Token",
"derivedETH": "0",
"feesUSD": "62056.63454676765890574577989388061",
"id": "0x1559fa1b8f28238fd5d76d9f434ad86fd20d1559",
"name": "Eden",
"symbol": "EDEN",
"totalValueLocked": "13179.623235071167538178",
"totalValueLockedUSD": "0", <-----------
"txCount": "1863",
"volume": "1255330.880892956011740054",
"volumeUSD": "6235732.072187121969391931381996764"
}
]
}
} With another coin: {
"data": {
"tokens": [
{
"__typename": "Token",
"derivedETH": "0",
"feesUSD": "12491.15690999098388894178363751412",
"id": "0x799ebfabe77a6e34311eeee9825190b9ece32824",
"name": "BTRST",
"symbol": "BTRST",
"totalValueLocked": "248582.01862144848681035",
"totalValueLockedUSD": "0", <-----------
"txCount": "459",
"volume": "138138.64523260177497591",
"volumeUSD": "1249115.690999098388894178363751412"
}
]
}
} |
Another effect of this is in the Liquidity graph: When we hover the mouse to the right and left sides of the red line it always shows Check here: https://info.uniswap.org/#/pools/0x2138a12520c9b45bb4b2c742923b514d5f662fec With tokens that have normal price, the chart shows |
For many coins the Uniswap Pool and the Trade are not showing the price of the token, even being so easy to calculate the price using the current rate of exchange with the other token (eg WETH)
I guess there is no need for an external "oracle" for this purpose, but if there is one, after the oracle returns 0 or null as the price for the token on the pair, its price can then be calculated using the above simple method.
This is also happening when displaying the TVL (total value locked), it is showing the value of only ETH locked:
Also when adding liquidity, it only shows the value related to ETH or USDT, not the other token. Sometimes it appears as 0 (zero) total value added when adding only the other token on the pair:
Example:
https://info.uniswap.org/#/pools/0x8c2f778589b08dbd5857be26b604dc5c42861732
The text was updated successfully, but these errors were encountered: