{"id":5738,"date":"2021-03-18T14:50:57","date_gmt":"2021-03-18T12:50:57","guid":{"rendered":"https:\/\/godex.io\/blog\/?p=5738"},"modified":"2021-10-15T12:52:18","modified_gmt":"2021-10-15T09:52:18","slug":"ethereum-smart-contracts-how-they-work","status":"publish","type":"post","link":"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work","title":{"rendered":"Ethereum Smart Contracts &#8211; how they work?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_25_1 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><label for=\"item\" aria-label=\"Table of Content\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/label><input type=\"checkbox\" id=\"item\"><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#ethereum_ecosystem_and_decentralized_exchanges\" title=\"Ethereum Ecosystem and Decentralized Exchanges\">Ethereum Ecosystem and Decentralized Exchanges<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#smart_contract_abc\" title=\"Smart Contract ABC\">Smart Contract ABC<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#the_real_purpose_of_using_the_technology\" title=\"The real purpose of using the technology\">The real purpose of using the technology<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#what_about_the_creator_and_target_audience\" title=\"What about the creator and target audience?\">What about the creator and target audience?<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#the_very_essence_of_the_technologys_work\" title=\"The very essence of the technology\u2019s work\">The very essence of the technology\u2019s work<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#benefits_that_smart_contracts_stand_out_for\" title=\"Benefits that smart contracts stand out for\">Benefits that smart contracts stand out for<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#smart_contract_implementation_in_real_life\" title=\"Smart Contract Implementation in Real Life\">Smart Contract Implementation in Real Life<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#state_institutions\" title=\"State institutions\">State institutions<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#healthcare\" title=\"Healthcare\">Healthcare<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#businesses\" title=\"Businesses\">Businesses<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#real_estate\" title=\"Real Estate\">Real Estate<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#automobile\" title=\"Automobile\">Automobile<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/godex.io\/blog\/ethereum-smart-contracts-how-they-work\/#erc20_standard\" title=\"ERC20 Standard\">ERC20 Standard<\/a><\/li><\/ul><\/nav><\/div>\n<p><span style=\"font-weight: 400;\">Victor Hugo said: \u201cThere\u2019s nothing more powerful than an idea whose time has come\u201d. It looks like he predicted Smart Contracts because they did really change our life for good. To illustrate, now John and Ann do not have to turn to third-party services like banks, government institutions to have a buy-and-sell deal between them. It\u2019s just two of them and transparent technology enabling this process.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, what do we know about smart contracts? Who\u2019s the creator? How can you apply them? What\u2019s more important, how can you benefit from them? You\u2019ll find all the answers here and even more. But first, let\u2019s get to know more about the Ethereum blockchain, which \u201cmothered\u201d smart contracts, and the very idea of decentralization. Take a look!<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"ethereum_ecosystem_and_decentralized_exchanges\"><\/span><span style=\"font-weight: 400;\">Ethereum Ecosystem and Decentralized Exchanges<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Ethereum is a blockchain network aka platform that is control-free and open-source and represents its own cryptocurrency. It authorizes Smart Contracts and Distributed Applications. These are built-in and operate without delays, scam, supervision, or intervention from the external parties.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Applications circulating on this platform work on a particular cryptographic token &#8211; ether. It\u2019s the <a target=\"_blank\" rel=\u201dnofollow,noopener\u201d href=\"https:\/\/ethereum.org\/\">Ethereum\u2019s<\/a> driving force and is mainly in demand by developers who strive to create and manage applications within the network. The launch of Ether had two purposes &#8211; trading as a virtual currency exchange like Ripple, for example, and managing applications and cashing in the activities.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In 2016, 2 blockchains originated from Ethereum as a result of a 50 million theft. These were Ethereum and Ethereum Classic. The novel one was a hard fork from the initial software designed to prevent any malware attacks.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For now, it\u2019s the second-largest digital currency on the market, giving place to Bitcoin.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As for decentralized exchanges, they represent moderators that help buyers and sellers interact without middleman fees. The participants do not share their data with third parties. The concept of decentralization makes trading volume and price manipulation impossible and allows users to stay anonymous.\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"smart_contract_abc\"><\/span><span style=\"font-weight: 400;\">Smart Contract ABC<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The term simply means a blueprint or transaction protocol that is being exploited on the Ethereum blockchain. It\u2019s a number of codes, namely its actions, and data (its state) that is placed under a specific address on the blockchain.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Smart Contracts are a kind of Ethereum back office, meaning they possess a deposit and can carry out operations across the network. Herewith, any user controls it, and they are exploited on the network and operate according to the program. Other accounts can later work with a smart contract by providing transactions that act as anticipated on the smart contract. Smart Contracts can suggest guidelines like a traditional one, and in default apply them with the code.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">One can compare a smart contract with a candy machine. When putting in the precise fund, the precise output comes out. For example, you put money to get a chocolate bar, pick it first, and in seconds the bar is dispenced. This principle is built into the candy machine. A smart contract has its logic integrated into it as well. Just like coin-operated machines do not require vendor employees, many industries won\u2019t need intermediaries thanks to smart contracts.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Anyone can create a smart contract and forward it to the ecosystem of users. The latter are required to know how to code in a needed language and possess enough <a target=\"_blank\" rel=\u201dnofollow,noopener\u201d href=\"https:\/\/godex.io\/coin\/eth\">ETH<\/a> to push forward a contract. Procedurally, managing a smart contract is a transaction, meaning one needs to pay their Gas in the same manner they have to pay gas for an ordinary ETH transfer. But in this case, expenses are bigger.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Finally, as for the basics,\u00a0 these transaction protocols might be considered as open APIs since they are public on Ethereum. It allows appealing to other ones in your own smart contract to get more opportunities. Contracts might even produce other ones.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"the_real_purpose_of_using_the_technology\"><\/span><span style=\"font-weight: 400;\">The real purpose of using the technology<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">When two people agree on something and do it by means of a code &#8211; that\u2019s what a smart contract is. No one can change the code since it is deployed on the blockchain. The contract can be enforced only when certain conditions are followed.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here\u2019s a great example to illustrate the term. Tom is willing to buy Ann\u2019s house. Their settlement comes as a smart contract. If Tom pays Ann 5,000 ETH,\u00a0 the house becomes his property. When this agreement is deployed on the blockchain, no one won\u2019t be able to modify it. This smart contract will be immediately fulfilled once Tom pays Ann for the property.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Hadn\u2019t they a smart contract, they will go for the services of banks, government institutions, etc. On the contrary, blockchain turns smart contracts into an amazing idea. It can be utilized in any sphere of life. As blockchain is control-free and represents a shared database, no one is able to control it. Smart contracts are like a bridge for industries and blockchain. Any domain can benefit from it: government, supply chains, healthcare, automotive, real estate.\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"what_about_the_creator_and_target_audience\"><\/span><span style=\"font-weight: 400;\">What about the creator and target audience?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Nick Szabo, a computer scientist, was the pioneer in introducing the concept of smart contracts to the world (now the most influential person in the crypto and tech world). He gave the full definition and the role of these computer programs for financial institutions. Yet, at a time, there was no suitable environment to make the implementation possible.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Although blockchain technology was not even known at a time, he explained the entire mechanism in his book. Then, when the first blockchain was created in 2009, smart contracts irrevocably found their appropriate environment. Now, people can use cryptocurrency wallets and exchanges without actually seeing the technology but benefit from it. Blockchain saves transactions and processes them.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">What\u2019s good about it is that it saves tons of time and removes middlemen from the equation and thus possible conflicts between them. Users can exchange real estate, money, anything valuable in a hassle-free way and without collision of interests. As mentioned above, it can be applied to any industry &#8211; insurance, credit approval, breach contracts, real estate law, etc.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"the_very_essence_of_the_technologys_work\"><\/span><span style=\"font-weight: 400;\">The very essence of the technology\u2019s work<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To get you a picture of how the technology works, imagine a vending machine. Nick puts 15 cents in it and then gets his Soda, while Sarah puts a two-dollar bill and gets her Coke and the change back. Thus, the coin-operated machine represents a sort of consent carrier that enables anyone having some funds to take part in an exchange.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In a blockchain, the user provides a needed amount of digital money to a smart contract, thus the wanted component arrives at his or her account. To get a smart contract completed, the user can indicate conditions, rules, any other detail to be followed.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, what about functionality?\u00a0<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">It\u2019s subject to being approved by many. The funds are spent only when the needed percentage of users agree on that.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">It can give rise to other contracts. Smart contracts can be interrelated, meaning if one ends, the next one begins.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">It keeps data on applications.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">To make it work, the user needs to script a code and possess ETH coins to give effect to a contract. From the technical point of view, its deployment constitutes the Ethereum transaction. The sender pays a fee in Gas, which is usually higher than the one of an ordinary transaction.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"benefits_that_smart_contracts_stand_out_for\"><\/span><span style=\"font-weight: 400;\">Benefits that smart contracts stand out for<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No human factor ruining processes: no need for individual or institutional approval, no third parties as it\u2019s up to the whole network to manage the execution.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No trustworthiness problems as the logs are encrypted on a collective ledger. In no way any user can say they are just gone.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0No savings lost as it might happen in a regular bank. On Ethereum, users are there for you. The documents are \u201ccloned\u201d a lot of times over and over again.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No hacking threats as cryptography, encryption make documents secure.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No tons of time to deal with documents as these programs exploit software code to make processes automatic.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No filling out piles of docs and applications, which provides greater accuracy\u00a0<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"smart_contract_implementation_in_real_life\"><\/span><span style=\"font-weight: 400;\">Smart Contract Implementation in Real Life<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Smart contracts are subject to implementation in any area of life &#8211; financial services, healthcare, insurance &#8211; you name it. Let\u2019s regard a few examples.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"state_institutions\"><\/span><span style=\"font-weight: 400;\">State institutions<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Smart contracts have the potential to create an even more secure voting system thanks to ledger-secured votes that need to be decrypted. Additionally, smart contracts can boost voter turnout, eliminating a clumsy system of filling out questionnaires, proving identity, etc. All voting will happen online.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"healthcare\"><\/span><span style=\"font-weight: 400;\">Healthcare<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Blockchain will add to keeping personal health logs encoded, with a unique key providing permission to particular people. It can also store invoices of surgeries and send them directly and by default to insurance agencies as proof-of-delivery. Researches might be conducted strictly by HIPAA laws. Other healthcare processes like drug supervision, test results, and healthcare equipment management can benefit from the use of the ledger.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"businesses\"><\/span><span style=\"font-weight: 400;\">Businesses<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Not only does blockchain deliver a unique ledger for trust matters, but it also improves drastically socializing at any level and workflow processes thanks to correctness, automation, and clarity. The blockchain ledger accelerates approvals, problem solutions and removes inconsistencies coming from independent processing and bringing about legal problems.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"real_estate\"><\/span><span style=\"font-weight: 400;\">Real Estate<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Smart contracts will help make more money by decreasing the costs of intermediaries, such as Craiglist, newspaper ads. etc. Instead, brokers pay with crypto and deploy the contract on the ledger. The network\u2019s members notice it, and the contract gets their automatic execution. Every participant in the business can benefit from this kind of deal.\u00a0<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"automobile\"><\/span><span style=\"font-weight: 400;\">Automobile<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Smart contracts can help with self-driven vehicles by enabling \u201coracles\u201d that will identify who did what in a car accident &#8211; the driver or the sensor &#8211; and many other variables. Insurances can charge differently according to where and under which terms their clients are running their vehicles.\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"erc20_standard\"><\/span><span style=\"font-weight: 400;\">ERC20 Standard<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The term stands for Ethereum Request for Comments and was suggested by Fabian Vogelsteller in 2015. It represents a benchmark for fungible tokens that are similar in type and worth. To understand it properly, ERC-20 can render anything that is brought to virtual reality like reputation points, lottery tickets, financial assets. To have an interface for any ERC-20 token, Contract Application Binary needs to be used.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Table of Contents Ethereum Ecosystem and Decentralized ExchangesSmart Contract ABCThe real purpose of using the technologyWhat about the creator and target audience?The very essence of the technology\u2019s workBenefits that smart contracts stand out forSmart Contract Implementation in Real LifeState institutionsHealthcareBusinessesReal EstateAutomobileERC20 Standard Victor Hugo said: \u201cThere\u2019s nothing more powerful than an idea whose time has [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":5739,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[132,131],"tags":[1079,114,505,812,1849],"yst_prominent_words":[],"class_list":["post-5738","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-crypto-currencies","category-crypto-tips","tag-crypto-talks","tag-crypto-tips","tag-cryptocurrency","tag-ethereum","tag-ethereum-2-0"],"lang":"en","translations":{"en":5738},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/posts\/5738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/comments?post=5738"}],"version-history":[{"count":1,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/posts\/5738\/revisions"}],"predecessor-version":[{"id":5740,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/posts\/5738\/revisions\/5740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/media\/5739"}],"wp:attachment":[{"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/media?parent=5738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/categories?post=5738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/tags?post=5738"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/godex.io\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=5738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}