0% found this document useful (0 votes)
21 views16 pages

Notes Session 05

The document discusses centralized and decentralized systems, highlighting their definitions, characteristics, advantages, and disadvantages. It also covers distributed systems, their types, and examples, emphasizing the role of blockchain in decentralization. Additionally, it outlines the requirements and features of decentralized applications (DApps) and lists various platforms for decentralization like Ethereum and Solana.

Uploaded by

shruthi g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views16 pages

Notes Session 05

The document discusses centralized and decentralized systems, highlighting their definitions, characteristics, advantages, and disadvantages. It also covers distributed systems, their types, and examples, emphasizing the role of blockchain in decentralization. Additionally, it outlines the requirements and features of decentralized applications (DApps) and lists various platforms for decentralization like Ethereum and Solana.

Uploaded by

shruthi g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Table of Contents

❖ Centralization and Decentralization.


❖ Requirements of a Decentralized Applications (DApps).
❖ DApp Features & Examples.

❖ Platforms for Decentralization.

1 Different Systems
Centralized, Decentralized and Distributed Systems

Problems with Centralized Systems

1
Problems with Decentralized Systems

Problems with Decentralized Systems

2
Distributed Systems

2 Centralized & Decentralized Systems


Definitions
❖ Centralized Systems: A centralized system is a system where a single
authority or entity has control over decision-making, data storage, and
resource management. These systems are commonly used in various do-
mains, including computing, business, and government structures.
❖ Decentralized Systems: A system in which decision-making, control,

3
and operations are distributed across multiple independent units or nodes,
rather than being managed by a single central authority.
Characteristics
❖ Centralized Systems:
• Single Point of Control: A central authority makes decisions and
manages operations.
• Hierarchical Structure: Information and control flow from the top
to the bottom.
• Efficiency and Consistency: A central entity ensures uniformity
and compliance.
• Single Point of Failure: If the central system fails, the entire
system may be disrupted.
• Easier Management: Centralization simplifies maintenance, secu-
rity, and policy enforcement.
❖ Decentralized Systems:
• Distributed Control: No single authority, decision-making is spread
across multiple nodes.
• Greater Autonomy: Individual units operate independently with
minimal oversight.
• Increased Redundancy: Data and resources are duplicated across
multiple locations to prevent loss.
• Higher Complexity in Coordination: Requires robust protocols
for communication and consensus.
• Resilience to Failures: If one node or unit fails, others continue
to function normally.
• Scalability: Can easily expand by adding more nodes without a
central bottleneck.
• Transparency: Often relies on public ledgers or open networks for
increased trust and security.
Examples
❖ Centralized Systems
• Computing: Client-server architecture (e.g., cloud services like Google
Drive).
• Business: Traditional corporations with a CEO making key deci-
sions.
• Government: Centralized governments where decisions are made
by a single authority.

4
• Banking: Central banks managing a country’s financial policies.
❖ Decentralized Systems
• Computing: The network is peer-to-peer (e.g., BitTorrent, IPFS)
• Finance: Blockchain-based cryptocurrencies (e.g., Bitcoin, Ethereum)
• Governance: Decentralized autonomous organizations (DAOs)
• Energy: Decentralized energy grids and microgrids
• Social Media: Decentralized platforms (e.g., Mastodon, Diaspora)
Centralized Systems
❖ Advantages:
• Simplified decision-making.
• Lower redundancy and cost efficiency.
• Easier enforcement of policies and security.
• Greater consistency and standardization.
• It is easy to secure and service the server and client nodes by virtue
of their location.
• Smooth and elegant personal experience — A client has a dedicated
system that he uses (personal computers) and the organization has
a similar system that can be modified to suit customer needs.
• Dedicated resources (memory, CPU cores, etc.)
• As the central systems take fewer funds to set up, they have an edge
when small systems must be built.
• Quick updates are possible — Only one machine to update.
• Easy detachment of a node from the system. Just remove the con-
nection of the client node from the server.
Disadvantages of Centralized Systems
❖ Disadvantages:
• Vulnerable to failures and cyber-attacks.
• Potential bottlenecks and inefficiencies at scale.
• Reduced flexibility and slower adaptability.
• Lack of autonomy for lower-level entities.
• Centralized systems are highly dependent on network connectivity —
A system can fail if the nodes lose connectivity as there is only one
central node.
• No graceful degradation of the system — abrupt(unconscious) failure
of the entire system.

