Skip to content
Surf Wiki
Save to docs
law

From Surf Wiki (app.surf) — the open knowledge base

Smart contract

Contractual transaction on a decentralized platform


Contractual transaction on a decentralized platform

Note

contractual transactions on a decentralized platform

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. 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.

The original Ethereum white paper by Vitalik Buterin in 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.

A smart contract should not be confused with a smart legal contract, which is 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. 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.

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. The transaction includes the compiled code for the smart contract as well as a special receiver address. 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. On Ethereum, smart contracts are typically written in a Turing-complete programming language called Solidity, and compiled into low-level bytecode to be executed by the Ethereum Virtual Machine. 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. 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.

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

NameDescription
Ethereumtitle=6th International Conference on Principles of Security and Trust (POST)year=2017last1=Atzeilast2=Bartolettilast3=Cimolifirst1=Nicolafirst2=Massimofirst3=Tizianacontribution=A survey of attacks on Ethereum smart contractscontribution-url=http://eprint.iacr.org/2016/1007.pdfpublisher=European Joint Conferences on Theory and Practice of Softwareaccess-date=2017-06-20archive-date=2017-07-10archive-url=https://web.archive.org/web/20170710185734/http://eprint.iacr.org/2016/1007.pdfurl-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.
Cardanolast1=Hasanfirst1=Mdlast2=Mbahfirst2=Josephyear=2024title=A Comprehensive Analysis of Blockchain Technology and Consensus Protocols Across Multilayered Frameworkjournal=IEEE Accessvolume=12pages=10555–10582doi=10.1109/ACCESS.2024.3352723doi-broken-date=21 January 2026 }}
Solanaurl=https://www.investopedia.com/solana-5210472title=Solana (SOL) Explained: Fast Transactions and Low Costspublisher=Investopediayear=2024}}
Tronurl=https://www.zdnet.com/finance/blockchain/trons-secret-sauce-why-this-blockchain-is-winning-the-stablecoin-race/title=Tron's 'secret sauce': Why this blockchain is winning the stablecoin racepublisher=ZDNetyear=2024}}
Tezoslast1=Hafidfirst1=Lailalast2=Hafidfirst2=Abdelillahyear=2022title=Formal verification of Tezos smart contracts in Coqjournal=Journal of Ambient Intelligence and Humanized Computingvolume=13issue=12pages=6003–6021doi=10.1007/s12652-021-03487-ydoi-broken-date=21 January 2026 }}
Avalancheurl=https://www.bloomberg.com/news/articles/2021-09-16/avalanche-raises-230-million-from-sale-of-surging-crypto-tokentitle=Avalanche Raises $230 Million From Sale of Surging Crypto Tokenpublisher=Bloombergyear=2021}}

Processes on a blockchain are generally deterministic in order to ensure Byzantine fault tolerance. Nevertheless, real world application of smart contracts, such as lotteries and casinos, require secure randomness. 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 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. Askemos implemented this approach in 2002 using Scheme (later adding SQLite) as the contract script language.

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

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

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

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.

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.

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. Such an attack, difficult to fix quickly, was successfully executed on The DAO in June 2016, draining approximately million worth of Ether at the time, while developers attempted to come to a solution that would gain consensus. 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. Other high-profile attacks include the Parity multisignature wallet attacks, and an integer underflow/overflow attack (2018), totaling over million.

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.

References

