Genesis Block
Home » Blog

Category: Blog

Crypto Classroom Lesson #11: What is a database?

  At its simplest, a database is defined as a systematic collection of data. Organisations use a database management system (DBMS) to access a database, store, retrieve and update data in a computer system.     Databases are used for a variety of reasons: – Hospitals – Patient records – Government – Tax records – Bank – Client balances – Police – Criminal records Why would you use a database? – Databases can store large amounts of data efficiently – Access can be granted and denied to specific users – It is easy to add, edit and delete data – It is more secure and efficient than manual paper recording So then what is a blockchain? The blockchain is a newer kind of database. It is decentralised which means no individual, company or government controls the records. All participants work together to come to a consensus on the state of the database. Blockchain has special properties that distinguish itself from centralized databases which are: – Disintermediation (eliminate trust) – Immutable – Fault-tolerant – Openness   Disintermediation The core offering of a blockchain is the ability for strangers to exchange value with each other in a trustless environment without a middleman. We have become accustomed to using trusted intermediaries for various purposes i.e. settling transactions, disputes, contracts and so on. Blockchain removes intermediaries because the technology ensures that peers in the network act with integrity that is achievable by combining a distributed network with public key cryptography. In a normal database, each person/organisation has their own version of the database containing records of what happened. If there are any discrepancies, time will be spent reconciling the problem.   Immutable A record confirmed by the blockchain is permanent and irreversible. The blockchain was designed with rules in place that permit data to

Crypto Classroom Lesson #10: Atomic Swaps

What are Atomic Swaps? Atomic Swaps are the peer-to-peer exchange of two different cryptocurrencies. They can be executed on off-chain channels or separate blockchains with different native coins. Currently, there are 10 cryptocurrencies that support atomic swaps including BTC, BCH, ETH, LTC, etc. Why Atomic Swaps? One might wonder why we should use Atomic Swaps when there are numerous exchanges providing crypto-to-crypto pairs. The main reason is to mitigate counter-party risk with respect to centralized exchanges. There have been many cases of funds lost due to fraud, mismanagement and cyber attacks. Notable examples include Mt. Gox, Coincheck and Zaif. Besides the crypto assets, user personal data is also at risk. Atomic Swaps provide a solution for users to exchange cryptocurrencies without having to trust a third-party.   How does it work? Suppose Alice has 10 BTC and Bob has 100 LTC, and they want to swap their coins. Alice can generate a smart contract, tx1, with hash function H(x), where x is a random number. Her 10 BTC is conditionally locked in the smart contract.           tx1:         [pay 10 BTC to Bob’s public key if                 i) x for H(x) is known and signed by Bob or                 ii) signed by both Alice and Bob.]   Since her BTC is locked in tx1 she needs to generate another smart contract, tx2, to retrieve her BTC if Bob defaults.           tx2:         [pay 10 BTC from tx1 to Alice’s public key, locked for 48 hours, signed by Alice]   tx1 and tx2 are also called Hashed Timelock Contracts (HTLCs).   Alice then sends tx2 to Bob. Once Bob has signed tx2,, Alice

Crypto Classroom Lesson #9: Stablecoin

Most cryptocurrencies are volatile as we often see a 10% move for the price of Bitcoin or Ethereum on any given day. To better facilitate practical transactions for good & services and store of USD value, several stablecoin projects were launched. A stablecoin is a cryptocurrency that is designed to minimize price volatility by being pegged to another asset such as the U.S. dollar or gold. However, most asset-backed stablecoins are considered to be centralized as the collateral (underlying asset) is controlled and managed by the issuer of the coin (centralized body). There are three main advantages of using stablecoins: 1. Stablecoins can be used in smart contracts; e.g. decentralized fundraising and decentralized financial products such as consumer loans. 2. Stablecoins act as a bridge for quicker and less costly international money transfers compared to fiat. 3. Various exchanges provide crypto to stablecoin pairs which allow traders to adjust their exposure. Stablecoins can be categorized into fiat-backed and crypto-backed. The main difference is while the collateralization of fiat-backed stablecoins happens off-chain, the collateralization of crypto-backed stablecoins is done on the blockchain via smart contract, hence more transparent and decentralized.   Fiat-backed stablecoins Tether (USDT) USDT is a stablecoin claiming that each token is backed by one US Dollar. It was initially issued on Bitcoin’s blockchain using the Omni Layer Protocol and later issued on the Ethereum blockchain (a Euro version of USDT, EURT was also issued) by Tether Limited. It is the most liquid stablecoin at the time of writing. USDT can be directly redeemed 1:1 with USD on the platform. However, there is a fee on fiat deposits and withdrawals. USDT has been the centre of controversy several times in the past. – During the 2017 Bitcoin rally, Tether was accused of manipulating Bitcoin prices by ‘printing’ USDT.

