Blockchain Notes-Unit IV
Blockchain Notes-Unit IV
MCA-FY (SEM-II)
Unit IV Cryptocurrency
310916: Elective-I
Block Chain
MCA I YEAR – SEM(II)
(2022-23)
Department of MCA
MCA-FY (SEM-II)
Unit IV Cryptocurrency
A cryptocurrency is not a type of currency that can be used in the real world. It can
be used to perform transactions only in the digital world. So in order to buy/sell
using a cryptocurrency, it has to be converted from a digital form to some existing
currency that is used in the real world. For example, Dollars, Rupees, etc.
Cryptocurrencies don’t have a central issuing authority instead using a decentralized
system to record transactions and issue new units.
What is Cryptocurrency?
Cryptocurrency is a digital payment system that does not rely on banks to verify
transactions. Cryptocurrency payments exist purely as digital entries to an online
database. When cryptocurrency funds are transferred, the transactions are recorded
in a public ledger.
In cryptocurrency, “coins” (which are publicly agreed on records of ownership)
are generated or produced by “miners”.
These miners are people who run programs on ASIC (Application Specific
Integrated Circuit) devices made specifically to solve proof-of-work puzzles.
The work behind mining coins gives them value, while the scarcity of coins and
demand for them causes their value to fluctuate.
Cryptocurrencies can be used for buying goods just like fiat currency.
Cryptocurrencies use encryption to verify and protect transactions.
It does not exist in physical form and is not typically issued by any central
authority.
They use decentralized control in contrast to central bank digital currency.
Cryptocurrency Examples
MCA-FY (SEM-II)
Unit IV Cryptocurrency
4. Stablecoins: These are the class of cryptocurrencies whose values are designed
to stay stable relative to real-world assets like the U.S. Dollar.
5. Solana: Solana is a competitor of Ethereum whose main emphasis is on speed
and cost-effectiveness.
Let’s understand the difference between the working of a cryptocurrency and fiat
currency like the U.S. Dollar while purchasing goods.
There are two things that make cryptocurrency working and fiat currency working
different: Transactions and the Consensus protocol. A block in a Blockchain has the
following structure:
MCA-FY (SEM-II)
Unit IV Cryptocurrency
MCA-FY (SEM-II)
Unit IV Cryptocurrency
currency like U.S. Dollar, the Euro, or using Credit and Debit cards, but this varies
from platform to platform. An important factor to consider here is the fees that
include the potential deposit and withdrawal transaction fees plus the trading fees.
3. Placing an order: The order can be placed via exchanges or broker’s web or
mobile platform.
Select the Buy option.
Choose the order type.
Enter the amount of cryptocurrencies.
Confirm the order.
A similar process needs to be followed for selling cryptocurrencies.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Custodial Paper
Wallet Cold Wallet Hot Wallet Wallet
Simple and
convenient
Gives
method. Maximum
control over
Easy to Highest security at
crypto.
access. level of the lowest
Almost
No worry security. possible
always free.
about losing cost.
Easy to use.
your crypto
Advantage wallet.
The process
is slower
The security compared to Less user-
risk of leaving when friendly.
Risk of being
crypto in third- storing Risk of
hacked.
party’s crypto losing a
possession. online. wallet.
Cost of
Disadvantage device.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Travel: As crypto is not tied to a specific country, thus traveling with crypto can
save a lot on money exchange fees.
Advantages of Cryptocurrencies
Disadvantages of Cryptocurrencies
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Future scope
Features of cryptocurrencies:
MCA-FY (SEM-II)
Unit IV Cryptocurrency
MCA-FY (SEM-II)
Unit IV Cryptocurrency
ledger will try to verify the transactions with the various consensus algorithms or
voting. the voting or participation of all the nodes depends on the rules of that ledger. In
the case of bitcoin, the Proof of Work consensus mechanism is used for the
participation of each node.
5. Shared: The distributed ledger is not associated with any single entity. It is shared
among the nodes on the network where some nodes have a full copy of the ledger while
some nodes have only the necessary information that is required to make them
functional and efficient.
6. Smart Contracts: Distributed ledgers can be programmed to execute smart contracts,
which are self-executing contracts with the terms of the agreement between buyer and
seller being directly written into lines of code. This allows for transactions to be
automated, secure, and transparent.
7. Fault Tolerance: Distributed ledgers are highly fault-tolerant because of their
decentralized nature. If one node or participant fails, the data remains available on other
nodes.
8. Transparency: Distributed ledgers are transparent because every participant can see
the transactions that occur on the ledger. This transparency helps in creating trust
among the participants.
9. Efficiency: The distributed nature of ledgers makes them highly efficient. Transactions
can be processed and settled in a matter of seconds, making them much faster than
traditional methods.
10. Security: Distributed ledgers are highly secure because of their cryptographic nature.
Every transaction is recorded with a cryptographic signature that ensures that it cannot
be altered. This makes the technology highly secure and resistant to fraud.
Distributed ledger technology has the potential to effectively improve these traditional
methods of bookkeeping by updating and modifying fundamental methods of how data is
collected, shared, and managed in the ledger. To understand this, traditionally paper-based
and conventional electronic ledgers were used to manage data that had a centralized point
of control. This types of system require high computing resource and labor to maintain
ledgers and also had many points of failure. Points of failure like:
1. Mistakes made during data entry.
2. Manipulation of data could happen which increases the risk of errors.
3. Other participants contributing data to the central ledger will not able to verify the
legitimacy of data coming from other sources.
However, DLT allows real-time sharing of data with transparency which gives trust that
data in the ledger is up to date and legitimate. Also Distributed Ledger Technology
eliminates the single point of failure which prevents data in the ledger from being
manipulations and errors. In DLT, there is no need for a central authority to validate
transactions here different consensus mechanisms are used to validate transactions which
MCA-FY (SEM-II)
Unit IV Cryptocurrency
eventually makes this process very fast and real-time. Similarly, DLT can reduce the cost of
transactions because of this process.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Because of all these benefits of distributed ledger technology and this technology has the
potential to revolutionize many sectors like Financial, energy, healthcare, governance,
supply chain management, real estate, cloud computing, etc.
1. Banking: In the banking sector right now transfer of money can be both expensive and
time-consuming. Also sending money overseas becomes even more complex due to
exchange rates and other hidden fees included. Here DLT can provide a decentralized
secure network that will help to reduce the time, complexity, and costs required to
transfer money. This decentralized network will eliminate the need for third parties
which makes this system more complex and time-consuming.
2. Cyber Security: Nowadays cyber security has been emerging as a big threat to
governments, enterprises, and individual people also. So it is essential to find an
effective solution to secure our data and privacy against unauthorized access. In DLT,
all information is authorized and securely encrypted by various cryptographic
algorithms. This provides a transparent and secure environment and none of the data
can be tempered by any entity.
3. Supply chain management: Supply chain is one of the complex structures itself. In this
structure, it is hard to trace where the fault happened. So here Distributed ledger
technology comes into the picture, Using DLT, you can easily trace the supply chain
from the beginning to the end and can easily find out where a mistake or fault has
happened. All the data added to the DLT is validated and permanent and can not be
altered. This transparency of data enables us to trace from the beginning to the end of
the ledger.
4. Healthcare: Distributed Ledger eliminates central authority and ensures rapid access to
secured and untempered data. Here important medical can be stored securely and no one
can change this data, even if someone tries to change it will be reflected everyone
immediately. DLT can be used in the insurance sector to trace false claims because of
its decentralized system.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
5. Governance: DLT can be used in the government system to make it transparent among
citizens. Many governments have adopted blockchain in the governance system because
of the robustness of this system. It can be used as a voting system too. The traditional
voting system has many flaws and sometimes it is found that there are many false
voting and illegal activities that happen during voting. Online voting systems can be
used to vote and with security and fake votes can be easily checked. everyone will have
their own identity. So that any person sitting anywhere in the world can cast his vote.
In general blockchain and Distributed Ledger Technology are considered as same, but there
are some differences between these two technologies. Blockchain can be classified as a
type of Distributed Ledger Technology. We can say that Blockchain is a type of DLT, but
every Distributed Ledger can not be called a blockchain.
Blockchain is the parent technology of DLT. But the idea behind them is the same.
Blockchain technology has the potential to solve many problems in the banking and
financial industry. Here, blockchain is the advanced version of Distributed Ledger
Technology with many useful functionalities. Developers have many other variants of
DLTs in the technology world. However, they do not have the many real-life
implementations and applications that blockchain has been able to do.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
1. Security: All records of every transaction are securely encrypted. Once the transaction
is validated, it is completely secure and no one can update or change it. It is a
permanent process.
2. Decentralization: All network members or nodes have a copy of the ledger for
complete transparency. A decentralized private distributed network improves the
reliability of the system and gives assurance of continuous operations without any
interruption. It gives control of information and data in the hand of the user.
3. Anonymity: The identity of each participant is anonymous and does not possibly reveal
their identity.
4. Immutable: Any validated transactions can not be changed as they are irreversible.
5. Transparency: Distributed technologies offer a high level of transparency. Which is
necessary for the sectors like finance, medical science, banking, etc.
6. Speed: Distributed Ledger Technology can handle large transactions faster than
traditional methods.
7. Smart Contracts: Distributed Ledger Technology supports smart contracts which are
self-executing contracts with the terms of the agreement between buyer and seller being
directly written into lines of code. Smart contracts reduce the need for intermediaries
and offer transparency and automation in the execution of the contract terms.
8. Lower Costs: Distributed Ledger Technology eliminates intermediaries and reduces the
costs associated with intermediaries, which makes the system more cost-effective.
9. Improved Efficiency: Distributed Ledger Technology reduces the time and costs
associated with traditional transaction methods. It offers faster settlement times,
reduced paperwork, and increased efficiency.
10. Auditing: Distributed Ledger Technology makes auditing easier as every transaction is
recorded and the ledger cannot be altered. This improves the transparency and accuracy
of financial audits.
11. Resilience: Distributed Ledger Technology is more resilient than traditional databases
as it is spread across multiple nodes. This means that even if one node goes down, the
network can still function as the rest of the nodes can continue to validate transactions.
12. Traceability: Distributed Ledger Technology offers complete traceability of assets,
from their creation to their current ownership. This improves accountability and reduces
the risks of fraud and theft.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
1. 51% Attack: The 51% attack is a bit concerning part of this distributed ledger
technology that is to be checked routinely.
2. Costs of Transaction: The connected nodes are expected to validate the transaction of
a given Distributed Ledger Technology which gives high transaction cost as the other
nodes are paid incentives to validate the transaction.
3. Slow Transaction Speed: The major disadvantage of this DLT is the slow speed of
transactions as multiple nodes are attached to this network and it takes time to validate
the transaction by all the other nodes.
4. Scalability Issues: Due to low speed and high transaction costs DLT faces very
difficulties to expand on a large scale.
5. Lack of Regulation: As DLT is a decentralized technology, it operates outside the
control of any centralized authority which can lead to a lack of regulation, making it
difficult to hold accountable any wrongdoings or fraudulent activities on the network.
6. Energy Consumption: Distributed Ledger Technology requires a significant amount of
energy to maintain the network and validate transactions, especially in the case of Proof
of Work consensus mechanisms, which can lead to a negative impact on the
environment.
7. Complexity: Implementing and managing Distributed Ledger Technology can be
complex and requires a high level of technical expertise, which can be a barrier to entry
for many organizations and individuals.
8. Privacy Concerns: While the anonymity of participants on the network is considered
an advantage, it can also be a disadvantage as it can lead to privacy concerns and illicit
activities on the network.
9. Lack of Interoperability: Different Distributed Ledger Technologies may use different
protocols, which can lead to interoperability issues, making it difficult for different
networks to communicate and transact with each other.
1. Experts in this area promote DLT as a solution for many problems that are present on
the internet and will drastically be able to solve all these problems. Distributed Ledger
Technology is termed the “Internet of Value”. Transactions and processes will occur in
real-time with the help of the internet.
2. Distributed Ledger Technology has the potential to impact problems in financial or
banking, cyber security, healthcare, government, data security, etc. sectors with
effective solutions.
3. Enterprises and visionaries are now faced with the challenge of establishing networks of
entities that together can take advantage of DLT to radically change how they share and
keep records, and innovate where DLT can enable entirely new processes and business
models.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Blockchain technology gained public notice with the advent of bitcoin in 2009. Bitcoin is
a cryptocurrency that runs on blockchain technology and is by far, the most popular and
most ranked cryptocurrency. Ethereum was initially released in 2015. Within two years of
its release, it was ranked the second best blockchain network, Bitcoin is the first. The
Ethereum network acquired more global interest when china stated that it is the best
blockchain network ever created.
What is Ethereum?
The Ethereum network is currently famous for allowing the implementation of smart
contracts. Smart contracts can be thought of as ‘cryptographic bank lockers’ which
contain certain values.
These cryptographic lockers can only be unlocked when certain conditions are met.
Unlike bitcoin, Ethereum is a network that can be applied to various other sectors.
Ethereum is often called Blockchain 2.0 since it proved the potential of blockchain
technology beyond the financial sector.
The consensus mechanism used in Ethereum is Proof of Stakes(PoS), which is more
energy efficient when compared to that used in the Bitcoin network, that is, Proof of
Work(PoW). PoS depends on the amount of stake a node holds.
History of Ethereum
2013: Ethereum was first described in Vitalik Buterin’s white paper in 2013 with the
goal of developing decentralized applications.
2014: In 2014, EVM was specified in a paper by Gavin Wood, and the formal
development of the software also began.
2015: In 2015, Ethereum created its genesis block marking the official launch of the
platform.
2018: In 2018, Ethereum took second place in Bitcoin in terms of market capitalization.
2021: In 2021, a major network upgrade named London included Ethereum
improvement proposal 1559 and introduced a mechanism for reducing transaction fee
volatility.
2022: In 2022, Ethereum has shifted from PoW( Proof-of-Work ) to PoS( Proof-of-
State ) consensus mechanism, which is also known as Ethereum Merge. It has reduced
Ethereum’s energy consumption by ~ 99.95%.
Features of Ethereum
17 Prof. Dhanashree R.Kolpe
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING, Balewadi-Baner, Pune- 411 045
MCA-FY (SEM-II)
Unit IV Cryptocurrency
1. Smart contracts: Ethereum allows the creation and deployment of smart contracts.
Smart contracts are created mainly using a programming language called solidity.
Solidity is an Object Oriented Programming language that is comparatively easy to
learn.
2. Ethereum Virtual Machine (EVM): It is designed to operate as a runtime
environment for compiling and deploying Ethereum-based smart contracts.
3. Ether: Ether is the cryptocurrency of the Ethereum network. It is the only acceptable
form of payment for transaction fees on the Ethereum network.
4. Decentralized applications (Daaps): Dapp has its backend code running on a
decentralized peer-to-peer network. It can have a frontend and user interface written in
any language to make calls and query data from its backend. They operate on Ethereum
and perform the same function irrespective of the environment in which they get
executed.
5. Decentralized autonomous organizations (DAOs): It is a decentralized organization
that works in a democratic and decentralized fashion. DAO relies on smart contracts for
decision-making or decentralized voting systems within the organization.
Ethereum has two types of accounts: An externally owned account (EOA), and a Contract
account. These are explained as following below:
Externally owned account (EOA): Externally owned accounts are controlled by
private keys. Each EOA has a public-private key pair. The users can send messages by
creating and signing transactions.
Contract Account: Contract accounts are controlled by contract codes. These codes are
stored with the account. Each contract account has an ether balance associated with it.
The contract code of these accounts gets activated every time a transaction from an
EOA or a message from another contract is received by it. When the contract code
activates, it allows to read/write the message to the local storage, send messages and
create contracts.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
All the nodes on the network must perform the same calculations for keeping their
ledgers in sync.
Every transaction must include:
Gas limit.
Transaction Fee that the sender is willing to pay for the transaction.
If the total amount of gas needed to process the transaction is less than or equal to the
gas limit then the transaction will be processed and if the total amount of the gas needed
is more than the gas limit then the transaction will not be processed the fees are still
lost.
Thus it is safe to send transactions with the gas limit above the estimate to increase the
chances of getting it processed.
Voting: Voting systems are adopting Ethereum. The results of polls are available
publicly, ensuring a transparent fair system thus eliminating voting malpractices.
Agreements: With Ethereum smart contracts, agreements and contracts can be
maintained and executed without any alteration. Ethereum can be used for creating
smart contracts and for digitally recording transactions based on them.
Banking systems: Due to the decentralized nature of the Ethereum blockchain it
becomes challenging for hackers to gain unauthorized access to the network. It also
makes payments on the Ethereum network secure, so banks are using Ethereum as a
channel for making payments.
Shipping: Ethereum provides a tracking framework that helps with the tracking of
cargo and prevents goods from being misplaced.
Crowdfunding: Applying Ethereum smart contracts to blockchain-based crowdfunding
platforms helps to increase trust and information symmetry. It creates many possibilities
for startups by raising funds to create their own digital cryptocurrency.
Domain names: Ethereum name service allows crypto users to buy and manage their
own domain names on Ethereum, thus simplifying decentralized transactions without
putting users to remember long, machine-readable addresses.
Benefits of Ethereum
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Drawbacks of Ethereum
Need of DAO
Beginning an association with somebody that includes financing and cash requires a great
deal of confidence in the individuals you’re working with. Yet, it’s difficult to believe
somebody you’ve just at any point associated with on the web. With DAOs you do not
20 Prof. Dhanashree R.Kolpe
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING, Balewadi-Baner, Pune- 411 045
MCA-FY (SEM-II)
Unit IV Cryptocurrency
need to trust the other individual within the gathering, simply the DAO’s code, which is
100% straightforward and evident by anybody. This opens up countless new freedoms for
worldwide joint effort and coordination.
S
DAO Traditional Organizations
No.
Votes were counted, and results were If casting a ballot is permitted, votes are
2. carried out consequently without a counted inside, and the result of casting a
believed intermediary. ballot should be taken care of physically.
Administrations offered are taken care Requires human taking care of, or halfway
4. of consequently in a decentralized controlled mechanization, inclined to
way. control.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
DAO Examples
So far we are using people to “store” information instead. In order to know how much
hiring a new person would cost? – There is a person answerable in the human resources
department. Similarly, to get movement costs repaid?- There is a separate person
responsible for this in the accounting.
In a DAO, there is a code for that. Computers will take over much of the decision-
making and operations we see nowadays. The final control, however, is still with
humans, the shareholders. Shareholders have voting rights just like in regular
corporations. They dictate the general direction and accept or decline initiatives.
The general idea is to bring the benefits of blockchain technology to management.
The blockchain is immutable, precise, and consistent. It is also transparent and open so
that anyone could review companies. Strong consistency makes DAOs reliable business
partners.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Such an organization is also harder to put under pressure. It will be difficult to ban it
from operating somewhere. As it is controlled by the organization members and not
influenced by a central government authority to put under pressure.
DAO Membership
There are various models for DAO membership. Membership can decide how casting ballot
functions and other key pieces of the DAO.
1. Token-based membership: Normally completely permissionless, contingent upon the
token utilized. For the most part, these administration tokens can be exchanged for
permissionless on a decentralized trade. Others should be procured by giving liquidity or
another ‘evidence of work’. In any case, just holding the symbolic awards admittance to
casting a ballot. Ordinarily used to administer expansive decentralized conventions as well
as tokens themselves.
Example: MakerDAO’s token MKR is generally accessible on decentralized trades. So
anybody can become tied up with having cast a ballot power on the Maker convention’s
future.
2. Share-based membership: Offer-based DAOs are more allowed, yet at the same time
very open. Any imminent individuals can present a proposition to join the DAO, typically
offering recognition of some worth as tokens or work. Offers to address direct democratic
force and possession. Individuals can exit whenever with their proportionate portion of the
depository. Regularly utilized for all the nearer sew, human-driven associations like
foundations, laborer assemblages, and venture clubs. Can administer conventions and
tokens too.
Example: MolochDAO is centered around financing Ethereum projects. They require a
proposition for enrollment so the gathering can evaluate whether you have the important
mastery and funding to make educated decisions about possible grantees. You can’t simply
purchase admittance to the DAO on the open market.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Advantages of DAO
Disadvantages of DAO
Future of DAO
The DAO as initially imagined had not returned as of mid-2020. Regardless, interest in
decentralized independent associations as a more extensive gathering keeps on developing.
24 Prof. Dhanashree R.Kolpe
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING, Balewadi-Baner, Pune- 411 045
MCA-FY (SEM-II)
Unit IV Cryptocurrency
While there are many waiting concerns and potential issues with respect to lawfulness,
security, and construction, a few investigators and financial backers accept that this kind of
association will ultimately come to conspicuousness, maybe in any event, supplanting
customarily organized organizations.
Criticism of DAO
DAOs are an exciting idea, and they come with their pros and cons. The well-known DAO
is called … “the DAO”. It was a form of investor-directed venture capital fund founded in
2016 that got famous for its failure. In its ICO the DAO collected a staggering $ 150
million. More than 18.000 investors participated. Shortly after that, the account of the DAO
was hacked. Unknown attackers stole $ 50 million worth of Ethereum. As a result,
Ethereum had to execute a hard fork to restore the funds. That is why we now have
Ethereum and Ethereum Classic. Ethereum is the version where the hack was erased.
Investor support subsided after the incident. The event has been a famous example of how
fragile DAOs can be to certain attacks.
Smart contracts:
Smart contracts are blocks of code that reside on the blockchain. It is like an Ethereum
account but there is a critical difference between an external account and a smart contract.
Unlike a smart contract, an external account can connect to multiple Ethereum networks
(Goerli testnet, mainnet, etc.) whereas a smart contract is only specific to one individual
network (the network it is deployed on). When a smart contract is deployed, it creates an
instance (contract account) on the network. One can create multiple instances of a smart
contract on the network or multiple networks. Deployment of a smart contract is done by
sending a transaction to the network with bytecode.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
An emulator can be used to deploy a smart contract on a local network eg. Ganache-cli. It
takes care of everything and the user doesn’t have to worry about the security and the gas
amount required for transactions since everything is happening on a local test network. All
one has to do is pass the ganache provider as an argument to the web3 instance(web3
facilitates the connection between the blockchain network and the js application).
Before deploying a smart contract to an actual Ethereum network make sure the account
has some ether in it. Deploying a contract is like sending a transaction and it needs some
gas amount to process. Unlike deploying on a local network, transactions will take some
time to complete (anywhere between 15 seconds to 5 minutes). Web3 is used to interact
with the network the same way it is done in local deployment except customize the provider
that will be passed into the web3 instance. Instead of creating our own node that connects
to the Ethereum network, one can use a developer platform with RPC endpoints
like Infura or Alchemy. With one of these accounts, you have an API key that gives access
to their Infura / Alchemy blockchain nodes that are already hosted on the Ethereum
network. Simply sign-up for Infura and get an endpoint that will be used in the code to
deploy the smart contract. The below tutorial shows a smart contract being deployed with
Infura. For a smart contract tutorial using tools like Alchemy (ethers.js, Hardhat, Solidity,
and Metamask), refer to this basic tutorial – “Hello World Smart Contract“.
example.sol- Below is the sample solidity code used for testing. All it does is set a public
variable as the address of the sender.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Step 3 – Get access to Bytecode and ABI (Compile the smart contract). Solidity compiler
gives a huge piece of code as output, one can print the output to console if required. Only
the relevant part (relevant for deployment) i.e., bytecode and interface are extracted from
the output in the following script.
27 Prof. Dhanashree R.Kolpe
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING, Balewadi-Baner, Pune- 411 045
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Step 4 – Add the Metamask extension to google chrome from the Chrome web store.
Step 5 – Once have access to the bytecode and interface, all that is required is to
create a provider with own mnemonic phrase and infura endpoint using the
truffle-hdwallet-provider that was installed earlier. Create a web3 instance and
pass the provider as an argument. Finally, use the deploy method with bytecode
as an argument to deploy the smart contract.
// solidity code.
"mnemonic phrase",
"-"
);
// provider as an argument.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
};
deploy();
// of using promises
Output:
29 Prof. Dhanashree R.Kolpe
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING, Balewadi-Baner, Pune- 411 045
MCA-FY (SEM-II)
Unit IV Cryptocurrency
GHOST:
Blockchain technology is the talk of the town and many people are starting to explore it
because of its numerous benefits. One such benefit, or pro as it’s called in blockchain, is
GHOST Protocol.
The Ghost Protocol is a development in the cryptographic protocol behind Bitcoin that
allows for transactions to be processed without broadcasting them. It is an end-to-end
encryption protocol that provides authentication without having to rely on centralized trust
authorities. It can be either symmetric or asymmetric, depending on how it’s used. The
principle of GHOST is that the sender only sends a ghost (or dummy) packet to the
receiver, which can then reply with as many packets as it needs.
The sender creates a digital signature by encrypting the packet with the receiver’s
public key.
The receiver decrypts it using his private key (the public key is used to encrypt).
If the decryption was done correctly, the sender is assumed to be who he claims to be,
and the transaction is accepted.
He may also send this ghost packet to other receivers (i.e., the transaction is
broadcasted) using the same procedure.
Since there may be more than one receiver, this protocol is called “GHOST”, which
stands for ” Greedy Heaviest Observed Sub-Tree”, as a reference to how it routes
packets through other nodes in addition to its direct route between sender and receiver.
The transactions in blockchain can be published from anywhere. In PoW blockchains like
Bitcoin, Ethereum, etc due to the random nature of hashing two miners can be working on
the same transaction producing two blocks.
30 Prof. Dhanashree R.Kolpe
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING, Balewadi-Baner, Pune- 411 045
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Bitcore, a bitcoin development team implemented the GHOST Protocol. This is also the
first public implementation of the GHOST protocol.
Scalability: GHOST protocol was designed and built with scalability and security in
mind so that it can easily handle thousands.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Sidechains are independent blockchains that are compatible with Ethereum to help
with scaling. They do this by offering a faster and cheaper blockchain for
transactions. When users finish their transactions, they can easily move their tokens
back to the main Ethereum network.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Namecoin is a blockchain with a token forked initially from Bitcoin software, used to
represent ownership of a domain name.
It was developed to decentralize the internet infrastructure, reduce censorship, and
increase privacy and security.
Namecoin attempts to replace existing domain name server technology with
blockchain technology.
Namecoin History
The idea for developing a tokenized domain name system was first introduced in 2010 in an
Internet Relay Chat (IRC) room, #bitcoin-dev, where users discussed the merits of a bitcoin-
like DNS system that came to be known as bitdns. Namecoin was introduced in April 2011,
by Vincent Durham (an anonymous name) on the same Bitcoin Forum used to announce
Bitcoin
Namecoin features several Bitcoin similarities, currently the top digital currency by market
capitalization. Namecoin's fork was initiated to create a new way to establish ownership of
the human-readable addresses assigned to the machine-readable addresses used on the
web—domain names.
The main difference between Bitcoin and Namecoin is the purpose of the technology.
Bitcoin creators wanted a viable alternative currency; Namecoin creators wanted a domain
naming system. Because of this, there are different consensus and protocol rules that exist
within each project. Certain features are necessary when conducting financial transactions
that are not necessary when completing name registrations for new internet domains.
MCA-FY (SEM-II)
Unit IV Cryptocurrency
Because Namecoin utilizes the same proof-of-work (PoW) algorithm as Bitcoin, you can
merge-mine Namecoins without additional hardware (and without any extra electricity) if
you are already mining Bitcoin. Both Bitcoin and Namecoin are limited to a total of 21
million coins. The critical difference in Namecoin is that tokens are used up as domain
names are registered. The cost of one domain name to Namecoin's usable supply is .01
NMC. This means there are 2.1 billion domain names (or other uses) available using
Namecoin.
Goals of Namecoin
Namecoin's developers indicated several potential uses and applications for this
experimental token. First and foremost, the developers hope to protect free speech rights
online by making the web more resistant to censorship.
There are myriad ways that Namecoin attempts to do this. For example, it can be used to
attach identifying information—such as email addresses, cryptocurrency public addresses, or
specific keys—to various identities as determined by the user. It can also be used as a means
of providing decentralized website certificate validation.
Namecoin can be used in Tor and other anonymizing web platforms to generate human-
meaningful Tor .onion domains. In the future, the token and its underlying technology could
also be used for file signatures, securing voting procedures, notary services, and establishing
proof of existence for individuals and entities.
Because of their links with the Namecoin network, these names are difficult to censor or
seize, meaning they are resistant to outside influence. Additionally, the makers of Namecoin
specify that lookups do not generate network traffic. The result of this is that Namecoin
offers improved privacy capabilities as well.
__________________________________________________________________________