Smart contract

A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control or document events and actions according to the terms of a contract or an agreement.[1][2][3][4] The objectives of smart contracts are the reduction of need for trusted intermediators, arbitration costs, and fraud losses, as well as the reduction of malicious and accidental exceptions.[5][2] Smart contracts are commonly associated with cryptocurrencies, and the smart contracts introduced by Ethereum are generally considered a fundamental building block for decentralized finance (DeFi) and NFT applications.[6][7]

Vending machines are mentioned as the oldest piece of technology equivalent to smart contract implementation.[3] The original Ethereum white paper by Vitalik Buterin in 2014[8] describes the Bitcoin protocol as a weak version of the smart contract concept as originally defined by Nick Szabo, and proposed a stronger version based on the Solidity language, which is Turing complete. Since Bitcoin, various cryptocurrencies have supported programming languages which allow for more advanced smart contracts between untrusted parties.[9]

A smart contract should not be confused with a smart legal contract, which refers to a traditional, natural-language, legally-binding agreement that has selected terms expressed and implemented in machine-readable code.[10][11][12]

Etymology

Smart contracts were first proposed in the early 1990s by Nick Szabo, who coined the term, using it to refer to "a set of promises, specified in digital form, including protocols within which the parties perform on these promises".[13][14] In 1998, the term was used to describe objects in rights management service layer of the system The Stanford Infobus, which was a part of Stanford Digital Library Project.[1]

A smart contract does not typically constitute a valid binding agreement at law,[15] although a smart legal contract is intended to be both executable by a machine and legally enforceable.[16] [10][11][12]

Smart contracts are not legal agreements, but rather means of performing obligations deriving from agreements that can be executed automatically by a computer program or a transaction protocol,[15] such as technological means for the automation of payment obligations[17] or obligations consisting in the transfer of tokens or cryptocurrencies. Some scholars have argued that the imperative or declarative nature of programming languages would impact the legal validity of smart contracts.[18]

Since the 2015 launch of the Ethereum blockchain,[19] the term "smart contract" has been more specifically applied toward the notion of general purpose computation that takes place on a blockchain or distributed ledger. The US National Institute of Standards and Technology describes a "smart contract" as a "collection of code and data (sometimes referred to as functions and state) that is deployed using cryptographically signed transactions on the blockchain network".[20] In this interpretation, used for example by the Ethereum Foundation[8] or IBM,[21] a smart contract is not necessarily related to the classical concept of a contract, but can be any kind of computer program. A smart contract also can be regarded as a secured stored procedure, as its execution and codified effects (like the transfer of value between parties) are strictly enforced and cannot be manipulated; after a transaction with specific contract details is stored into a blockchain or distributed ledger, it cannot be changed. That's because the actual execution of contracts is controlled and audited by the platform, not by arbitrary server-side programs connecting to the platform.[22][23]

In 2017, by implementing the Decree on Development of Digital Economy, Belarus has become the first-ever country to legalize smart contracts. Belarusian lawyer Denis Aleinikov is considered to be the author of a smart contract legal concept introduced by the decree.[24]

In 2018, a US Senate report said: "While smart contracts might sound new, the concept is rooted in basic contract law. Usually, the judicial system adjudicates contractual disputes and enforces terms, but it is also common to have another arbitration method, especially for international transactions. With smart contracts, a program enforces the contract built into the code."[25] A number of states in the US have passed legislation on the use of smart contracts, such as Arizona,[26] Nevada,[27] Tennessee,[28] and Wyoming.[29] And in April 2020, Iowa's House of Representatives passed a bill legally recognizing smart contracts in the state.[30]

In April 2021, the UK Jurisdiction Taskforce (UKJT) published the Digital Dispute Resolution Rules (the Digital DR Rules) to help enable the rapid resolution of blockchain and crypto legal disputes in Britain.[31]

Workings

