hard20 pts · first answer countssoliditysmart-contract-security
A fee that rounds to zero
A protocol charges a 0.3% fee. What fee is charged when amount is 9,999?
uint256 fee = amount / 10_000 * 30;
Discussion 0
Join free to post in the discussion.
Related questions
- storage, memory, calldataBlockchain Developer
- Why emit eventsBlockchain Developer
- What msg.sender isBlockchain Developer
- Wei and etherBlockchain Developer
- view vs pureBlockchain Developer
- Sending ETH to a functionBlockchain Developer
- receive vs fallbackBlockchain Developer
- Reading a missing mapping keyBlockchain Developer