A method for securing smart contracts in a blockchain, the method implemented by means of one or more processors which, alone or in combination, are configured to provide for execution of the following steps: receiving, from a contract creator, in the blockchain a contract creation transaction having a control flow graph, CFG, and contract code for a smart contract to be created, the CFG representing valid execution paths the smart contract may follow while it is executing; verifying, by a contract validator, the contract creation transaction by checking a signature of the creator of the smart contract and determining that the CFG is correct based on the contract code from which the CFG is derived; in case the contract creation transaction verification is successful, including, by the contract validator, the verified contract creation transaction as a block in a distributed ledger of the blockchain; receiving, by a receiving contract validator, a blockchain transaction invoking the smart contract or another smart contract created, verified and included in the blockchain in the same manner as the smart contract; determining, by the receiving contract validator, an execution path invoked by the blockchain transaction; comparing, by the receiving contract validator, the execution path of the blockchain transaction to the CFG, and based thereon, performing one of the following steps: validating the blockchain transaction where the comparison results in a determination that the execution path of the blockchain transaction matches the CFG; and broadcasting a proof of malicious transaction to the blockchain where the comparison results in a determination that the execution path of the blockchain transaction does not match the CFG. receiving, from a contract creator, in the blockchain a contract creation transaction having a control flow graph, CFG, and contract code for a smart contract to be created, the CFG representing valid execution paths the smart contract may follow while it is executing; verifying, by a contract validator, the contract creation transaction by checking a signature of the creator of the smart contract and determining that the CFG is correct based on the contract code from which the CFG is derived; in case the contract creation transaction verification is successful, including, by the contract validator, the verified contract creation transaction as a block in a distributed ledger of the blockchain; receiving, by a receiving contract validator, a blockchain transaction invoking the smart contract or another smart contract created, verified and included in the blockchain in the same manner as the smart contract; determining, by the receiving contract validator, an execution path invoked by the blockchain transaction; comparing, by the receiving contract validator, the execution path of the blockchain transaction to the CFG, and based thereon, performing one of the following steps: validating the blockchain transaction where the comparison results in a determination that the execution path of the blockchain transaction matches the CFG; and broadcasting a proof of malicious transaction to the blockchain where the comparison results in a determination that the execution path of the blockchain transaction does not match the CFG. validating the blockchain transaction where the comparison results in a determination that the execution path of the blockchain transaction matches the CFG; and broadcasting a proof of malicious transaction to the blockchain where the comparison results in a determination that the execution path of the blockchain transaction does not match the CFG.