Similar to a transfer of value on a blockchain, deployment of a smart contract on a blockchain occurs by sending a transaction from a wallet for the blockchain.[32] The transaction includes the compiled code for the smart contract as well as a special receiver address.[32] That transaction must then be included in a block that is added to the blockchain, at which point the smart contract's code will execute to establish the initial state of the smart contract.[32] Byzantine fault-tolerant algorithms secure the smart contract in a decentralized way from attempts to tamper with it. Once a smart contract is deployed, it cannot be updated.[33] Smart contracts on a blockchain can store arbitrary state and execute arbitrary computations. End clients interact with a smart contract through transactions. Such transactions with a smart contract can invoke other smart contracts. These transactions might result in changing the state and sending coins from one smart contract to another or from one account to another.[33]

The most popular blockchain for running smart contracts is Ethereum.[34] On Ethereum, smart contracts are typically written in a Turing-complete programming language called Solidity,[35] and compiled into low-level bytecode to be executed by the Ethereum Virtual Machine.[36] Due to the halting problem and other security problems, Turing-completeness is considered to be a risk and is deliberately avoided by languages like Vyper.[37][38] Some of the other smart contract programming languages missing Turing-completeness are Simplicity, Scilla, Ivy and Bitcoin Script.[38] However, measurements in 2020 using regular expressions showed that only 35.3% of 53,757 Ethereum smart contracts at that time included recursions and loops — constructs connected to the halting problem.[39]

Several languages are designed to enable formal verification: Bamboo, IELE, Simplicity, Michelson (can be verified with Coq),[38] Liquidity (compiles to Michelson), Scilla, DAML and Pact.[37]

Notable examples of blockchain platforms supporting smart contracts include the following:
NameDescription
EthereumImplements a Turing-complete language on its blockchain, a prominent smart contract framework[40]
BitcoinProvides a Turing-incomplete script language that allows the creation of custom smart contracts on top of Bitcoin like multisignature accounts, payment channels, escrows, time locks, atomic cross-chain trading, oracles, or multi-party lottery with no operator.[41]
Binance Smart ChainA blockchain platform for smart contracts
CardanoA blockchain platform for smart contracts, using proof of stake
SolanaA blockchain platform for smart contracts
AvalancheA blockchain platform for smart contracts
TronA blockchain platform for smart contracts
EOS.IOA blockchain platform for smart contracts
TezosA blockchain platform modifying its own set of rules with minimal disruption to the network through an on-chain governance model

Processes on a blockchain are generally deterministic in order to ensure Byzantine fault-tolerance.[42] Nevertheless, real world application of smart contracts, such as lotteries and casinos, require secure randomness.[43] In fact, blockchain technology reduces the costs for conducting of a lottery and is therefore beneficial for the participants. Randomness on blockchain can be implemented by using block hashes or timestamps, oracles, commitment schemes, special smart contracts like RANDAO[44][45] and Quanta, as well as sequences from mixed strategy Nash equilibria.[42]

Applications

In 1998, Szabo proposed that smart contract infrastructure can be implemented by replicated asset registries and contract execution using cryptographic hash chains and Byzantine fault-tolerant replication.[46] Askemos implemented this approach in 2002[47][48] using Scheme (later adding SQLite[49][50]) as the contract script language.[51]

One proposal for using bitcoin for replicated asset registration and contract execution is called "colored coins".[52] Replicated titles for potentially arbitrary forms of property, along with replicated contract execution, are implemented in different projects.

As of 2015, UBS was experimenting with "smart bonds" that use the bitcoin blockchain[53] in which payment streams could hypothetically be fully automated, creating a self-paying instrument.[54]

Inheritance wishes could hypothetically be implemented automatically upon registration of a death certificate by means of smart contracts.[55][56] Birth certificates can also work together with smart contracts.[57][58]

Chris Snook of Inc.com suggests smart contracts could also be used to handle real estate transactions and could be used in the field of title records and in the public register.[59][60][61][62][63]

Seth Oranburg and Liya Palagashvili argue that smart contracts could also be used in employment contracts, especially temporary employment contracts, which according to them would benefit the employer.[64][65]

Smart contract on block chain technology for smart villages[66]

Security issues

