Smart contract

Page semi-protected
Source: Wikipedia, the free encyclopedia.

A smart contract is a

NFT applications.[6][7]

The original

Turing complete. Since Bitcoin,[clarification needed] 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

By 1996, Nick Szabo was using the term "smart contract" to refer to contracts which would be enforced by physical property (such as hardware or software) instead of by law. Szabo described vending machines as an example of this concept.[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]

Legal status of smart contracts

A smart contract does not typically constitute a valid binding agreement at law.[15] Proposals exist to regulate smart contracts.[10][11][12]

Smart contracts are not legal agreements, but instead transactions which are executed automatically by a

transaction protocol,[15] such as technological means for the automation of payment obligations[16] such as by transferring cryptocurrencies or other tokens. Some scholars have argued that the imperative or declarative nature of programming languages would impact the legal validity of smart contracts.[17]

Since the 2015 launch of the

blockchain, the term "smart contract" has been applied to general purpose computation that takes place on a blockchain. 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".[18] In this interpretation a smart contract is any kind of computer program which uses a blockchain. A smart contract also can be regarded as a secured stored procedure, as its execution and codified effects (like the transfer of tokens between parties) cannot be manipulated without modifying the blockchain itself. In this interpretation, the execution of contracts is controlled and audited by the platform, not by arbitrary server-side programs connecting to the platform.[19][20]

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."[21] States in the US which have passed legislation on the use of smart contracts include Arizona,[22] Iowa,[23] Nevada,[24] Tennessee,[25] and Wyoming.[26]
In April 2020,

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

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

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.[29] 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.[29]

The most popular blockchain for running smart contracts is

Turing-complete programming language called Solidity,[31] and compiled into low-level bytecode to be executed by the Ethereum Virtual Machine.[32] 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.[33][34] Some of the other smart contract programming languages missing Turing-completeness are Simplicity, Scilla, Ivy and Bitcoin Script.[34] 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.[35]

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

Notable examples of blockchain platforms supporting smart contracts include the following:
Name Description
Ethereum Implements a Turing-complete language on its blockchain, a prominent smart contract framework[36]
Bitcoin Provides 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.[37]
Binance Smart Chain
A blockchain platform for smart contracts
Cardano
A blockchain platform for smart contracts, using proof of stake
Solana A blockchain platform for smart contracts
Avalanche A blockchain platform for smart contracts
Tron A blockchain platform for smart contracts
EOS.IO A blockchain platform for smart contracts
Tezos A 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.

mixed strategy Nash equilibria.[38]

Applications

In 1998, Szabo proposed that smart contract infrastructure can be implemented by replicated asset registries and contract execution using

Byzantine fault-tolerant replication.[42] Askemos implemented this approach in 2002[43][44] using Scheme (later adding SQLite[45][46]) as the contract script language.[47]

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

As of 2015,

blockchain[49] in which payment streams could hypothetically be fully automated, creating a self-paying instrument.[50]

Inheritance wishes could hypothetically be implemented automatically upon registration of a death certificate by means of smart contracts.[according to whom?][51][52] Birth certificates can also work together with smart contracts.[53][54]

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.[55][56][57][58][59]

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.[60][61]

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

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.

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.[64] 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.[65] Other high-profile attacks include the Parity multisignature wallet attacks, and an integer underflow/overflow attack (2018), totaling over US$184 million.[66]

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.[36]

Difference from smart legal contracts

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.[67]

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

A Ricardian contract is a type of smart legal contract.[citation needed]

See also

