Solidity Smart contract Security best practices

in blockchain •  7 years ago 

Security of a smart contract is more important than any other software or piece of code just because of the non-editable nature of it in general.Still, there are no widely adopted security standards or best practices for projects to follow. There are no tools for developers to easily create, test, verify and audit smart contracts, and do so collaboratively. Entire Ethereum community is grateful for researchers and developers of OpenZeppelin/zeppelin-solidity for the standard and well tested contract sources to relay on.

  1. External Calls
  2. Handling the funds
  3. Token standard
  4. Integer Division, Overflow and Underflow
  5. Fallback functions
  6. Race Conditions

External Calls

Calls to untrusted contracts can introduce several unexpected risks or errors. External calls may execute malicious code in that contract or any other contract that it depends upon. As such, every external call should be treated as a potential security risk, and removed if possible. Understand how send(), transfer(), and call.value()(). Using send() or transfer() will prevent reentrancy but it does so at the cost of being incompatible with any contract whose fallback function requires more than 2,300 gas.


Solidity Smart contract Security best practices

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!