5
• Less possibility of data backup. If the server node fails and there is
no backup, you lose the data straight away.
• Difficult server maintenance — There is only one server node and
due to availability reasons, it is inefficient and unprofessional to take
the server down for maintenance.
Advantages of Decentralized Systems
❖ Advantages:
• Greater fault tolerance.
• Faster innovation and adaptability.
• Reduces single points of failure.
• Encourages autonomy and flexibility.
• There’s no traffic issue as the load can be balanced across nodes.
• Highly available as one node can take charge of others in case of
failure at node, network etc.
• Provide better overall control as nodes are independent and follow
self governing mechanisms.
Disadvantages of Decentralized Systems
❖ Disadvantages:
• Complex coordination and governance.
• Higher operational costs.
• Difficult enforcement of security and compliance.
• Potential for inconsistencies and fragmentation.
• Difficult to achieve global big tasks.
• Difficult to know which node failed – Each node must be pinged
for availability checking and partitioning of work has to be done to
actually find out which node failed by checking the expected output
with what the node generated.
• Difficult to know which node responded – When a request is served
by a decentralized system, the request is actually served by one of
the nodes in the system but it is actually difficult to find out which
node indeed served the request.

3 Distributed Systems
Introduction to Distributed Systems
❖ Definition 1: A collection of independent computers that appear to users
as a single system.

6
❖ Definition 2: A distributed system is a collection of computer programs
that utilize computational resources across multiple, separate computa-
tion nodes to achieve a common, shared goal. Also known as distributed
computing.
❖ Purpose: Enhance performance, reliability, and scalability.

Characteristics of Distributed Systems


❖ Resource Sharing: Shared hardware, software, and data resources.
❖ Concurrency: Multiple processes execute simultaneously.

❖ Scalability: Can expand seamlessly without significant performance loss.


❖ Fault Tolerance: System continues operating despite failures.
❖ Transparency: Hides the complexity from users (location, access, failure,
replication).

❖ Concurrency works here, and consensus controls are required to have


agreement on transaction values and log commands.
❖ Nodes have their own clock; no global clock exists in the network.
❖ Failure of network node does not affect the whole system. So provides
high availability.

❖ It can scale both horizontally and vertically.


❖ Components of Decentralized Systems are same as centralized Systems
Types of Distributed Systems

❖ Client-Server Systems: Centralized servers provide services to clients.


❖ Peer-to-Peer (P2P) Systems: Nodes communicate directly without
central control.
❖ Distributed Computing Systems: Multiple computers perform paral-
lel computations.

❖ Distributed Database Systems: Data is stored across multiple nodes


but appears unified.
❖ Blockchain Networks: Decentralized, immutable ledger for transac-
tions.

Distributed Systems
❖ Advantages:
• High Availability: No single point of failure.

7
• Improved Performance: Load balancing and parallel processing.
• Flexibility: Supports multiple applications and devices.
• Scalability: Can grow without major architectural changes.
• Low latency: Distributed systems have low latency (than a central-
ized system) because of high geographical spread, hence leading to
less time to get a response.
❖ Disadvantages:
• Complexity: Difficult to design and manage.
• Security Risks: Data distribution increases vulnerabilities.
• Data Consistency: Managing updates across nodes can be chal-
lenging.
• Network Dependency: Requires stable and fast communication.
• Difficult to come to a Consensus: Consensus mechanism is diffi-
cult here because it looks for logging into events at the absolute time
when it happens, and it’s not possible.
Distributed Systems
❖ Examples:
• Cloud Computing (AWS, Google Cloud, Azure)
• Blockchain & Cryptocurrencies (Bitcoin, Ethereum)
• P2P File Sharing (BitTorrent, IPFS)
• Microservices Architecture
• Distributed Databases (MongoDB, Cassandra)

❖ Applications:
• Finance & Banking (Online transactions, stock trading)
• Healthcare (Electronic health records, telemedicine)
• E-commerce (Amazon, eBay)
• Social Media (Facebook, Twitter, Instagram)
• Scientific Computing (Weather simulations, AI model training)
❖ Challenges:
• Latency Issues: Communication delays affect performance.
• Synchronization: Ensuring consistency between distributed nodes.
• Security Threats: Cyberattacks like DDoS and data breaches.
• Fault Tolerance Mechanisms: Handling hardware or software
failures.

