<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Smart_contract</id>
	<title>Smart contract - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Smart_contract"/>
	<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Smart_contract&amp;action=history"/>
	<updated>2026-05-15T06:27:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>http://en.zaoniao.it/index.php?title=Smart_contract&amp;diff=1858&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;{{#seo: |title= Smart contracts. All about cryptocurrency - zaoniao Wiki |keywords= smart contract,Waves Platform,Ethereum,ICO,blockchain,tokens |description=Smart contract is...&quot;</title>
		<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Smart_contract&amp;diff=1858&amp;oldid=prev"/>
		<updated>2019-03-10T06:51:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{#seo: |title= Smart contracts. All about cryptocurrency - zaoniao Wiki |keywords= smart contract,Waves Platform,Ethereum,ICO,blockchain,tokens |description=Smart contract is...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{#seo:&lt;br /&gt;
|title= Smart contracts. All about cryptocurrency - zaoniao Wiki&lt;br /&gt;
|keywords= smart contract,Waves Platform,Ethereum,ICO,blockchain,tokens&lt;br /&gt;
|description=Smart contract is an electronic algorithm intended for the automation of the contract execution process in the blockchain. Originally, smart contracts technology was created by Nick Szabo in 1996. Smart contracts blockchain was put into practice in Ethereum.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;amp/&amp;gt;&lt;br /&gt;
[[File:smartcontract.png|400px|right|Smart contract]]&lt;br /&gt;
'''Smart contract''' (also self-executing contract, [[blockchain]] contract, or digital contract)&amp;lt;ref&amp;gt;http://www.blockchaintechnologies.com/blockchain-smart-contracts &amp;lt;/ref&amp;gt;  is an electronic algorithm intended for the automation of the contract execution process in the blockchain. The general idea of smart contracts is to exclude divergences in the treatment of the agreement terms by the entered parties.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
[[Nick Szabo]] is the creator of smart contract technology. He did this in 1996&amp;lt;ref&amp;gt;Szabo N. Smart contracts: building blocks for digital markets. URL: http://www. alamut. com/subj/economics/nick_szabo/smartContracts.html (Letzter Abruf vom 31.10. 2016). 1996.&amp;lt;/ref&amp;gt; -1997.&lt;br /&gt;
&lt;br /&gt;
He offered to use computer algorithms with user interfaces to close deals in the area of the electronic commerce. According to the author’s idea, the description of the contract terms had to be made with the use of mathematical tools and programming languages. The idea of Nick Szabo about smart contracts was put into practice for the first time by [[Vitalik Buterin]] in his [[Ethereum]] Project (2013).&lt;br /&gt;
&lt;br /&gt;
== Smart contracts in blockchain  ==&lt;br /&gt;
{{#ev:youtube|FkeLDPZ-v8g|500|right|Smart contract blockchain explained}}&lt;br /&gt;
The realization of Szabo’s idea became possible with the appearance of the blockchain technology, which ensures the reliability and protection of a [[smart contract]] due to its characteristics:&lt;br /&gt;
&lt;br /&gt;
* Decentralized system type: None of the contract parties may [[change]] the text of the document, since a copy of the agreement is kept in the register, distributed between numerous [[network]] nodes.&lt;br /&gt;
&lt;br /&gt;
* Open databases: The contract terms are available for all blockchain participants – the audit of the contract execution becomes easier.&lt;br /&gt;
&lt;br /&gt;
* Formalization of the contract terms: The check and execution of the contract terms is made with a program code (if-this-then-that (IFTTT))&amp;lt;ref&amp;gt;Dannen C. Bridging the Blockchain Knowledge Gap //Introducing [[Ethereum]] and Solidity. Apress, 2017.  С. 1-20.&amp;lt;/ref&amp;gt;,  which is why the possibility of a wrong contract execution is excluded.&lt;br /&gt;
&lt;br /&gt;
* Atomic operations: A contact will be either implemented successfully or not implemented at all.&lt;br /&gt;
&lt;br /&gt;
* Turing completeness: The blockchain presented in Ethereum, has a built-in Turing-full programming language, thanks to which the users will be able to create any contracts by themselves.&lt;br /&gt;
&lt;br /&gt;
=== Smart contracts example ===&lt;br /&gt;
Smart contracts are basically just computer code that is stored in a distributed blockchain. Because the blockchain is distributed, a copy of it is stored in each computer of the network. This implies that a copy of the smart contracts code is also stored in each computer of the network, and can in fact be executed in the same way by each computer. In the Ethereum blockchain, the code is executed in a specific environment: the Ethereum Virtual Machine (EVM). Every network [[node]] (i.e. each computer) will verify new [[block|blocks]] by going through the [[transactions]] included in it and implementing the codes initiated by them in the EVM&amp;lt;ref&amp;gt;Delmolino K. et al. Step by step towards creating a safe smart contract: Lessons and insights from a cryptocurrency lab //International Conference on Financial Cryptography and Data Security. – Springer Berlin Heidelberg, 2016. – С. 79-94.&amp;lt;/ref&amp;gt;. Since they all have an exact copy of the same chunk of code, each network node makes the same calculations, saving equal values.&lt;br /&gt;
&lt;br /&gt;
== Security and sensibilities ==&lt;br /&gt;
Smart contracts in Ethereum are vulnerable to hacker attacks for a number of reasons.&lt;br /&gt;
&lt;br /&gt;
1. Errors in the use of Solidity (the Ethereum programming language)&lt;br /&gt;
&lt;br /&gt;
* Semantics: smart contracts are written in [[Solidity]], which is similar to Java. However, the bytecode of the EVM does not support work with functions, so the contracts are compiled before being sent to the blockchain. One typing error in the contract code may lead to the implementation of the fallback function.&lt;br /&gt;
&lt;br /&gt;
* Incorrect order of exceptions: For the implementation of a smart contract, an interruption of the work of its method – an exception may be needed. If an exception appears during the running of the call command, then the execution of contracts will continue until the gas is over.&lt;br /&gt;
&lt;br /&gt;
* Reenterability: The same program instructions may be entered for several times, for example, through the fallback function, which will lead to a cycle in the calling of the call method and expending the whole gas. The attack on DAO was built on this type&amp;lt;ref&amp;gt;Atzei N., Bartoletti M., Cimoli T. A Survey of Attacks on Ethereum Smart Contracts (SoK) //International Conference on Principles of Security and Trust. – Springer, Berlin, Heidelberg, 2017. – С. 164-186. &amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
2.  Errors in the work of the Ethereum virtual machine &lt;br /&gt;
&lt;br /&gt;
* Invariability of contracts: A contract published on the blockchain cannot be changed. If a contract contains a bug, it’s impossible to correct, the contract execution only can be stopped. An outstanding example may be the elimination of the consequences of the attack on DAO. &lt;br /&gt;
&lt;br /&gt;
* Ether losses during the transfer: To send ether, you need to give the address of the receiving party, which presents a sequence of 160 bits. If the given address is not bound to a user or a contract, the sent ether will be lost forever.&lt;br /&gt;
&lt;br /&gt;
3. Blockchain errors&lt;br /&gt;
&lt;br /&gt;
* State of a contract: A part of a smart contract that came into a short sub circuit won’t be executed. Accordingly, the contract status won’t be determined uniquely temporarily. One of the contract parties may consider that the contract has been executed although it didn’t happen.&lt;br /&gt;
&lt;br /&gt;
* Temporary restrictions: To determine the state of a contract, some time is needed (see the previous paragraph), which makes it vulnerable to attacks.&lt;br /&gt;
&lt;br /&gt;
== Smart contract attacks ==&lt;br /&gt;
In July 2016, there was an attack on [[The DAO]], as a result of which a hacker managed to transfer over $64 million to the balance of a contract created by him&amp;lt;ref&amp;gt;Velner Y., Teutsch J., Luu L. Smart Contracts Make Bitcoin [[Mining]] Pools Vulnerable //IACR Cryptology ePrint Archive. – 2017. – Т. 2017. – С. 230.&amp;lt;/ref&amp;gt;.  For an attack, the reenterability characteristic has been used: within one transaction, the hacker withdrew funds of the DAO and transferred ether to their daughter DAO, repeating the operation for many times&amp;lt;ref&amp;gt;http://www.cbc.ca/news/technology/ethereum-hack-blockchain-fork-bitcoin-1.3719009 &amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Ethereum]]&lt;br /&gt;
* [[Ethereum Classic]]&lt;br /&gt;
* [[Bitcoin Cash]]&lt;br /&gt;
* [[ASIC]]&lt;br /&gt;
* [[Cloud mining]]&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[ru:Смарт-контракт]][[es:Contrato inteligente]][[de:Smart Contract]]&lt;br /&gt;
[[Category:Blockchain]]&lt;br /&gt;
[[Category:Cryptographic algorithms]]&lt;br /&gt;
[[Category:Technology]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>