here is quick question. From uniswap pool, which one is base token?
Price in Uniswap pools is tracked in terms of
token1 is the numeraire token if that's what you're asking.
There is no on-chain way to determine which token is a base token or which is a quote token if token0 and token1 are mapped to normal trading pairs.
The trading pair base-quote token order is a human-made concept for making natural reading easier. Thus, you need to have your own rules that determine which of the tokens is a quote token (determining quote is usually easier than determining base).
Here are some rules that can help you
First determine if a token is stablecoin. Have a hierarchy of stablecoins to determine a "better stablecoin for stable-stable pairs.
Then check for a native token. A quote token is usually ETH (WETH), MATIC (WMATIC), AVAX (WAVAX) or similar. All "large cap tokens", including BTC (WBTC) are good quote tokens.
If you still cannot determine then flip a coin. However, in this case, it's an exotic pair you probably do not want to trade in the first place.