Back Understanding Ethereum
district0x
General

What Are Smart Contracts?

 
The basic function that powers applications and programs built on Ethereum is called smart contracts. Smart contracts are digital agreements that execute automatically based on real-world inputs in data. It’s best to think of them is an “If-then statement.” IF condition A exists, THEN perform function B.


Let’s look at a simple example:

The King has put the castle up for rent through the blockchain, and the rental payment has been made in cryptocurrency.  The renter received a receipt which is held in a smart contract with the following terms:

  • The King must give the renter a digital entry key by a specified date. If the key doesn’t come on time, the blockchain releases a refund. If it does, the smart contract validates and releases both the rental fee to the King and key to the renter.

The smart contract works on the If-Then premise, so the renter can expect a faultless delivery. If the King gives the renter the key, then he is sure to be paid. If the renter sends a certain amount of cryptocurrency, then the renter receives the key from the King.

The code cannot be interfered with by either party without the other knowing since all participants are simultaneously alerted and the code is open sourced, meaning it is publicly viewable


But here is the REALLY cool thing:


Smart contracts have applications far beyond improving the reliability & efficiency of rent collection. In fact, any processes that currently involves manual interactions between two parties can now be automated and the value can be moved in real time over the blockchain rather than settling days later as with traditional banking.

Ethereum and smart contracts are helping to build the “smart economy” – one in which slow manual processes prone to error and fees are replaced with automated processes that are completely transparent and trustworthy.

The best part is that a “middleman” or any rent seeking third party can be completely eliminated. Plus (apart from some gas fees to power the network) there is no charge to set up and deploy.

Was our Education Portal helpful?

Share

Dont Miss Out On Updates!

Subscribe to our newsletter to stay up to date on all the happenings in the district0x network.