Ethereum Smart Contracts Explained! by nvest

View this thread on steempeak.com
· @nvest ·
$18.31
Ethereum Smart Contracts Explained!
Would you like to know what *Ethereum* smart contracts are because you have probably heard of them, but don't know exactly how they work?

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmahCnhnfvboauP5ysA487WfyCupk9HaEYkGWjCWEVoD4e/nvest-smartcontract.jpg)

[*Thumbnail Source Pixabay.com*](https://pixabay.com/en/cryptocurrency-ethereum-matrix-3424632/)

## Ethereum Smart Contracts Explained!  

*Ethereum* smart contracts have captured the fascination of the entire world. 

*Smart contracts* are based on the public blockchain platform, which allows for the easy execution of a contract. Most individuals are still confused about the execution of smart contracts and it's what we are going to explain in this post.

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmVCmzAgLJpjehwLvFogGmqbYqVGGtkdcUQ6SghULoqYeF/business-contract.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/business-signature-contract-962359/)

When you compare a smart contract with a normal contract, you will realize that it is enforceable by law. It directly spells out the terms between the different parties. 

On the other hand, a smart contract is enforced with the help of cryptographic code. This contract in the form of code is written by the developers as well as the creators.

### History of smart contracts 

Many people think that smart contracts have been a recent addition to the blockchain. The truth is that the concept of these contracts was first conceived in *1993.* It was conceived by the cryptographer *[Nick Szabo](https://en.wikipedia.org/wiki/Nick_Szabo).* 

The concept was used in digital vending machines where consumers had to input the correct value in order to receive an item from the machine.

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmQt4mobtJJfeevwb9jTmzZnwKALvjL5ZzQCRaHN2W6tqZ/japan-machines.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/japan-vending-machine-beverage-682010/)

In the current form, this contract can be as simple as a contract to send *10 ether* to a particular wallet address on a particular date of every month.

Now that you are familiar with what exactly smart contracts are, we will go into the working of the same.

### How do smart contracts work?

Even though today *smart contracts* are often associated with the *Ethereum* blockchain, they were implemented on a smaller scale by *Bitcoin* earlier. 

The premise of the implementation was pretty simple. The value in the form of *Bitcoin* will be transferred from one user to another only when there is validation by the nodes. *Bitcoin,* however, used it only for currency transmission.

On the other hand, *Ethereum* actually made it much more versatile. It allowed the developers to use the smart contract functionality for a wide variety of applications. As a result, it was now up to the developers to use the smart contract capability by using the proper programming language.

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmf6Vd92HsyjaS6aBVKLJeqK9dsD5ueD4XjthHjn3gfV7k/eth-smart.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/cryptocurrency-ethereum-matrix-3424632/)

Smart contracts are also known by the name of [*autonomous agents*](https://en.wikipedia.org/wiki/Autonomous_agent) in the *Ethereum* blockchain. There is complete freedom for the developers to write the kind of code which they want. 

As per the [white paper of *Ethereum,*](https://www.ethereum.org) the smart contract language can support a lot of different computational instructions. 

Thus, it is *[Turing](https://en.wikipedia.org/wiki/Alan_Turing)* complete. 

This provides virtually unlimited power to the developers to draft and execute these contracts. 

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmW5N9R8xzFZZ2eyEFfbTMezNg8hgQNS5z6oQ3k9GUHdhZ/math.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/geometry-mathematics-volume-surface-1044090/)

Some of the functions which these contracts can execute are:

- Create a multi-signature account so that the funds in the account are only spent when a certain percentage of stakeholders agree.
- Manage any kind of transaction between stakeholders.
- Work as a utility to other enforceable contracts.
- Store records whenever there is an execution of a transaction.

As you can see, the number of applications of these contracts are plenty and they are virtually unlimited.

### Coordination with other contracts

Seldom, do these contracts just rely on the input of the user. Oftentimes, they rely on other similar contracts as well.

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmVeX2coijFdcqoi9ToPUWCoNCJUhKAM5VXzW4HP7raUtc/coordination.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/meeting-relationship-business-1019875/)

An example in point is a simple bet placed by a user regarding the temperature of the day. This simple transaction will involve multiple such contracts. 

One of the contracts will find credible sources of the temperature outside to actually determine the value. Another smart contract will settle the bet based on the information, which is gathered by the *1st* contract. The *2nd* contract will also examine the condition to find the actual winner of the bet. 

As a result, in a single transaction, multiple such contracts might be involved.

### Transaction fees

The execution of these contracts is not free. The exact fee depends on the computational power, which is required to execute the *smart contract.* The more the computational power, the higher will be the fee charged for the execution.

The execution of a *smart contract* only begins when the user or another smart contract indicates that there is enough amount to cover the transaction fees. Without this confirmation, the execution of the contract will not start at all.

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmQcJxiaZMTKVCsjj7XADhxBZ6vatKLLyaEeAoSgGvRaLa/fee.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/euro-bank-notes-handshake-1144835/)

