BCT - UNIT-3
BCT - UNIT-3
BCT - UNIT-3
Bitcoin - blockchain
Bitcoin is a protocol which implements a highly available, public, permanent,
and decentralized ledger.
In order to add to the ledger, a user must prove they control an entry in the
ledger.
The protocol specifies that the entry indicates an amount of a token.
The user can update the ledger, assigning some of their bitcoin to another entry
in the ledger.
Bitcoin Transactions
A Bitcoin Transaction happens when you send or receive a bitcoin. To send a
coin, you enter the receiver's address in your wallet application, enter your
private key, and agree to the transaction fee. Then, press whichever button
corresponds to "send."
The receiver must wait for the transaction to be verified by the mining network,
which can take up to 30 minutes because transactions wait in a mining queue
called the mempool.
These transfers are confirmed directly between users and are located on a shared
public ledger, Bitcoin eliminates the need for central facilitators, like
governments and banks, to verify currency transactions.
Bitcoin Mining
Mining is the process of validating transactions and creating a new block on the
blockchain.
Mining is conducted by software applications that run on computers or
machines designed specifically for mining called Application Specific
Integrated Circuits.
The hash is the focus of the mining programs and machines. They are working
to generate a number that matches the block hash. The programs randomly
generate a hash and try to match the block hash.
Bitcoin has come a long way in the eight or so years it's been in existence, but
there's still a long way to go before the digital currency becomes a widely used
method of paying for goods and services.
1. Volatility
2. Ease of Use
3. Widespread Acceptance
4. Potential for Theft
5. Reputation for Criminal Activity
6. Tax Issues
7. Scalability
1. Volatility
This environment has made bitcoin extremely popular among speculators who
buy bitcoin hoping the price will continue to rise, but it isn't helping to fuel
bitcoin's popularity as a currency.
2. Ease of Use
User-friendly enough to encourage mainstream adoption. Currently, if the
average person wants to buy bitcoin, he or she needs to open an account at a
bitcoin exchange such as Coinbase, link a checking account (or credit card,
which generally comes with a higher fee), and in many cases wait several days
for the transaction to clear.
3. Widespread Acceptance
There are many retailers, particularly online, through which consumers can pay
for transactions in bitcoin, but the digital currency still isn't anywhere close to
being widely accepted.
6. Tax Issues
If you buy bitcoin and then sell it for more than you paid, you'll need to report
the difference on your taxes.Keep detailed records of every bitcoin purchase and
transaction, risk getting into trouble with the use of bitcoin at all.
7. Scalability
The underlying technology behind bitcoin, the blockchain, limits the amount of
information that can be contained in each block to 1 megabyte of data. This
limitation allows for a maximum network capacity of about three transactions
per second.
Solutions in Bitcoin
Bitcoin is the first type of decentralized digital currency that has ever been
developed.
It is a type of currency that does not have any central bank or administrative
system that regulates it. Therefore all transactions completed with Bitcoin are
not monitored or verified by any entities.
The computers are all run by the same software and follow the same set of
protocols.
A technology known as blockchain serves as the public record of every
transaction that occurs via Bitcoin.
Bitcoin has emerged as a common currency that many businesses and
individuals now use, there have been efforts to develop software that will make
it easier to access and use.
Therefore, many organizations and individuals have begun to get software
developed so that they can take advantage of the many benefits that are offered.
1. Enabling of Transactions
2. Internet of Money
3. Improved Payment Processing
4. Safe and Easy Storage
5. Easy to Create Backup
6. Reduces Errors
Proof Of Work
Proof of work is also a much slower validation method than other mechanisms.
For example, more transactions are taking place than the Bitcoin network can
handle.
Features of PoW
There are mainly two features that have contributed to the wide popularity of
this consensus protocol and they are:
It is hard to find a solution to a mathematical problem.
It is easy to verify the correctness of that solution.
Purpose of PoW
Time-consuming: Miners have to check over many nonce values to find the
right solution to the puzzle that must be solved to mine the block, which is a
time-consuming process.
Proof Of Stake
1. ETHEREUM (ETH)
2. BINANCE COIN (BNB)
3. CARDANO (ADA)
4. SOLANA (SOL)
5. POLYGON (MATIC)
6. AVALANCHE (AVAX)
7. UNISWAP (UNI)
8. LITECOIN (LTC)
9. CHAINLINK (LINK)
10. DECENTRALAND (MANA)
1. ETHEREUM (ETH)
Ethereum is a decentralized blockchain platform that works on a peer-to-peer
network that securely executes and verifies application code, called smart
contracts. In fact, Ethereum was the first smart contract platform in the crypto
world, and is heralded as the ‘second generation’ of cryptos.
2. BINANCE COIN (BNB)
Binance coin is a crypto issued by the Binance exchange and trades with the
BNB symbol, cerated by Changing Zhao, more commonly known as CZ.
Initially based on the Ethereum network, it has now shifted to its own
blockchain known as Binance Smart Chain.
3. CARDANO (ADA)
Cardano is a publicly accessible, open-source and decentralised blockchain
platform with a proof-of-stake consensus mechanism under the hood. It can
facilitate peer-to-peer transactions with its internal crypto token – ADA.
4. SOLANA (SOL)
It was one of the few blockchain platforms in the market that was able to deliver
extremely high transaction speeds with no loss of decentralisation at its core. It
is able to do so thanks to a bundle of new technologies including a consensus
mechanism known as proof-of-history.
5. POLYGON (MATIC)
Polygon, which was earlier known as the MATIC Network – is an Ethereum
token that powers the Polygon network – a scaling solution for Ethereum.
Polygon was started with the aim of providing faster and cheaper transactions
on the Ethereum blockchain network .
6. AVALANCHE (AVAX)
Avalanche is a blockchain network that describes itself as an open,
programmable smart contracts platform for decentralised applications. AVAX is
used to pay transaction fees and can be staked to secure the network.
7. UNISWAP (UNI)
Uniswap is a crypto exchange which uses a decentralised network protocol.
Uniswap is the name of the company that initially built the network. The
protocol is responsible for automated transactions between crypto exchanges on
the Ethereum blockchain through the use of smart contracts.
8. LITECOIN (LTC)
It was initially designed to address developer’s concerns that Bitcoin was
becoming too centrally controlled and hence it prevented other large-scale
mining firms to gain the upper hand in the mining process.
9. CHAINLINK (LINK)
Chainlink is essentially a crypto that aims to incentivise a global network of
computers to provide reliable, real-world data to smart contracts running on top
of blockchains.
10. DECENTRALAND (MANA)
Decentraland is one of the most popular metaverse tokens in the crypto space. It
is a 3D, virtual world, browser-based platform. Users can choose to buy virtual
plots of land on the platform.
A stack is a very simple data structure that can be visualized as a stack of cards.
A stack allows two operations: push and pop.
Operations on a stack can only act on the topmost item on the stack. A stack
data structure is also called a Last-In-First-Out, or "LIFO" .
The scripting language executes the script by processing each item from left to
right. Numbers (data constants) are pushed onto the stack. Operators push or
pop one or more parameters from the stack, act on them, and might push a result
onto the stack.
The world is changing and developers are not perfect. The first iteration of any
software always has some flaws or shortcomings that need to be adjusted after a
while. For those two reasons, it is important to have a mechanism for change
management. In the case of APIs of central services, you typically have an API
version and a deprecation schedule.
This means you need to have good hardware and invest a lot of time and
electricity to solve it.
People wouldn’t do that just for fun on the current scale. They do it, because of
the mining reward. This reward is given to every solved hash puzzle.
Bitcoin’s scripting language is simply called Script. All Bitcoin scripts are
written in Script. It is a simple language that is not Turing complete, meaning it
lacks several logical functions, including loops.
This is done to ensure that no Bitcoin script can consume inordinate computing
power and harm nodes on the network.
Script is used almost exclusively to lock and unlock bitcoin, not to build
applications or run programs.
Script’s simplicity also gives Bitcoin security and makes it easier for developers
to avoid losing money while designing wallets or applications on top of Bitcoin.
In other words, it will be verified if the signatures were correct and if they
matched the public key.
Ethereum Architecture
Benefits of building on Ethereum
Ethereum offers an extremely flexible platform on which to build decentralized
applications using the native Solidity scripting language and Ethereum Virtual
Machine.
2. Contract Accounts :
A contract account has an associated code that executes when it receives a
transaction from an EOA. A contract account cannot initiate transactions on its
own. Transactions must always originate from an EOA.
Advantages of Ethereum
1. Decentralization
2. Rapid deployment
3. Permissioned network
4. Network size
5. Private transactions
6. Scalability and performance
7. Finality
8.Interoperability and open source
Disadvantages of Ethereum
1. Uses a Complicated Programming Language
2. Issues with Scaling
3. Ethereum Investing Can Be Risky
This means they have a balance and can be the target of transactions. However
they're not controlled by a user, instead they are deployed to the network and
run as programmed.
User accounts can then interact with a smart contract by submitting transactions
that execute a function defined on the smart contract.
3. Financial services
Smart contracts help in transforming traditional financial services in multiple
ways. In the case of insurance claims, they perform error checking, routing, and
transfer payments to the user if everything is found appropriate.
Bitcoins: Bitcoin uses Script that has limited capabilities when processing
documents. The Scripts are specifically designed to process Bitcoin
transactions.
Turing completeness refers to the idea that given infinite time, any program in
one language could be written in another.
● Smart contracts are being used for all kinds of applications including
common transactions like payments, buying a car, or even licensing music
or software.
● You can use different programming languages like Solidity, Web Assembly
and Michelson to create a smart contract.
● Every network computer (or node) stores a copy of all existing smart
contracts, their current state, and transaction information.
● Smart contracts receive funds from users, and the nodes in the network
execute the smart contract code to reach a consensus on the outcome.
● Smart contracts run securely without a central authority, even when users
make complex financial transactions with unknown entities.
● A system has to be Turing complete in order to be useful in blockchain, but
it can have all the other desirable properties of a blockchain, such as
decentralization and trustless transactions.