hard20 pts · first answer countssmart-contract-securitydefi
Reward rate from the token balance
A staking contract computes reward per staked token from token.balanceOf(address(this)) instead of its own totalStaked variable. Why is this risky?
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
- What makes a flash loan possibleBlockchain Developer
- How an AMM sets pricesBlockchain Developer
- What TVL measuresBlockchain Developer
- A stablecoin pool paying 40%Blockchain Developer