Getting started with Ethereum & Smart Contracts

Devanshu Jain
Coinmonks
5 min readDec 11, 2018

--

Over the past year, I took a keen interest in cryptocurrencies. How these cryptocurrencies use decentralised control as opposed to centralised banking systems and even having no centralised control, the market values of these cryptocurrencies, especially Bitcoin, Ethereum, and Ripple skyrocketed so high! How come people trusting these cryptocurrencies so easily? After digging into the matter, I quickly realised that while cryptocurrencies are powerful — the technology that backs them, Blockchain is super powerful and can lead us to the new web.

Photo by Clint Adair on Unsplash

What is Blockchain?

The blockchain is just that — a chain of multiple blocks. Each block that is added to the blockchain has transaction data (or whatever) that is permanently recorded. This permanently recorded data that is indestructible makes it so popular and powerful.

The technology that powers Bitcoin is Bitcoin’s Blockchain. Same as the technology that powers Ethereum is Ethereum’s Blockchain.

To understand how blockchain works and how the data is permanently recorded and is indestructible, lets take a small example of how Bitcoin transactions(Bitcoin’s Blockchain) work. A wants to send some money(1 BTC) to B. Here’s how Bitcoin’s happy path looks like:

  1. A initiates bitcoin transfer to B via a peer-to-peer network — called the bitcoin network. They must provide cryptographic proof of identity to the network that they are indeed who they say they are.
  2. The transaction details are recorded in a “block” and the block is announced to the peer-to-peer network for transaction verification & validation.
  3. The nodes on the network move to validate the transaction block — which basically involves solving a computationally intensive random math problem. The incentive for nodes to validate transactions are new bitcoins and associated transaction fees as reward for ‘finding’ the new block . The process of validating transactions in a block is called bitcoin mining.
  4. Each peer/node in the network keeps a copy of all such blocks of transactions that were previously verified — sort of a chain of blocks , a running ledger. This chain is called the BLOCKCHAIN.
  5. Once a node successfully solves the math problem, the transfer is verified and the newly verified transaction block is added to this chain by the winning node.The winning node then broadcasts to the network that a block has been found.
  6. Next, all other nodes in the network check the winning node’s claims and arrive at a distributed consensus that the transaction has indeed been validated , and the transfer is successful. Once consensus is achieved, each node updates their respective copy of the blockchain ledger. (More about this in a minute)
  7. The manner in which this chain is built as transactions flow in , bestows interesting and important properties to the blockchain. It becomes an immutable, indelible and transparent record of reality to everyone on the bitcoin network . Any attempt to submit bogus transaction blocks, such as double spend bitcoins, is recorded in the blockchain and is broadcast to everyone.
  8. When all of the above steps are complete, A’s account balance is reduced by 1 BTC . B’s balance increases by 1 BTC.

To delete or alter the above transaction, the hacker needs to alter/delete the specific block (A -> B, 1BTC) and all the subsequent blocks present in the chain because all these blocks are interconnected to each other and making change in one block would lead to change the entire chain. Further, these transaction blocks are encrypted by the most finest cryptographic algorithms present in the market. This makes this an impossible task.

With this, it seems like Bitcoin’s blockchain technology is perfect for crypto-currencies. But does the Blockchain technology only limited to crypto-currencies? Lets have a look at this video to understand how powerful this underlying technology is!

Blockchain have much more use-cases than being a simply cryptocurrencies technology.

Blockchain is much a philosophy as a technology and has the potential to change the entire world as an Internet did in 90’s. Just as the cryptocurrencies changing the entire finance industry, to make the new web, Web3.0, we need to move forward from centralised applications to de-centralised applications. Dapps.

To have Dapps, we need a solid development framework to base our applications. Upon searching various stuffs online to create a de-centralised apps, the one name that is making the rounds on internet is Ethereum Blockchain. So when I first pondered about this blockchain, my immediate question was

Why do we need Ethereum — another blockchain — when we already have a blockchain that powers Bitcoin?

Because Bitcoin’s scripting language is not very developer friendly. That means it lacks very basic concepts that are needed by developers to build robust and scalable applications. One such example of it is, it does not support loops. This seemingly simple downside means building even trivial and simple applications on bitcoin’s blockchain can often become a research project for most developers. And so, Ethereum comes into the picture.

Ethereum is a Platform

Ethereum is a Platform. Underneath the platform is a custom-built open-source public blockchain that enables new applications to be built on top of it. Ethereum’s blockchain promises that these applications will run securely forever without any censorship or downtime.

So far we have understand what is blockchain and the need of Ethereum. In the next part we’ll be learning more about Ethereum and how to get started with it.

If you have reached till now, and have learnt even a bit from it, please recommend it to others by clapping for this post. See you! till the next post —Part 2

Get Best Software Deals Directly In Your Inbox

Click to read today’s top story

--

--

Devanshu Jain
Coinmonks

Dreamer | Builder | Want to be a part of Nation Building!