getEthToTokenInputPrice method to get the prices for token pairs.
But as I was getting the prices of LINK, KNC, and DAI when exchanging for ETH, I noticed that they are inaccurate when compared to the prices on the Uniswap interface.
For example, the returned price I got from the smart contract for ETH-DAI is 1674, while the Uniswap interface says 1669. For ETH-KNC, it's 591 versus 796. For ETH-LINK, it's 49 versus 58.
Are these differences in price natural or incorrect? Should I switch to V2 instead?
I've been using these contracts below if it helps you understand the problem I'm having.
Uniswap Factory Contract: https://etherscan.io/address/0xc0a47dfe034b400b47bdad5fecda2621de6c4d95#code Uniswap Exchange Template: https://etherscan.io/address/0x09cabec1ead1c0ba254b09efb3ee13841712be14#code