Blockchain smart contracts tutorial
Blockchain Smart Contracts explained - presented by Bitbond CEO Radoslav Albrecht at this years Tech Open Air Festival in Berlin.
This event was hosted by The Place.
Table of content:
A Primer on Blockchain Technology @ 1:55
An introduction to Smart Contracts @ 12:50
Use cases of Smart Contracts @ 26:43
Q&A @ 43:54
A Primer on Blockchain Technology @ 1:55
The concept of Blockchain was first discussed in Satoshi Nakomoto’s whitepaper called, Bitcoin: A Peer to Peer Electronic Cash System. In this whitepaper Nakomoto discusses the need for a cryptographically secured form of digital cash.
Up until then, all forms of digital money had faltered due to the ‘double spend’ problem. This described how all digital assets could be infinitely copied and are therefore rendered worthless. By creating the Blockchain, Nakomoto solved this problem.
Blockchain in its simplest form, is a record of transactions sorted into blocks. These transactions are time-stamped within the blocks which are each immutably linked to the preceding block. By creating this link, the blocks are made tamper-proof, as changing one transaction in one of the blocks would require all preceding blocks to be changed as well.
The Blockchain therefore leverages the power of the internet to facilitate the exchange of value across borders. Companies like Bitbond use this to facilitate both international fixed income investments (https://www.bitbond.com/fixed-income-investments), and small business loans (https://www.bitbond.com/small-business-loans).
What are Smart Contracts? 12:50
Smart Contracts are “If this, then that” statements written into the blockchain. They allow for the exchange of money, properties, shares and anything else of value, without the use of an intermediary.
Perhaps the easiest way to understand the function of a Smart Contract, is to compare it to the way a vending machine works. If you choose an item from the vending machine for example and input money, then the item falls into the grate and becomes available to you. It does not become available to you until you input the money, which in this case, is the event that triggers the action (the item falling into the grate).
Similarly, a Smart Contract is an immutable agreement between two parties to trigger a certain action at a predefined event. If for example, you paid into a disaster relief fund designed to help those affected by earthquakes, you could create a Smart Contract which pays out the money when a certain predefined level of tectonic movement is measured which is indicative of an earthquake.
This has several important advantages, chief among them being the removal of intermediaries and the automation of processes which otherwise may be expensive or open to fraud. As a result, individuals can take further control of their assets through the Blockchain.
How do Smart Contracts work?
Smart Contracts currently work primarily on the Ethereum Blockchain. In fact, founder Vitalik Buterin, wrote the Ethereum Blockchain in a programming language called Solidity which is explicitly designed for Smart Contracts. In this video, we provide the outlines of a Smart Contract tutorial to help you get started with the technology.
Specifically, Smart Contracts work in three steps:
1. Two parties agree on terms
2. A predefined event occurs
3. The event triggers and action (payout)
With these three steps in mind, it becomes that smart contracts not only define the rules of an agreement in the same way that a traditional contract does, but also automatically enforces those obligations through the execution of code.
How can I use a Smart Contract? 21:10
In this presentation, Radoslav Albrecht provides a detailed explanation of not only what a Smart Contract is, but also how a layperson may set one up on his own.
Specifically, he mentions three browser plugins:
These three plugins are probably the easiest way for people, who may not be developers, to interact with, and learn about Smart Contracts on the Blockchain.
To set up your own Smart Contract, you can visit dealmate.io. This website is a relatively light-weight solution which will let you set up your first basic Smart Contract for free and without the need for code. Simply enter your desired parameters and have dealmate generate the code for you. You will need the Metamask plugin to use dealmate.
Developers can also create Smart Contracts on the Ethereum Blockchain directly by learning a programming language called Solidity.