The transactions data from a blockchain-based smart contract is visible to all users in the blockchain. The data provides cryptographic view of the transactions, however, this leads to a situation where bugs, including security holes, are visible to all yet may not be quickly fixed.[67] Such an attack, difficult to fix quickly, was successfully executed on The DAO in June 2016, draining approximately US$50 million worth of Ether at the time, while developers attempted to come to a solution that would gain consensus.[68] The DAO program had a time delay in place before the hacker could remove the funds; a hard fork of the Ethereum software was done to claw back the funds from the attacker before the time limit expired.[69] Other high-profile attacks include the Parity multisignature wallet attacks, and an integer underflow/overflow attack (2018), totaling over US$184 million.[70]

Issues in Ethereum smart contracts, in particular, include ambiguities and easy-but-insecure constructs in its contract language Solidity, compiler bugs, Ethereum Virtual Machine bugs, attacks on the blockchain network, the immutability of bugs and that there is no central source documenting known vulnerabilities, attacks and problematic constructs.[40]

Smart legal contracts are distinct from smart contracts. As mentioned above, a smart contract is not necessarily legally enforceable as a contract. On the other hand, a smart legal contract has all the elements of a legally enforceable contract in the jurisdiction in which it can be enforced and it can be enforced by a court or tribunal. Therefore, while every smart legal contract will contain some elements of a smart contract, not every smart contract will be a smart legal contract.[71]

There is no formal definition of a smart legal contract in the legal industry.[72]

A Ricardian contract is a type of smart legal contract.

See also

