Skip to content

Commit 4830b95

Browse files
committed
Don't assume contracts are created with zero balance
Fix #61 Consensys/smart-contract-best-practices#61 Thanks @SergioDemianLerner
1 parent 383e574 commit 4830b95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ The attacker can do this by creating a contract, funding it with 1 wei, and invo
269269
`selfdestruct(victimAddress)`. No code is invoked in `victimAddress`, so it
270270
cannot be prevented.
271271

272+
### Don't assume contracts are created with zero balance
273+
274+
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.
272275

273276
### Remember that on-chain data is public
274277

0 commit comments

Comments
 (0)