source avatarJoe Joe

Share

𝗠𝗮𝗻𝘆 𝗯𝗮𝗻𝗸𝘀 𝘄𝗶𝗹𝗹 𝗿𝗲𝗳𝘂𝘀𝗲 𝗮 𝗰𝗵𝗲𝗾𝘂𝗲 𝘁𝗵𝗮𝘁 𝗵𝗮𝘀 𝗯𝗲𝗲𝗻 𝘀𝗶𝘁𝘁𝗶𝗻𝗴 𝗶𝗻 𝘀𝗼𝗺𝗲𝗼𝗻𝗲'𝘀 𝗱𝗿𝗮𝘄𝗲𝗿 𝗳𝗼𝗿 𝘁𝗼𝗼 𝗹𝗼𝗻𝗴, 𝗲𝘃𝗲𝗻 𝗶𝗳 𝘁𝗵𝗲 𝘀𝗶𝗴𝗻𝗮𝘁𝘂𝗿𝗲 𝗶𝘀 𝗴𝗲𝗻𝘂𝗶𝗻𝗲. The money might still be there. But nobody wants to settle a payment on information that has gone stale. That is the attitude I want every contract to take toward a price. When you read an @WinkLink_Oracle feed with latestRoundData, you get the price and an 𝘂𝗽𝗱𝗮𝘁𝗲𝗱𝗔𝘁 timestamp. The timestamp is the date on the cheque. The docs recommend checking it against a 𝗺𝗮𝘅𝗶𝗺𝘂𝗺 𝗽𝗿𝗶𝗰𝗲 𝗮𝗴𝗲 before using the price. They are specific about how to pick that age: ➜ 𝗟𝗼𝗻𝗴𝗲𝗿 𝘁𝗵𝗮𝗻 𝘁𝗵𝗲 𝗵𝗲𝗮𝗿𝘁𝗯𝗲𝗮𝘁, the interval within which the feed is guaranteed to update ➜ 𝗦𝗵𝗮𝗽𝗲𝗱 𝗯𝘆 𝘆𝗼𝘂𝗿 𝗯𝘂𝘀𝗶𝗻𝗲𝘀𝘀, because a lending market and a slow game can tolerate different delays ➜ 𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗽𝗲𝗿 𝗳𝗲𝗲𝗱, since heartbeats are listed pair by pair ➜ 𝗡𝗲𝘃𝗲𝗿 𝘀𝗸𝗶𝗽𝗽𝗲𝗱, because a convenient read without a timestamp check is a cheque nobody looked at The docs also warn about latestAnswer. It returns the price with no timestamp at all, which is like a cheque with the date torn off. A bank teller checks the date in two seconds. A contract can do it in one line, and the habit costs almost nothing. The freshness guidance is in the developer notes: https://t.co/BVkWssd0mw 𝗚𝗲𝗻𝘂𝗶𝗻𝗲 𝗶𝘀 𝗻𝗼𝘁 𝘁𝗵𝗲 𝘀𝗮𝗺𝗲 𝗮𝘀 𝗰𝘂𝗿𝗿𝗲𝗻𝘁. Check the date before you cash the price. @justinsuntron @WinkLink_Oracle #TronEcoStar

No.0 picture
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.