How to get price of ETH to DAI within smart contract?

Noah: 5 weeks ago

Is it possible to get the current price of Ethereum to Dai within a smart contract? Can this be done without a transaction, using a read operation by the nodes on some kind of existing decentralized exchange or the dai contract itself?

Emma: 5 weeks ago

You can use MakerDAO's ETHUSD feeds ( to get price of ETH in USD. This should be extremely close (<1% difference usually) to ETHDAI in the short term, and average to much closer in the long term (<0.1% usually).

Alternatively, you can use the ratio of ETH to DAI in the Uniswap ETH/DAI exchange to estimate the price, which is located here (