We all know a smart contract is a normal piece of code which can have intended and unintended bugs. DAO attack is such an example where a bug has led to a heavy loss. Suppose I want to check what all properties can be there which a smart contract should satisfy in order to call it as safe. I have seen that there are many projects already going on where FORMAL VERIFICATION is being used to achieve the exact specification but I am not talking about those things. I am asking for some safe properties which can ensure this safety.

For example, we know that using CALL function to transfer ethers to a contract address can be a potential vulnerability that can be exploited if not handled properly.

So what all these properties can be?

  • 1
    If you're looking for safety best practices, here's a resource github.com/ethereum/wiki/wiki/Safety – Miguel Mota Jan 30 '18 at 5:48
  • @MiguelMota yeah I have an idea about that but I am basically implementing a system where I want these properties to be the checkpoints so that I can analyze whether my program has satisfied these general key features or not – anand011090 Jan 30 '18 at 6:59
  • The DOA attack is not a bug, just the developer forgot to set security (use modifiers). – Florian Castelain Jan 30 '18 at 10:11
  • @Andromelus Yeah sorry for saying that way but yes there was bad coding practice which was followed. – anand011090 Feb 1 '18 at 4:40
  • solidity is silly – anand011090 Mar 29 '18 at 8:21

"Tests Cant Prove The Absence Of Bugs"

This is a fundamental law of testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.