Professional Documents
Culture Documents
Blockchain Ecosystem
Blockchain Ecosystem
Blockchain Ecosystem
1. Transaction is born
2. Transaction is broadcasted
3. Race to create a new block
A subset of nodes, called miners, organize valid transactions into
lists called blocks. A block in progress contains a list of recent
valid transactions and a cryptographic reference to the
previous block. In blockchain systems like Bitcoin and Ethereum,
miners race to complete new blocks, a process that requires
solving a labor-intensive mathematical puzzle, which is
unique to each new block. The first miner to solve the puzzle
will earn some cryptocurrency as a reward. The math
puzzle involves randomly guessing at a number called a
nonce. The nonce is combined with the other data in the
block to create an encrypted digital fingerprint, called a
hash.
4. Completing new block
The hash must meet certain conditions; if it doesn’t, the miner tries
another random nonce and calculates the hash again. It takes an
enormous number of tries to find a valid hash. This process deters
hackers by making it hard to modify the ledger.
Some blockchain uses another mechanism, to secure their chains,
called as proof-of-work.
5. Adding a new block to the chain
This is the final step in securing the ledger. When a mining node
becomes the first to solve a new block’s crypto-puzzle, it sends the
block to the rest of the network for approval, earning digital tokens
in reward. Mining difficulty is encoded in the blockchain’s protocol;
Bitcoin and Ethereum are designed to make it increasingly hard to
solve a block over time.
Case Study: Silk Road
https://www.gawker.com/the-underground-website-where-you-
can-buy-any-drug-imag-30818160
Smart Contracts
But there’s a problem: before smart contracts can do anything really
useful, they need a reliable way to connect with events in the real
world—and that has proved impossible so far. This is the so-called
"oracle problem," a technological challenge that is still hampering
any chance that blockchain will break out and become a part of our
everyday lives.
Prob:
Many organizations have no master ledger of all their activities;
instead records are distributed across internal units and functions.
The problem is, reconciling transactions across individual and
private ledgers takes a lot of time and is prone to error.
Working:
In a blockchain system, the ledger is replicated in a large number of
identical databases, each hosted and maintained by an interested
party. When changes are entered in one copy, all the other copies
are simultaneously updated. So as transactions occur, records of the
value and assets exchanged are permanently entered in all ledgers.
There is no need for third-party intermediaries to verify or transfer
ownership. If a stock transaction took place on a blockchain-based
system, it would be settled within seconds, securely and verifiably.
(The infamous hacks that have hit bitcoin exchanges exposed
weaknesses not in the blockchain itself but in separate systems
linked to parties using the blockchain.)
Let’s take Bitcoin, for example. The Bitcoin protocol has a consensus
algorithm called “Proof of Work” that holds the system together. For
a transaction to be settled between two consumers, the algorithm
requires that a set of nodes (called “miners”) compete to validate
transactions by solving a complex algorithmic problem. In other
words, Bitcoin “economically incentivizes” miners to purchase and
use compute power to solve complex problems. These economic
incentives include:
The first miner to solve the algorithm adds the proof and the new
block (and all the transactions in it) to the blockchain and
broadcasts it to the network. At that point, everyone else in the
network syncs the latest blockchain because it’s a “truth” everyone
believes in.
Since miners are competing to run computations, there are times
when multiple blocks get solved at the same time. This then creates
a “fork” of multiple chains:
When there are forks like this, the network’s “canonical” chain is the
one which is the “longest” — the one which the most amount of
miners trusted and continued to work on.
Every new block that’s added to the blockchain in this manner adds
more security to the system because an attacker who wants to create
new blocks that overwrite a party of history would need to
consistently solve for the puzzle faster than anyone else in the
network. This is practically impossible to do, making it’s impossible
to reverse engineer or alter the data inside these blocks. This is why
users trust continue to trust the system.
Once that happens, miners race to order and record the new
transactions into a block of data, and each block has to include the
digest or hash of the previous block of transactions. A hash is like a
fingerprint for a block. It identifies the block and its contents and
it's always unique. In making a new block, the software attaches the
hash to a random number called the nonce.
Transaction Chains
Constructing a Transaction
Alice’s wallet application will first have to find inputs that can pay
the amount she wants to send to Bob. Most wallets keep track of all
the available outputs belonging to addresses in the wallet.
Therefore, Alice’s wallet would contain a copy of the transaction
output from Joe’s transaction, which was created in exchange for
cash (see [getting_first_bitcoin]). A bitcoin wallet application that
runs as a full-node client actually contains a copy of every unspent
output from every transaction in the blockchain. This allows a
wallet to construct transaction inputs as well as quickly verify
incoming transactions as having correct inputs. However, because a
full-node client takes up a lot of disk space, most user wallets run
"lightweight" clients that track only the user’s own unspent outputs.
$ curl https://blockchain.info/unspent?
active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK
{
"unspent_outputs":[
{
"tx_hash":"186f9f998a5...2836dd734d2804fe6
5fa35779",
"tx_index":104810202,
"tx_output_n": 0,
"script":"76a9147f9b1a7fb68d60c536c2fd8aea
a53a8f3cc025a888ac",
"value": 10000000,
"value_hex": "00989680",
"confirmations":0
}
]
}
The response in Look up all the unspent outputs for Alice’s Bitcoin
address shows one unspent output (one that has not been redeemed
yet) under the ownership of Alice’s address
1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK. The response includes
the reference to the transaction in which this unspent output is
contained (the payment from Joe) and its value in satoshis, at 10
million, equivalent to 0.10 bitcoin. With this information, Alice’s
wallet application can construct a transaction to transfer that value
to new owner addresses.
Bob’s view
Bitcoin Mining
New transactions are constantly flowing into the network from user
wallets and other applications. As these are seen by the Bitcoin
network nodes, they get added to a temporary pool of unverified
transactions maintained by each node. As miners construct a new
block, they add unverified transactions from this pool to the new
block and then attempt to prove the validity of that new block, with
the mining algorithm (Proof-of-Work).
Transactions are added to the new block, prioritized by the highest-
fee transactions first and a few other criteria. Each miner starts the
process of mining a new block of transactions as soon as they
receive the previous block from the network, knowing they have lost
that previous round of competition. They immediately create a new
block, fill it with transactions and the fingerprint of the previous
block, and start calculating the Proof-of-Work for the new block.
Each miner includes a special transaction in their block, one that
pays their own Bitcoin address the block reward (currently 6.25
newly created bitcoin) plus the sum of transaction fees from all the
transactions included in the block. If they find a solution that makes
that block valid, they "win" this reward because their successful
block is added to the global blockchain and the reward transaction
they included becomes spendable. Jing, who participates in a
mining pool, has set up his software to create new blocks that assign
the reward to a pool address. From there, a share of the reward is
distributed to Jing and other miners in proportion to the amount of
work they contributed in the last round.
Bob can now spend the output from this and other transactions. For
example, Bob can pay a contractor or supplier by transferring value
from Alice’s coffee cup payment to these new owners. Most likely,
Bob’s bitcoin software will aggregate many small payments into a
larger payment, perhaps concentrating all the day’s bitcoin revenue
into a single transaction. This would aggregate the various
payments into a single output (and a single address).
Types of Blockchains
There are four types of blockchains:
1. Public Blockchains
Public blockchains are open, decentralized networks of computers
accessible to anyone wanting to request or validate a transaction
(check for accuracy). Those (miners) who validate transactions
receive rewards.
2. Private Blockchains
Private blockchains are not open, they have access restrictions.
People who want to join require permission from the system
administrator. They are typically governed by one entity, meaning
they’re centralized. For example, Hyperledger is a private,
permissioned blockchain.
3. Hybrid Blockchains or Consortiums
Consortiums are a combination of public and private blockchains
and contain centralized and decentralized features. For example,
Energy Web Foundation, Dragonchain, and R3.
Take note: There isn’t a 100 percent consensus on whether these
are different terms. Some make a distinction between the two, while
others consider them the same thing.
4. Sidechains
A sidechain is a blockchain running parallel to the main chain. It
allows users to move digital assets between two different
blockchains and improves scalability and efficiency. An example of
a sidechain is the Liquid Network.
Each new block added to the network is assigned a unique key (via
cryptography). To obtain each new key, the previous block’s key and
information are inputted into a formula.
You can see this depicted below for house records stored on the
blockchain. For example, Block 2 provides a key after taking all the
information from Block 1 into account (including the key) and
inputting it into a formula. Block 3, in turn, provides a new key after
taking all the information from Block 1 and Block 2 into account
(including the key) and inputting it into a formula. And so, the
process repeats itself indefinitely.
Proof of Work (PoW) vs. Proof of Stake (PoS)
PoW and PoS are two such mechanisms. While their goal—to reach
a consensus that a transaction is valid—remains the same, how they
get there is a little different.
What Is PoW?
The two big problems with PoW are that it uses a lot of electricity
and can only process a limited number of transactions
simultaneously (seven for Bitcoin). Transactions typically take at
least ten minutes to complete, with this delay increasing when the
network is congested. Though compared to the days-long wait
required to wire money across the globe, or even to clear a check,
Bitcoin’s ten-minute delay is quite remarkable.
The bigger a person’s stake, the more mining power they have—and
the higher the chances they’ll be selected as the validator for the
next block.
To ensure those with the most coins aren’t always selected, other
selection methods are used. These include randomized block
selection (forgers with the highest stake and lowest hash value are
chosen) and coin age selection (forgers are selected based on how
long they’ve held their coins)
The results are faster transaction times and lower costs. The NEO
and Dash cryptocurrencies, for example, can send and receive
transactions in seconds.
Let’s look at these concepts in more detail and explore the tradeoffs:
Decentralization
computers.
Scalability
it.
TPS but has come under criticism for being too centralized.
Security
1. Environmental Impact
Blockchain networks like Bitcoin use a lot of electricity to validate
transactions, leading to environmental concerns. For example,
Bitcoin consumes more electricity than a small, medium-sized
European country, and Bitcoin mining is threatening China’s
climate change goals.
However, many would argue that Bitcoin is held to higher
environmental standards than anyone and anything. This may be
true, especially if you consider that the blockchain and Bitcoin are
an alternative to the traditional finance system that uses much more
electricity and has a much larger environmental impact.
2. Personal Responsibility
One of blockchains and cryptocurrencies’ most significant
advantages is also its biggest weakness. When you invest in public
open-source blockchains by mining or buying cryptocurrencies and
store it in your cryptocurrency wallet (your wallet is like your bank
account, except only you can access it and have the passwords), only
you control your money.
You are your own bank— and this is great! But if you lose your seed
phrases – the list of words that give you access to recover your
wallets – there is no recourse (compared to banks where you can
reset your password). Your money is lost forever.
But there are risks: It’s a new technology, and many projects will
not pan out. So, invest only what you can afford to lose, do your own
research to determine if the project (or initial coin offering) is worth
investing in, and decide what level of exposure you want.
For example, you can get more exposure by investing in
cryptocurrencies directly instead of an exchange-traded fund (ETF).
But there are also investment strategies that are unique to the
blockchain and cryptocurrencies, like yield farming.
Read on to learn about ten common traditional finance and
blockchain investment strategies you can use when investing in
public blockchain companies and cryptocurrencies.
#2 Proof Of Stake
Blocks are produced in the rounds of 21.