References

  1. ^ .
  2. ^ .
  3. .
  4. .
  5. .
  6. .
  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. S2CID 725413
    .
  10. ^ .
  11. ^ .
  12. ^ .
  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. ^ a b Mik, Eliza, Smart Contracts: A Requiem (December 7, 2019). Journal of Contract Law (2019) Volume 36 Part 1 at p 72
  16. ^ J Cieplak, S Leefatt, ‘Smart Contracts: A Smart Way To Automate Performance’ (2017) 1 Georgia L & Tech Rev 417
  17. S2CID 3663005
    .
  18. ^ 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
  19. ^ 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). 21. OpenProceedings: 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.
  20. . 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.
  21. Joint Economic Committee
    , March 2018.
  22. ^ "Arizona HB2417 - 2017 - Fifty-third Legislature 1st Regular". LegiScan.
  23. ^ "Iowa House approves bills to facilitate broadband, cryptocurrency". www.thegazette.com. Retrieved 2021-04-15.
  24. ^ Hyman Gayle M, Digesti, Matthew P New Nevada legislation recognizes blockchain and smart contract terminologies August 2017, Nevada Lawyer
  25. ^ Tom, Daniel (22 September 2020). "Smart Contract Bill Tennessee" (PDF).
  26. ^ Wyoming, Legislature (26 February 2019). "Wyoming - Smart Contract".
  27. ^ 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.
  28. ^ . Retrieved 1 November 2020.
  29. ^ .
  30. .
  31. .
  32. ].
  33. ^ ].
  34. ^ .
  35. .
  36. ^ a b 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
  37. ^ 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
  38. ^ ].
  39. ^ 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.
  40. S2CID 207880557
    .
  41. ^ "randao/randao". randao. 10 July 2020. Retrieved 10 July 2020.
  42. ^ Nick Szabo (1998). "Secure Property Titles with Owner Authority". Archived from the original on January 15, 2014. Retrieved January 12, 2014.
  43. ^ 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.
  44. ^ "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.
  45. ^ Martin Möbius (2009). Erstellung eines Archivierungskonzepts für die Speicherung rückverfolgbarer Datenbestände im Askemos-System (Thesis). Hochschule Mittweida.
  46. ^ Tom-Steve Watzke (2010). "Entwicklung einer Datenbankschnittstelle als Grundlage für Shop-Systeme unter dem Betriebssystem Askemos".
  47. ^ RA Markus Heinker (2007). "Beweiswürdigung elektronischer Dokumente im Zivilprozess unter vergleichender Betrachtung von qualifizierten elektronischen Signaturen nach dem Signaturgesetz und dem Askemos-Verfahren".
  48. ^ Hal Hodson (20 November 2013). "Bitcoin moves beyond mere money". New Scientist. Retrieved 12 January 2014.
  49. ^ Ross, Rory (2015-09-12). "Smart Money: Blockchains Are the Future of the Internet". Newsweek. Retrieved 2016-05-27.
  50. ^ Wigan, David (2015-06-11). "Bitcoin technology will disrupt derivatives, says banker". IFR Asia. Retrieved 2016-05-27.
  51. ^ How blockchain technology could change our lives
  52. ^ Blockchain and AI are coming to kill these 4 business verticals
  53. ^ Blockchain for Digital Governments
  54. ^ Blockchain Based Framework for Document Authentication
  55. ^ 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.
  56. ^ The Bitfury Group and Government of Republic of Georgia Expand Blockchain Pilot
  57. ^ A BLOCKCHAIN - Journals Gateway
  58. ^ Digital Transformation: Blockchain and Land Titles
  59. ^ "Ukraine launches big blockchain deal with tech firm Bitfury". Reuters. 17 April 2017. Archived from the original on 2023-01-24.
  60. SSRN 3270867
    . Retrieved 25 January 2022.
  61. ^ A blockchain-based decentralized system for proper handling of temporary employment contracts
  62. PMID 34720578
    .
  63. ^ 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.
  64. ^ 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.
  65. ^ Coy, Peter; Kharif, Olga (25 August 2016). "This Is Your Company on Blockchain". Bloomberg Businessweek. Retrieved 2016-12-05.
  66. ].
  67. ^ Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective, 5.
  68. ^ Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective, 3.