:Smart contract

{{About|contractual transactions on a decentralized platform|smart legal contracts|Smart legal contract}}

{{Short description|Contractual transaction on a decentralized platform}}

{{pp-semi|small=yes}}

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.{{cite book |last1=Röscheisen |first1=Martin |last2=Baldonado |first2=Michelle |last3=Chang |first3=Kevin |last4=Gravano |first4=Luis |last5=Ketchpel |first5=Steven |last6=Paepcke |first6=Andreas |title=Digital Libraries in Computer Science: The MeDoc Approach |chapter=The Stanford InfoBus and its service layers: Augmenting the internet with higher-level information management protocols |series=Lecture Notes in Computer Science |date=1998 |volume=1392 |pages=213–230 |doi=10.1007/bfb0052526 |publisher=Springer |isbn=978-3-540-64493-4 |language=en}}{{cite book |last1=Fries |first1=Martin |last2=P. Paal |first2=Boris |title=Smart Contracts |year=2019 |publisher=Mohr Siebeck |jstor=j.ctvn96h9r |isbn=978-3-16-156911-1 |language=de}}{{cite web |last1=Savelyev |first1=Alexander |title=Contract Law 2.0: "Smart" Contracts As the Beginning of the End of Classic Contract Law |date=14 December 2016 |publisher=Social Science Research Network |ssrn=2885241 |language=en |url=https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2885241 |access-date=24 May 2020 |archive-date=24 March 2020 |archive-url=https://web.archive.org/web/20200324141259/https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2885241 |url-status=live }}{{cite book|title=The Blockchain Revolution: How the Technology Behind Bitcoin is Changing Money, Business, and the World|last1=Tapscott|first1=Don|last2=Tapscott|first2=Alex|date=May 2016|isbn=978-0670069972|pages=72, 83, 101, 127|publisher=Portfolio/Penguin |author-link=Don Tapscott}} 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.{{cite journal |last1=Szabo |first1=Nick |author-link1=Nick Szabo |title=View of Formalizing and Securing Relationships on Public Networks {{!}} First Monday |journal=First Monday |date=1997 |doi=10.5210/fm.v2i9.548 |s2cid=33773111 |url=https://firstmonday.org/article/view/548/469 |doi-access=free |access-date=2020-05-24 |archive-date=2022-04-10 |archive-url=https://web.archive.org/web/20220410235953/https://firstmonday.org/article/view/548/469 |url-status=dead }} 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 non-fungible token (NFT) applications.{{Cite journal |last1=Zhou |first1=Haozhe |last2=Milani Fard |first2=Amin |last3=Makanju |first3=Adetokunbo |date=2022-05-27 |title=The State of Ethereum Smart Contracts Security: Vulnerabilities, Countermeasures, and Tool Support |journal=Journal of Cybersecurity and Privacy |language=en |volume=2 |issue=2 |pages=358–378 |doi=10.3390/jcp2020019 |issn=2624-800X|doi-access=free }}

The original Ethereum white paper by Vitalik Buterin in 2014{{cite web |url=https://github.com/ethereum/wiki/wiki/White-Paper |title=White Paper· ethereum/wiki Wiki · GitHub |website=GitHub |url-status=live |archive-url=https://web.archive.org/web/20140111180823/http://ethereum.org/ethereum.html |archive-date=11 January 2014 }} 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 then, various cryptocurrencies have supported programming languages which allow for more advanced smart contracts between untrusted parties.{{cite journal |last1=Alharby |first1=Maher |last2=van Moorsel |first2=Aad |title=Blockchain-based Smart Contracts: A Systematic Mapping Study |journal=Computer Science & Information Technology |date=26 August 2017 |pages=125–140 |doi=10.5121/csit.2017.71011 |arxiv=1710.06372 |isbn=9781921987700 |s2cid=725413 }}

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.

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.{{cite web |url=http://fortune.com/2014/01/21/bitcoin-is-not-just-digital-currency-its-napster-for-finance/ |title=Bitcoin is not just digital currency. It's Napster for finance |last=Morris |first=David Z. |date=21 January 2014 |website=Fortune |access-date=7 November 2018 |archive-date=20 October 2014 |archive-url=https://web.archive.org/web/20141020170036/http://fortune.com/2014/01/21/bitcoin-is-not-just-digital-currency-its-napster-for-finance/ |url-status=live }}{{cite web |url=http://arno.uvt.nl/show.cgi?fid=146860 |title=Smart contracts in the Netherlands - University of Tilburg |last=Schulpen |first=Ruben R.W.H.G. |date=1 August 2018 |website=uvt.nl |publisher=Twente University |access-date=26 October 2019 |archive-date=19 February 2021 |archive-url=https://web.archive.org/web/20210219033925/http://arno.uvt.nl/show.cgi?fid=146860 |url-status=live }} 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.

Legal status of smart contracts

{{See also|Regulation of algorithms|distributed ledger technology law}}

A smart contract does not typically constitute a valid binding agreement at law. Proposals exist to regulate smart contracts.{{cite journal |last1=Cannarsa |first1=Michel |title=Interpretation of Contracts and Smart Contracts: Smart Interpretation or Interpretation of Smart Contracts? |journal=European Review of Private Law |date=1 December 2018 |volume=26 |issue=6 |pages=773–785 |doi=10.54648/ERPL2018054 |s2cid=188017977 |url=https://kluwerlawonline.com/journalarticle/European+Review+of+Private+Law/26.6/ERPL2018054 |language=en |access-date=20 September 2020 |archive-date=10 August 2020 |archive-url=https://web.archive.org/web/20200810045525/https://kluwerlawonline.com/journalarticle/European+Review+of+Private+Law/26.6/ERPL2018054 |url-status=live }}{{cite journal |last1=Drummer |first1=Daniel |last2=Neumann |first2=Dirk |title=Is code law? Current legal and technical adoption issues and remedies for blockchain-enabled smart contracts |journal=Journal of Information Technology |date=5 August 2020 |volume=35 |issue=4 |pages=337–360 |doi=10.1177/0268396220924669 |s2cid=225409384 |url=https://journals.sagepub.com/doi/abs/10.1177/0268396220924669 |language=en |issn=0268-3962 |access-date=20 September 2020 |archive-date=9 March 2021 |archive-url=https://web.archive.org/web/20210309234557/https://journals.sagepub.com/doi/abs/10.1177/0268396220924669 |url-status=live }}{{cite journal |last1=Filatova |first1=Nataliia |title=Smart contracts from the contract law perspective: outlining new regulative strategies |journal=International Journal of Law and Information Technology |date=1 September 2020 |volume=28 |issue=3 |pages=217–242 |doi=10.1093/ijlit/eaaa015 |url=https://academic.oup.com/ijlit/article-abstract/28/3/217/5897086 |language=en |issn=0967-0769 |access-date=20 September 2020 |archive-date=18 January 2022 |archive-url=https://web.archive.org/web/20220118115800/https://academic.oup.com/ijlit/article-abstract/28/3/217/5897086 |url-status=live }}

Smart contracts are not legal agreements, but instead transactions which are executed automatically by a computer program or a transaction protocol,Mik, Eliza, Smart Contracts: A Requiem (December 7, 2019). Journal of Contract Law (2019) Volume 36 Part 1 at p 72 such as technological means for the automation of payment obligationsJ Cieplak, S Leefatt, ‘Smart Contracts: A Smart Way To Automate Performance’ (2017) 1 Georgia L & Tech Rev 417 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.{{cite journal|last1=Governatori|first1=Guido|last2=Idelberger|first2=Florian|last3=Milosevic|first3=Zoran|last4=Riveret|first4=Regis|last5=Sartor|first5=Giovanni|last6=Xu|first6=Xiwei|title=On legal contracts, imperative and declarative smart contracts, and blockchain systems|journal=Artificial Intelligence and Law|year=2018|volume=26|issue=4|pages=33|language=en|doi=10.1007/s10506-018-9223-3|s2cid=3663005}}

In some jurisdictions, legal scholars have examined how the rigidity of smart contracts interacts with traditional doctrines such as contractual unforeseeability. For instance, Colombian legal scholarship has proposed adapting the theory of supervening onerousness (teoría de la imprevisión) to account for the high economic and systemic costs of reversing smart contract effects through judicial intervention, emphasizing the need to internalize these costs and develop new procedural mechanisms for digital environments.{{Cite journal |last=Arenas Correa |first=José David |date=2022-12-01 |title=Remedies to the Irreversibility of Smart Contracts in Colombian Private Law |url=https://www.sciendo.com/article/10.2478/bjes-2022-0014 |journal=TalTech Journal of European Studies |language=en |volume=12 |issue=2 |pages=113–145 |doi=10.2478/bjes-2022-0014 |issn=2674-4619|doi-access=free }}

Since the 2015 launch of the Ethereum 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".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 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.{{cite journal|first1=Hoang Tam|last1=Vo|first2=Ashish|last2=Kundu|first3=Mukesh|last3=Mohania|title=Research Directions in Blockchain Data Management and Analytics|url=https://openproceedings.org/2018/conf/edbt/paper-227.pdf|journal=Advances in Database Technology - Extending Database Technology (EDBT)|volume=21|year=2018|publisher=OpenProceedings|quote=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.|page=446|access-date=2019-10-02|archive-date=2019-10-02|archive-url=https://web.archive.org/web/20191002034850/https://openproceedings.org/2018/conf/edbt/paper-227.pdf|url-status=live}}{{cite journal |first1=Steve|last1=Huckle|first2=Rituparna|last2=Bhattacharya|first3=Martin|last3=White|first4=Natalia|last4=Beloff|journal=Procedia Computer Science|volume=98|year=2016|title=Internet of Things, Blockchain and Shared Economy Applications |publisher=Elsevier B.V. |quote=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.|page=463|doi=10.1016/j.procs.2016.09.074|doi-access=free}}

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."[https://www.jec.senate.gov/public/_cache/files/aaac3a69-e9fb-45b6-be9f-b1fd96dd738b/chapter-9-building-a-secure-future-one-blockchain-at-a-time.pdf Chapter 9: Building a Secure Future, One blockchain at a time] {{Webarchive|url=https://web.archive.org/web/20200514100431/https://www.jec.senate.gov/public/_cache/files/aaac3a69-e9fb-45b6-be9f-b1fd96dd738b/chapter-9-building-a-secure-future-one-blockchain-at-a-time.pdf |date=2020-05-14 }}, US Senate Joint Economic Committee, March 2018. States in the US which have passed legislation on the use of smart contracts include Arizona,{{cite web|url=https://legiscan.com/AZ/text/HB2417/id/1588180|title=Arizona HB2417 - 2017 - Fifty-third Legislature 1st Regular|website=LegiScan|access-date=2020-09-16|archive-date=2017-04-28|archive-url=https://web.archive.org/web/20170428221018/https://legiscan.com/AZ/text/HB2417/id/1588180|url-status=live}} Iowa,{{Cite web|title=Iowa House approves bills to facilitate broadband, cryptocurrency|url=https://www.thegazette.com/government-politics/iowa-house-approves-bills-to-facilitate-broadband-cryptocurrency/|access-date=2021-04-15|website=www.thegazette.com|language=en-US|archive-date=2021-04-15|archive-url=https://web.archive.org/web/20210415212617/https://www.thegazette.com/government-politics/iowa-house-approves-bills-to-facilitate-broadband-cryptocurrency/|url-status=live}} Nevada,Hyman Gayle M, Digesti, Matthew P [https://www.nvbar.org/wp-content/uploads/NevadaLawyer_Aug2017_Blockchain-1.pdf New Nevada legislation recognizes blockchain and smart contract terminologies] {{Webarchive|url=https://web.archive.org/web/20180910211704/https://www.nvbar.org/wp-content/uploads/NevadaLawyer_Aug2017_Blockchain-1.pdf |date=2018-09-10 }} August 2017, Nevada Lawyer Tennessee,{{cite web|last=Tom|first=Daniel|date=22 September 2020|title=Smart Contract Bill Tennessee|url=http://www.capitol.tn.gov/Bills/110/Bill/SB1662.pdf|access-date=22 September 2020|archive-date=2 October 2020|archive-url=https://web.archive.org/web/20201002001659/http://www.capitol.tn.gov/Bills/110/Bill/SB1662.pdf|url-status=live}} and Wyoming.{{Cite web|last=Wyoming|first=Legislature|date=26 February 2019|title=Wyoming - Smart Contract|url=https://wyoleg.gov/Legislation/2019/sf0125|access-date=26 September 2020|archive-date=28 January 2019|archive-url=https://web.archive.org/web/20190128120631/https://wyoleg.gov/Legislation/2019/sf0125|url-status=live}}

In April 2021, the UK Jurisdiction Taskforce (UKJT) published the Digital Dispute Resolution Rules (the Digital DR Rules), which were intended to enable the rapid resolution of blockchain and crypto legal disputes in Britain.{{Cite web|last1=Morgan|first1=Herbert Smith Freehills LLP-Charlie|last2=Parker|first2=Chris|last3=Livingston|first3=Dorothy|last4=Naish|first4=Vanessa|last5=Tevendale|first5=Craig|title=Arbitration of digital disputes in smart contracts and the release of the digital dispute resolution rules from the UK jurisdiction taskforce {{!}} Lexology|url=https://www.lexology.com/library/detail.aspx?g=6ea7c284-0157-4f2c-b330-e2758d1bf7a0|access-date=2021-04-25|website=www.lexology.com|date=23 April 2021|language=en|archive-date=2021-04-25|archive-url=https://web.archive.org/web/20210425165929/https://www.lexology.com/library/detail.aspx?g=6ea7c284-0157-4f2c-b330-e2758d1bf7a0|url-status=live}}

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.{{cite book |last1=Soloro |first1=Kevin |last2=Kanna |first2=Randall |last3=Hoover |first3=David |title=Hands-On Smart Contract Development With Solidity and Ethereum: From Fundamentals to Deployment |date=December 2019 |publisher=O'Reilly |location=California, U.S.A. |isbn=978-1-492-04526-7 |page=73 |url=https://books.google.com/books?id=thbADwAAQBAJ |access-date=1 November 2020 |archive-date=25 October 2023 |archive-url=https://web.archive.org/web/20231025073010/https://books.google.com/books?id=thbADwAAQBAJ |url-status=live }} The transaction includes the compiled code for the smart contract as well as a special receiver address. 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. 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.{{cite journal |last1=Sergey |first1=Ilya |last2=Nagaraj |first2=Vaivaswatha |last3=Johannsen |first3=Jacob |last4=Kumar |first4=Amrit |last5=Trunov |first5=Anton |last6=Hao |first6=Ken Chan Guan |title=Safer smart contract programming with Scilla |journal=Proceedings of the ACM on Programming Languages |date=10 October 2019 |volume=3 |issue=OOPSLA |pages=1–30 |doi=10.1145/3360611 |language=en |issn=2475-1421|doi-access=free }} 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.

The most popular blockchain for running smart contracts is Ethereum.{{cite journal |last1=Alharby |first1=Maher |last2=van Moorsel |first2=Aad |title=Blockchain-based Smart Contracts: A Systematic Mapping Study |journal=Computer Science & Information Technology |date=26 August 2017 |pages=125–140 |doi=10.5121/csit.2017.71011 |arxiv=1710.06372|isbn=9781921987700 |doi-access=free }} On Ethereum, smart contracts are typically written in a Turing-complete programming language called Solidity,{{cite book |last1=Wohrer |first1=Maximilian |last2=Zdun |first2=Uwe |title=2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE) |chapter=Smart contracts: Security patterns in the ethereum ecosystem and solidity |date=20 March 2018 |pages=2–8 |doi=10.1109/IWBOSE.2018.8327565 |isbn=978-1-5386-5986-1 |s2cid=4567923 |chapter-url=https://ieeexplore.ieee.org/document/8327565 |access-date=4 October 2020 |archive-date=9 October 2020 |archive-url=https://web.archive.org/web/20201009060917/https://ieeexplore.ieee.org/document/8327565 |url-status=live }} and compiled into low-level bytecode to be executed by the Ethereum Virtual Machine.{{cite arXiv |last1=Perez |first1=Daniel |last2=Livshits |first2=Benjamin |title=Smart Contract Vulnerabilities: Vulnerable Does Not Imply Exploited |date=17 October 2020 |class=cs.CR |eprint=1902.06710}} 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.{{cite arXiv |last1=Harz |first1=Dominik |last2=Knottenbelt |first2=William |title=Towards Safer Smart Contracts: A Survey of Languages and Verification Methods |date=31 October 2018 |class=cs.CR |eprint=1809.09805 }}{{cite journal |last1=Tyurin |first1=A.V. |last2=Tyuluandin |first2=I.V. |last3=Maltsev |first3=V.S. |last4=Kirilenko |first4=I.A. |last5=Berezun |first5=D.A. |title=Overview of the Languages for Safe Smart Contract Programming |journal=Proceedings of the Institute for System Programming of the RAS |date=2019 |volume=31 |issue=3 |pages=157–176 |doi=10.15514/ispras-2019-31(3)-13 |s2cid=203179644 |doi-access=free }} Some of the other smart contract programming languages missing Turing-completeness are Simplicity, Scilla, Ivy and Bitcoin Script. 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.{{cite book |last1=Jansen |first1=Marc |last2=Hdhili |first2=Farouk |last3=Gouiaa |first3=Ramy |last4=Qasem |first4=Ziyaad |title=Blockchain and Applications |chapter=Do Smart Contract Languages Need to be Turing Complete? |series=Advances in Intelligent Systems and Computing |date=2020 |volume=1010 |pages=19–26 |doi=10.1007/978-3-030-23813-1_3 |publisher=Springer International Publishing |isbn=978-3-030-23812-4 |s2cid=195656195 |language=en }}

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

class="wikitable sortable"

|+ 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{{Citation|title=6th International Conference on Principles of Security and Trust (POST)|year=2017|last1=Atzei|last2=Bartoletti|last3=Cimoli|first1=Nicola|first2=Massimo|first3=Tiziana|contribution=A survey of attacks on Ethereum smart contracts|contribution-url=http://eprint.iacr.org/2016/1007.pdf|publisher=European Joint Conferences on Theory and Practice of Software|access-date=2017-06-20|archive-date=2017-07-10|archive-url=https://web.archive.org/web/20170710185734/http://eprint.iacr.org/2016/1007.pdf|url-status=live}}
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.{{Citation|title=7th International Conference on Principles of Security and Trust (POST)|year=2018|last1=Atzei|last2=Bartoletti|last3=Cimoli|last4=Lande|last5=Zunino|first1=Nicola|first2=Massimo|first3=Tiziana|first4=Stefano|first5=Roberto|contribution=SoK: unraveling Bitcoin smart contracts|contribution-url=https://eprint.iacr.org/2018/192.pdf|publisher=European Joint Conferences on Theory and Practice of Software|access-date=2018-02-22|archive-date=2018-02-23|archive-url=https://web.archive.org/web/20180223050722/https://eprint.iacr.org/2018/192.pdf|url-status=live}}
CardanoA blockchain platform for smart contracts
SolanaA blockchain platform for smart contracts
TronA blockchain platform for smart contracts
TezosA blockchain platform for smart contracts

Processes on a blockchain are generally deterministic in order to ensure Byzantine fault tolerance.{{cite arXiv |last1=Chatterjee |first1=Krishnendu |last2=Goharshady |first2=Amir Kafshdar |last3=Pourdamghani |first3=Arash |title=Probabilistic Smart Contracts: Secure Randomness on the Blockchain |date=21 February 2019 |class=cs.GT |eprint=1902.07986 |language=en}} Nevertheless, real world application of smart contracts, such as lotteries and casinos, require secure randomness.{{cite web |last1=Chen |first1=Tai-yuan |last2=Huang |first2=Wei-ning |last3=Kuo |first3=Po-chun |last4=Chung |first4=Hao |title=Method for Generating Secure Randomness on Blockchain |url=http://www.freepatentsonline.com/y2020/0252211.html |access-date=28 August 2020 |date=6 August 2020}} 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{{cite book |date=2019 |doi=10.1145/3376044.3376049 |s2cid=207880557 |language=EN|chapter=DeLottery: A Novel Decentralized Lottery System Based on Blockchain Technology |title=Proceedings of the 2019 2nd International Conference on Blockchain Technology and Applications |last1=Jia |first1=Zhifeng |last2=Chen |first2=Rui |last3=Li |first3=Jie |pages=20–25 |isbn=9781450377430 }}{{cite web |title=randao/randao |url=https://github.com/randao/randao |publisher=randao |access-date=10 July 2020 |date=10 July 2020 |archive-date=10 August 2020 |archive-url=https://web.archive.org/web/20200810041714/https://github.com/randao/randao |url-status=live }} and Quanta, as well as sequences from mixed strategy Nash equilibria.

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.{{cite web | url=http://szabo.best.vwh.net/securetitle.html | author=Nick Szabo | title=Secure Property Titles with Owner Authority | year=1998 | access-date=January 12, 2014 | url-status=dead | archive-url=https://web.archive.org/web/20140115142013/http://szabo.best.vwh.net/securetitle.html | archive-date=January 15, 2014 }} Askemos implemented this approach in 2002{{cite conference |url=http://citeseerx.ist.psu.edu/viewdoc/download;?doi=10.1.1.11.5050&rep=rep1&type=pdf |year=2002 |author=Jörg F. Wittenberger |title=Askemos a distributed settlement |conference=Proceedings of International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science, and e-Medicine on the Internet (SSGRR), L’Aquila |access-date=2017-05-25 |archive-date=2018-07-01 |archive-url=https://web.archive.org/web/20180701083246/http://citeseerx.ist.psu.edu/viewdoc/download;?doi=10.1.1.11.5050&rep=rep1&type=pdf |url-status=live }}{{cite web | url=http://www.isl.cs.waseda.ac.jp/~sugawara/pdf/kurihara-SSGRR2002.pdf | title=Proceedings of International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science, and e-Medicine on the Internet | access-date=2017-05-25 | archive-date=2017-10-26 | archive-url=https://web.archive.org/web/20171026111541/http://www.isl.cs.waseda.ac.jp/~sugawara/pdf/kurihara-SSGRR2002.pdf | url-status=dead }} using Scheme (later adding SQLite{{cite thesis | url=https://monami.hs-mittweida.de/frontdoor/index/index/docId/476 | title=Erstellung eines Archivierungskonzepts für die Speicherung rückverfolgbarer Datenbestände im Askemos-System | year=2009 | author=Martin Möbius | publisher=Hochschule Mittweida | access-date=2017-05-25 | archive-date=2018-07-01 | archive-url=https://web.archive.org/web/20180701085359/https://monami.hs-mittweida.de/frontdoor/index/index/docId/476 | url-status=live }}{{cite web | url=https://core.ac.uk/display/33987564 | title=Entwicklung einer Datenbankschnittstelle als Grundlage für Shop-Systeme unter dem Betriebssystem Askemos | year=2010 | author=Tom-Steve Watzke | access-date=2017-05-25 | archive-date=2018-07-01 | archive-url=https://web.archive.org/web/20180701085258/https://core.ac.uk/display/33987564 | url-status=live }}) as the contract script language.{{cite web | url=http://askemos.org/A0e80fdd97a7b6e7af87c5d294f39a96c | title=Beweiswürdigung elektronischer Dokumente im Zivilprozess unter vergleichender Betrachtung von qualifizierten elektronischen Signaturen nach dem Signaturgesetz und dem Askemos-Verfahren | author=RA Markus Heinker | year=2007 | access-date=2017-05-25 | archive-date=2018-07-01 | archive-url=https://web.archive.org/web/20180701083239/http://askemos.org/A0e80fdd97a7b6e7af87c5d294f39a96c | url-status=live }}

One proposal for using Bitcoin for replicated asset registration and contract execution is called "colored coins".{{cite magazine | url=https://www.newscientist.com/article/dn24620-bitcoin-moves-beyond-mere-money.html | magazine=New Scientist | author=Hal Hodson | title=Bitcoin moves beyond mere money | date=20 November 2013 | access-date=12 January 2014 | archive-date=5 July 2015 | archive-url=https://web.archive.org/web/20150705004911/http://www.newscientist.com/article/dn24620-bitcoin-moves-beyond-mere-money.html | url-status=live }} Replicated titles for potentially arbitrary forms of property, along with replicated contract execution, are implemented in different projects.

{{asof|2015}}, UBS was experimenting with "smart bonds" that use the bitcoin blockchain{{cite news |last=Ross |first=Rory |url=http://europe.newsweek.com/smart-money-blockchains-are-future-internet-329278 |title=Smart Money: Blockchains Are the Future of the Internet |work=Newsweek |date=2015-09-12 |access-date=2016-05-27 |archive-date=2016-07-10 |archive-url=https://web.archive.org/web/20160710030311/http://europe.newsweek.com/smart-money-blockchains-are-future-internet-329278 |url-status=live }} in which payment streams could hypothetically be fully automated, creating a self-paying instrument.{{cite news |last=Wigan |first=David |url=http://www.ifrasia.com/bitcoin-technology-will-disrupt-derivatives-says-banker/21202956.article |title=Bitcoin technology will disrupt derivatives, says banker |work=IFR Asia |date=2015-06-11 |access-date=2016-05-27 |archive-date=2016-06-29 |archive-url=https://web.archive.org/web/20160629164342/http://www.ifrasia.com/bitcoin-technology-will-disrupt-derivatives-says-banker/21202956.article |url-status=live }}

Inheritance wishes could hypothetically be implemented automatically upon registration of a death certificate by means of smart contracts.{{according to whom|date=January 2022}}{{Cite web |url=https://www.europarl.europa.eu/RegData/etudes/IDAN/2017/581948/EPRS_IDA(2017)581948_EN.pdf |title=How blockchain technology could change our lives |access-date=2024-05-24 |archive-date=2017-03-30 |archive-url=https://web.archive.org/web/20170330113734/https://www.europarl.europa.eu/RegData/etudes/IDAN/2017/581948/EPRS_IDA(2017)581948_EN.pdf |url-status=live }}{{Cite web |url=https://www.inc.com/chris-j-snook/4-small-business-verticals-artificial-intelligence-blockchain-will-destroy-in-coming-decade.html |title=Blockchain and AI are coming to kill these 4 business verticals |access-date=2024-05-24 |archive-date=2017-12-22 |archive-url=https://web.archive.org/web/20171222224001/https://www.inc.com/chris-j-snook/4-small-business-verticals-artificial-intelligence-blockchain-will-destroy-in-coming-decade.html |url-status=live }} Birth certificates can also work together with smart contracts.[https://publications.jrc.ec.europa.eu/repository/bitstream/JRC115049/blockchain_for_digital_government_online.pdf Blockchain for Digital Governments]{{Cite web |url=https://link.springer.com/chapter/10.1007/978-3-030-67490-8_19 |title=Blockchain Based Framework for Document Authentication |doi=10.1007/978-3-030-67490-8_19 |access-date=2024-05-24 |archive-date=2021-05-12 |archive-url=https://web.archive.org/web/20210512150223/https://link.springer.com/chapter/10.1007/978-3-030-67490-8_19 |url-status=live }}

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.{{cite web | last=Snook | first=Chris J. | title=Blockchain and Artificial Intelligence Are Coming to Kill These 4 Small Business Verticals | website=Inc.com | date=31 October 2017 | url=https://www.inc.com/chris-j-snook/4-small-business-verticals-artificial-intelligence-blockchain-will-destroy-in-coming-decade.html | access-date=25 January 2022 | archive-date=22 December 2017 | archive-url=https://web.archive.org/web/20171222224001/https://www.inc.com/chris-j-snook/4-small-business-verticals-artificial-intelligence-blockchain-will-destroy-in-coming-decade.html | url-status=live }}{{Cite web |url=https://bitfury.com/content/downloads/the_bitfury_group_republic_of_georgia_expand_blockchain_pilot_2_7_16.pdf |title=The Bitfury Group and Government of Republic of Georgia Expand Blockchain Pilot |access-date=2021-05-26 |archive-date=2021-05-26 |archive-url=https://web.archive.org/web/20210526112445/https://bitfury.com/content/downloads/the_bitfury_group_republic_of_georgia_expand_blockchain_pilot_2_7_16.pdf |url-status=live }}{{Cite web |url=https://www.mitpressjournals.org/doi/pdf/10.1162/inov_a_00276 |title=A BLOCKCHAIN - Journals Gateway |doi=10.1162/inov_a_00276 |access-date=2021-05-26 |archive-date=2021-03-03 |archive-url=https://web.archive.org/web/20210303050326/https://www.mitpressjournals.org/doi/pdf/10.1162/inov_a_00276 |url-status=live }}{{Cite web |url=https://www.oecd.org/corruption/integrity-forum/academic-papers/Georg%20Eder-%20Blockchain%20-%20Ghana_verified.pdf |title=Digital Transformation: Blockchain and Land Titles |access-date=2021-05-26 |archive-date=2021-06-21 |archive-url=https://web.archive.org/web/20210621080621/https://www.oecd.org/corruption/integrity-forum/academic-papers/Georg%20Eder-%20Blockchain%20-%20Ghana_verified.pdf |url-status=live }}{{cite news |title=Ukraine launches big blockchain deal with tech firm Bitfury |website=Reuters |date=17 April 2017 |archive-url=https://web.archive.org/web/20230124224631/https://www.reuters.com/article/us-ukraine-bitfury-blockchain-idUSKBN17F0N2 |archive-date=2023-01-24 |url-status=live |url=https://www.reuters.com/article/us-ukraine-bitfury-blockchain-idUSKBN17F0N2}}

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.{{cite journal | last1=Oranburg | first1=Seth | last2=Palagashvili | first2=Liya | title=The Gig Economy, Smart Contracts, and Disruption of Traditional Work Arrangements | website=Search eLibrary | date=22 October 2018 | doi=10.2139/ssrn.3270867 | ssrn=3270867 | s2cid=216803648 | url=https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3270867 | access-date=25 January 2022 | archive-date=20 February 2022 | archive-url=https://web.archive.org/web/20220220175727/https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3270867 | url-status=live }}{{Cite web |url=https://www.researchgate.net/publication/328657407 |title=A blockchain-based decentralized system for proper handling of temporary employment contracts |access-date=2024-05-24 |archive-date=2023-10-15 |archive-url=https://web.archive.org/web/20231015155844/https://www.researchgate.net/publication/328657407_A_Blockchain-Based_Decentralized_System_for_Proper_Handling_of_Temporary_Employment_Contracts |url-status=live }}

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.{{cite web|url=https://spectrum.ieee.org/ethereums-150-million-dollar-dao-opens-for-business-just-as-researchers-call-for-a-moratorium|title=Ethereum's $150-Million Blockchain-Powered Fund Opens Just as Researchers Call For a Halt|first=M.|last=Peck|date=28 May 2016|work=IEEE Spectrum|publisher=Institute of Electrical and Electronics Engineers|access-date=2 February 2020|archive-date=30 May 2016|archive-url=https://web.archive.org/web/20160530202345/https://spectrum.ieee.org/tech-talk/computing/networks/ethereums-150-million-dollar-dao-opens-for-business-just-as-researchers-call-for-a-moratorium|url-status=live}} Such an attack, difficult to fix quickly, was successfully executed on The DAO in June 2016, draining approximately {{US$|50}}{{nbsp}}million worth of Ether at the time, while developers attempted to come to a solution that would gain consensus.{{cite web|url=http://iqdupont.com/assets/documents/DUPONT-2017-Preprint-Algorithmic-Governance.pdf|title=Experiments in Algorithmic Governance: A history and ethnography of "The DAO", a failed Decentralized Autonomous Organization|last=DuPont|first=Quinn|date=2017|archive-url=https://web.archive.org/web/20170730133911/http://iqdupont.com/assets/documents/DUPONT%2D2017%2DPreprint%2DAlgorithmic%2DGovernance.pdf|archive-date=2017-07-30|url-status=dead|access-date=29 July 2017}} 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.{{Cite news|url=https://www.bloomberg.com/news/articles/2016-08-25/this-is-your-company-on-blockchain|title=This Is Your Company on Blockchain|last1=Coy|first1=Peter|date=25 August 2016|last2=Kharif|first2=Olga|newspaper=Bloomberg Businessweek|access-date=2016-12-05|archive-date=2016-09-14|archive-url=https://web.archive.org/web/20160914101357/http://www.bloomberg.com/news/articles/2016-08-25/this-is-your-company-on-blockchain|url-status=live}} Other high-profile attacks include the Parity multisignature wallet attacks, and an integer underflow/overflow attack (2018), totaling over {{US$|184}}{{nbsp}}million.{{cite arXiv |last1=Praitheeshan |first1=Purathani |last2=Pan |first2=Lei |last3=Yu |first3=Jiangshan |last4=Liu |first4=Joseph |last5=Doss |first5=R. |title=Security Analysis Methods on Ethereum Smart Contract Vulnerabilities: A Survey |eprint=1908.08605 |date=2019 |class=cs.CR }}

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.

See also

{{Portal|Law|Business and Economics}}

References

{{Reflist}}

{{Means of Exchange}}

{{Cryptocurrencies|state=expanded}}

{{Authority control}}

Category:Blockchains

Category:Computer law

Category:Contract law

Category:Cryptocurrencies