Recent from talks
Contribute something
Nothing was collected or created yet.
Smart contract
View on WikipediaA 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 non-fungible token (NFT) applications.[6]
The original Ethereum white paper by Vitalik Buterin in 2014[7] 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.[8]
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.[9][10][11]
Etymology
[edit]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.[12][13] 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
[edit]A smart contract does not typically constitute a valid binding agreement at law.[14] Proposals exist to regulate smart contracts.[9][10][11]
Smart contracts are not legal agreements, but instead transactions which are executed automatically by a computer program or a transaction protocol,[14] such as technological means for the automation of payment obligations[15] 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.[16]
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.[17]
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".[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 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.[27]
In 2021, the Law Commission of England and Wales advised that smart legal contracts are capable of being recognized and enforced under existing English law.[1]
Workings
[edit]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.[28] The transaction includes the compiled code for the smart contract as well as a special receiver address.[28] 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.[28] 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 Ethereum.[30] On Ethereum, smart contracts are typically written in a 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 Rocq),[34] Liquidity (compiles to Michelson), Scilla, DAML and Pact.[33]
| 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] |
| Cardano | A blockchain platform for smart contracts |
| Solana | A blockchain platform for smart contracts |
| Tron | A blockchain platform for smart contracts |
| Tezos | A blockchain platform for smart contracts |
| Avalanche | A blockchain platform for smart contracts |
Processes on a blockchain are generally deterministic in order to ensure Byzantine fault tolerance.[38] Nevertheless, real world application of smart contracts, such as lotteries and casinos, require secure randomness.[39] 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[40][41] and Quanta, as well as sequences from mixed strategy Nash equilibria.[38]
Applications
[edit]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.[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[update], UBS was experimenting with "smart bonds" that use the bitcoin 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]
Security issues
[edit]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.[62] 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.[63] 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.[64] Other high-profile attacks include the Parity multisignature wallet attacks, and an integer underflow/overflow attack (2018), totaling over US$184 million.[65]
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
[edit]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.[66]
There is no formal definition of a smart legal contract in the legal industry.[67]
A Ricardian contract is a type of smart legal contract.[citation needed]
See also
[edit]- Code and Other Laws of Cyberspace
- Decentralized application
- Ethereum
- Regulation by algorithms
- Regulation of algorithms
- Ricardian contract (a design pattern to capture the intent of the agreement of parties)[citation needed]
- Loan
- Secure multiparty computation
- Transparency
References
[edit]- ^ a b 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.
- ^ a b Fries, Martin; P. Paal, Boris (2019). Smart Contracts (in German). Mohr Siebeck. ISBN 978-3-16-156911-1. JSTOR j.ctvn96h9r.
- ^ Savelyev, Alexander (14 December 2016). "Contract Law 2.0: "Smart" Contracts As the Beginning of the End of Classic Contract Law". SSRN 2885241.
- ^ 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.
- ^ Szabo, Nick (1997). "View of Formalizing and Securing Relationships on Public Networks | First Monday". First Monday. doi:10.5210/fm.v2i9.548. S2CID 33773111. Archived from the original on 2022-04-10. Retrieved 2020-05-24.
- ^ 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.
- ^ "White Paper· ethereum/wiki Wiki · GitHub". GitHub. Archived from the original on 11 January 2014.
- ^ 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.
- ^ a b 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. Archived from the original on 10 August 2020. Retrieved 20 September 2020.
- ^ a b 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. Archived from the original on 9 March 2021. Retrieved 20 September 2020.
- ^ a b 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. Archived from the original on 18 January 2022. Retrieved 20 September 2020.
- ^ Morris, David Z. (21 January 2014). "Bitcoin is not just digital currency. It's Napster for finance". Fortune. Archived from the original on 20 October 2014. Retrieved 7 November 2018.
- ^ Schulpen, Ruben R.W.H.G. (1 August 2018). "Smart contracts in the Netherlands - University of Tilburg". uvt.nl. Twente University. Archived from the original on 19 February 2021. Retrieved 26 October 2019.
- ^ a b Mik, Eliza, Smart Contracts: A Requiem (December 7, 2019). Journal of Contract Law (2019) Volume 36 Part 1 at p 72
- ^ J Cieplak, S Leefatt, ‘Smart Contracts: A Smart Way To Automate Performance’ (2017) 1 Georgia L & Tech Rev 417
- ^ 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.
- ^ Arenas Correa, José David (2022-12-01). "Remedies to the Irreversibility of Smart Contracts in Colombian Private Law". TalTech Journal of European Studies. 12 (2): 113–145. doi:10.2478/bjes-2022-0014. ISSN 2674-4619.
- ^ 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
- ^ Vo, Hoang Tam; Kundu, Ashish; Mohania, Mukesh (2018). "Research Directions in Blockchain Data Management and Analytics" (PDF). Advances in Database Technology - Extending Database Technology. 21. OpenProceedings: 446. Archived (PDF) from the original on 2019-10-02. Retrieved 2019-10-02.
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.
- ^ Huckle, Steve; Bhattacharya, Rituparna; White, Martin; Beloff, Natalia (2016). "Internet of Things, Blockchain and Shared Economy Applications". Procedia Computer Science. 98. Elsevier B.V.: 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.
- ^ Chapter 9: Building a Secure Future, One blockchain at a time Archived 2020-05-14 at the Wayback Machine, US Senate Joint Economic Committee, March 2018.
- ^ "Arizona HB2417 - 2017 - Fifty-third Legislature 1st Regular". LegiScan. Archived from the original on 2017-04-28. Retrieved 2020-09-16.
- ^ "Iowa House approves bills to facilitate broadband, cryptocurrency". www.thegazette.com. Archived from the original on 2021-04-15. Retrieved 2021-04-15.
- ^ Hyman Gayle M, Digesti, Matthew P New Nevada legislation recognizes blockchain and smart contract terminologies Archived 2018-09-10 at the Wayback Machine August 2017, Nevada Lawyer
- ^ Tom, Daniel (22 September 2020). "Smart Contract Bill Tennessee" (PDF). Archived (PDF) from the original on 2 October 2020. Retrieved 22 September 2020.
- ^ Wyoming, Legislature (26 February 2019). "Wyoming - Smart Contract". Archived from the original on 28 January 2019. Retrieved 26 September 2020.
- ^ 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. Archived from the original on 2021-04-25. Retrieved 2021-04-25.
- ^ a b c 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. Archived from the original on 25 October 2023. Retrieved 1 November 2020.
- ^ a b 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.
- ^ 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.
- ^ 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.
- ^ Perez, Daniel; Livshits, Benjamin (17 October 2020). "Smart Contract Vulnerabilities: Vulnerable Does Not Imply Exploited". arXiv:1902.06710 [cs.CR].
- ^ a b Harz, Dominik; Knottenbelt, William (31 October 2018). "Towards Safer Smart Contracts: A Survey of Languages and Verification Methods". arXiv:1809.09805 [cs.CR].
- ^ a b c 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.
- ^ 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.
- ^ 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, archived (PDF) from the original on 2017-07-10, retrieved 2017-06-20
- ^ 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, archived (PDF) from the original on 2018-02-23, retrieved 2018-02-22
- ^ a b Chatterjee, Krishnendu; Goharshady, Amir Kafshdar; Pourdamghani, Arash (21 February 2019). "Probabilistic Smart Contracts: Secure Randomness on the Blockchain". arXiv:1902.07986 [cs.GT].
- ^ 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.
- ^ 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.
- ^ "randao/randao". randao. 10 July 2020. Archived from the original on 10 August 2020. Retrieved 10 July 2020.
- ^ Nick Szabo (1998). "Secure Property Titles with Owner Authority". Archived from the original on January 15, 2014. Retrieved January 12, 2014.
- ^ 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. Archived from the original on 2018-07-01. Retrieved 2017-05-25.
- ^ "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.
- ^ Martin Möbius (2009). Erstellung eines Archivierungskonzepts für die Speicherung rückverfolgbarer Datenbestände im Askemos-System (Thesis). Hochschule Mittweida. Archived from the original on 2018-07-01. Retrieved 2017-05-25.
- ^ Tom-Steve Watzke (2010). "Entwicklung einer Datenbankschnittstelle als Grundlage für Shop-Systeme unter dem Betriebssystem Askemos". Archived from the original on 2018-07-01. Retrieved 2017-05-25.
- ^ RA Markus Heinker (2007). "Beweiswürdigung elektronischer Dokumente im Zivilprozess unter vergleichender Betrachtung von qualifizierten elektronischen Signaturen nach dem Signaturgesetz und dem Askemos-Verfahren". Archived from the original on 2018-07-01. Retrieved 2017-05-25.
- ^ Hal Hodson (20 November 2013). "Bitcoin moves beyond mere money". New Scientist. Archived from the original on 5 July 2015. Retrieved 12 January 2014.
- ^ Ross, Rory (2015-09-12). "Smart Money: Blockchains Are the Future of the Internet". Newsweek. Archived from the original on 2016-07-10. Retrieved 2016-05-27.
- ^ Wigan, David (2015-06-11). "Bitcoin technology will disrupt derivatives, says banker". IFR Asia. Archived from the original on 2016-06-29. Retrieved 2016-05-27.
- ^ "How blockchain technology could change our lives" (PDF). Archived (PDF) from the original on 2017-03-30. Retrieved 2024-05-24.
- ^ "Blockchain and AI are coming to kill these 4 business verticals". Archived from the original on 2017-12-22. Retrieved 2024-05-24.
- ^ Blockchain for Digital Governments
- ^ Chauhan, Prakrut; Verma, Jai Prakash; Jain, Swati; Rai, Rohit (2021). "Blockchain Based Framework for Document Authentication and Management of Daily Business Records". In Sudeep Tanwar (ed.). Blockchain for 5G-Enabled IoT. pp. 497–517. doi:10.1007/978-3-030-67490-8_19. ISBN 978-3-030-67489-2. Retrieved 2024-05-24.
- ^ Snook, Chris J. (31 October 2017). "Blockchain and Artificial Intelligence Are Coming to Kill These 4 Small Business Verticals". Inc.com. Archived from the original on 22 December 2017. Retrieved 25 January 2022.
- ^ "The Bitfury Group and Government of Republic of Georgia Expand Blockchain Pilot" (PDF). Archived (PDF) from the original on 2021-05-26. Retrieved 2021-05-26.
- ^ "A BLOCKCHAIN - Journals Gateway". doi:10.1162/inov_a_00276. Archived from the original on 2021-03-03. Retrieved 2021-05-26.
- ^ "Digital Transformation: Blockchain and Land Titles" (PDF). Archived (PDF) from the original on 2021-06-21. Retrieved 2021-05-26.
- ^ "Ukraine launches big blockchain deal with tech firm Bitfury". Reuters. 17 April 2017. Archived from the original on 2023-01-24.
- ^ Oranburg, Seth; Palagashvili, Liya (22 October 2018). "The Gig Economy, Smart Contracts, and Disruption of Traditional Work Arrangements". SSRN 3270867.
- ^ Pinna, Andrea; Ibba, Simona (2019). "A blockchain-based decentralized system for proper handling of temporary employment contracts". In Kohei Arai; Supriya Kapoor; Rahul Bhatia (eds.). Intelligent Computing: Proceedings of the 2018 Computing Conference, Volume 2. Advances in Intelligent Systems and Computing. Vol. 857. pp. 1231–1243. doi:10.1007/978-3-030-01177-2_88. ISBN 978-3-030-01176-5. Retrieved 2024-05-24.
- ^ 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. Archived from the original on 30 May 2016. Retrieved 2 February 2020.
- ^ 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.
- ^ Coy, Peter; Kharif, Olga (25 August 2016). "This Is Your Company on Blockchain". Bloomberg Businessweek. Archived from the original on 2016-09-14. Retrieved 2016-12-05.
- ^ 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].
- ^ Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective Archived 2018-04-24 at the Wayback Machine, 5.
- ^ Whitepaper: Smart Contracts and Distributed Ledger – A Legal Perspective Archived 2018-04-24 at the Wayback Machine, 3.
Smart contract
View on GrokipediaOrigins and History
Conceptual Foundations
The concept of smart contracts originated in the mid-1990s as a theoretical framework for automating contractual agreements through computer protocols, independent of any centralized enforcement authority. Computer scientist Nick Szabo first articulated the idea in a 1994 paper, defining a smart contract as a computerized transaction protocol designed to execute the terms of a contract automatically while satisfying common business needs such as observability, verifiability, and enforceability of performance. Szabo drew an analogy to vending machines as a primitive form of smart contracts, where insertion of payment triggers unconditional delivery of goods or services without human intervention, illustrating the core principle of conditional execution based on predefined inputs.[10] In his 1996 elaboration, Szabo expanded on smart contracts as building blocks for digital markets, emphasizing their role in formalizing promises through digital protocols that incorporate cryptographic methods for secure, decentralized verification and enforcement.[11] These protocols aimed to reduce reliance on trusted intermediaries by embedding contract terms directly into executable code, leveraging properties like atomicity—where transactions either complete fully or not at all—and proactive measures for compliance, such as hardware-enforced safeguards or digital seals. This approach built on earlier cryptographic primitives, including public-key cryptography developed in the 1970s by researchers like Whitfield Diffie and Martin Hellman, which enabled tamper-resistant digital signatures and secure multiparty transactions without prior trust. Prior to widespread digital infrastructure, such concepts echoed rudimentary automated transaction machines from the late 19th and early 20th centuries, like mechanical vending devices patented as early as 1886 by inventors such as Percival Everitt, which enforced simple exchanges via physical mechanisms. However, Szabo's innovation lay in extending these to complex, programmable digital assets, addressing limitations of traditional contracts that depend on subjective interpretation or third-party adjudication. The theoretical viability of fully trustless smart contracts hinged on solving the oracle problem—reliable external data inputs—and the absence of a tamper-proof, distributed execution environment, rendering them impractical until the advent of decentralized ledger technologies capable of providing immutable, consensus-driven computation.[11]Blockchain Implementation and Early Adoption
Ethereum's Frontier release on July 30, 2015, marked the initial blockchain implementation enabling practical smart contract deployment through the Ethereum Virtual Machine (EVM), a Turing-complete runtime environment that executed code deterministically across nodes. This followed Vitalik Buterin's whitepaper, published in 2014, which proposed extending blockchain scripting beyond Bitcoin's limited operations to support complex, programmable contracts for applications like decentralized finance primitives. Solidity, introduced around 2014 as a high-level language targeting the EVM, became the primary tool for developers writing these contracts, compiling to bytecode for on-chain execution.[12] Early adoption centered on technical experimentation post-Frontier, with developers deploying rudimentary contracts for tasks such as ether-based lotteries, voting systems, and basic token distributions to test EVM functionality under the initial 5,000 gas block limit.[13] The Homestead upgrade in March 2016 broadened accessibility by stabilizing the protocol for non-developer use, fostering initial dApp prototypes. By late 2015, the ERC-20 token standard—proposed on November 19 by Fabian Vogelsteller—emerged as a key enabler, providing an interface for interoperable fungible tokens that simplified issuance and transfer logic in smart contracts. Despite these advances, adoption faced hurdles from scalability constraints, including network congestion during peak loads like the 2016 denial-of-service incidents that exploited opcode pricing, necessitating hard forks such as Tangerine Whistle in October 2016. Gas fees, intended to ration computation, averaged low initially but climbed with rising activity; by 2017, daily averages hit around $0.20 amid growing transaction volumes, introducing cost volatility that complicated budgeting for contract interactions and slowed broader uptake.[14][15] These issues highlighted the trade-offs in Ethereum's proof-of-work consensus for verifying contract executions, prompting early discussions on optimization.Major Milestones and Evolution
The DAO, launched in April 2016 as one of the earliest large-scale smart contract-based venture funds on Ethereum, raised over 1.1 million ETH (approximately $150 million at the time) but suffered a major exploit on June 17, 2016, when an attacker drained about 3.6 million ETH (valued at around $50-60 million) through a recursive call vulnerability in its code.[16] [17] This incident, which highlighted the risks of unaudited smart contracts and immutability trade-offs, prompted a contentious hard fork on July 20, 2016, reversing the stolen funds and creating Ethereum Classic as the unaltered chain for purists opposing intervention.[18] [19] The event accelerated industry-wide adoption of formal verification and auditing practices, though it also underscored debates over code-as-law versus corrective governance.[16] Decentralized finance (DeFi) marked a pivotal expansion of smart contract utility starting in 2018, with Uniswap's launch on November 2, 2018, introducing automated market-making via constant product formulas encoded in Solidity contracts, enabling permissionless token swaps without intermediaries.[20] This protocol's deployment catalyzed broader DeFi growth, as total value locked (TVL) across Ethereum smart contracts surged from under $1 billion in early 2019 to a peak exceeding $100 billion by late 2021, driven by composable lending (e.g., Compound), yield farming, and liquidity provision incentives amid low-interest environments and crypto market rallies.[21] [22] Empirical outcomes revealed both innovations—like flash loans for arbitrage—and vulnerabilities, including oracle manipulations and liquidation cascades, prompting iterative protocol upgrades focused on risk isolation.[23] By 2023, scalability bottlenecks on Ethereum's base layer—evident in high gas fees during peak DeFi activity—drove migration to Layer 2 rollups, with Optimism's mainnet achieving significant traction through optimistic execution inheriting Ethereum's smart contract determinism while batching transactions off-chain.[24] Adoption accelerated in 2023-2025, as Layer 2 TVL surpassed $19 billion by mid-2025, supported by cross-chain bridges like those integrating Wormhole for asset transfers, enabling multi-chain smart contract interoperability amid Ethereum's Dencun upgrade reducing rollup data costs.[25] These shifts empirically validated rollups' efficiency, with daily transactions on networks like Optimism exceeding base layer volumes in periods of congestion, though bridge exploits (e.g., over $2 billion lost historically) continued to expose centralization risks in relayer mechanisms.[26][27]Technical Mechanics
Definition and First-Principles Operation
A smart contract constitutes self-executing code deployed on a blockchain, comprising functions and state data stored at a designated address, which automatically triggers predefined actions upon satisfaction of specified conditions. This code operates within a virtual machine environment provided by the blockchain protocol, such as the Ethereum Virtual Machine (EVM), where incoming transactions invoke its functions to read or modify the associated state. For instance, a contract might verify receipt of a cryptocurrency payment via blockchain-recorded transaction data and, if conditions hold, release an equivalent asset transfer to the counterparty. At the foundational level, smart contracts leverage the blockchain's public ledger for transparent state tracking, where all executions update a shared, append-only record of transactions and contract states. Cryptographic hashing ensures data integrity by generating unique identifiers for blocks and transactions, linking them in a tamper-evident chain that resists alteration without network-wide recomputation. Network consensus mechanisms, such as proof-of-stake in Ethereum post-2022, validate these updates across distributed nodes, enforcing uniform execution outcomes through protocol rules that penalize deviations. The deterministic nature of smart contract code—yielding identical results for identical inputs across all executing nodes—underpins their trust-minimizing properties, as outcomes derive from mathematical logic rather than participant discretion. This eliminates counterparty risk inherent in traditional agreements, where default or dispute might require enforcement; instead, fulfillment becomes inevitable upon condition met, contingent only on the protocol's security against majority attacks.[28][29] By substituting verifiable computation for interpersonal reliance, smart contracts achieve enforcement via economic incentives and cryptographic guarantees, rendering non-compliance computationally infeasible under normal network conditions.[30]Programming Languages and Deployment
Solidity, a statically typed, object-oriented language influenced by C++, Python, and JavaScript, serves as the dominant programming language for Ethereum Virtual Machine (EVM)-compatible smart contracts, enabling developers to define contracts with functions, state variables, and events. First proposed in 2014, it compiles high-level code into EVM bytecode, supporting complex logic like inheritance and libraries for modular development.[31] For reliability, empirical practices include using Solidity's built-in optimizer during compilation to reduce bytecode size and gas costs, as larger contracts increase deployment fees and potential failure risks from out-of-gas errors. Vyper offers an alternative for Ethereum, emphasizing security and auditability through a Python-like syntax that restricts features like recursion and inline assembly to minimize vulnerabilities such as reentrancy attacks.[32] Developed with a focus on simplicity, it targets the EVM and is preferred in scenarios requiring verifiable code, as evidenced by its adoption in protocols prioritizing formal verification over expressiveness.[33] On Solana, launched in March 2020, Rust is the primary language for programs (Solana's term for smart contracts), leveraging its memory safety and performance for high-throughput execution via Berkeley Packet Filter (BPF) compilation.[34] Best practices here involve Rust's ownership model to prevent common errors like buffer overflows, with Anchor framework aiding in boilerplate reduction for reliable on-chain state management.[35] Deployment begins with compiling source code to bytecode using language-specific compilers—solc for Solidity, vyper for Vyper, and solana-program for Rust—followed by packaging with constructor arguments into an initialization transaction sent to the blockchain.[36] This transaction creates a new contract address via mechanisms like Ethereum's CREATE opcode or Solana's program deployment instructions, consuming gas proportional to bytecode size and network congestion; tools like Remix or Hardhat estimate costs to avoid underfunding.[5] Once mined or confirmed, the contract's bytecode resides immutably at its address, verifiable via block explorers. Immutability poses version control challenges, as direct code modifications post-deployment are impossible without redeployment, necessitating patterns like factory contracts that deploy child instances iteratively for testing and iteration.[37] Proxy patterns separate storage from logic, allowing upgrades by pointing to new implementations while preserving state, a practice adopted since Ethereum's 2017 proxy standards to balance reliability with adaptability in production systems.[38] Empirical evidence from DeFi protocols shows factories reduce redundant deployments, lowering cumulative gas expenditures by enabling batched or templated instantiations.Execution, Consensus, and Verification
Smart contract execution is triggered by on-chain transactions that invoke specific functions within the contract's bytecode, processed deterministically by the Ethereum Virtual Machine (EVM). The EVM interprets the bytecode as a sequence of opcodes, performing stack-based operations such as arithmetic, memory access, and storage updates, which result in a new global state root reflecting the transaction's effects. This state transition function ensures computational reproducibility across all participating nodes, as the EVM's rules mandate identical outcomes for given inputs, mitigating disputes over execution validity.[39][5] Following execution, the resulting state changes are bundled into blocks proposed by validators under Ethereum's proof-of-stake consensus, adopted via the Merge on September 15, 2022, which replaced proof-of-work mining. Validators, bonded by at least 32 ETH stakes, propose blocks and attest to their correctness, with the beacon chain coordinating via the Gasper algorithm to select proposers and aggregate attestations for liveness and security. Network consensus emerges as validators verify the execution layer's state root—computed by re-executing all transactions in the block—against the proposed header, propagating only valid blocks to prevent invalid state propagation.[40][41] Ethereum targets an average block time of 12 seconds, as evidenced by post-Merge data averaging 12.07 seconds through 2025, balancing transaction throughput with confirmation latency. Finality is probabilistic initially but achieves economic finality after checkpoints (two epochs, roughly 13 minutes), where reverting a finalized block incurs slashing penalties exceeding 50% of staked ETH for colluding validators, rendering attacks prohibitively costly.[42] Independent verification occurs through full nodes, which download complete blocks, re-execute every transaction including smart contract calls, and validate state transitions against Merkle proofs to confirm integrity without external trust. Light clients, by contrast, download only headers and selective proofs (e.g., transaction inclusion via Merkle paths), enabling lightweight auditing of outcomes like balances or event emissions, though they cannot recompute full state changes and thus complement rather than replace full node scrutiny. This mechanism allows third parties to audit executions verifiably, as discrepancies in node computations would fork the chain, enforcing adherence to the canonical state.[43][44]Key Features
Immutability, Determinism, and Atomicity
Smart contracts exhibit immutability upon deployment to a blockchain, whereby their bytecode becomes permanently fixed and resistant to modification by any party, including the original deployer. This design choice causally enforces tamper-resistance, as alterations would require consensus across the distributed network, thereby eliminating risks of unilateral tampering or censorship that plague centralized systems. Consequently, participants can rely on the contract's logic as a verifiable, unchanging commitment, reducing the need for trusted intermediaries. However, this permanence trades off flexibility, embedding any deployment-time errors irrevocably and potentially exposing funds or logic to exploitation without recourse to patches.[45][46] Determinism mandates that smart contract code produces identical outputs for the same inputs and execution environment across all validating nodes, a prerequisite for blockchain consensus mechanisms like proof-of-stake or proof-of-work. Without this property, divergent computations could fracture network agreement, as nodes might validate transactions inconsistently, undermining the ledger's integrity and enabling disputes over state transitions. Languages like Solidity enforce determinism by prohibiting non-deterministic operations, such as those reliant on external timestamps or random number generation without oracles, ensuring reproducible execution that aligns with the blockchain's causal chain of blocks. This reliability supports scalable verification, where full nodes independently confirm outcomes rather than deferring to a subset of authorities.[47][48] Atomicity provides "all-or-nothing" execution semantics, wherein a transaction comprising multiple state changes—such as fund transfers in a multi-step swap—either completes entirely or reverts to the pre-transaction state upon any failure, preserving ledger consistency. In execution environments like the Ethereum Virtual Machine, this is achieved through reversible state transitions: upon encountering an error, gas is consumed but no partial updates persist, causally preventing fragmented outcomes that could desynchronize the network. This property mitigates risks in composable operations, where interdependent calls between contracts must succeed holistically, but it demands careful gas budgeting to avoid unintended reverts from resource exhaustion rather than logical flaws. Together, immutability, determinism, and atomicity form a causal triad bolstering smart contract robustness, though their rigidity amplifies the imperative for exhaustive pre-deployment auditing.[49][50]Standardization and Interoperability
Standardization efforts within blockchain ecosystems, particularly on Ethereum, have focused on defining common interfaces for smart contracts to enhance composability, allowing disparate contracts to interact predictably without custom integrations. The ERC-20 standard, proposed by Fabian Vogelsteller in November 2015, established a uniform specification for fungible tokens, including functions for transfers, approvals, and balances, which enabled developers to build interchangeable token implementations. This uniformity reduced development friction, as contracts adhering to ERC-20 could seamlessly query and transfer tokens from other compliant contracts, fostering an ecosystem where over 90% of Ethereum tokens follow this interface. Building on this, the ERC-721 standard, proposed in January 2018 by William Entriken, Dieter Shirley, Jacob Evans, and Nastassia Sachs, introduced protocols for non-fungible tokens (NFTs), specifying unique identifiers and ownership tracking via mappings and events. These standards have empirically driven growth by enabling atomic composability, where complex operations like flash loans—uncollateralized borrowings repaid within a single transaction—chain multiple contracts without intermediaries, exploiting price discrepancies across decentralized exchanges.[51] Such mechanisms have underpinned DeFi protocols processing billions in daily volumes, with standardization minimizing errors and accelerating adoption by providing reliable primitives for value transfer and state updates.[52] Interoperability across disparate blockchains remains challenged by architectural silos, including differing consensus mechanisms and virtual machines, necessitating cross-chain protocols for message passing and asset bridging. Chainlink's Cross-Chain Interoperability Protocol (CCIP), entering mainnet early access in July 2023, exemplifies efforts to standardize secure token transfers and arbitrary data messaging via decentralized oracles, supporting risk management through configurable fees and off-chain computation.[53] By abstracting chain-specific details, CCIP and similar bridges enable composable multi-chain applications, reducing liquidity fragmentation and expanding total addressable markets, as evidenced by increased cross-chain transaction volumes post-deployment in DeFi sectors.[54] These protocols address causal barriers like isolated state machines, promoting ecosystem-wide efficiency without relying on centralized custodians, though vulnerabilities in bridges have historically led to over $2 billion in exploits, underscoring the need for robust verification layers.[55]Upgradability Mechanisms and Proxy Patterns
Smart contracts, once deployed on blockchains like Ethereum, are immutable, preventing direct code modifications and creating tension between this permanence—which ensures trust and predictability—and the need for adaptability to address bugs, incorporate new features, or respond to evolving standards.[56] To reconcile this, developers employ upgradability mechanisms, primarily through proxy patterns, where a proxy contract maintains the contract's address and state while delegating execution to interchangeable implementation contracts via low-leveldelegatecall instructions, allowing logic upgrades without altering the proxy's interface or storage location.[56] This approach, formalized in libraries like OpenZeppelin's contracts, enables seamless updates as demonstrated in their proxy architecture introduced in 2018, which separates storage in the proxy from updatable logic in separate contracts.[56]
A core risk in these upgrades arises from storage collisions, where mismatched storage layouts between old and new implementations overwrite critical data in shared slots, potentially leading to irreversible state corruption or fund loss, as storage in Ethereum is addressed by sequential slots determined by variable declaration order.[57] Empirical incidents and audits have highlighted this vulnerability in proxy-based systems, prompting mitigations such as appending "gap" variables in implementations to reserve slots or enforcing unstructured storage patterns that append new variables without reordering existing ones.[58] The Diamond Standard, outlined in EIP-2535 proposed on February 22, 2020, addresses these issues more robustly by enabling a single proxy (the "diamond") to delegate to multiple modular "facets"—independent contracts for distinct functions—while using standardized storage mapping via function selectors to prevent collisions and bypass Ethereum's 24KB contract size limit through facet replacements.[59]
These mechanisms enhance contract longevity by permitting post-deployment evolution, as seen in protocols like Aave or Compound that have upgraded via proxies to fix vulnerabilities or add features without migrating users.[58] However, they introduce centralization trade-offs, as upgrades typically require an administrative key or multisignature controlled by developers or DAOs to authorize implementation changes, creating a trusted party that could enable malicious alterations or suffer key compromises, undermining the decentralized ideal of code-as-immutable-law.[60] [61] While timelocks and governance voting can mitigate abuse, the reliance on off-chain coordination for on-chain upgrades persists as a pragmatic compromise, prioritizing functionality over pure immutability in production systems.[58]
Legal and Regulatory Dimensions
Enforceability Across Jurisdictions
In the United States, Arizona enacted House Bill 2417 in 2017, amending its Electronic Transactions Act to explicitly recognize smart contracts by prohibiting denial of legal effect, validity, or enforceability solely due to the inclusion of a smart contract term.[62] Similar legislation followed in Nevada through Senate Bill 398 in 2017, which deems blockchain-based records and smart contract outcomes as valid electronic records under state law, provided they meet authentication standards. These state-level recognitions have facilitated enforceability in commercial contexts, though federal courts have yet to produce landmark rulings directly affirming smart contracts as standalone enforceable instruments; instead, they evaluate them under general contract principles, requiring evidence of mutual assent and consideration beyond mere code execution.[63] In the European Union, the Markets in Crypto-Assets Regulation (MiCA), fully applicable from December 30, 2024, imposes anti-money laundering (AML) and know-your-customer (KYC) obligations on decentralized finance (DeFi) protocols reliant on smart contracts, treating certain automated arrangements as crypto-asset service providers if they facilitate trading or custody.[64] This regulatory framework implicitly acknowledges smart contract functionality by mandating compliance for cross-border enforceability but introduces hurdles, as non-compliant DeFi smart contracts risk delisting or sanctions, evidenced by early 2025 enforcement actions against unlicensed platforms.[65] Switzerland has demonstrated greater permissiveness, with the canton of Zug granting provisional recognition to a decentralized autonomous organization (DAO) in 2017 under its association laws, allowing smart contract-governed entities to hold assets and enter contracts without immediate recharacterization as unincorporated groups.[66] In contrast, China prohibited cryptocurrency-related activities, including those involving smart contracts for trading or payments, via a September 2021 joint announcement from the People's Bank of China and other regulators, rendering such contracts unenforceable domestically due to illegality under state financial controls.[67] Empirical successes in dispute resolution have leaned toward blockchain-native arbitration rather than traditional courts. Platforms like Kleros, launched in 2018, have adjudicated over 100 smart contract disputes by 2023 using crowdsourced jurors and economic incentives, with outcomes binding via on-chain enforcement in integrated protocols, though off-chain judicial recognition remains untested in major jurisdictions.[68] Challenges persist in proving contractual intent through code alone, as U.S. courts in preliminary 2025 rulings on DAO disputes have required supplemental evidence of off-chain agreements to avoid dismissal for ambiguity, highlighting that immutable code does not automatically equate to judicially cognizable terms.[69]Dispute Resolution and Code-as-Law Debates
The "code is law" principle asserts that the deterministic execution of smart contract code serves as the ultimate arbiter of outcomes, rendering external legal or human intervention unnecessary or illegitimate.[70] This view, central to philosophies like that of Ethereum Classic, emphasizes blockchain immutability and finality, where deviations from code-defined rules undermine the system's trust-minimizing properties.[71] Proponents argue it enables sovereign virtual jurisdictions governed solely by verifiable computation, free from subjective interpretations.[72] In practice, however, disputes have exposed causal limitations, as seen in the 2016 Ethereum hard fork responding to The DAO incident, where approximately 85% of miners and a majority of stakeholders supported altering the blockchain to reverse unauthorized fund transfers, overriding code execution in favor of restored equity.[73] This intervention fragmented the network into Ethereum (favoring social consensus) and Ethereum Classic (upholding strict code adherence), demonstrating that communities often prioritize perceived justice over unyielding automation when outcomes conflict with expectations. Such forks reveal an empirical tension: while code provides transparency, it lacks mechanisms for retroactive correction absent collective override, challenging the mantra's universality.[74] Fundamental critiques highlight smart contracts' vulnerability to incomplete foresight, where programmers cannot exhaustively encode responses to all contingent events, leading to rigid executions misaligned with dynamic realities.[75] For example, ambiguities in intent or unforeseen externalities—such as regulatory shifts or data discrepancies—cannot be fully anticipated in code, resulting in suboptimal or inequitable results without interpretive flexibility.[76] This rigidity amplifies risks, as immutable deployment precludes simple amendments, underscoring code's inadequacy as standalone "law" for complex interactions.[77] Consequently, hybrid resolution mechanisms have emerged to address these gaps, incorporating off-chain oracles for real-world data inputs—despite introducing centralization risks—and DAO governance for token-weighted voting on interpretive disputes.[78] Oracles, essential for bridging blockchain with external events, often rely on trusted providers whose outputs can spark contention, necessitating fallback arbitration.[79] DAOs enable decentralized adjudication, as in governance proposals that pause or modify contract behavior, blending automation with human-like deliberation to handle nuances code alone cannot resolve.[80] These adaptations affirm the need for oversight in ambiguous scenarios, prioritizing causal efficacy over purist immutability.[81]Distinctions from Traditional and Hybrid Contracts
Smart contracts fundamentally diverge from traditional contracts, which rely on natural language drafting, mutual trust among parties, and external enforcement by courts or intermediaries such as lawyers and notaries, by encoding terms directly into deterministic code that self-executes upon blockchain-verified conditions, thereby obviating the need for interpretive judicial discretion or manual oversight.[82][83] This code-driven approach ensures atomic execution—either full performance or none—without opportunities for partial fulfillment or renegotiation, contrasting with traditional contracts where ambiguities in language often necessitate costly litigation to resolve.[8] Unlike traditional variants, smart contracts eliminate notary fees and intermediary commissions through decentralized consensus mechanisms, enabling near-instantaneous settlement; for example, escrow-like functions in code release funds automatically upon condition satisfaction, bypassing the delays and expenses of paper-based validation processes that can span days or weeks.[84] Empirical analyses confirm that this automation reduces enforcement overheads, with blockchain implementations lowering monitoring and verification costs by automating compliance checks that traditionally require human auditing.[85] Hybrid contracts, often termed "smart legal contracts," seek to mitigate smart contracts' limitations in handling nuanced or unforeseen scenarios by combining executable code with human-readable natural language templates, as developed in initiatives like the Accord Project since 2017, which provides open-source tools for integrating prose descriptions with logic modules to improve legal interpretability.[86][87] These hybrids retain some automation benefits but introduce dependencies on off-chain resolution for prose-code conflicts, potentially reintroducing trust elements absent in pure smart contracts, where execution adheres strictly to programmed rules without external arbitration.[80] While hybrids enhance accessibility for complex agreements requiring human oversight, they forgo the full disintermediation of smart contracts, which prioritize tamper-proof, intermediary-free operation verifiable by network participants.[88]Applications
Decentralized Finance and Lending Protocols
Decentralized finance (DeFi) protocols leverage smart contracts to automate lending, borrowing, and trading without traditional intermediaries, enabling pseudonymous access to financial services on blockchains like Ethereum. In lending platforms, smart contracts manage overcollateralized loans, where borrowers deposit cryptocurrency assets exceeding the borrowed amount—typically 150% or more—to mitigate default risk, with automated liquidation mechanisms triggering sales of collateral if its value drops below predefined ratios relative to the debt.[89][90] This structure, enforced by deterministic code, allows lenders to supply funds to shared pools that generate interest yields algorithmically based on utilization rates, fostering mechanisms like yield farming where participants stake assets to earn protocol tokens or fees.[91] A seminal example is Aave, originally launched as ETHLend in November 2017, which pioneered peer-to-peer and pooled lending via smart contracts that handle flash loans—uncollateralized borrows repaid within the same transaction—and variable/stable interest rates adjusted in real-time by supply-demand dynamics.[91] These contracts ensure atomic execution, where loan issuance, interest accrual, and repayments occur trustlessly, reducing counterparty risk compared to centralized platforms reliant on manual oversight. By 2021, such protocols had attracted substantial liquidity, enabling borrowers to access capital against volatile assets like ETH without credit checks. In decentralized exchanges (DEXs), smart contracts implement automated market makers (AMMs) to facilitate token swaps through liquidity pools rather than order books. Uniswap, deployed on Ethereum mainnet on November 2, 2018, exemplifies this with its core smart contract enforcing the constant product formula , where and represent quantities of paired tokens, and remains invariant to maintain pricing equilibrium amid trades.[20] Liquidity providers deposit equal values of token pairs into these contracts, earning a share of trading fees proportional to their contribution, while arbitrageurs align pool prices with external markets, ensuring efficient discovery without custodians.[92] DeFi's expansion is evidenced by total value locked (TVL) metrics, which measure assets committed to these smart contract protocols; TVL peaked at approximately $180 billion in late 2021 amid bullish market conditions, underscoring adoption before subsequent drawdowns tied to broader crypto volatility.[93] By 2023, cumulative trading volume across DeFi platforms surpassed $1 trillion, reflecting scaled activity in AMM-based swaps and lending, though susceptible to flash crashes from rapid liquidity extraction or oracle price manipulations that cascade through interconnected pools.[94] These dynamics highlight smart contracts' role in amplifying efficiency but also exposing systemic interdependencies absent in siloed traditional finance.Tokenization of Assets and NFTs
Smart contracts facilitate the tokenization of assets by encoding ownership rights and transfer logic into blockchain-based tokens, representing either digital or real-world assets with verifiable scarcity and provenance.[95] This process leverages standards such as ERC-721, which defines non-fungible tokens (NFTs) for unique, indivisible assets where each token has a distinct identifier and metadata linked to specific ownership claims.[96] ERC-1155 extends this by supporting both unique NFTs and semi-fungible tokens within a single contract, enabling efficient batch transfers and reducing gas costs for collections of assets.[97] NFTs, primarily implemented via these standards, have enabled markets for digital collectibles, art, and media, with global sales volume peaking at approximately $25 billion in 2021, driven by high-profile transactions on platforms like OpenSea and CryptoPunks.[98] Ownership transfers occur atomically through smart contract execution, recording immutable transaction histories that establish clear chains of custody without reliance on centralized intermediaries. Tokenization extends to real-world assets (RWAs), where smart contracts represent fractional shares of illiquid holdings like real estate or funds, improving accessibility for investors. For instance, BlackRock launched the BUIDL fund on March 20, 2024, as its first tokenized product on Ethereum, backed by short-term U.S. Treasury securities and enabling institutional-grade liquidity with on-chain yield distribution.[99] This allows investors to hold divisible tokens redeemable for underlying assets, with smart contracts automating compliance checks and redemptions. Blockchain tokenization provides immutable audit trails for provenance, contrasting with traditional systems vulnerable to forgery through document alteration or lost records, as each transfer is cryptographically verified and appended to a tamper-resistant ledger.[95] This causal mechanism reduces disputes over authenticity, as token metadata and ownership history cannot be retroactively modified without network consensus, enhancing trust in asset legitimacy over paper-based or centralized databases prone to human error or fraud.[100]Supply Chain Tracking and Automation
Smart contracts enable automated verification and execution in supply chains by encoding rules for tracking goods provenance, quality checks, and conditional actions on distributed ledgers, reducing reliance on intermediaries for validation. Integrated with IoT sensors, they trigger events like status updates or alerts upon detecting deviations, creating immutable records that enhance accountability across multi-party networks.[101] IBM Food Trust, launched commercially on October 8, 2018, after 18 months of testing, exemplifies this in food traceability, where participants log data on a permissioned blockchain to maintain tamper-proof histories of product journeys from farm to consumer.[102] [103] Early adopters like Walmart mandated supplier participation for leafy greens, achieving instantaneous traceback during recalls compared to prior manual processes spanning days, thereby curtailing outbreak spreads and waste.[104] VeChain's platform similarly automates milestone-based payments in supply chains through smart contracts that release funds upon verified completions, such as shipment arrivals or quality certifications confirmed via oracle feeds.[105] Partnerships, including with Walmart China for blockchain traceability solutions around 2020, demonstrate enterprise adoption where contract logic enforces compliance without manual reconciliation, streamlining cross-border logistics.[106] Empirical assessments indicate blockchain smart contracts yield efficiency gains, with implementations reducing processing costs by 30-50% through automated dispute minimization via shared, verifiable data.[107] Deloitte analyses further highlight decreased administrative burdens from enhanced transparency, enabling faster resolution of provenance conflicts in complex networks.[101]Insurance, Gaming, and Other Sectors
Smart contracts enable parametric insurance models, which automate payouts based on verifiable external data triggers rather than traditional loss assessments. Etherisc, founded in 2016, developed Ethereum-based protocols for such coverage, including flight delay policies that trigger claims if delays exceed specified thresholds confirmed by oracle feeds like Chainlink.[108][109] This approach minimizes disputes and processing delays, with Etherisc expanding to risks such as crop failures and stablecoin depegs, where automatic settlements occur upon parameter breaches, such as a USDC price drop below $0.995.[110] By 2021, platforms like Etherisc had demonstrated feasibility for peer-to-peer parametric products, though total sector payouts remain modest compared to traditional insurance, with decentralized protocols collectively handling millions in claims.[111] In blockchain gaming, smart contracts govern play-to-earn mechanics, allowing players to own, trade, and monetize digital assets via NFTs and tokens. Axie Infinity, launched in March 2018 by Sky Mavis, popularized this model, where users breed and battle creatures called Axies to earn SLP tokens, generating over $334 million in monthly revenue by July 2021 and contributing to an ecosystem volume exceeding $1 billion in player earnings prior to the 2022 market downturn.[112][113] The game's smart contracts facilitated breeding fees, marketplace trades, and staking rewards, attracting millions of users, particularly in emerging markets, with peak daily active users surpassing 2.7 million in mid-2021.[114] Beyond these, smart contracts support decentralized autonomous organizations (DAOs) for governance in various sectors, automating voting and fund allocation. Aragon, initiated in 2017, offers modular smart contract frameworks for creating DAOs, enabling token-weighted proposals and executions for entity management without intermediaries.[115] These tools have been adopted for community-driven initiatives, such as protocol upgrades, but transaction data reveals that voting power often concentrates among top token holders—typically 1-5% of participants controlling over 50% of influence—exposing practical limits to decentralization in early implementations.[116][117]Advantages and Achievements
Efficiency and Cost Empirical Data
Empirical analyses of smart contract deployments on platforms like Ethereum reveal significant cost reductions compared to traditional financial intermediaries. As of late 2025, the average transaction fee on Ethereum stands at approximately $0.50, encompassing gas costs for executing smart contract operations.[118] In contrast, domestic outgoing bank wire transfers typically incur fees averaging $27, with international wires exceeding $44, excluding additional intermediary charges.[119] These disparities highlight how smart contracts eliminate manual verification and third-party processing layers, yielding per-transaction savings often exceeding 90% for equivalent value transfers.[120] Settlement speeds further underscore efficiency gains. Smart contracts on Ethereum facilitate near-instantaneous execution upon block confirmation, typically within 12-15 seconds per block, with probabilistic finality in minutes under normal conditions.[121] Traditional securities clearing, even post-2024 reforms shortening cycles to T+1 in major markets like the U.S., still requires up to one business day for final settlement, compared to the multi-day T+2 standard prevailing prior to 2023.[122] Bank for International Settlements analyses of tokenization frameworks emphasize that distributed ledger technologies enable atomic, real-time settlement, reducing counterparty exposure windows that persist in legacy systems.[123] Aggregate data from DeFi protocols, which rely heavily on smart contracts, indicate broader economic impacts. Layer-2 scaling solutions integrated with Ethereum have demonstrated up to 99.9% cost reductions in supply chain applications relative to off-chain equivalents, as measured in controlled empirical studies.[120] Operational efficiencies extend to risk mitigation, with smart contracts lowering transaction costs and enhancing liquidity management in financial workflows, per firm-level analyses.[124] These metrics, derived from on-chain data and comparative benchmarks, substantiate verifiable cost and speed advantages without relying on unsubstantiated projections.| Metric | Smart Contracts (Ethereum Mainnet/L2) | Traditional Financial Systems |
|---|---|---|
| Avg. Tx Fee (USD) | ~0.03 (L2) | $25–$45 (wires) |
| Settlement Time | Seconds to minutes | T+1 day (post-2024); formerly T+2 |
| Intermediary Reduction | Automated, near-100% elimination | Multiple layers (banks, clearers) |
Trust Minimization and Innovation Incentives
Smart contracts achieve trust minimization through their deterministic execution on public blockchains, where code is verifiable and immutable once deployed, eliminating reliance on intermediaries or centralized custodians. This design enables participants to interact solely with audited logic rather than trusting opaque institutions, as the blockchain's consensus mechanism enforces outcomes predictably. Permissionless deployment further reduces barriers, allowing any individual or entity worldwide to write, test, and launch contracts without approval, KYC requirements, or gatekeeper vetoes, which causally expands the developer pool beyond traditional financial incumbents.[125][126] This open access has spurred prolific innovation, evidenced by over 1 million Ethereum smart contracts deployed between January and April 2024 alone, reflecting daily volumes in the thousands amid rising adoption. Open-source repositories underpin this dynamism, with most contracts publicly auditable and forkable, enabling collaborative improvements without proprietary restrictions— a model that has democratized contributions from global developers unconstrained by institutional affiliations. Economic mechanisms amplify these incentives: native tokens distributed via protocols reward bug discoveries through bounties, with platforms paying out over $65 million for vulnerabilities in 2023, while governance tokens align upgraders with long-term protocol health by tying rewards to network security and enhancements.[127][128][129] Consequently, smart contract ecosystems have bootstrapped substantial scale independently of venture capital gatekeeping, as permissionless launches via initial coin offerings or fair launches have funded protocols capturing over $100 billion in total value locked by mid-2025, driven by community validation rather than selective investor endorsements. This contrasts with permissioned systems, where elite approval stifles experimentation; here, the absence of such filters has causally accelerated iterative advancements, from rudimentary token standards to complex autonomous agents, by rewarding meritocratic contributions over relational access.[130][131]Quantifiable Impacts on Markets and Adoption
The deployment of smart contracts on Ethereum has cumulatively exceeded 69 million as of February 2025, reflecting widespread developer engagement despite periods of reduced activity following the 2021 market peak.[132] Daily active addresses on Ethereum reached an all-time high of approximately 1.1 million during the 2020-2021 DeFi boom, driven by smart contract-based applications, but declined to below 300,000 during the 2022-2023 bear market before recovering to around 550,000 by late 2025, sustained by network upgrades such as the Dencun upgrade in March 2024 that reduced layer-2 transaction costs.[133] [134] This resurgence, including a surge to over 680,000 active addresses in August 2025, indicates that smart contract ecosystems have demonstrated resilience against hype cycles, with on-chain activity correlating to verifiable transaction volumes rather than speculative overclaims.[135] In decentralized finance (DeFi), where smart contracts underpin lending, trading, and yield protocols, total value locked (TVL) peaked at over $180 billion in November 2021, representing capital directly governed by automated code execution.[136] Following a sharp decline to around $40 billion amid the 2022 crypto winter—exposing vulnerabilities to market downturns rather than inherent protocol failures—TVL rebounded to surpass $160 billion by Q3 2025, a three-year high driven by renewed institutional inflows and protocol optimizations.[137] This metric quantifies real economic activity, as TVL tracks assets staked or lent via smart contracts, enabling over $1 trillion in cumulative trading volume on platforms like Uniswap since inception, though annual volumes have fluctuated with broader crypto prices.[136] Institutional adoption has further evidenced market impact, with JPMorgan's Kinexys (formerly Onyx) platform—leveraging permissioned blockchain and smart contract-like settlement logic—processing an average of over $2 billion daily in transactions as of 2025, up from initial volumes since its 2020 launch.[138] This represents a causal shift in wholesale payments, reducing settlement times from days to seconds for cross-border flows among banks, without relying on public blockchains. In emerging markets, blockchain-based remittances incorporating smart contract automation have gained traction for cost reduction, with studies noting potential savings of up to 50% on fees compared to traditional corridors, though adoption remains nascent and below 5% of global flows per 2024 analyses.[139] Overall, these figures underscore measurable efficiency gains in niche applications while highlighting that broad market transformation has been tempered by post-peak contractions.Criticisms and Limitations
Scalability and Performance Constraints
Smart contracts execute on blockchain networks where every node must independently verify and process transactions, imposing fundamental scalability limits tied to consensus mechanisms and state synchronization. Ethereum, the dominant platform for smart contracts, sustains an average throughput of 7-15 transactions per second (TPS) on its mainnet, constrained by sequential block production every 12 seconds and the computational demands of executing contract code across all validators.[140] This pales against centralized systems like Visa, which boasts a capacity exceeding 65,000 TPS through optimized, non-decentralized infrastructure.[141] The causal bottleneck stems from the blockchain trilemma—balancing decentralization, security, and scalability—where full replication of contract state and execution prevents parallel processing without risking inconsistencies.[142] Network congestion exacerbates these limits, particularly during demand spikes from smart contract activity such as decentralized exchanges or NFT mints. In the 2021 bull market, Ethereum gas fees—remunerating computational resources for contract execution—surged from typical levels around 20-50 Gwei to peaks over 200 Gwei on average and 500 Gwei during frenzied periods, inflating transaction costs by factors of 10-100 times and rendering many operations uneconomical.[143] [133] These "gas wars" arose from competition for limited block space, where complex smart contracts consuming thousands of gas units outbid simpler transfers, prioritizing high-fee users via Ethereum's proposer-builder separation dynamics.[143] To circumvent mainnet constraints, developers have fragmented into Layer 2 (L2) rollups like Optimism and Arbitrum, which batch transactions off-chain and settle periodically on Ethereum; however, this introduces liquidity silos, interoperability overhead, and reliance on sequencer centralization, diluting the seamless execution ideal of smart contracts.[144] Alternative blockchains pursuing higher throughput for smart contracts, such as Solana's proof-of-history with parallel transaction processing, reveal trade-offs in reliability. Solana targets thousands of TPS to support contract-heavy applications, but in 2022, it endured multiple outages—including a 7-hour halt in April from spam-induced consensus stalls and further incidents in June from clock drift and validator bugs—totaling over a dozen disruptions that year.[145] [146] These failures, often triggered by bots exploiting parallel execution slots, underscore how aggressive scalability optimizations can amplify vulnerabilities to coordinated attacks or malformed contract inputs, compromising the uninterrupted performance essential for production-grade smart contracts.[146] Despite upgrades like improved spam filtering, such events highlight that decentralization concessions—such as fewer, more powerful validators—may enable speed but at the expense of robustness under real-world loads.[145]Oracle Dependencies and Real-World Disconnects
Smart contracts execute deterministically based on on-chain data but cannot natively access external real-world information, such as asset prices or weather events, necessitating oracles as intermediaries to bridge this gap.[47] This dependency, known as the oracle problem, renders contracts "blind" to off-chain conditions without trusted data feeds, limiting their autonomy and introducing potential points of failure in data accuracy and timeliness.[147] Decentralized oracle networks like Chainlink, proposed in a 2017 whitepaper and launched on mainnet in 2019, aggregate data from multiple nodes to mitigate centralization risks, yet they do not eliminate underlying trust assumptions, as node operators still rely on external sources that can lag or diverge from market reality.[148] For instance, during the May 2022 TerraUSD (UST) depegging event, oracle price feeds struggled to reflect rapid market shifts, resulting in delayed or inaccurate updates that triggered cascading erroneous liquidations across DeFi lending protocols, amplifying systemic losses beyond what on-chain collateral ratios alone would dictate.[149] Similar data staleness has been documented in broader market stress scenarios, where oracle update latencies—often seconds to minutes—create mismatches between volatile off-chain prices and rigid on-chain triggers, leading to unintended contract executions like premature position closures.[150] This reliance exposes a fundamental causal disconnect: smart contract outcomes hinge on the fidelity of oracle inputs, which propagate real-world uncertainties onto the blockchain, undermining claims of fully trustless operation since users must implicitly trust oracle infrastructure over verifiable computation alone.[147] Empirical analyses of DeFi incidents reveal that such dependencies persist even in purportedly robust systems, as oracles cannot guarantee instantaneous or manipulation-proof data amid high-volatility events, thus preserving off-chain influence over on-chain determinism.Economic Incentives and Rationality Flaws
Smart contracts in decentralized finance (DeFi) rely on predefined incentives to align participants, such as validators, liquidity providers, and borrowers, yet game-theoretic dynamics often reveal flaws where rational self-interest leads to exploitation and systemic inefficiencies.[151] In non-cooperative settings, actors prioritize individual payoffs, resulting in outcomes like value extraction that undermine collective utility, as validators or searchers reorder transactions to capture arbitrage opportunities at users' expense.[152] A prominent example is maximal extractable value (MEV), first conceptualized as miner extractable value in the seminal paper "Flash Boys 2.0" by Daian et al. (2019), where block producers or specialized searchers exploit transaction ordering to enable front-running, inserting trades ahead of users to profit from price impacts, posing risks to consensus stability and DeFi fairness.[153] On Ethereum, MEV extraction exceeded 625,000 ETH by May 2023, equivalent to approximately $1.2 billion at prevailing prices of $1,850 per ETH, imposing hidden costs on traders through worse execution prices.[154] This rational pursuit of MEV, estimated at $300–900 million annually on Ethereum alone, distorts fair ordering and incentivizes adversarial behavior, as searchers compete in auctions for inclusion, further concentrating value away from end-users.[155] In automated market makers (AMMs), impermanent loss arises from rational arbitrageurs correcting price divergences, causing liquidity providers (LPs) to hold imbalanced portfolios relative to simply holding assets. For instance, a 5% price change in one token can yield up to 2.5% loss for LPs in constant-product pools, deterring provision as providers weigh trading fees against potential divergence losses, which empirical analyses show amplify with volatility.[156] This hesitation fragments liquidity across pools, as rational LPs migrate to lower-risk venues or abstain, reducing overall market depth despite incentives like fee shares.[157] DeFi lending protocols enforce overcollateralization, typically requiring 120–150% or higher ratios (e.g., up to 200% in volatile assets), to mitigate default risks in trustless environments lacking credit assessments. This contrasts with traditional undercollateralized loans, where borrowers pledge 50–80% based on verifiable income or assets, allowing higher capital efficiency; in DeFi, excess collateral ties up funds, inflating opportunity costs and limiting borrowing capacity for rational actors seeking leverage without proportional risk coverage.[158] Game-theoretically, this conservative mechanism prevents undercollateralized moral hazard but induces inefficiency, as borrowers over-provision to access funds, diverting capital from productive uses compared to centralized systems with asymmetric information advantages.[159]Security Risks and Exploits
Common Vulnerabilities (Reentrancy, Overflow)
Reentrancy vulnerabilities occur when a smart contract invokes an external call—such as transferring Ether viacall or send—before updating its own state variables, enabling the recipient contract to recursively invoke the original contract's functions and exploit unchanged balances or mappings. This exploits Ethereum's callback mechanism, where external calls can trigger fallback functions that re-enter the caller mid-execution, bypassing intended checks like balance deductions and allowing repeated withdrawals. From first principles, the issue stems from the non-atomic nature of cross-contract interactions: state mutations are not guaranteed to complete before external effects, violating the principle of sequential execution in deterministic virtual machines.[160] Mitigation relies on the checks-effects-interactions (CEI) pattern, which enforces validating conditions, updating state, and only then performing external interactions to prevent recursive exploitation.
Integer overflow and underflow vulnerabilities, prevalent in Solidity versions before 0.8.0, arise from the fixed-size representation of unsigned integers (e.g., uint256), where arithmetic operations wrap around modulo upon exceeding bounds, producing unexpectedly large values instead of errors.[161] For instance, subtracting a larger value from a smaller one, such as uint256 balance = 10; balance -= 20;, results in balance becoming rather than reverting or signaling underflow, enabling attackers to manipulate token transfers or balances manipulatively.[161] This flaw originates from the language's default unchecked arithmetic behavior, which prioritizes gas efficiency over safety in resource-constrained environments but ignores real-world expectations of bounded computations.[162] Starting with Solidity 0.8.0 (released December 2020), the compiler introduced automatic overflow checks that revert transactions on arithmetic errors, though developers must explicitly use unchecked blocks for performance-critical code.[161] Prior versions required manual safeguards via libraries like SafeMath, which wrap operations with assertions.[163]
Empirical data from vulnerability analyses indicate reentrancy and integer bugs as recurrent issues: in a dataset of Ethereum hacks, 46 contracts suffered reentrancy exploits while 125 were impacted by integer overflows, highlighting their role among code-level flaws despite mitigations.[160] Audits consistently flag these in the top vulnerability classes, with arithmetic errors persisting even post-Solidity 0.8 if unchecked blocks are misused.[164] Reentrancy remains a top concern per security frameworks, comprising a significant portion of audited weaknesses due to its exploitability in fund-handling logic.[165]
