Co-authored by Amrit Kumar.
Smart contracts provide means to implement a business logic on a blockchain. As is the case with most businesses, smart contracts often handle money and very often a lot of money (typically in hundreds of millions of dollars); “money” being the native token of the platform, e.g., ZIL in Zilliqa, ETH in Ethereum, etc. For example, in a kickstarter contract, backers send money to the contract to help kickstart a project. Or, in an auction contract, bidders transfer money to the contract acting as the auctioneer, which eventually selects the highest bidder as the winner.
Money held by or transferred to a contract often undergoes numerous transformations and checks that stress the integrity of the underlying code that manages it. The money may also “flow” across the contract through internal variables and operators, and one must ensure that it happens in a secure and consistent way. …