I would post this issue on uniswap/uniswap-v3-core by posting issues there is forbidden:
anyway, setting this aside... querying the subgraph I discovered that there can be multiple Liquidity Pools for a given token pair, as having a different fee tier, one can create a new LP for an already existing pair.
The question is, how do we determine price given multiple LPs for the same token pair? How does frontend tackle this?
{
"data": {
"token": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"whitelistPools": [
{
"feeTier": "10000",
"id": "0x6958686b6348c3d6d5f2dca3106a5c09c156873a",
"liquidity": "24405430160684491",
"token0": {
"symbol": "DAI"
},
"token0Price": "1.000097347797523468560923036695158",
"token1Price": "0.9999026616781477783833621614227994"
},
{
"feeTier": "500",
"id": "0x6c6bc977e13df9b0de53b251522280bb72383700",
"liquidity": "166739955719276340984048",
"token0": {
"symbol": "DAI"
},
"token0Price": "0.999375896994654300981013045872989",
"token1Price": "1.000624492753149756391698159238136"
},
{
"feeTier": "3000",
"id": "0xa63b490aa077f541c9d64bfc1cc0db2a752157b5",
"liquidity": "1983087073471302739",
"token0": {
"symbol": "DAI"
},
"token0Price": "0.9998697244241236777590508333027245",
"token1Price": "1.000130292549813281560606342941779"
}
]
}
}
}