Skip to content

Commit

Permalink
Don't assume contracts are created with zero balance
Browse files Browse the repository at this point in the history
  • Loading branch information
ethers authored May 16, 2019
1 parent 8c08b75 commit f5efa4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ The attacker can do this by creating a contract, funding it with 1 wei, and invo
`selfdestruct(victimAddress)`. No code is invoked in `victimAddress`, so it
cannot be prevented.

### Don't assume contracts are created with zero balance

An attacker can send wei to the address of a contract before it is created. Contracts should not assume that its initial state contains a zero balance. See [issue 61](https://github.com/ConsenSys/smart-contract-best-practices/issues/61) for more details.

### Remember that on-chain data is public

Expand Down

0 comments on commit f5efa4f

Please sign in to comment.