Jump to content

User:Ma6ic/sandbox

From Wikipedia, the free encyclopedia

A smart contract is a computer program or a transaction protocol which is intended to automatically execute, control or document legally relevant 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 in trusted intermediators, arbitrations and enforcement costs, fraud losses, as well as the reduction of malicious and accidental exceptions.[5][2]

Vending machines are mentioned as the oldest piece of technology equivalent to smart contract implementation.[3] 2014's white paper about the cryptocurrency Ethereum[6] describes the Bitcoin protocol as a weak version of the smart contract concept as defined by computer scientist, lawyer and cryptographer Nick Szabo. Since Ethereum, various cryptocurrencies support scripting languages which allow for more advanced smart contracts between untrusted parties.[7] Smart contracts should be distinguished from smart legal contracts. The latter refers to a traditional natural language legally-binding agreement which has certain terms expressed and implemented in machine-readable code.[8][9][10]

History

[edit]

Smart contracts were first proposed in the early 1990s by Nick Szabo, who coined the term, using it to refer to "a set of promises, specified in digital form, including protocols within which the parties perform on these promises".[11][12] 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]

Implementations

[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.[13] The transaction includes the compiled code for the smart contract as well as a special receiver address.[13] 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.[13] 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.[14] 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.[14]

Measurement using regular expressions showed that only % of smart contracts from Ethereum included recursions and loops — those are connected to halting problem.[15] Due to halting and other security problems, Turing-completeness is considered to be a risk and is deliberately avoided by languages like Vyper.[16][17] Some of the other smart contract programming languages missing Touring-completeness are Simplicity, Scilla, Ivy and Bitcoin Script.[17] An example for Turing-complete languages is the object-oriented smart contract language Solidity.[18]


Processes on a blockchain are generally deterministic in order to ensure Byzantine fault-tolerance.[19] Nevertheless, real world application of smart contracts, such as lotteries and casinos, require secure randomness.[20] 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[21][22] and Quanta as well as sequences from mixed strategy Nash equilibria.[19]

Replicated titles and contract execution

[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.[23] Askemos implemented this approach in 2002[24][25] using Scheme (later adding SQLite[26][27]) as contract script language.[28]

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

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

Security issues

[edit]

A blockchain-based smart contract is visible to all users of said blockchain. However, this leads to a situation where bugs, including security holes, are visible to all yet may not be quickly fixed.[32] Such an attack, difficult to fix quickly, was successfully executed on The DAO in June 2016, draining US$50 million in Ether while developers attempted to come to a solution that would gain consensus.[33] 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.[34]

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


See also

[edit]

References

[edit]
  1. ^ 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. 1392. Springer: 213–230. doi:10.1007/bfb0052526. ISBN 978-3-540-64493-4.
  2. ^ a b Fries, Martin; P. Paal, Boris (2019). Smart Contracts (in German). Mohr Siebeck. ISBN 978-3-16-156911-1. JSTOR j.ctvn96h9r.
  3. ^ a b Savelyev, Alexander (14 December 2016). "Contract Law 2.0: "Smart" Contracts As the Beginning of the End of Classic Contract Law". Social Science Research Network. SSRN 2885241. {{cite journal}}: Cite journal requires |journal= (help)
  4. ^ Tapscott, Don; Tapscott, Alex (May 2016). The Blockchain Revolution: How the Technology Behind Bitcoin is Changing Money, Business, and the World. pp. 72, 83, 101, 127. ISBN 978-0670069972.
  5. ^ Szabo, Nick (1997). "View of Formalizing and Securing Relationships on Public Networks | First Monday". firstmonday.org.
  6. ^ "White Paper· ethereum/wiki Wiki · GitHub". GitHub. Archived from the original on 11 January 2014.
  7. ^ 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.
  8. ^ 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.
  9. ^ 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.
  10. ^ 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.
  11. ^ Morris, David Z. (21 January 2014). "Bitcoin is not just digital currency. It's Napster for finance". Fortune. Retrieved 7 November 2018.
  12. ^ Schulpen, Ruben R.W.H.G. (1 August 2018). "Smart contracts in the Netherlands - University of Tilburg". uvt.nl. Twente University. Retrieved 26 October 2019.
  13. ^ 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. Retrieved 1 November 2020.
  14. ^ 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.
  15. ^ 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. 1010. Springer International Publishing: 19–26. doi:10.1007/978-3-030-23813-1_3. ISBN 978-3-030-23812-4. S2CID 195656195.
  16. ^ Harz, Dominik; Knottenbelt, William (31 October 2018). "Towards Safer Smart Contracts: A Survey of Languages and Verification Methods". arXiv:1809.09805 [cs.CR].
  17. ^ a b Тюрин, Алексей Валерьевич; Тюляндин, Иван Владимирович; Мальцев, Владимир; Кириленко, Яков Александрович; Березун, Даниил Андреевич (4 August 2019). "Обзор языков для безопасного программирования смарт-контрактов". Труды Института системного программирования РАН. doi:10.15514/ISPRAS-2019-31(3)-13.
  18. ^ 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): 2–8. doi:10.1109/IWBOSE.2018.8327565. ISBN 978-1-5386-5986-1. S2CID 4567923.
  19. ^ 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].
  20. ^ 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.
  21. ^ "DeLottery | Proceedings of the 2019 2nd International Conference on Blockchain Technology and Applications". dl.acm.org. 2019. doi:10.1145/3376044.3376049. S2CID 207880557.
  22. ^ "randao/randao". randao. 10 July 2020. Retrieved 10 July 2020.
  23. ^ Nick Szabo (1998). "Secure Property Titles with Owner Authority". Archived from the original on January 15, 2014. Retrieved January 12, 2014.
  24. ^ Jörg F. Wittenberger (2002). "Askemos a distributed settlement". {{cite web}}: Unknown parameter |book-title= ignored (help)
  25. ^ "Proceedings of International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science, and e-Medicine on the Internet" (PDF).
  26. ^ Martin Möbius (2009). "Erstellung eines Archivierungskonzepts für die Speicherung rückverfolgbarer Datenbestände im Askemos-System". {{cite journal}}: Cite journal requires |journal= (help)
  27. ^ Tom-Steve Watzke (2010). "Entwicklung einer Datenbankschnittstelle als Grundlage für Shop-Systeme unter dem Betriebssystem Askemos". {{cite journal}}: Cite journal requires |journal= (help)
  28. ^ RA Markus Heinker (2007). "Beweiswürdigung elektronischer Dokumente im Zivilprozess unter vergleichender Betrachtung von qualifizierten elektronischen Signaturen nach dem Signaturgesetz und dem Askemos-Verfahren".
  29. ^ Hal Hodson (20 November 2013). "Bitcoin moves beyond mere money". New Scientist. Retrieved 12 January 2014.
  30. ^ Ross, Rory (2015-09-12). "Smart Money: Blockchains Are the Future of the Internet". Newsweek. Retrieved 2016-05-27.
  31. ^ Wigan, David (2015-06-11). "Bitcoin technology will disrupt derivatives, says banker". IFR Asia. Retrieved 2016-05-27.
  32. ^ 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.
  33. ^ 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.
  34. ^ Coy, Peter; Kharif, Olga (25 August 2016). "This Is Your Company on Blockchain". Bloomberg Businessweek. Retrieved 2016-12-05.
  35. ^ Cite error: The named reference :1 was invoked but never defined (see the help page).

Category:Blockchains Category:Cryptocurrencies Category:Internet of things