How do Ethereum Smart Contracts Work?

The world’s second largest cryptocurrency, Ethereum, has allowed for the creation of Smart Contracts, with several other AltCoins following suit. While you might hear terms like Smart Contracts, cryptocurrencies and Blockchain bandied about, it can be hard to make out the differences between all those buzzwords.


What are Smart Contracts?

A Smart Contract operates like a regular contract, the difference is that a regular contract is enforceable by law whereas a smart contract does not need enforcement as it operates independently from the agents involved. Every contract, smart or otherwise, is a set of conditions that when met result in a particular action. For instance, an employment contract lists the conditions of work and remuneration. If some of those conditions are not met then termination can occur. If these conditions are not met or adhered to the legal action needs to occur.

With Smart Contracts, if the conditions are met then the result can occur and if the conditions are not met then the contract is terminated. Let’s take a simple example of a Smart Contract; Andrew will pay John 25 Ether (the token currency used by Ethereum) once he receives a package from John. The Smart Contract would verify that the package arrives and executes the transfer immediately.

Smart Contracts, DApps and Ether

While Smart Contracts may sound like something novel, they were first conceived of in 1993 by Nick Szabo. His initial idea was of users inputting data or value (a cryptocurrency token for instance) and receive a particular item from a machine. Similar to how a vending machine works, except instead of using coins, you would transfer digital funds.

BitCoin was technically the first to utilise Smart Contracts, as for a transaction to occur on the BitCoin network certain conditions have to be met. For instance, that a user actually has the funds to send in the first place. If these conditions are met then the transfer can occur. But Ethereum was the first to create a platform which revolved around Smart Contracts. You see, Smart Contracts have huge potential, they can be used to manage agreements between users, act as “multi-signature” accounts where funds can only be spent once a set amount of people agree or even to store information about applications!

Smart Contracts are considered to be the basic building blocks of DApps, Decentralised Applications, which run on the Ethereum Network without a governing or regulating entity such as the App Store. The language used for Smart Contracts is “Turing-Complete,” which allows it to be used for complex computational instructions. Developers can create their own, unique DApps using Smart Contract technology.

These DApps could be anything, from betting software, market prediction tools, games and even a unique program called Golem which allows users to rent and lease computing power. The possibilities are endless! All of these DApps involve a transfer of data or value in some shape or form; for instance, a betting software would need to collect data about a particular race or match, games would require spending money for a virtual service. All of these require a Smart Contract in place and, given that these DApps exist on Ethereum, they are also part of the Ethereum Blockchain making those transfers safe and secure! Any action on Ethereum requires Ether and the fee is calculated based on the amount of computational power required to perform the action. Many refer to Ether as the “gas” used to power the Ethereum Network.

Imagine a world where the contracts we signed were clear and immutable. Every action and transaction is upheld by an objective mediator with complete and unfaltering mathematical precision. All of these Smart Contracts would run simultaneously, creating a global, decentralised super-computer that everyone is connected to. Ethereum has advanced Smart Contract technology to help make this sort of fairness possible for everyone!

Leave a Reply