medium10 pts · first answer countssmart-contract-securityoraclesarithmetic
Casting a negative price
A contract reads an int256 answer from an oracle and does uint256 price = uint256(answer); without checks. The answer is -1 due to a feed issue. What is price?
Discussion 0
Join free to post in the discussion.
Related questions
- Private variables are public dataBlockchain Developer
- Verifying a contract on EtherscanBlockchain Developer
- Sharing a seed phraseBlockchain Developer
- Why use OpenZeppelinBlockchain Developer
- Why contracts need oraclesBlockchain Developer
- The checks-effects-interactions orderBlockchain Developer
- What nonReentrant doesBlockchain Developer
- What front-running isBlockchain Developer