8
Decentralization using Blockchain
❖ Decentralization It is a type of distributed system where no single entity
has majority administrative control
❖ The basic idea of decentralization is to distribute control and authority
to the peripheries of an organization instead of one central body being in
full control of the organization.
❖ This configuration produces several benefits for organizations, such as in-
creased efficiency, expedited decision making, better motivation, and a
reduced burden on top management.
❖ Any blockchain network such as Bitcoin, Ethereum, Hyperledger Fabric,
or Quorum can be used to provide decentralization service.
❖ The critical difference between a decentralized system and distributed sys-
tem is that in a distributed system, there still exists a central authority
that governs the entire system; whereas, in a decentralized system, no
such authority exists.
❖ A Decentralized system is a type of network where nodes are not dependent
on a single master node; instead, control is distributed among many nodes.
❖ This mechanism came into play with Bitcoin, and it enables a user to agree
on something via a consensus algorithm without the need for a central,
trusted third party, intermediary, or service provider.
Decentralization using Blockchain
❖ Decentralization It is a type of distributed system where no single entity
has majority administrative control.
❖ The basic idea of decentralization is to distribute control and authority
to the peripheries of an organization instead of one central body being in
full control of the organization.
❖ This configuration produces several benefits for organizations, such as in-
creased efficiency, expedited decision making, better motivation, and a
reduced burden on top management.
❖ Any blockchain network such as Bitcoin, Ethereum, Hyperledger Fabric,
or Quorum can be used to provide decentralization service.
❖ The critical difference between a decentralized system and distributed sys-
tem is that in a distributed system, there still exists a central authority
that governs the entire system; whereas, in a decentralized system, no
such authority exists.
❖ A Decentralized system is a type of network where nodes are not dependent
on a single master node; instead, control is distributed among many nodes.

9
❖ This mechanism came into play with Bitcoin, and it enables a user to agree
on something via a consensus algorithm without the need for a central,
trusted third party, intermediary, or service provider.
Method of Decentralization Some one want to send some money from India
to Japan.

Method of Decentralization Some one want to send some money through


blockchain.

❖ The upcoming transaction is recorded in a block.


❖ This block is sent to each and every member in the network.
❖ The transaction is validated by all the members in the network.
❖ Once the validation is done, the block is added to the public distributed
ledger.
❖ This block is then added to the chain and lies there as a permanent record
forever.
❖ Your friend receives your money in almost a day compared to 5 to 7 days
in case of conventional transfers.

Method of Decentralization - Disintermediation

10
❖ With blockchain technology, it is possible to send this money directly to
your friend without the need for a bank.
❖ All you need is the address of your friend on the blockchain.

❖ This way, the intermediary; that is, the bank, is no longer required, and
decentralization is achieved by disintermediation.
❖ Disintermediation is a process of achieving transactions between two par-
ties by removing the requirements of mediators or third party.

4 Requirements of a Decentralized Applications


(DApps)
Requirements of a Decentralized Applications (DApps)
❖ Decentralization: Operates on a blockchain or distributed network with-
out central authority.
❖ Consensus Mechanism: Uses protocols like Proof of Work (PoW) or
Proof of Stake (PoS) for transaction validation.

❖ Open Source Code: The codebase is publicly available for transparency


and community-driven improvements.
❖ Smart Contracts: Self-executing contracts with predefined rules running
on a blockchain.

❖ Tokenization: Utilizes cryptocurrencies or tokens for transactions, in-


centives, and governance.
❖ Security and Privacy: Strong cryptographic techniques ensure data
integrity and protection from attacks.

❖ Interoperability: Ability to interact with other decentralized applica-


tions and systems.
❖ Scalability: Designed to handle increasing user demand and transactions
efficiently.

11
5 DApp Features & Examples
Key Features of DApps

❖ Decentralization: No single entity controls the application; data is


stored on a blockchain.
❖ Transparency: The code and transactions are visible and verifiable by
all users.

❖ Immutability: Once data is recorded on the blockchain, it cannot be


altered.
❖ Open-source: Many DApps have open-source code, allowing community
contributions.
❖ Incentivization: Many DApps use tokens to reward participants and
users.
Examples of DApps
❖ Finance (DeFi) DApps:
• Uniswap: A decentralized exchange (DEX) for trading cryptocur-
rencies.
• Aave: A lending and borrowing platform for crypto assets.
• Compound: A decentralized money market protocol.
❖ Gaming & NFT DApps:

• Axie Infinity: A play-to-earn blockchain game.


• Decentraland: A virtual world where users own land as NFTs.
• Gods Unchained: A blockchain-based trading card game.
❖ Social Media DApps:

• Lens Protocol: A decentralized social media platform.


• Steemit: A blockchain-based blogging and social media site.
• Minds: A censorship-resistant social network.
❖ Supply Chain & Identity DApps:

