What is P2PKH? P2PKH stands for “Pay-to-PublicKeyHash” and it is the most common form of transaction in bitcoin. A Public Key Hash is synonymous to a bitcoin address. It is one format of a bitcoin address (the other being Pay-to-Script Hash). At a basic level, P2PKH means to “pay to this bitcoin address”. It is an instruction on the blockchain to transfer bitcoin from the current owner to the new owner of a bitcoin address. Behind every bitcoin transaction, there is some code working in the background, this code is the Bitcoin Scripting language. Terms you need to know 1. PubkeyScript (also called scriptPubKey or locking script); and 2. SignatureScript (also called scriptSig or unlocking script). A PubkeyScript is a list of recorded instructions that accompany output transactions, it governs how the next person can unlock received bitcoin and spend it. To do this, the recipient of sent bitcoin will generate a signature script which must satisfy the parameters of a PubkeyScript created by the last sender. These parameters are 1. Public Key Hash (bitcoin address) 2. Digital Signature An owner of a P2PKH address can only unlock the PubKey Script and spend sent funds, by providing a public key hash and a private key signature. In a typical scenario, Bob will give a bitcoin address to Alice and Alice will send bitcoin to Bob. The output of Alice’s transaction will create a PubkeyScript. Alice’s job is done and the transaction is broadcasted onto the bitcoin network and bitcoin appears in Bob’s wallet. For Bob to spend his newly received bitcoin, he must prove that he is the owner of the bitcoin address that Alice attached the BTC to. Bob does this by building a scriptSig with his signature and his public key. The scriptPubKey places conditions on the transfer of
Background Bitcoin Cash is a cryptocurrency hard forked from Bitcoin on 1st August 2017, with the aim to speed up transaction time and cost. Towards the end of 2017, Bitcoin transactions reached an all-time high and its 1MB block size were a concern for many users. Unconfirmed transactions started to pile up and increased the transaction time up to a few days. Users had to pay a higher transaction fee to gain priority. Two solutions were brought up to solve this problem: Hard fork (increasing block size) and Soft fork (SegWit). Due to disagreement between the two solutions, part of the community decided to hard fork the network. The hard fork split the network into a new blockchain, i.e. Bitcoin Cash. What is a hard fork A hard fork occurs when a new set of consensus rules are introduced to the network. It requires network participants to update to the latest version to continue to verify and validate new blocks on the new blockchain. Also, new blocks will no longer be compatible with the old chain. When there is disagreement between community stakeholders on the underlying protocol (i.e. some refuse to follow the new consensus rules) a chain split will occur. Both chains will have identical transaction history prior to the fork but transactions on the chain will be separated independently after the fork. Initial Features (Aug 1, 2017) – Block size: 8MB – Average block time: 10mins. – Consensus algorithm: Proof-of-work – Supply limit: 21,000,000 BTC – Cryptographic Algorithm: SHA-256 Latest fork On 15th November 2018, a hard fork on the BCH network caused a chain split into BCHABC (Bitcoin Cash ABC) and BCHSV (Bitcoin Cash Satoshi Vision). The below table shows a summary of both chains: Written by Peter Chan Trader @Genesis Block For any
When Satoshi Nakamoto introduced Bitcoin in 2008, they envisioned a world where Bitcoin would be used as a new form of digital money. However most people today consider Bitcoin as a digital store of value rather than a currency. As Bitcoin grew in popularity, its low transaction throughput and high transaction cost became more apparent and impractical for everyday small payments. The Lightning Network proposed by Joseph Poon and Thaddeus Dryja in 2015 aims to provide the solution to these problems. What is Lightning Network The Lightning Network is a second layer payment network built on top of the Bitcoin blockchain that enables instant payments between connected users at extremely low fees. How does it work In the below example we will illustrate how Adam can purchase a cup of coffee using bitcoin (BTC) via the Lightning Network. Adam first opens a payment channel with the coffee shop by depositing BTC into a multi-signature wallet. A multi-signature wallet requires more than one user to authorize a transaction, in this case between Adam and the coffee shop owner. This transaction is publicly recorded on the blockchain for each party to see. To pay for a coffee, Adam subtracts the cost from his balance and adds it to the coffee shop’s balance. Both parties then sign a signature on the updated balance sheet with their private keys to confirm the balance. This transaction simply updates the state of the balance sheet and will not be recorded on the blockchain. This can happen an unlimited number of times as long as there is sufficient balance. When either person wants to close the channel, they can broadcast the latest balance sheet (signed by both parties’ private keys) to the blockchain. Other network nodes will then validate the signature on the balance sheet and the funds will be
In Hong Kong, there are a number of ways by which one can buy and sell crypto-assets; through an online exchange like (www.gatecoin.com), ATM’s (click here for list), person-to-person trading via www.localbitcoins.com, and over-the-counter (OTC) at Genesis Block. OTC is essentially trading crypto-assets offline, away from the public eye, via a private messaging channel between two counterparties. There is a minimum trade amount, for example US$25,000, this will vary for each OTC operator. This is beneficial for investors in Asia for a number of reasons. KYC OTC operators, as with other types of exchanges, must conduct know-your-customer (KYC) procedures, and conform to anti-money laundering guidelines for new accounts. This means collecting data and documents from the applicant, including a valid proof of ID and valid proof of address. This has two main benefits. Firstly, it assures the public that the OTC is running legitimately and in a proper manner. It also plays a role in protecting the OTC from investigation by governments and financial authorities seeking to detect and prohibit fraudulent transactions. Christine Lagarde, Managing Director of the International Monetary Fund wrote in her blog in April, “before crypto-assets can transform financial activity in a meaningful and lasting way, they must earn the confidence and support of consumers and authorities.” Price One of the biggest appeals of OTC is the price competitiveness that can be offered when compared with using an ATM or online exchange. ATM’s are great to acquire crypto instantly without KYC, but the higher fees means it will be costly for large orders. Online exchanges are public and offer a whole range of ‘alt’ coins to trade within the platform’s orderbook. On the flipside, often there is not enough depth in the orderbook to fulfil large orders without causing an upward spike in price for a buy order, or a downward
Inside the box should contain the following: 1x Trezor device 1x Micro USB cable 2x Recovery seed card 1x Lanyard 4x Stickers 1x User Manual Setting up your Trezor Start by connecting your Trezor via USB to your PC, and then in a web browser visit trezor.io/start to begin your set up. 2. Click on the left model if you have purchased a Trezor One. (This guide is for Trezor One, the Trezor Model T set up process may be slightly different.) 3. Click ‘Create new’ to create a new wallet. 4. Then click ‘Continue to the wallet’. 5. Click ‘Create a backup in 3 minutes’. 6. Tick ‘I understand and I agree’ and press ‘Continue’ to proceed. 7. Now with your recovery seed card, write down the 24 words shown on your Trezor device. Triple check there are no words misspelt. This is a very important step if you ever have to recover your funds. After you have done that, store away your recovery seed card in a secure place. 8. Then click ‘Continue’ to proceed. 9. Click ‘Continue’ again to set a name for your Trezor. 10. Give your Trezor a name and then click ‘Confirm to continue’. 11. Your device will prompt you to confirm your name. Click ‘Confirm’ and ‘Continue’ on your PC to proceed to the next step. 12. On your Trezor again, click ‘Confirm’ to set a PIN number. 13. Create a PIN number up to nine digits. You will need to enter your PIN every time you access your Trezor wallet. This is highly recommended to do to ensure only you have access to your funds. 14. Once you have set a strong PIN, click ‘Continue’. 15. Click ‘Finish’ to complete the set-up process.
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
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