What is Sharding? – A Solution for Blockchain Scalability

TLDR: Bitcoin & Ethereum are slow networks. Sharding can divide the mining capacity into small shards, each capable of processing transactions in parallel. Sharding = Speed! Scalability of Blockchain The lack of scalability, only capable of processing a few transactions per second, is a major bottleneck for blockchain technology to garner mass adoption. With only 5 transactions per second (tps) for Bitcoin and 12 transactions per second for Ethereum, existing blockchain solutions are not competitive to centralized solutions like Visa as a payments system and AWS as cloud computing service. For example, with the growing popularity of CryptoKitties in 2017, it slowed down the Ethereum network significantly with just a few thousand users. This is certainly a concern for companies using Ethereum to power their services. Currently, every computer maintaining Bitcoin and Ethereum network are working on the same public ledger. Every node has to process every single transaction. Adding more computers into the network improves only security but not efficiency. A blockchain trilemma is formed as none of the mentioned blockchains can achieve scalability, security, and decentralization at the same time. Bitcoin and Ethereum are networks secured by Proof-of-Work. Hundreds of thousands of computers and specialized mining machines around the world are used to process transactions. As a P2P cash system / a world computer, Bitcoin and Ethereum are both secure and decentralized. However, they are not immediately scalable. To improve scalability, a lot of solutions have been suggested. For example, BitcoinCash (fork of Bitcoin) increased block size to allow more transactions to be processed in each block, while Lightning Network (second layer) utilized off-chain payment channels to reduce the burden on the main chain. Sharding is one of the most popular approaches being developed by different blockchain projects including Ethereum, Zilliqa, Quarkchain, etc.   What is Sharding? Sharding

Crypto Classroom Lesson #8: Stellar Lumens (XLM) -Part 2

In part 1, we explained quorum slices in the Stellar Consensus Protocol (SCP). In part 2, we will cover the federated voting process of SCP and recent developments of Stellar.   Federated Voting process Nodes within the SCP reaches consensus with the federated voting process. It consist of 3 steps: 1. Initial votin 2. Acceptance 3. Confirmation To simplify the process, let’s assume Bob needs to vote for either statement A or B. Bob starts at an uncommitted state and votes for A. When he sees a quorum vote for A then he can accept A and hold a second vote to confirm that the first vote has succeeded. In the case that Bob votes for B, he will be convinced and accept A if Bob’s v-blocking set of nodes has voted for A. A v-blocking set contains at least one node from each of Bob’s quorum slices. As a result A will be confirmed within Bob’s quorum.   Stellar developments IBM World Wire platform IBM Blockchain last week unveiled the World Wire platform which will help settle cross border payments in near real-time using the Stellar protocol. Financial institutions can transact with  any agreed stable coin, central bank digital currency or other digital asset as the bridge asset between any two fiat currencies. At the moment, while Stellar Lumens are used as the crypto bridge asset, IBM is also looking to test Stronghold USD, a stablecoin that is running on Stellar blockchain, as an additional bridge. Compared to Ripple’s xRapid (only uses XRP as bridge assets), the World Wire platform allows financial institution to use stable coin, central bank digital currency or other digital asset as bridge asset between any two fiat currencies.   Stellar Decentralized Exchange – StellarX Launched in July 2018, the StellarX allows users to trade

Beginner’s guide to Privacy Coins