• VeChain: Tracks supply chain movements using blockchain.


• Civic: Provides decentralized identity verification.

12
6 Platforms for Decentralization
Platforms for Decentralization

❖ Ethereum (ETH):
• Consensus Mechanism: Proof of Stake (PoS)
• Smart Contract Language: Solidity
• Features: Most popular DApp platform, supports ERC-20 tokens,
DeFi, and NFTs.
• Notable DApps: Uniswap, Aave, OpenSea, Decentraland.
❖ Binance Smart Chain (BSC):
• Consensus Mechanism: Proof of Staked Authority (PoSA)
• Smart Contract Language: Solidity (same as Ethereum)
• Features: Faster and cheaper transactions than Ethereum, compat-
ible with Ethereum-based DApps.
• Notable DApps: PancakeSwap, Venus, BakerySwap.
❖ Solana (SOL):

• Consensus Mechanism: Proof of History (PoH) + Proof of Stake


(PoS)
• Smart Contract Language: Rust, C, C++
• Features: High speed (65,000 TPS) and low transaction costs.
• Notable DApps: Serum, Raydium, Star Atlas.
Platforms for Decentralization
❖ Polygon (MATIC):
• Consensus Mechanism: Proof of Stake (PoS)
• Smart Contract Language: Solidity (Ethereum-compatible)
• Features: Layer 2 scaling solution for Ethereum, improving speed
and reducing costs.
• Notable DApps: QuickSwap, Aavegotchi, SushiSwap.
❖ Avalanche (AVAX):

• Consensus Mechanism: Avalanche Consensus + Proof of Stake


(PoS).
• Smart Contract Language: Solidity
• Features: High throughput and low fees, supports custom blockchain
creation.

13
• Notable DApps: Trader Joe, Pangolin, Benqi.
❖ Polkadot (DOT):
• Consensus Mechanism: Nominated Proof of Stake (NPoS)
• Smart Contract Language: Rust, WebAssembly (WASM)
• Features: Cross-chain interoperability, scalable parachains.
• Notable DApps: Acala, Moonbeam, Phala Network.
Platforms for Decentralization
❖ Cardano (ADA):
• Consensus Mechanism: Proof of Stake (PoS) (Ouroboros proto-
col)
• Smart Contract Language: Plutus (based on Haskell) (Ethereum-
compatible)
• Features: Research-driven blockchain with high security and sus-
tainability.
• Notable DApps: SundaeSwap, Minswap, Meld.
❖ Tezos (XTZ):
• Consensus Mechanism: Liquid Proof of Stake (LPoS)
• Smart Contract Language: Michelson
• Features: Self-upgradable blockchain, strong security.
• Notable DApps: Kolibri, Objkt, SmartPy.
❖ Near Protocol (NEAR):
• Consensus Mechanism: Nightshade Sharding (PoS)
• Smart Contract Language: Rust, AssemblyScript.
• Features: High scalability, developer-friendly.
• Notable DApps: Ref Finance, Mintbase, Paras.
Platforms for Decentralization
❖ Tron (TRX):
• Consensus Mechanism: Delegated Proof of Stake (DPoS)
• Smart Contract Language: Solidity.
• Features: Focuses on content sharing and entertainment.
• Notable DApps: JustSwap, Wink, BitTorrent.
❖ Which platform is best?
It depends on your use case:

14
• DeFi & NFTs: Ethereum, Polygon, Solana.
• Speed & low fees: Solana, Avalanche, Binance Smart Chain.
• Interoperability: Polkadot, Cosmos.
• Research-driven security: Cardano, Tezos.
Race Conditions in Blockchain
• What is a Race Condition?
• What is a Race Condition in Blockchain?
Race Conditions in Blockchain

Race Conditions in Blockchain


❖ Race conditions are a common vulnerability in smart contracts.
❖ A race condition occurs when multiple transactions attempt to modify the
same state variable at the same time.
❖ When this happens, it is unclear which transaction will be processed first,
and the outcome of the smart contract becomes unpredictable.
❖ One example of a race condition vulnerability is the reentrancy attack.
❖ In this attack, a malicious actor exploits a race condition to call a contract
function multiple times before the function has completed its previous
execution.
❖ This can lead to unexpected behavior, such as the attacker being able to
withdraw more funds than they are entitled to.
❖ To prevent race conditions in smart contracts, developers should use lock-
ing mechanisms to ensure that only one transaction can modify a state
variable at a time.

15
Thank Q!

16

You might also like