1

I know that we can program the contract that sends ETH based on $USD if we use oracles. But isn’t there any way to achieve this without the third party?

1 Answer 1

3

The problem is that price of ETH in USD is based on what the market will pay for it. All pricing information comes from exchanges who have a dynamic sell/buy list, changing the price every second.

If you look at CoinMarketCap, you will see that the price of ETH on that site is determined by the price on multiple exchanges averaged out:

https://coinmarketcap.com/currencies/ethereum/#markets

You would need an oracle to collect and send that data to your contract, unless you want to specify a fixed price for ETH/USD.

2
  • Thanks Shawn! I guess we can automate the process of retrieving the price data but the question is if it’s safe or not. Do you have any suggestions of oracles we can use?
    – sflow
    May 21, 2018 at 1:08
  • 1
    I have not personally used an oracle service for this, but the internet says MakerDAO is a good choice. May 21, 2018 at 1:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.