Every bitcoin can be traced back and identified if there’s illegal activity. Therefore, some people use a Bitcoin mixer, for example, to make transactions untraceable and fungible. It can distort  the trail from the original source but it is not completely untraceable. Therefore, several cryptocurrencies that specialise on concealing transaction data have been introduced. The three major privacy coins (Monero, Dash & Zcash) will be discussed in this article.   Monero Monero (XMR) is the first altcoin to provide untraceable transactions. Monero’s privacy  is provided by CryptoNote protocol that implements a ring signature system. During each transaction, numerous  addresses will be included for mixing. An observer cannot tell which address is the real sender. It provides privacy  for everyone included in the ring signature. Also, the transaction amount is confidential. A Math Function is applied so that only the sender and the receiver can know the actual amount. The technology behind is called Ring CT. For each transaction, a one-time random address is generated. Therefore, transactions are unlinkable to your public address. The diagram illustrates how XMR transactions are obscured with more routes the transaction  goes through. After implementing ring signatures, all users referenced will have an equal possibility of being the actual sender.   Dash Dash (DASH) was launched in Jan 2014 as Xcoin and rebranded as Darkcoin. In Mar 2015, it rebranded again with the name Dash to avoid correlation to the dark market. The Masternode performs its private transaction through Privatesend. Privatesend can break down your transaction into specific denominations (0.01,0.1,1 and 10 DASH) and mix it with transactions from different people. After a few mixes, the coins will be indistinguishable from other coins on the network. However, the Privatesend function is optional. Other transactions are as transparent as those on Bitcoin’s blockchain. The anonymous transactions may

Crypto Classroom Lesson #7: Stellar Lumens (XLM) – Part 1

Stellar Lumens are the native asset of the Stellar Network. 100 billion lumens was created with the launch of Stellar network in 2014. Like  Ripple, Stellar Lumens is a mining-free crypto which allows near-instant and low-cost transactions. While Ripple was created specifically to appeal to banks, a huge market with a great deal of potential for profit. By contrast, Stellar’s creation was to extend the reach of financial services around the globe, helping the unbanked. Lumens are used in transactions. Each transaction has a 0.00001 lumens transaction fee to prevent spam attack. All accounts also have to hold a minimum balance of 20 lumens. Lumens’ supply is inflationary with a fixed inflation rate of 1% of Lumens each year. These new stellars will be generated on a weekly basis and distributed via a direct voting method. In this article we will focus on the Stellar Consensus Protocol. Stellar Consensus Protocol (SCP) The Stellar Consensus Protocol (SCP) is the underlying consensus algorithm of the Stellar Network that functions as a provably safe construction of Federated Byzantine Agreement System (FBAS) and making Stellar a decentralized and permissionless network at the same time. Federated Byzantine Agreement System (FBAS) The Federated Byzantine Agreement System is a pair of 1) set of nodes V and 2) quorum function Q specifying one or more quorum slices for each node. It allows nodes to reach a universal agreement without knowing the trustworthiness of all other nodes. Nodes in the SCP can pick quorum slices with other nodes that they think are important and trustworthy. The FBAS guarantees four key properties: Decentralized Control, Flexible Trust, Low Latency and Asymptotic Security. What is a Quorum and a Quorum Slice A Quorum is a set of nodes sufficient to reach agreement while a quorum slice is a subset of a

Crypto Classroom Lesson #6: Ripple (XRP)

What is Ripple Ripple is a real-time gross settlement system (RTGS), currency exchange and remittance network. It aims to enable fast cross-border payments with low transaction fees and all of the other benefits of digital currencies. Transactions on the system are verified by consensus among members of RippleNet and it is designed to handle transactions much faster than Bitcoin and Ethereum. Ripple’s global payment transfer system is called RippleNet, which aims to provide real-time messaging, clearing and settlement of transactions. Ripple plans to offer three products on RippleNet to suit different users: xCurrent, xRapid and xVia. xCurrent is currently used to enable real-time messaging and settlement between institutions. While xRapid (which uses XRP) aims to resolve the liquidity problem over international payments. Another product, xVia is currently under development to provide a more standard and simpler interface than the other two. What is XRP Many confuse Ripple with XRP. While XRP is an independent cryptocurrency issued by Ripple Labs (who owns Ripple), XRP is only used in one of Ripple’s products (xRapid). 100 billion XRP was created at the beginning and no more are allowed to be created. 20% were retained by the founders while 80% went to Ripple Labs to further develop XRP. As of today, Ripple still owns over 60 billion XRP. Ripple releases 1 billion XRP to themselves through a smart contract each month to promote and fund XRP operations. XRP can handle 1,500 transactions per second and settle payment in 3-4 seconds. This is because Ripple uses a cooperative consensus rather than an adversarial one such as proof-of-work. Transaction fees are adjusted based on transaction demand to ensure quick transaction speed. The minimum transaction fee required by the network for a standard transaction is 0.00001 XRP. Unlike Bitcoin, the transaction fee will not be rewarded to

Crypto Classroom Lesson #5: P2PKH

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