6

It looks like many Chainlink feed aggregators have 8 decimals of precision:

  • ETH/USD, which returns 140330173736 = $1,403.30173736
  • BTC/USD, which returns 3696759888474 = $36,967.59888474

I found the contracts above on feeds.chain.link.

Do all Chainlink feed aggregators have 8 decimals of precision?

Paul Razvan Berg
  • 17,902
  • 6
  • 73
  • 143

1 Answers1

12

Non-ETH pairs: 8 decimals

ETH pairs: 18 Decimals

Hence, ETH/USD is a non-ETH pair, so it has 8. But if it were USD/ETH, it would have 18

For reference

EDIT: Each contract has a decimals function you can call to see exactly how many it has.

Patrick Collins
  • 11,186
  • 5
  • 44
  • 97