References

  1. (1998). "Digital Libraries in Computer Science: The MeDoc Approach". Springer.
  2. (2019). "Smart Contracts". Mohr Siebeck.
  3. (14 December 2016). "Contract Law 2.0: "Smart" Contracts As the Beginning of the End of Classic Contract Law".
  4. (May 2016). "The Blockchain Revolution: How the Technology Behind Bitcoin is Changing Money, Business, and the World". Portfolio/Penguin.
  5. (1997). "View of Formalizing and Securing Relationships on Public Networks {{!}} First Monday". First Monday.
  6. (2022-05-27). "The State of Ethereum Smart Contracts Security: Vulnerabilities, Countermeasures, and Tool Support". Journal of Cybersecurity and Privacy.
  7. "White Paper· ethereum/wiki Wiki · GitHub".
  8. (26 August 2017). "Blockchain-based Smart Contracts: A Systematic Mapping Study". Computer Science & Information Technology.
  9. Morris, David Z.. (21 January 2014). "Bitcoin is not just digital currency. It's Napster for finance".
  10. Schulpen, Ruben R.W.H.G.. (1 August 2018). "Smart contracts in the Netherlands - University of Tilburg". Twente University.
  11. (1 December 2018). "Interpretation of Contracts and Smart Contracts: Smart Interpretation or Interpretation of Smart Contracts?". European Review of Private Law.
  12. (5 August 2020). "Is code law? Current legal and technical adoption issues and remedies for blockchain-enabled smart contracts". Journal of Information Technology.
  13. (1 September 2020). "Smart contracts from the contract law perspective: outlining new regulative strategies". International Journal of Law and Information Technology.
  14. Mik, Eliza, Smart Contracts: A Requiem (December 7, 2019). Journal of Contract Law (2019) Volume 36 Part 1 at p 72
  15. J Cieplak, S Leefatt, ‘Smart Contracts: A Smart Way To Automate Performance’ (2017) 1 Georgia L & Tech Rev 417
  16. (2018). "On legal contracts, imperative and declarative smart contracts, and blockchain systems". Artificial Intelligence and Law.
  17. Arenas Correa, José David. (2022-12-01). "Remedies to the Irreversibility of Smart Contracts in Colombian Private Law". TalTech Journal of European Studies.
  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. (2018). "Research Directions in Blockchain Data Management and Analytics". OpenProceedings.
  20. (2016). "Internet of Things, Blockchain and Shared Economy Applications". Elsevier B.V..
  21. [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. link. (2020-05-14 , [[US Senate]] [[Joint Economic Committee]], March 2018.)
  22. "Arizona HB2417 - 2017 - Fifty-third Legislature 1st Regular".
  23. "Iowa House approves bills to facilitate broadband, cryptocurrency".
  24. 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. link. (2018-09-10 August 2017, Nevada Lawyer)
  25. Tom, Daniel. (22 September 2020). "Smart Contract Bill Tennessee".
  26. Wyoming, Legislature. (26 February 2019). "Wyoming - Smart Contract".
  27. (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".
  28. (December 2019). "Hands-On Smart Contract Development With Solidity and Ethereum: From Fundamentals to Deployment". O'Reilly.
  29. (10 October 2019). "Safer smart contract programming with Scilla". Proceedings of the ACM on Programming Languages.
  30. (26 August 2017). "Blockchain-based Smart Contracts: A Systematic Mapping Study". Computer Science & Information Technology.
  31. (20 March 2018). "2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE)".
  32. (17 October 2020). "Smart Contract Vulnerabilities: Vulnerable Does Not Imply Exploited".
  33. (31 October 2018). "Towards Safer Smart Contracts: A Survey of Languages and Verification Methods".
  34. (2019). "Overview of the Languages for Safe Smart Contract Programming". Proceedings of the Institute for System Programming of the RAS.
  35. (January 2024). "Global Protocol Report 2024". Crypto Oasis.
  36. (2020). "Blockchain and Applications". Springer International Publishing.
  37. (2017). "6th International Conference on Principles of Security and Trust (POST)". European Joint Conferences on Theory and Practice of Software.
  38. (2018). "7th International Conference on Principles of Security and Trust (POST)". European Joint Conferences on Theory and Practice of Software.
  39. (2024). "A Comprehensive Analysis of Blockchain Technology and Consensus Protocols Across Multilayered Framework". IEEE Access.
  40. (2024). "Solana (SOL) Explained: Fast Transactions and Low Costs". Investopedia.
  41. (2024). "Tron's 'secret sauce': Why this blockchain is winning the stablecoin race". ZDNet.
  42. (2022). "Formal verification of Tezos smart contracts in Coq". Journal of Ambient Intelligence and Humanized Computing.
  43. (2021). "Avalanche Raises $230 Million From Sale of Surging Crypto Token". Bloomberg.
  44. (21 February 2019). "Probabilistic Smart Contracts: Secure Randomness on the Blockchain".
  45. (6 August 2020). "Method for Generating Secure Randomness on Blockchain".
  46. (2019). "Proceedings of the 2019 2nd International Conference on Blockchain Technology and Applications".
  47. (10 July 2020). "randao/randao". randao.
  48. Nick Szabo. (1998). "Secure Property Titles with Owner Authority".
  49. Jörg F. Wittenberger. (2002). "Askemos a distributed settlement".
  50. "Proceedings of International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science, and e-Medicine on the Internet".
  51. Martin Möbius. (2009). "Erstellung eines Archivierungskonzepts für die Speicherung rückverfolgbarer Datenbestände im Askemos-System". Hochschule Mittweida.
  52. Tom-Steve Watzke. (2010). "Entwicklung einer Datenbankschnittstelle als Grundlage für Shop-Systeme unter dem Betriebssystem Askemos".
  53. RA Markus Heinker. (2007). "Beweiswürdigung elektronischer Dokumente im Zivilprozess unter vergleichender Betrachtung von qualifizierten elektronischen Signaturen nach dem Signaturgesetz und dem Askemos-Verfahren".
  54. Hal Hodson. (20 November 2013). "Bitcoin moves beyond mere money".
  55. Ross, Rory. (2015-09-12). "Smart Money: Blockchains Are the Future of the Internet". [[Newsweek]].
  56. Wigan, David. (2015-06-11). "Bitcoin technology will disrupt derivatives, says banker". IFR Asia.
  57. "How blockchain technology could change our lives".
  58. "Blockchain and AI are coming to kill these 4 business verticals".
  59. [https://publications.jrc.ec.europa.eu/repository/bitstream/JRC115049/blockchain_for_digital_government_online.pdf Blockchain for Digital Governments]
  60. (2021). "Blockchain for 5G-Enabled IoT".
  61. Snook, Chris J.. (31 October 2017). "Blockchain and Artificial Intelligence Are Coming to Kill These 4 Small Business Verticals".
  62. "The Bitfury Group and Government of Republic of Georgia Expand Blockchain Pilot".
  63. "A BLOCKCHAIN - Journals Gateway".
  64. "Digital Transformation: Blockchain and Land Titles".
  65. (17 April 2017). "Ukraine launches big blockchain deal with tech firm Bitfury".
  66. (22 October 2018). "The Gig Economy, Smart Contracts, and Disruption of Traditional Work Arrangements".
  67. (2019). "Intelligent Computing: Proceedings of the 2018 Computing Conference, Volume 2".
  68. Peck, M.. (28 May 2016). "Ethereum's $150-Million Blockchain-Powered Fund Opens Just as Researchers Call For a Halt". [[Institute of Electrical and Electronics Engineers]].
  69. DuPont, Quinn. (2017). "Experiments in Algorithmic Governance: A history and ethnography of "The DAO", a failed Decentralized Autonomous Organization".
  70. (25 August 2016). "This Is Your Company on Blockchain". Bloomberg Businessweek.
  71. (2019). "Security Analysis Methods on Ethereum Smart Contract Vulnerabilities: A Survey".
  72. [https://www.isda.org/a/6EKDE/smart-contracts-and-distributed-ledger-a-legal-perspective.pdf Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective] {{Webarchive. link. (2018-04-24 , 5.)
  73. [https://www.isda.org/a/6EKDE/smart-contracts-and-distributed-ledger-a-legal-perspective.pdf Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective] {{Webarchive. link. (2018-04-24 , 3.)
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Smart contract — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report