Genesis Block
Home » Blog » Page 3

Category: Blog

Crypto Classroom Lesson #2: Ethereum (ETH)

admin
What is Ethereum Ethereum is an open-source, public blockchain platform that allows users to build and deploy decentralised applications (Dapp). A Dapp is a server-less peer-to-peer application which uses Smart Contracts to execute commands and retrieve information from the blockchain. Unlike traditional contracts, a smart contract is a program designed by developers that automatically executes itself based on the underlying agreement coded in the contract. Its self-execution nature provides three advantages over traditional contracts: Immutable – Once a smart contract is deployed on the blockchain, its code cannot be modified unless it was rewritten to be upgradable. Fast – Smart contracts are executed almost instantly without human confirmation. Cheap – The costs associated with developing and executing smart contracts are relatively low compared to traditional contracts which involve third parties (lawyers, brokers, etc). The Ethereum Virtual Machine (EVM) The EVM is a system that can read and execute contracts written in the Ethereum programming language. The EVM from each node is a completely segregated network on its own (isolated from the main network). All full nodes execute smart contracts using the same software and agree on the outcome (which should be the same for all nodes). This allows nodes to verify the computation themselves without the need to rely on other parties, making the network less vulnerable to hacking or data corruption. Moreover, the isolation provides developers with a sandbox environment to test their programs in a real use-case environment without affecting the main blockchain. How Smart Contracts Work In this example, we will demonstrate how a smart contract can be used for crowdfunding. 1. A smart contract is written and placed on the blockchain so that the project owner can receive funds from investors only if certain conditions are met (e.g. total funding reached 100k). 2. Investors can now send funds (in ETH) to

Crypto Classroom Lesson #1: Bitcoin (BTC)

admin
The Creation of Bitcoin Bitcoin was created by Satoshi Nakamoto in early 2009. In wake of the 2008 financial crisis, Satoshi saw the need for a new kind of money. The current financial system relies almost exclusively on trusted third parties to process payments. Middlemen are required to mediate disputes, which lead to expensive fees and slow processing. Satoshi hoped to create a decentralized peer-to-peer payment system with no reliance on central authorities. How does it work? 1. When transactions are initiated, it contains information of the sender, the recipient, the transaction amount and a digital signature. 2. The user will generate two keys. The digital signature is signed with the sender’s private key and the public key is available to other nodes to verify the signature. 3. When a transaction is signed, it will be sent to a pool of unconfirmed transactions called a mempool (memory pool). The transactions will be picked by miners and put into the next block. 4. Miners validate blocks by solving mathematical problems i.e. hash function. The first miner to solve the problem will receive a block reward paid in Bitcoins. The hash identifies a block and is dependent on the transactions within. Any changes to the transactions will cause the hash to change completely and be rejected by the rest of the network. This brings immutability to the history of transactions. 5. Miners will broadcast the solved hash (i.e. his ‘proof of work’) to other nodes in the network. When other nodes verify and agree on acceptance, a consensus is reached.  Nodes express acceptance by working on the next block. Why is Bitcoin Decentralized? There is no centralised authority in the Bitcoin network. The blockchain ledger is distributed across nodes all over the world and is open for anyone to view. The Bitcoin