source avatar🦖FullTimeScam

Share

Four things to watch out for when attaching Chainlink price feeds—always verify these if you're using them for liquidations or collateral calculations. 1. If you don’t check updatedAt, you might use outdated prices. The feed only updates when price volatility or heartbeat thresholds are met. Ensure that block.timestamp - updatedAt is within the heartbeat window. 2. Volatility thresholds vary by feed. On Ethereum Mainnet, ETH/USD uses a 0.5% threshold, but on Arbitrum, ETH/USD uses 0.05%. Simply swapping addresses will change your threshold criteria. 3. The answer is an int256 and can return negative values. Converting directly to uint256 will result in extremely large incorrect values. Always first check if the value is greater than zero. 4. On L2s, also check the sequencer feed. If answer equals 1, the sequencer is offline. Even after it restarts, wait until the grace period—based on startedAt—has expired.

Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information. Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.