Ethereum smart contracts. Details.

Ethereum is usually mentioned in unison with Bitcoin, as it is the second-most popular cryptocurrency in the world. These two are, however, entirely different things: Bitcoin is a decentralized cryptocurrency payment network, which allows BTC to be transferred between users.
The Ethereum project has goals of a far broader scale. As stated on the Ethereum website, “Ethereum is a decentralized platform that runs smart contracts.” These contracts are resolved using an “Ether virtual machine,” a distributed computing network that consists of all the devices the Ethereum nodes are being run on.
A “decentralized platform” means that everyone is able to set up and run an Ethereum node the same way everyone can set up a Bitcoin node. Users that would like to run a “smart contract” on these nodes, however, must pay the node operators in Ether, the token of this particular cryptocurrency, tied to Ethereum. This means that people who use the Ether nodes provide Ethereum with the computing power it needs while paying for the service with Ether, which is identical to how people using Bitcoin nodes provide Bitcoin with hash power while paying for the service in BTC.
In other words, Bitcoin is simply a blockchain and a payment network, and Ethereum is a distributed computing network with a blockchain that can be used for a variety of different purposes. One would have to spend many hours reading the Ethereum white paper to make sense of all the ins and outs of this particular network.

What is a smart contract?

A smart contract is an application run by a virtual Ethereum computer. This machine is a decentralized “world computer,” where all the nodes of the Ethereum network contribute to its computing power. The calculations of all the nodes that provide computing power are funded in Ether tokens.
So why exactly are these protocols called “smart contracts”? The answer is quite simple – the contracts get resolved/executed automatically when certain requirements/terms are met, with no possibility of outside interference.
Say you have just launched a startup or a crowdfunding service based on the Ethereum network. You can create an Ethereum smart contract, executed through a built-in algorithm, that collects user funds and pays for certain goods and/or services.
A smart contract can be set up such that every time $100,000 is added to the currency pool, the entire sum is sent to a recipient. A contradictory term can be added: for example, if the $100,000 cap isn’t reached within a certain period (say, a month), the money can be returned to the party that initially sent it. Ether tokens (or any other Ether-protocol ERC20-based altcoins, for that matter) are used instead of USD.
All the above-mentioned actions are executed in accordance with the smart contract’s code, which completes the transactions automatically without any third-party access requirements. There is no need to withhold money or approve transactions.
For example, “the most expensive bank” issues a 5% commission fee for payment processing, which amounts to $5,000 in fees for a 100,000 dollar project. A smart contract doesn’t require any percentage be paid for the service, compared to a bank.

Smart contract use cases

Smart contracts can be used for various purposes. A developer can create a smart contract that, in turn, provides other smart contracts with different functions, similar to how software libraries work. They can also be used as apps, storing information regarding the Ethereum network blockchain.
To properly execute a smart contract, one should send enough Ether as a transaction payment (so-called “gas”), depending on how much computing power is needed. This up-front sum pays for the Ethereum nodes’ participation and providing of computing power.


One of the better-known apps created using Ethereum smart contracts is CryptoKitties, which is considered one of the first blockchain-based games ever made.
In essence, CryptoKitties is a form of digital collection stored on Ethereum blockchain. It’s a great demonstration of the Ethereum network’s storage and digital element exchange capabilities.
New CryptoKitties are generated through a “breeding” process, which consists of selecting two base “kitties” and using Ether tokens to initiate a smart contract. The contract then uses both of the selected “kitties” to “breed” a new, unique feline. These new kittens and the “breeding” process itself are stored in the Ethereum blockchain public ledger, with all actions executed by smart contracts that have already been written.

Smart contracts for banking and financial services

Ethereum smart contracts can be used for a wide variety of banking and financial purposes, including mortgage loans, domestic bonds, payments and accounting, insurance fees, etc.
Imagine a person not paying a certain amount of TKN when it’s due and not informing the bank about it. Instead of using enforced recovery, a smart contract can be developed to ensure that the client complies with terms and conditions: the client’s account can be blocked, and all the account receipts can be transferred to the bank, with a certain percentage taken off of every transaction.

OmiseGO – a virtual banking platform

OmiseGO is both a payment and a banking platform and makes use of smart contracts and its own ERC20 standard token (Ethereum code standard). This company has already implemented an “all banks in one place” system. The platform allows developers to offer decentralized banking services globally, with no need for a real bank account.
The OmiseGO Ethereum Dapp is the platform infrastructure, which features an open wallet and allows anyone to integrate the platform into any ongoing payment service via carefully tailored smart contracts. One thing to note is that a special smart contract is also used to define the required contract in any given case. This smart contract chooses the necessary algorithm for each specific action/operation on its own. All the contracts work as a bridge, connecting the fragmented payment processes with the decentralized blocks of the Ethereum network.