At the machine level, such contracts are executed in the same way as other programs. They are executed in the byte-code. The only difference here is that the contracts are actually programmed into the blockchain rather than any normal compiler.

### Advantages of smart contracts

Now that you are aware of the functioning of these contracts, it is time to look into some of the advantages. 

These advantages include:

- Easily programmable.
- Affordable to execute.
- Not easy to manipulate.
- Entirely automated once programmed.
- Real-time execution.
- Blockchain can handle thousands of such contracts.
- Can be executed globally.
- Can be executed irrespective of the value involved.
- Can be executed in a completely secure manner.

![Ethereum Smart Contracts Explained!](https://cdn.steemitimages.com/DQmXo7HQksKaBnSGvEWe4seft5HQqCfXKfjvRwNeubAtCak/ethereum.jpg)

[*Source Pixabay.com*](https://pixabay.com/en/cryptocurrency-money-ethereum-3424785/)

As you can see, the advantages of such contracts are plenty. They are much more secure as compared to a normal paper contract.

Since the execution is automatic, it is not controlled by a single individual. Thus, once the user enters such contract, it will get executed automatically without any kind of interference from any parties.

The next time around you hear about these contracts on the *Ethereum* blockchain, you will exactly know what these contracts mean. 

You are now also aware of the working of a smart contract and how it operates. 

Owing to the versatility of smart contracts, the *Ethereum* blockchain is becoming more and more famous as it offers the execution of virtually any kind of *smart contract* on the blockchain.

Would you upvote this post and follow us because this will encourage us to write more articles like this one?

![Nvest.ai - Crypto data & analytics powered by Machine Learning and Artificial Intelligence.](https://cdn.steemitimages.com/DQmSYLV5GZjEEk5ZDhkAowxdBdUYaRZ9V5FWmhkggn1zCY5/nvest-bottom.jpg)

Crypto data & analytics powered by *Machine Learning* and *Artificial Intelligence.* 

**[Nvest.ai](http://nvest.ai/)** is helping crypto traders and investors make better decisions with next generation tools and leading them to the next level.

Visit our website: *http://nvest.ai*

![Nvest.ai](https://cdn.steemitimages.com/DQmPK1sKqane7sApaEbixEjzuUHHkZJm7fVWmtUebFSzM2h/robot-full-sig-sm.png)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
post_id60,942,342
authornvest
permlinkethereum-smart-contracts-explained
categorycryptocurrency
json_metadata{"tags":["cryptocurrency","ethereum","crypto","steem","technology"],"format":"markdown","links":["https:\/\/pixabay.com\/en\/cryptocurrency-ethereum-matrix-3424632\/","https:\/\/pixabay.com\/en\/business-signature-contract-962359\/","https:\/\/en.wikipedia.org\/wiki\/Nick_Szabo","https:\/\/pixabay.com\/en\/japan-vending-machine-beverage-682010\/","https:\/\/en.wikipedia.org\/wiki\/Autonomous_agent","https:\/\/www.ethereum.org","https:\/\/en.wikipedia.org\/wiki\/Alan_Turing","https:\/\/pixabay.com\/en\/geometry-mathematics-volume-surface-1044090\/","https:\/\/pixabay.com\/en\/meeting-relationship-business-1019875\/","https:\/\/pixabay.com\/en\/euro-bank-notes-handshake-1144835\/","https:\/\/pixabay.com\/en\/cryptocurrency-money-ethereum-3424785\/","http:\/\/nvest.ai\/","http:\/\/nvest.ai"],"image":["https:\/\/cdn.steemitimages.com\/DQmahCnhnfvboauP5ysA487WfyCupk9HaEYkGWjCWEVoD4e\/nvest-smartcontract.jpg"],"app":"steemit\/0.1"}
created2018-08-28 10:56:39
last_update2018-08-28 10:56:39
depth0
children9
net_rshares12,131,357,615,525
last_payout2018-09-04 10:56:39
cashout_time1969-12-31 23:59:59
total_payout_value13.916 SBD
curator_payout_value4.397 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length8,483
author_reputation4,421,356,718,697
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (59)
@procaptainjoe ·
awesome! deffinately some good content for someone to read into if they want to understand more about the foundations of crypto and how things really happen! thanks for spending your time writing this. They are nice because its true they are easy to program and cheep.... it takes forever to send money across a boarder but you can send it in a minute via smart contract approval.
👍  
properties (23)
post_id60,942,529
authorprocaptainjoe
permlinkre-nvest-ethereum-smart-contracts-explained-20180828t105954994z
categorycryptocurrency
json_metadata{"community":"busy","image":[],"users":[],"tags":["cryptocurrency"],"format":"markdown","app":"busy\/2.5.6","links":[]}
created2018-08-28 10:59:57
last_update2018-08-28 10:59:57
depth1
children3
net_rshares6,909,633,621
last_payout2018-09-04 10:59:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length380
author_reputation1,308,177,474,260
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@nvest ·
Thank you very much for your long and fast comment @procaptainjoe. We are glad that you like the article and we have many more like this to come.
properties (22)
post_id60,942,691
authornvest
permlinkre-procaptainjoe-re-nvest-ethereum-smart-contracts-explained-20180828t110236914z
categorycryptocurrency
json_metadata{"users":["procaptainjoe"],"tags":["cryptocurrency"],"app":"steemit\/0.1"}
created2018-08-28 11:02:36
last_update2018-08-28 11:02:36
depth2
children2
net_rshares0
last_payout2018-09-04 11:02:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length145
author_reputation4,421,356,718,697
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@procaptainjoe ·
i have a lot of time on my hands right now, i enjoy reading as much as i can! if you have more with this quality, following for sure. ill be glad to have some more active friends!
👍  
properties (23)
post_id60,942,812
authorprocaptainjoe
permlinkre-nvest-re-procaptainjoe-re-nvest-ethereum-smart-contracts-explained-20180828t110429911z
categorycryptocurrency
json_metadata{"community":"busy","image":[],"users":[],"tags":["cryptocurrency"],"format":"markdown","app":"busy\/2.5.6","links":[]}
created2018-08-28 11:04:30
last_update2018-08-28 11:04:30
depth3
children1
net_rshares6,909,633,621
last_payout2018-09-04 11:04:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length179
author_reputation1,308,177,474,260
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@jrswab ·
<center>🚀 This is a stellar post! 🚀

I will be featuring it in my weekly #technology and #science curation post for the @minnowsupport project and the [Tech Bloggers' Guild](https://discord.gg/ZTDzbvf)!  The Tech Bloggers' Guild is a new group of Steem bloggers and content creators looking to improve the overall quality of our niche.

Wish not to be featured in the curation post this Friday? Please let me know. In the meantime, keep up the hard work, and I hope to see you at the Tech Bloggers' Guild!

---
If you have a free witness vote and like what I am doing for the Steem blockchain it would be an honor to have your vote for my witness server. Either [click this SteemConnect link](https://steemconnect.com/sign/account-witness-vote?witness=jrswab&approve=1) or head over to [steemit.com/~witnesses](https://steemit.com/~witnesses) and enter my username it the box at the bottom.</center>
👍  
properties (23)
post_id60,962,768
authorjrswab
permlinkre-nvest-ethereum-smart-contracts-explained-20180828t152737289z
categorycryptocurrency
json_metadata{"links":["https:\/\/discord.gg\/ZTDzbvf","https:\/\/steemconnect.com\/sign\/account-witness-vote?witness=jrswab&approve=1","https:\/\/steemit.com\/~witnesses"],"app":"steemit\/0.1","tags":["cryptocurrency","technology","science"],"users":["minnowsupport"]}
created2018-08-28 15:27:36
last_update2018-08-28 15:27:36
depth1
children2
net_rshares6,909,633,621
last_payout2018-09-04 15:27:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length899
author_reputation45,243,433,466,167
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@nvest ·
Thank you very much @jrswab for your comment and featuring this post in your weekly curation post. We just voted for you as a witness.
properties (22)
post_id61,033,393
authornvest
permlinkre-jrswab-re-nvest-ethereum-smart-contracts-explained-20180829t113051453z
categorycryptocurrency
json_metadata{"tags":["cryptocurrency"],"users":["jrswab"],"app":"steemit\/0.1"}
created2018-08-29 11:30:51
last_update2018-08-29 11:30:51
depth2
children1
net_rshares0
last_payout2018-09-05 11:30:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length134
author_reputation4,421,356,718,697
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@jrswab ·
$0.02
Thank you for the vote! if you ever have any questions about my witness please ask. I also made https://jrswab.cloud/ for more transparency.
👍  
properties (23)
post_id61,033,496
authorjrswab
permlinkre-nvest-re-jrswab-re-nvest-ethereum-smart-contracts-explained-20180829t113232843z
categorycryptocurrency
json_metadata{"users":[],"app":"busy\/2.5.6","tags":["cryptocurrency"],"community":"busy","image":[],"links":["https:\/\/jrswab.cloud\/"],"format":"markdown"}
created2018-08-29 11:32:33
last_update2018-08-29 11:32:33
depth3
children0
net_rshares15,390,193,821
last_payout2018-09-05 11:32:33
cashout_time1969-12-31 23:59:59
total_payout_value0.021 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length140
author_reputation45,243,433,466,167
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@nicnas ·
Your post had been curated by the @buildawhale team and mentioned here: 
 
https://steemit.com/curation/@buildawhale/buildawhale-curation-digest-08-29-18
 
Keep up the good work and original content, everyone appreciates it!
👍  
properties (23)
post_id61,068,071
authornicnas
permlinkre-nvest-ethereum-smart-contracts-explained-20180829t195725213z
categorycryptocurrency
json_metadata{"tags":["cryptocurrency"],"links":["https:\/\/steemit.com\/curation\/@buildawhale\/buildawhale-curation-digest-08-29-18"],"app":"steemit\/0.1","users":["buildawhale"]}
created2018-08-29 19:57:24
last_update2018-08-29 19:57:24
depth1
children1
net_rshares6,909,882,940
last_payout2018-09-05 19:57:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length224
author_reputation38,508,407,201,933
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@nvest ·
Thank you very much for curating the post @nicnas.
properties (22)
post_id61,078,912
authornvest
permlinkre-nicnas-re-nvest-ethereum-smart-contracts-explained-20180829t233131055z
categorycryptocurrency
json_metadata{"users":["nicnas"],"app":"steemit\/0.1","tags":["cryptocurrency"]}
created2018-08-29 23:31:30
last_update2018-08-29 23:31:30
depth2
children0
net_rshares0
last_payout2018-09-05 23:31:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length50
author_reputation4,421,356,718,697
root_title"Ethereum Smart Contracts Explained!"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000