Skip to main content
Separated the question into just 1 instead of 2
Source Link
Patrick Collins
  • 12.4k
  • 8
  • 46
  • 104

Numerical assumptions on What is the largest number that can be returned from a Chainlink contractsPrice Feed?

I am currently tryingIs it safe to implementassume that chainlink oracles have an upper bound on the price feed, eg it fits into uint96, or perhaps a smart contract. Ismaller or larger number? It would likebe great to make some assumptions onknow the dataabsolute largest number that chainlink provides through itsa chainlink oracle price feed could provide, and potential escaping mechanisms in case this price is exceeded.

  1. Is it safe to assume that the denomination of each price does not change? Eg the number of decimals changes. If not, then we could simply "hard code" the number of decimals that the oracle so provides, otherwise we would have to implement a "gas costly" algorithm for checking if the number of decimals has changed.
  2. Is it safe to assume that chainlink oracles have an upper bound on the price feed, eg it fits into uint96, or perhaps a smaller or larger number? It would be great to know the absolute largest number that a chainlink oracle price feed could provide, and potential escaping mechanisms in case this price is exceeded.

Thanks a lot for helping!

Numerical assumptions on Chainlink contracts

I am currently trying to implement chainlink into a smart contract. I would like to make some assumptions on the data that chainlink provides through its chainlink price feed.

  1. Is it safe to assume that the denomination of each price does not change? Eg the number of decimals changes. If not, then we could simply "hard code" the number of decimals that the oracle so provides, otherwise we would have to implement a "gas costly" algorithm for checking if the number of decimals has changed.
  2. Is it safe to assume that chainlink oracles have an upper bound on the price feed, eg it fits into uint96, or perhaps a smaller or larger number? It would be great to know the absolute largest number that a chainlink oracle price feed could provide, and potential escaping mechanisms in case this price is exceeded.

Thanks a lot for helping!

What is the largest number that can be returned from a Chainlink Price Feed?

Is it safe to assume that chainlink oracles have an upper bound on the price feed, eg it fits into uint96, or perhaps a smaller or larger number? It would be great to know the absolute largest number that a chainlink oracle price feed could provide, and potential escaping mechanisms in case this price is exceeded.

Thanks a lot for helping!

Source Link

Numerical assumptions on Chainlink contracts

I am currently trying to implement chainlink into a smart contract. I would like to make some assumptions on the data that chainlink provides through its chainlink price feed.

  1. Is it safe to assume that the denomination of each price does not change? Eg the number of decimals changes. If not, then we could simply "hard code" the number of decimals that the oracle so provides, otherwise we would have to implement a "gas costly" algorithm for checking if the number of decimals has changed.
  2. Is it safe to assume that chainlink oracles have an upper bound on the price feed, eg it fits into uint96, or perhaps a smaller or larger number? It would be great to know the absolute largest number that a chainlink oracle price feed could provide, and potential escaping mechanisms in case this price is exceeded.

Thanks a lot for helping!