about blockchain smart contracts Blockchains are distributed database systems. Smart contracts look like Stored Procedures in RDBMS. There are some critical points developers MUST care when writing smart contracts - code must be deterministic. deterministic functions produce always same output when they get same inputs. for example, rand() function producing random values does not always produce same output due to its random nature. random function must not be used in smart contract code, if every peer produces different result with random, consensus may not be reached. If such randomness functionality needed, client SDK must produce that random number and send it as a parameter to smart contracts. Then all peers running that smart contract will work with same random number for example, map iterator at Go language was not deterministics. Please read below. You must care such functions. https://blog.golang.org/go-maps-in-action "Since Go 1 the runtime randomizes map iteration order, as programmers relied on the stable iteration order of the previous implementation. If you require a stable iteration order you must maintain a separate data structure that specifies that order." * HyperLedger Fabric has ENDORSEMENT mechanism. This can help detecting non-deterministic function use-cases much simpler. * Preventing non-deterministic function use-cases is critical because whole blockchain network may halt because of this problem. - Smart contract security is another critical issue. you may examine "Making Smart Contracts Smarter" article by "Luu & Chu & Olickel & Saxena & Hobor" at ACM CCS 2016 Conference. After these security issues, some "contract verification and testing tools" are developed. They may not be a %100 solution but they will certainly be helpfull. Some tool samples are Frama-C,Why3,Oyente and Hawk. Also due to probable bugs in smart contracts software, Accenture proposed a new way for editing immutable blockchains in a controlled way. You may examine Accenture article named "Editing the Uneditable Blockchain" They distribute some keys to 4-5 authorized person. when they all combine, they can edit blockchain and chain is not broken due to using a second chain architurecture constructed using chameleon hash keys. - Smart contracts may also be integrated with company business rules management systems(BRMS) like IBM ODM, Oracle OBR, Fico Blaze Advisor etc. Blockchain integrations must always be considered carefully but if integrated well, it can have additional benefits. Feel free to communicate by bulent.yucesoy@gmail.com