References

  1. Röscheisen, Martin; Baldonado, Michelle; Chang, Kevin; Gravano, Luis; Ketchpel, Steven; Paepcke, Andreas (1998). "The Stanford InfoBus and its service layers: Augmenting the internet with higher-level information management protocols". Digital Libraries in Computer Science: The MeDoc Approach. Lecture Notes in Computer Science. Vol. 1392. Springer. pp. 213–230. doi:10.1007/bfb0052526. ISBN 978-3-540-64493-4.
  2. Fries, Martin; P. Paal, Boris (2019). Smart Contracts (in German). Mohr Siebeck. ISBN 978-3-16-156911-1. JSTOR j.ctvn96h9r.
  3. Savelyev, Alexander (14 December 2016). "Contract Law 2.0: "Smart" Contracts As the Beginning of the End of Classic Contract Law". Social Science Research Network. SSRN 2885241.
  4. Tapscott, Don; Tapscott, Alex (May 2016). The Blockchain Revolution: How the Technology Behind Bitcoin is Changing Money, Business, and the World. Portfolio/Penguin. pp. 72, 83, 101, 127. ISBN 978-0670069972.
  5. Szabo, Nick (1997). "View of Formalizing and Securing Relationships on Public Networks | First Monday". First Monday. doi:10.5210/fm.v2i9.548. S2CID 33773111.
  6. Zhou, Haozhe; Milani Fard, Amin; Makanju, Adetokunbo (2022-05-27). "The State of Ethereum Smart Contracts Security: Vulnerabilities, Countermeasures, and Tool Support". Journal of Cybersecurity and Privacy. 2 (2): 358–378. doi:10.3390/jcp2020019. ISSN 2624-800X.
  7. "All You Need to Know About NFT Smart Contracts". Binance.com. Binance. Retrieved 26 September 2022.
  8. "White Paper· ethereum/wiki Wiki · GitHub". GitHub. Archived from the original on 11 January 2014.
  9. Alharby, Maher; van Moorsel, Aad (26 August 2017). "Blockchain-based Smart Contracts: A Systematic Mapping Study". Computer Science & Information Technology: 125–140. arXiv:1710.06372. doi:10.5121/csit.2017.71011. ISBN 9781921987700. S2CID 725413.
  10. Cannarsa, Michel (1 December 2018). "Interpretation of Contracts and Smart Contracts: Smart Interpretation or Interpretation of Smart Contracts?". European Review of Private Law. 26 (6): 773–785. doi:10.54648/ERPL2018054. S2CID 188017977.
  11. Drummer, Daniel; Neumann, Dirk (5 August 2020). "Is code law? Current legal and technical adoption issues and remedies for blockchain-enabled smart contracts". Journal of Information Technology. 35 (4): 337–360. doi:10.1177/0268396220924669. ISSN 0268-3962. S2CID 225409384.
  12. Filatova, Nataliia (1 September 2020). "Smart contracts from the contract law perspective: outlining new regulative strategies". International Journal of Law and Information Technology. 28 (3): 217–242. doi:10.1093/ijlit/eaaa015. ISSN 0967-0769.
  13. Morris, David Z. (21 January 2014). "Bitcoin is not just digital currency. It's Napster for finance". Fortune. Retrieved 7 November 2018.
  14. Schulpen, Ruben R.W.H.G. (1 August 2018). "Smart contracts in the Netherlands - University of Tilburg". uvt.nl. Twente University. Retrieved 26 October 2019.
  15. Mik, Eliza, Smart Contracts: A Requiem (December 7, 2019). Journal of Contract Law (2019) Volume 36 Part 1 at p 72
  16. CleanApp (January 21, 2019). "Crypto's Founding Fallacy: How Mistakes in the 'Smart Contract' Genesis Block Weaken the Whole Chain". Crypto Law Review.
  17. J Cieplak, S Leefatt, ‘Smart Contracts: A Smart Way To Automate Performance’ (2017) 1 Georgia L & Tech Rev 417
  18. Governatori, Guido; Idelberger, Florian; Milosevic, Zoran; Riveret, Regis; Sartor, Giovanni; Xu, Xiwei (2018). "On legal contracts, imperative and declarative smart contracts, and blockchain systems". Artificial Intelligence and Law. 26 (4): 33. doi:10.1007/s10506-018-9223-3. S2CID 3663005.
  19. Buterin, Vitalik (August 7, 2015). "Ethereum - On Public and Public Blockchains". Ethereum.Org.
  20. D J Yaga et al., Blockchain Technology Overview, National Institute of Standards and Technology Internal/Interagency Report 8202, 2018, p 54, cited in Mik, Eliza, Smart Contracts: A Requiem (December 7, 2019). Journal of Contract Law (2019) Volume 36 Part 1 at p 71
  21. Cachin, Christian. "Architecture of the Hyperledger Blockchain Fabric" (PDF). ibm.com.
  22. Vo, Hoang Tam; Kundu, Ashish; Mohania, Mukesh (2018). "Research Directions in Blockchain Data Management and Analytics" (PDF). Advances in Database Technology - Extending Database Technology (EDBT). OpenProceedings. 21: 446. Some distributed ledger technologies support an additional capability called a smart contract, which is similar to the concept of stored procedure in classical relational databases to some extent. Smart contracts allow the shared business processes within a business network to be standardised, automated and enforced via computer programs to increase the integrity of the ledger.
  23. Huckle, Steve; Bhattacharya, Rituparna; White, Martin; Beloff, Natalia (2016). "Internet of Things, Blockchain and Shared Economy Applications". Procedia Computer Science. Elsevier B.V. 98: 463. doi:10.1016/j.procs.2016.09.074. Firstly, that total quantity of BTC in a transaction's inputs must cover the total number of BTC in the outputs. That rule behaves similarly to a database stored procedure, except that it is impossible to circumvent. Secondly, BTC transactions use public-private key cryptography. That makes BTC act like a database with a publicly auditable per-row permission scheme.
  24. Makhovsky, Andrei (December 22, 2017). "Belarus adopts crypto-currency law to woo foreign investors". Reuters.
  25. Chapter 9: Building a Secure Future, One blockchain at a time, US Senate Joint Economic Committee, March 2018.
  26. "Arizona HB2417 - 2017 - Fifty-third Legislature 1st Regular". LegiScan.
  27. Hyman Gayle M, Digesti, Matthew P New Nevada legislation recognizes blockchain and smart contract terminologies August 2017, Nevada Lawyer
  28. Tom, Daniel (22 September 2020). "Smart Contract Bill Tennessee" (PDF).
  29. Wyoming, Legislature (26 February 2019). "Wyoming - Smart Contract".
  30. "Iowa House approves bills to facilitate broadband, cryptocurrency". www.thegazette.com. Retrieved 2021-04-15.
  31. Morgan, Herbert Smith Freehills LLP-Charlie; Parker, Chris; Livingston, Dorothy; Naish, Vanessa; Tevendale, Craig (23 April 2021). "Arbitration of digital disputes in smart contracts and the release of the digital dispute resolution rules from the UK jurisdiction taskforce | Lexology". www.lexology.com. Retrieved 2021-04-25.
  32. Soloro, Kevin; Kanna, Randall; Hoover, David (December 2019). Hands-On Smart Contract Development With Solidity and Ethereum: From Fundamentals to Deployment. California, U.S.A.: O'Reilly. p. 73. ISBN 978-1-492-04526-7. Retrieved 1 November 2020.
  33. Sergey, Ilya; Nagaraj, Vaivaswatha; Johannsen, Jacob; Kumar, Amrit; Trunov, Anton; Hao, Ken Chan Guan (10 October 2019). "Safer smart contract programming with Scilla". Proceedings of the ACM on Programming Languages. 3 (OOPSLA): 1–30. doi:10.1145/3360611. ISSN 2475-1421.
  34. Alharby, Maher; van Moorsel, Aad (26 August 2017). "Blockchain-based Smart Contracts: A Systematic Mapping Study". Computer Science & Information Technology: 125–140. arXiv:1710.06372. doi:10.5121/csit.2017.71011. ISBN 9781921987700.
  35. Wohrer, Maximilian; Zdun, Uwe (20 March 2018). "Smart contracts: Security patterns in the ethereum ecosystem and solidity". 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE). pp. 2–8. doi:10.1109/IWBOSE.2018.8327565. ISBN 978-1-5386-5986-1. S2CID 4567923.
  36. Perez, Daniel; Livshits, Benjamin (17 October 2020). "Smart Contract Vulnerabilities: Vulnerable Does Not Imply Exploited". arXiv:1902.06710 [cs.CR].
  37. Harz, Dominik; Knottenbelt, William (31 October 2018). "Towards Safer Smart Contracts: A Survey of Languages and Verification Methods". arXiv:1809.09805 [cs.CR].
  38. Tyurin, A.V.; Tyuluandin, I.V.; Maltsev, V.S.; Kirilenko, I.A.; Berezun, D.A. (2019). "Overview of the Languages for Safe Smart Contract Programming". Proceedings of the Institute for System Programming of the RAS. 31 (3): 157–176. doi:10.15514/ispras-2019-31(3)-13. S2CID 203179644.
  39. Jansen, Marc; Hdhili, Farouk; Gouiaa, Ramy; Qasem, Ziyaad (2020). "Do Smart Contract Languages Need to be Turing Complete?". Blockchain and Applications. Advances in Intelligent Systems and Computing. Vol. 1010. Springer International Publishing. pp. 19–26. doi:10.1007/978-3-030-23813-1_3. ISBN 978-3-030-23812-4. S2CID 195656195.
  40. Atzei, Nicola; Bartoletti, Massimo; Cimoli, Tiziana (2017), "A survey of attacks on Ethereum smart contracts" (PDF), 6th International Conference on Principles of Security and Trust (POST), European Joint Conferences on Theory and Practice of Software
  41. Atzei, Nicola; Bartoletti, Massimo; Cimoli, Tiziana; Lande, Stefano; Zunino, Roberto (2018), "SoK: unraveling Bitcoin smart contracts" (PDF), 7th International Conference on Principles of Security and Trust (POST), European Joint Conferences on Theory and Practice of Software
  42. Chatterjee, Krishnendu; Goharshady, Amir Kafshdar; Pourdamghani, Arash (21 February 2019). "Probabilistic Smart Contracts: Secure Randomness on the Blockchain". arXiv:1902.07986 [cs.GT].
  43. Chen, Tai-yuan; Huang, Wei-ning; Kuo, Po-chun; Chung, Hao (6 August 2020). "Method for Generating Secure Randomness on Blockchain". Retrieved 28 August 2020.
  44. Jia, Zhifeng; Chen, Rui; Li, Jie (2019). "DeLottery: A Novel Decentralized Lottery System Based on Blockchain Technology". Proceedings of the 2019 2nd International Conference on Blockchain Technology and Applications. pp. 20–25. doi:10.1145/3376044.3376049. ISBN 9781450377430. S2CID 207880557.
  45. "randao/randao". randao. 10 July 2020. Retrieved 10 July 2020.
  46. Nick Szabo (1998). "Secure Property Titles with Owner Authority". Archived from the original on January 15, 2014. Retrieved January 12, 2014.
  47. Jörg F. Wittenberger (2002). Askemos a distributed settlement. Proceedings of International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science, and e-Medicine on the Internet (SSGRR), L’Aquila.
  48. "Proceedings of International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science, and e-Medicine on the Internet" (PDF). Archived from the original (PDF) on 2017-10-26. Retrieved 2017-05-25.
  49. Martin Möbius (2009). Erstellung eines Archivierungskonzepts für die Speicherung rückverfolgbarer Datenbestände im Askemos-System (Thesis). Hochschule Mittweida.
  50. Tom-Steve Watzke (2010). "Entwicklung einer Datenbankschnittstelle als Grundlage für Shop-Systeme unter dem Betriebssystem Askemos".
  51. RA Markus Heinker (2007). "Beweiswürdigung elektronischer Dokumente im Zivilprozess unter vergleichender Betrachtung von qualifizierten elektronischen Signaturen nach dem Signaturgesetz und dem Askemos-Verfahren".
  52. Hal Hodson (20 November 2013). "Bitcoin moves beyond mere money". New Scientist. Retrieved 12 January 2014.
  53. Ross, Rory (2015-09-12). "Smart Money: Blockchains Are the Future of the Internet". Newsweek. Retrieved 2016-05-27.
  54. Wigan, David (2015-06-11). "Bitcoin technology will disrupt derivatives, says banker". IFR Asia. Retrieved 2016-05-27.
  55. How blockchain technology could change our lives
  56. Blockchain and AI are coming to kill these 4 business verticals
  57. Blockchain for Digital Governments
  58. Blockchain Based Framework for Document Authentication
  59. Snook, Chris J. (31 October 2017). "Blockchain and Artificial Intelligence Are Coming to Kill These 4 Small Business Verticals". Inc.com. Retrieved 25 January 2022.
  60. The Bitfury Group and Government of Republic of Georgia Expand Blockchain Pilot
  61. A BLOCKCHAIN - Journals Gateway
  62. Digital Transformation: Blockchain and Land Titles
  63. "Ukraine launches big blockchain deal with tech firm Bitfury". Reuters. 17 April 2017. Archived from the original on 2023-01-24.
  64. Oranburg, Seth; Palagashvili, Liya (22 October 2018). "The Gig Economy, Smart Contracts, and Disruption of Traditional Work Arrangements". Search eLibrary. doi:10.2139/ssrn.3270867. S2CID 216803648. SSRN 3270867. Retrieved 25 January 2022.
  65. A blockchain-based decentralized system for proper handling of temporary employment contracts
  66. Kaur, Parminder; Parashar, Anshu (2022-06-01). "A Systematic Literature Review of Blockchain Technology for Smart Villages". Archives of Computational Methods in Engineering. 29 (4): 2417–2468. doi:10.1007/s11831-021-09659-7. ISSN 1886-1784. PMC 8549431. PMID 34720578.
  67. Peck, M. (28 May 2016). "Ethereum's $150-Million Blockchain-Powered Fund Opens Just as Researchers Call For a Halt". IEEE Spectrum. Institute of Electrical and Electronics Engineers.
  68. DuPont, Quinn (2017). "Experiments in Algorithmic Governance: A history and ethnography of "The DAO", a failed Decentralized Autonomous Organization" (PDF). Archived from the original (PDF) on 2017-07-30. Retrieved 29 July 2017.
  69. Coy, Peter; Kharif, Olga (25 August 2016). "This Is Your Company on Blockchain". Bloomberg Businessweek. Retrieved 2016-12-05.
  70. Praitheeshan, Purathani; Pan, Lei; Yu, Jiangshan; Liu, Joseph; Doss, R. (2019). "Security Analysis Methods on Ethereum Smart Contract Vulnerabilities: A Survey". arXiv:1908.08605 [cs.CR].
  71. Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective, 5.
  72. Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective, 3.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.