Rewrite #2: http://ojphi.org/ojs/index.php/fm/article/view/548/469 The basic idea of smart contracts is that many kinds of contractual clauses (such as liens, bonding, delineation of property rights, etc.) can be embedded in the hardware and software we deal with, in such a way as to make breach of contract expensive (if desired, sometimes prohibitively so) for the breacher.
Rewrite #2: http://ojphi.org/ojs/index.php/fm/article/view/548/469 Most Common Synonyms: Self-executing contracts Digital contracts Blockchain contracts Ethereum contracts
Mechanical arm picks wrong item • Swing door is stuck and item not accessible • Coinbox is full and no additional funds can be deposited • Purchaser does not have exact change • Purchaser does not have valid currency (tokens, Euros) • Purchaser remits purposefully counterfeit funds • Purchaser physically removes items by breaking glass • Purchaser physically removes deposited funds by opening coinbox • Price data is incorrect but physical access is required to update vending machine (1000% sugar price spike)
machines. • I have to make an (un)expected payment on a debt instrument, insurance policy, etc. • I have the funds available inside the machines, but have to collect them from 100 separate locations and then redeposit. • It costs time/money to visit and access 100 machines. • Subsequently, those machines now don’t have funds on hand to make change. • Instead, you might take a short-term loan secured against the funds/machines to pay the former debt instrument.
legal system is a double-edged sword with many benefits. (prompt: if this “feature” of status quo systematically favors larger, more sophisticated parties, is there a normative justification?)
the devices to run the contract instructions. Incentivize the device to report the computation results accurately. Incentivize the devices to report the computation results quickly.
may reasonably vary from system to system. Many systems are open source. Private chains can be created with “custom” incentives. Example: • Private Bitcoin/Ethereum networks with different block rewards, gas costs, instruction sets
of various DLT systems/programming languages to implement incentives 3. Select language to write contract 4. Implement test cases for contract based on incentives 5. Implement contract methods 6. Validate contract methods against test cases 7. Deploy contract on DLT system
based on Step 1. If a right exists for an actor, test that party can actually do it. If an obligation exists for an actor, test that it is met. If a condition generates a penalty or reward, make sure it happens.
is becoming more like writing software, then we should acknowledge that there are different philosophies of software development. Some are compatible, others are not. Examples: Test-Driven Development (TDD), Agile, Pair Programming, Formal Verification, Functional, Procedural
test cases from Step 4. Make sure 100% of your contract has test cases that pass. Is it malpractice to have less than 100% contract coverage and pass rate? What about modeling a traditional contract? Measurement drives change...
crypto community embraces open source. You can find the source code to almost every major project - hundreds of millions of dollars of labor and investment - freely available on GitHub.
is that “modular” or “re-usable” components are developed in large numbers. You are not probably not the first person to need a wheel. Nor will your wheel be the best. Don’t design and build one yourself. Just import it.
Documentation from Ethereum Solidity team. Get an idea of the big picture. Documentation: http://solidity.readthedocs.io/en/v0.4.21/index.html# Examples: • http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html • http://solidity.readthedocs.io/en/v0.4.21/solidity-by-example.html#voting