Centralized Power: Prone To Hacks:: Issues With The Current Banking System
Centralized Power: Prone To Hacks:: Issues With The Current Banking System
➢ Centralized power: With bitcoin this centralized power system that the banks have got decentralized and distributed among
everyone who was part of the bitcoin system.
➢ Prone to Hacks: Unlike banks, Blockchain system is completely immutable to hacks. Any transaction that takes place can not
be modified ahead, and even if someone tries to modify it, the Blockchain system is built so securely that this false
transaction detail gets rejected.
➢ Double Spending: In Blockchain system, double spending is not at all possible and it is basically because of how the
Blockchain system was structured and created.
➢ Transaction Fees: The transaction fee is 0 or very minimal in comparison with third parties such as banks and digital transfer
systems.
➢ Private Ledger: Most banking and financial organisation follow a private ledger. However, with Blockchain system the ledger
is public. Everyone who becomes a part of the Blockchain network gets a complete copy of the entire Blockchain as soon as
they sign up. That is a huge amount of transaction, but Blockchain makes it very easy as well as completely secure to store all
this transaction detail and at the same times makes sure that none of this gets manipulated.
Although it is a public ledger and a person connected to the network can have the complete details with respect to the
transaction, they still cannot know who exactly is doing this transaction and this is the anonymity that Blockchain gives a
person.
3. What is Blockchain?
Blockchain is the core technology behind Bitcoin. Blockchain is a public distributed database which holds the encrypted ledger. It is
encrypted to keep the details of the people involved in it completely anonymous.
A block is a collection of all the recent transactions that have happened and are verified. Group all those transaction details, create a
hash code for this and then it stored in a block. Every block in this online ledger consists of a hash pointer which acts as a link to the
block which is prior to it, transaction data and in fact a stamp of time. Each block has a unique hash pointer.
Once the transaction is verified then this block becomes a permanent part of the Blockchain, and the chain keeps growing.
Blockchain keeps count of the unspent transaction output whereas systems like GoEthereum follows an account-based system where
an account balance in also stored.
Block identifies are the means to identify a block in a blockchain. The block can be identified by the block header hash and the block
height.
Blockchain is a concept and can be implemented by any language. Solidity is the most preferred default for writing programs in
Blockchain.
4. Blockchain Ecosystem:
6. What is Bitcoin?
Bitcoin is the first decentralized digital currency which was introduced in July 2019 by Satoshi Nakamoto. He bought in the concept of
Bitcoin and Blockchain together in an open paper.
Bitcoins use various cryptographical and mathematical problems that ensures that the creation and management of Bitcoins is
restricted. There are only 21 million Bitcoins that can be created.
The Bitcoin community keeps on upgrading the algorithms as well as cryptographic technologies involved in Bitcoin on a regular
basis. This ensures that even when they are more miners that come into the Bitcoin technology every day that the Bitcoin system does
not get exhausted. With the increase in complexity, it ensures that only by 2140 does the last Bitcoin get mined.
The ledger system which keeps a track of how much Bitcoin gets transacted is completely electronic and highly secure.
Transactions in a Blockchain ledger are irreversible. Bitcoins once sent to a party cannot be recovered. Bitcoins were created after the
2008 financial crisis with a vision to remove dependencies on third parties to facilitate the transaction
7. Key concepts in a Blockchain:
The first is the previous block’s hash code. Every block has a specific hash code associated with it which is used as an identifying
factor for that block.
This hash gets created with very complex hash algorithms where even a minute change with respect to the input can create a highly
different hash output as a whole. The hash code cannot be reverse engineered.
The algorithm is created in such a way that no one can get the complete data by reverse engineering the hash code. The value or
proof of work for that block. This is the mathematical solution that is attached with the block to ensure that the block is a valid block.
8. Role of a miner :
The role of a miner is to build the Blockchain of records that forms the Bitcoin ledger. These ledgers are called blocks, and each block
contains all the different transactions that have taken place. A new block is added in every 10 minutes as a new Bitcoin Transaction
takes place.
So, as the miners process these different transactions, they build the block, and when a block is confirmed, it gets added to the
Blockchain. The Bitcoin Blockchain provides a permanent record of all Bitcoin transactions to the beginning.
The miners who validate the transaction as well as complete the next block of the Blockchain get a 12.5 Bitcoin as an incentive for the
creation of a new block.
1. Private Key Cryptography: Blockchain uses Private Key Cryptography to secure identities and hash functions to make the
blockchain immutable.
Private Key Cryptography involves two different keys – Private and Public. One key is purposely kept private, the other is
provided to the other party (or often the public). If the private key is used to encrypt then the public key can decrypt and
vice-versa. This is known as Asymmetric Encryption.
2. P2P Network: Pure to Pure network machines on the network help in maintaining the consistency of the distributed ledger.
Node A broadcasts a message for a transaction that needs to take place to both B and C who verify it and transmit it to their
peers as well. Now once they have transmitted to their peers, they keep transmitting it across the network and this
transaction gets propagated throughout the network. So now a new block is about to be created the transaction gets
verified and validated and then gets added to the new block thereby keeping a complete consistency.
3. Blockchain Program: The program gives the Blockchain its protocol based on the requirement.
➢ Public: Public blockchains have ledgers visible to everyone on the internet and anyone can verify and add a block of
transactions to the block chain.
➢ Private: Private blockchains allow only specific people in the organization to verify and add transaction blocks but everyone
on the internet is generally allowed to view.
➢ Consortium: Here, only a group of organizations (such as banks) can verify and add transactions, but the ledger can open or
restricted to select groups.
13. Blockchain Use Cases:
➢ Traditional Applications: A web service has two parts, first is the client and then the client connects to the web server. This
web server is very centralized and is owned by a certain company that is hosting all the web services. So, any time a client
wants to access any of the web services offered by the company, they must send a request to their server in which the
response they will give you the requested service.
The centralized server contains two major things – API and the Data. When these two things are being owned by big major
companies, they have the right to do anything with the client’s data.
The main problem here it is a central point of functionality so if a hacker wants to penetrate through their system, they must
concentrate on only one point and that is the main server. So, if that is hacked then all the client’s data and APIs and their
endpoints are compromised.
➢ Decentralized Applications:
DApps is a set of smart contracts that operate on the data stored in those contracts. DApp is a program which is run by
many people which either use or create a decentralized network for some specific purpose. An application qualifies as a
DApp only if it is:
• It is Open-sourced.
• It is Decentralized.
• It has an inbuilt Consensus Mechanism.
• It has Tokens fuelling for itself.
The decentralized applications aimed at dealing with all the shortcomings of the centralized applications. Firstly, a user
invokes a smart contract.
The competition resources that are being required, they are paid in gas, which is the unit that is used in Ethereum network. A
small amount of fee is also being paid which is the transactional fee which is collected by the miners who are validating
these blocks. This transaction fee can vary from one or two ether or even smaller denominations.
Every miner who validates the block also gets paid by the network in terms of ether. The user’s Ethereum wallet is used to
generate funds and invoke different contracts. After all this invocation has been done and all the state changes have been
made and the miner validates the block then all this information is sent to the network, the network then updates the user’s
wallet with the new and updated funds that they have.
15. Smart contract: It is written in Solidity. Smart contracts were first proposed in the early 1990s by Nick Szabo, who coined the term.
Smart contracts are executable logic that runs on a Blockchain. The smart contract will contain all the rules abiding for the service that
is being provided and it also contains state information which contains data for the smart contract. Smart Contract is a computerized
protocol wherein a standard contract rule is written by the user which is immutable.
Smart contracts can also be written in Viper, Ivy-Lang, Rust, LLL, Serpent etc.
➢ Autonomy: The user is the only one making the agreement; there is no need for a broker or a lawyer.
➢ Trust: The user’s documents are encrypted on a shared ledger.
➢ Backup: On the Blockchain, the user’s documents are duplicated many times over and kept safe.
➢ Accuracy: Smart Contracts are not only faster and cheaper but also avoid the errors that arise from tedious manual work.
➢ Blockverify: Counterfeit products lead to billions of dollars of losses every year. Blockverify is a project that seeks to harness
the blockchain to fight the counterfeit industry. Blockverify is confident that they can monitor the entire supply chain with
complete ease.
To achieve this, they are using a private blockchain which highly scalable, transparent and tamper proof. Every product is
given a unique identification number that is then stored on the blockchain.
Blockverify can help in identifying counterfeits, non-duplicatable, and company verifiable goods and products. It also offers
a global solution to this method. Blockverify can verify the following:
• Counterfeit goods
• Diverted Products
• Stolen Merchandise
• Fraudulent Transactions
➢ Ripple: RippleNet is a network of institutional payment-providers such as banks and money services businesses that use
solutions developed by Ripple to provide a frictionless experience to send money globally.
Ripple makes transactions very much accessible, fast, extremely reliable because it runs on the blockchain and has a very low
cost. Normal digital transactions do not provide the users with any of these facilities.
➢ Storj: Storj is an open source, decentralized file storage solution. It uses encryption, file sharding, and a Blockchain-based
hash table to store files on peer-to-peer network. The goal is to make cloud storage faster, cheaper, and private.
The traditional cloud storage solutions like Dropbox and Google Drive have limitations. While files are backed up
redundantly, bandwidth from a data centre can restrict access to your files, there is also issue with privacy and these
companies have control over all the user’s files including the ability to access them.
End-to-end encryption is provided, sharding adds one layer of privacy as no one knows which data to host and can read the
whole file from, but even being able to read a shard of a file is problematic, it could still contain some sensitive information.
File Sharding means the file is broken is broken up into millions of pieces and distributed on the network.
Storj completes a file verification audit every hour to get paid farmers or the people who are validating on the network have
to prove that they have the shards they’ve been sent. Storj sends a request to the farmers and as the farmer has changed or
deleted the encrypted chart, they would not be able to answer the request.
➢ Augur: It is a decentralized prediction market which can forecast the outcome of an event based on the wisdom of the crowd
principle. It is a prediction market protocol owned and operated by the people who use it.
In this method, information collected from the crowd is averaged into the most realistic possibility and therefore the most
probable outcome. Correct predictions are rewarded by the network while the incorrect ones are reported and penalised. So,
this incentivizes the truthful reporting of events. So, Augur revolutionised prediction market and in doing so changing the
way people receive and verify the truth.
The main objective is to make predictions using large groups of people instead of a small group of experts doing it. Auger is
the first major decentralized application made using Ethereum and represents a major proof of concept for this underlying
technology.
Decentralization ensures that auger cannot be censored by government that the prediction markets as gambling while
ensuring the sustainability of the application. This decentralized nature ensures honesty in reporting and outcome of events
using crowd wisdom to cancel out individual frauds.
Auger has been used in:
• Weather Prediction
• Political Forecasting
• Company Forecasting
• Event Hedging
➢ Ethlance: It allows the users to create an employer or employee profile and list and apply for open positions and provide
feedback for employers and employees and send and receive invoices. Ethlance works on Ethereum so it was 0% service
charge, is decentralized and there is no restriction and has free membership.
18. Need for Blockchains Wallets:
➢ Solves all the issues in remembering all the various blockchain accounts and balances.
➢ Allows instant transactions.
➢ Records the history of all the blockchain transactions.
A wallet is basically the blockchain equivalent of a bank account. It allows the user to receive Bitcoins or other cryptocurrencies, store
them and then send them to others. Features of Blockchain Wallets:
➢ High Security
➢ Instantaneous Transactions.
➢ Currency Conversion
➢ User Accessibility
• Mobile Wallet: The Private Keys are stored on the user’s phone and it is linked to a web-based server. On the web-
based server based on the application, there would be a copy of the Private Key or it could just be stored on the
user’s phone whereas the transaction details would be propagated on the cloud service.
• Desktop Wallet: They are an extension to the user’s cloud-based wallet. It is a cold wallet rather than a hot wallet
because all the details with respect to the user’s Private Key and transactions, everything is stored on the wallet and
not directly accessible to a third-party professional. All the details are present on the application and it is only the
hash value that is going to get propagated through a cloud-based server or on the Blockchain server.
• Physical Wallet: Physical wallets can present with the user in the form of a Bitcoin card, or it can also be a paper
wallet, where the user’s Bitcoins are stored on a piece of paper. Physical wallets are used to store Bitcoins for future
purposes as well.
➢ Based on Clients:
• Bitcoin Clients
• Hardware Wallets
➢ Bitcoin Core:
• Bitcoin core is a full Bitcoin client and builds the backbone of the network.
• It offers high security, privacy, and stability.
• It has fewer features, and it takes a lot of space and memory.
➢ TREZOR:
• Most popular Hardware Bitcoin Wallet.
• It offers high security, privacy, and stability.
• It includes a display and hardware keys which offers extra protection and verification.
• It can make secure payments without exposing the private keys to a potentially compromised computer.
• They are not that useful when an immediate transaction is required
➢ Blockchain:
• Blockchain Info is the most popular Blockchain online wallet.
• It currently supports Bitcoin and Ethereum and allows the conversion of both.
• One of the cheapest in transaction fee.
➢ Electrum:
• Electrum’s focus is speed and simplicity, with low resource usage.
• It uses remote servers that handle the most complicated parts of the Bitcoin system.
• It allows you to recover your wallet from a secret phrase.
• Electrum has slightly higher transaction fee as compared to the other wallets.
➢ Mycelium:
• Mycelium is the most popular mobile wallet available for Android and iOS.
• Complete control over the user’s Private Keys, they never leave the user’s device unless they are exported.
• Watch-only addresses and Private Key import for secure cold-storage integration.
➢ Contract Accounts:
• Autonomous accounts.
• Controlled by code.
25. Solidity:
Solidity is a contract-oriented, high-level language for implementing smart contracts on the Ethereum Virtual Machine. Solidity syntax
is very much like that of JavaScript. Solidity compiler takes a high-level code and breaks it down into byte code.
It was developed because using the mainstream languages on a public Blockchain would not add value because firstly there are
security requirements, anything that gets recorded on the blockchain gets immutable, so there is absolutely no window for bug fixes
and secondly it costs money for executing each instruction on the program.
If any of the languages like C language is used to write a smart contract, then a very expensive contract would be made for no reason.
26. Ethereum Virtual Machine:
EVM is a Turing complete software that runs on the Ethereum Network. It enables anyone to run a program regardless of the
programming language and even non-specialised programmers can create a program on the EVM. Contracts are written in a smart
contract-specific programming language are complied into bytecode, which an EVM can read and execute.
On the Hyperledger network, only parties directly affiliated with the deal are updated on the ledger and notified. This maintaining the
privacy and confidentiality that a Blockchain would not be able to due to its private nature.
The peers in Hyperledger can be separated into two different runtimes and three distinct roles named Endorsers, Committers which
are executed on the same runtime, and Consenters which are run on a completely different run-time. This allows a high degree of
personalization to the network according to the needs of the business.
Hyperledger Projects:
• SAWTOOTH
• FABRIC
• IROHA
• INDY
➢ Proof of Work (PoW): This consensus algorithm is used to select a miner for the next block generation. Bitcoin uses this PoW
consensus algorithm. The central idea behind this algorithm is to solve a complex mathematical puzzle and easily give out a
solution. This mathematical puzzle requires a lot of computational power and thus, the node who solves the puzzle as soon
as possible gets to mine the next block.
➢ Practical Byzantine Fault Tolerance (PBFT): is a consensus algorithm introduced in the late 90s by Barbara Liskov and Miguel
Castro. Byzantine Fault Tolerance(BFT) is the feature of a distributed network to reach consensus(agreement on the same
value) even when some of the nodes in the network fail to respond or respond with incorrect information.
The objective of a BFT mechanism is to safeguard against the system failures by employing collective decision making(both
– correct and faulty nodes) which aims to reduce to influence of the faulty nodes. BFT is derived from Byzantine Generals’
Problem.
➢ Proof of Burn (PoB): This algorithm is implementing to avoid the possibility of any cryptocurrency coin double-spending.
Proof of burn follows the principle of “burning” the coins held by the miners that grant them mining rights.
➢ Proof of Capacity (PoC): In the Proof of Capacity consensus, validators are supposed to invest their hard drive space instead
of investing in expensive hardware or burning coins. The more hard drive space validators have, the better are their chances
of getting selected for mining the next block and earning the block reward.
➢ Proof of Elapsed Time (PoET): PoET is one of the fairest consensus algorithms which chooses the next block using fair means
only. It is widely used in permissioned Blockchain networks. In this algorithm, every validator on the network gets a fair
chance to create their own block. All the nodes do so by waiting for random amount of time, adding a proof of their wait in
the block. The created blocks are broadcasted to the network for others consideration. The winner is the validator which has
least timer value in the proof part. The block from the winning validator node gets appended to the Blockchain. There are
additional checks in the algorithm to stop nodes from always winning the election, stop nodes from generating a lowest
timer value.
➢ Proof of Stake (PoS): This is the most common alternative to PoW. Ethereum has shifted from PoW to PoS consensus. In this
type of consensus algorithm, instead of investing in expensive hardware to solve a complex puzzle, validators invest in the
coins of the system by locking up some of their coins as stake. After that, all the validators will start validating the blocks.
Validators will validate blocks by placing a bet on it if they discover a block which they think can be added to the chain.
Based on the actual blocks added in the Blockchain, all the validators get a reward proportionate to their bets and their stake
increase accordingly.
In the end, a validator is chosen to generate a new block based on their economic stake in the network. Thus, PoS
encourages validators through an incentive mechanism to reach to an agreement.
Interview Questions
1) What type of records can be kept in a Blockchain? Is there any restriction on the same?
There is no restriction on keeping records of any type in the Blockchain approach. Industries are using blockchain for securing all
types of records.
• Records of Medical Transactions
• Identity Management
• Transaction Processing
• Business Transactions
• Management Activities
• Documentation
2) What are Merkle Trees? How important are Merkle trees in Blockchain?
Merkle tree is also known as hash tree which is a data structure in cryptography in which each leaf node is a hash of block of data and
each non-leaf node is a hash of its child nodes.
The benefit of using the Merkle tree in the Blockchain is that instead of downloading every transaction and every block, a light client
can only download the chain of block headers.
3) Name the type of Network systems that are extensively being used in various applications.
• Centralized Network: In a centralized system, all users are connected to a central network owner or “server”. The central owner
stores data, which other users can access, and user information. This user information may include user profiles, user-generated
content, and more.
Pros:
▪ Simple deployment
▪ Can be developed quickly
▪ Affordable to maintain
▪ Practical when data needs to be controlled centrally
Cons:
▪ Prone to failures
▪ Higher security and privacy risks for users
▪ Longer access times to data for users who are far from the server
• Decentralized Network: Decentralized systems do not have one central owner. Instead, they use multiple central owners, each of
which usually stores a copy of the resources users can access. A decentralized system can be just as vulnerable to crashes as a
centralized one. However, it is by design more tolerant to faults. That is because when one or more central owners or servers fail,
the others can continue to provide data access to users.
Pros:
▪ Less likely to fail than a centralized system
▪ Better performance
▪ Allows for a more diverse and more flexible system
Cons:
▪ Security and privacy risks to users
▪ Higher maintenance costs
▪ Inconsistent performance when not properly optimized
• Distributed Network: A distributed system is like a decentralized one in that it does not have a single central owner. But going a
step further, it eliminates centralization. In a distributed system, users have equal access to data, though user privileges can be
enabled when needed. The best example of a vast, distributed system is the internet itself. The distributed system enables users
to share ownership of the data.
Pros:
▪ Fault-tolerant
▪ Transparent and secure
▪ Promotes resource sharing
▪ Extremely scalable
Cons:
▪ More difficult to deploy
▪ Higher maintenance costs
4) What is mining?
Mining is the process of adding transaction records to Bitcoin’s public ledger of past transactions. Miners are special nodes which
hold the copy of the ledger and verifies the transactions happening in the network.
Using state of the art cryptographic algorithm, miners validate the transactions across the network.
• Hard fork: A hard fork is a rule change such that the software enforcing the old rules will see the blocks adhering to the new
rules as invalid.
• Soft fork: A soft fork is a change of rules that creates blocks recognized as valid by the old software, i.e., it is backwards-
compatible. As soft fork can also split the blockchain when non-upgraded software creates blocks not considered valid by
the new rules.
7) What is Secret sharing in Blockchain? Does it have any benefit in Blockchain technology?
It is an approach that divides secret or personal information into different units and sends them to the users on the network.
The original information can only be combined when a participant to whom a share of secret is allocated agree to combine them
together with others.
• The Lightening Network: Proposed solutions to Bitcoin’s scalability. This is possible since Lightning Network doesn't require
every individual transaction to be recorded on the blockchain.
• Segwit: Segwit (exclusive to Bitcoins) would mean that all the signature data of each and every transaction will move from
the main chain to the side chain.
• Block Size Increase: With increasing transactions (particularly in Bitcoins & Ethereum), the possible solution is to increase the
block size to accommodate more transactions.
• Sharding: Means separating the blockchain data in several sets and storing only one of these sets. In Monero's example, if
there were a set for blocks with an even block height and a set for odd block height your Monero daemon could store the
data for blocks with an even block height only.