a good library would help developers avoid these issues there's no reason to call functions without side-effects like vector::contains() without using the return result most modern compilers support flags like [[nodiscard]] or #[must_use] which emit a warning if a return value is ignored right now, the move compilers and runtime libraries don't support these attributes which help developers avoid writing incorrect code nodiscard would be a good feature to add to the compiler and move runtimes
gpt-5 caught this bug in one shot after thinking 95 seconds > Yep — the critical bug is in the “v2” updater’s authority check. > In update_v2 you call vector::contains but you ignore its return value, so the function never enforces that the tx sender is authorized. Anyone who can pass a reference to the shared UpdateAuthority object can update the oracle minimal prompt and one-shot response below:
3.26K
26
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.