- ES Español (Latinoamérica)

- EN English

3.73. CS3E1 Blockchain and Decentralized Systems (Elective)
- Credits: 3
- Hour of this course: Theory: 2 hours; Laboratory: 2 hours;
- Syllabus:


Español (Latinoamérica)

English - Prerrequisites:
- CS3P1 Parallel and Distributed Computing (8th Sem)
- CS292 Software Engineering II (7th Sem)
- ES Español (Latinoamérica)

- EN English

3.73.1. Justification Back to top


Blockchain and decentralized systems have moved from a niche cryptocurrency topic to a general-purpose computing paradigm used in finance, supply chains, digital identity, and public infrastructure. This elective gives students a rigorous, systems-level understanding of how a blockchain actually works: the data structures and cryptographic primitives (hashing, digital signatures, Merkle trees) that make a distributed ledger tamper-evident, the peer-to-peer networking and consensus protocols (PoW, PoS, BFT-family) that let mutually distrusting nodes agree on a single history without a central authority, and the execution environment (the EVM) that turns a blockchain into a general-purpose computing platform for smart contracts.
Building on these foundations, students develop, test, and audit smart contracts using Solidity and industry-standard tooling, and architect decentralized applications that combine an on-chain backend with a Web3 frontend and wallet-based identity. Because smart contracts manage real economic value and cannot be easily patched after deployment, the course places particular emphasis on the vulnerability classes unique to this domain – reentrancy, integer overflow, access-control flaws, and oracle manipulation – and on the auditing discipline needed to catch them before deployment.
The course closes by situating these technical skills in their broader context: the scalability and interoperability techniques (Layer-2, bridges) and economic primitives (tokens, automated market makers, lending protocols) that underpin decentralized finance, and the governance, regulatory, and ethical questions – on-chain voting, DAO governance failures, and the evolving legal treatment of cryptoassets – that any engineer working in this space must be prepared to reason about.
- ES Español (Latinoamérica)

- EN English

3.73.2. Generales Goals Back to top


- Explain the data-structure, cryptographic, and peer-to-peer networking foundations that make a blockchain a tamper-evident, decentralized ledger.
- Analyze and compare consensus mechanisms, including Proof-of-Work, Proof-of-Stake, and BFT-family protocols, in terms of security, performance, and trust assumptions.
- Design, program, and test smart contracts on an EVM-compatible platform using Solidity and modern development and testing tooling.
- Architect decentralized applications that integrate a Web3 frontend, a wallet, and an on-chain smart-contract backend.
- Identify common smart-contract security vulnerabilities and apply auditing techniques and tools to mitigate them.
- Evaluate blockchain scalability and interoperability approaches, the economic primitives behind decentralized finance (DeFi), and the governance and regulatory implications of decentralized systems.
- ES Español (Latinoamérica)

- EN English

3.73.3. Contribution to Outcomes Back to top


- AG-C09) Design and Development of Solutions: Designs, implements, and evaluates solutions for complex computing problems. (Assessment)
- AG-C11) Use of Tools: Applies modern computing tools in problem solving. (Usage)
- AG-C12) Applies computer science theory and software development fundamentals to produce computer-based solutions. (Assessment)
- ES Español (Latinoamérica)

- EN English

3.73.4. Content Back to top


- ES Español (Latinoamérica)

- EN English

3.73.4.1. Distributed Ledgers and Peer-to-Peer Architectures (8 hours) [Skills AG-C09,AG-C12] Back to top


Bibliography: (Narayanan et al., 2016; Antonopoulos, 2023)
Topics
- Distributed ledger structure: a chain of blocks linked by cryptographic hashes, providing append-only, tamper-evident storage of ordered transactions Cryptographic Algorithms .
- Peer-to-peer network topology and gossip/broadcast protocols for propagating blocks and transactions without a central server Networked Applications .
- Node roles: full nodes, light nodes, and miners/validators, and the responsibilities each assumes in maintaining the ledger.
- Decentralization versus centralization trade-offs: trust assumptions, single points of failure, censorship resistance, and performance costs Evaluation .
Learning Outcomes
- Explain how a distributed ledger's block structure and hash linkage provide tamper-evidence [Explain]
- Compare peer-to-peer and client-server architectures in terms of fault tolerance, scalability, and trust [Compare]
- Analyze the decentralization trade-offs of a given blockchain design against a centralized alternative [Analyze]
- ES Español (Latinoamérica)

- EN English

3.73.4.2. Cryptographic Foundations for Blockchain (8 hours) [Skills AG-C09,AG-C12] Back to top


Bibliography: (Narayanan et al., 2016; Antonopoulos, 2023)
Topics
- Cryptographic hash functions: properties (preimage resistance, collision resistance, avalanche effect) and their use in chaining blocks Cryptographic Algorithms .
- Digital signatures for transaction authentication: key pairs, signing and verification, and non-repudiation Cryptographic Algorithms .
- Merkle trees: construction, Merkle roots, and Merkle proofs for efficient verification of transaction inclusion in a block.
- Public-key-derived addresses and key management considerations Cryptography Fundamentals .
Learning Outcomes
- Explain which cryptographic hash-function properties make a blockchain's chain of blocks tamper-evident [Explain]
- Implement a Merkle tree and verify an inclusion proof for a given transaction [Implement]
- Apply digital signatures to authenticate and verify a blockchain transaction [Apply]
- ES Español (Latinoamérica)

- EN English

3.73.4.3. Memory and Consistency (8 hours) [Skills AG-C09,AG-C12] Back to top


Bibliography: (Narayanan et al., 2016; Bashir, 2023)
Topics
- Memory models, data consistency, and fault tolerance
- Memory models: sequential and release/acquire consistency
- Memory management; including reclamation of shared data; reference counts and alternatives
- Bulk data placement and transfer; reducing message traffic and improving locality; overlapping data transfer and computation; impact of data layout such as array-of-structs vs struct-of-arrays
- Emulating shared memory: distributed shared memory, Remote Direct Memory Access (RDMA)
- Data store consistency: Atomicity, linearizability, transactionality, coherence, causal ordering, conflict resolution, eventual consistency, blockchains
- Faults, partitioning, and partial failures; voting; protocols such as Paxos and Raft.
- Design tradeoffs among consistency, availability, partition (fault) tolerance; impossibility of meeting all at once
- Security and trust: Byzantine failures, proof of work and alternatives
Learning Outcomes
- Give an example of an ordering of accesses among concurrent activities (e.g., program with a data race) that is not sequentially consistent [Create]
- Write a program that illustrates memory-access or message reordering [Write]
- Describe the relative merits of optimistic versus conservative concurrency control under different rates of contention among updates [Describe]
- Give an example of a scenario in which an attempted optimistic update may never complete [Create]
- Modify a concurrent system to use a more scalable, reliable, or available data store [Create]
- Using an existing platform supporting replicated data stores, write a program that maintains a key-value mapping even when one or more hosts fail [Write]
- ES Español (Latinoamérica)

- EN English

3.73.4.4. Blockchain Execution Platforms: The EVM Model (8 hours) [Skills AG-C09,AG-C12] Back to top


Bibliography: (Antonopoulos and Wood, 2018)
Topics
- EVM architecture: stack-based virtual machine, opcodes, and the bytecode execution model Common Aspects: Platforms, APIs and Constraints .
- Gas model: execution cost accounting, gas limits, and its role in bounding computation and preventing denial-of-service.
- Account and state model: externally-owned accounts versus contract accounts, and persistent contract storage.
- Smart contract lifecycle: compilation to bytecode, deployment, invocation, and transaction receipts.
Learning Outcomes
- Explain how the gas model bounds smart contract execution and mitigates denial-of-service risk [Explain]
- Describe how EVM bytecode is executed against the stack and persistent contract storage [Describe]
- Compare externally-owned accounts and contract accounts in terms of capabilities and state [Compare]
- ES Español (Latinoamérica)

- EN English

3.73.4.5. Smart Contract Development and Testing (8 hours) [Skills AG-C09,AG-C11] Back to top


Bibliography: (Antonopoulos and Wood, 2018; Solorio et al., 2019)
Topics
- The Solidity programming language: contract structure, state variables, functions, modifiers, and events Common Aspects: Platform Languages and Web Programming Patterns .
- Smart contract development frameworks and tooling (e.g., Hardhat, Foundry, Truffle) for compiling, deploying, and scripting contracts Development Environment and IDE .
- Local and public test networks for simulating contract execution prior to mainnet deployment.
- Unit and integration testing of smart contracts, including test coverage and mocking of external dependencies Advanced Testing Practices .
Learning Outcomes
- Program a smart contract in Solidity that implements a specified business rule [Program]
- Write unit and integration tests for a smart contract using a development framework [Write]
- Determine whether a smart contract's test suite provides adequate coverage of its state transitions [Determine]
- ES Español (Latinoamérica)

- EN English

3.73.4.6. Decentralized Application (DApp) Architecture and Web3 Integration (6 hours) [Skills AG-C09,AG-C11] Back to top


Bibliography: (Antonopoulos and Wood, 2018; Solorio et al., 2019)
Topics
- DApp architecture: on-chain smart-contract backend versus off-chain frontend and storage Frontend, Frameworks and Web Standards .
- Wallets as identity and signing agents: key custody, transaction signing, and connection protocols.
- Web3 client libraries (e.g., ethers.js, web3.js) for reading blockchain state and submitting signed transactions Frontend, Frameworks and Web Standards .
- Oracles and off-chain data feeds for supplying external data to on-chain contracts.
Learning Outcomes
- Design the on-chain/off-chain architecture of a decentralized application for a given use case [Design]
- Integrate a web frontend with a user's wallet using a Web3 client library to sign and submit transactions [Integrate]
- Explain the role of oracles in supplying trustworthy off-chain data to smart contracts [Explain]
- ES Español (Latinoamérica)

- EN English

3.73.4.7. Smart Contract Security and Auditing (8 hours) [Skills AG-C11,AG-C12] Back to top


Bibliography: (Atzei et al., 2017; Antonopoulos and Wood, 2018)
Topics
- Reentrancy attacks and checks-effects-interactions mitigation patterns Memory Safety and Types .
- Integer overflow and underflow in contract arithmetic, and safe-math mitigations Memory Safety and Types .
- Access-control flaws in contract functions, such as missing modifiers or unprotected initialization Access Control and Applications .
- Oracle and price-manipulation attacks, and front-running/transaction-ordering risks.
- Auditing methodology: manual code review, static analysis, and formal verification tools Threat Analysis and Security Engineering .
Learning Outcomes
- Analyze a smart contract for reentrancy and integer-overflow vulnerabilities [Analyze]
- Apply checks-effects-interactions and safe-math patterns to remediate an identified vulnerability [Apply]
- Evaluate the findings of a static-analysis tool run against a smart contract and prioritize remediation [Evaluate]
- ES Español (Latinoamérica)

- EN English

3.73.4.8. Blockchain Scalability, Interoperability, and DeFi Primitives (6 hours) [Skills AG-C09,AG-C12] Back to top


Bibliography: (Bashir, 2023; Werner et al., 2022)
Topics
- Layer-2 scaling techniques: rollups, state channels, and sidechains Evaluation .
- Cross-chain interoperability: bridges and their trust assumptions.
- Tokenomics and decentralized finance (DeFi) primitives: fungible/non-fungible tokens, automated market makers, and lending protocols Economic Models and Strategies .
Learning Outcomes
- Compare Layer-2 scaling approaches in terms of throughput, security, and trust assumptions [Compare]
- Analyze the trust assumptions and failure modes of a given cross-chain bridge design [Analyze]
- Describe how a given DeFi primitive, such as an automated market maker, uses token incentives to provide a decentralized financial service [Describe]
- ES Español (Latinoamérica)

- EN English

3.73.4.9. Blockchain Governance, Regulation, and Ethical Case Studies (4 hours) [Skills ] Back to top


Bibliography: (Filippi and Wright, 2018; Bashir, 2023)
Topics
- On-chain governance and decentralized autonomous organizations (DAOs): voting mechanisms and protocol upgrade processes.
- Regulatory treatment of cryptoassets across jurisdictions and its implications for compliance Security Laws, Policies and Responsibility .
- Ethical case studies: notable governance failures and contested community interventions Ethical Foundations and Frameworks .
Learning Outcomes
- Explain how a DAO's on-chain voting mechanism governs protocol upgrades [Explain]
- Debate the trade-offs between permissionless innovation and regulatory compliance in a given cryptoasset case [Debate]
- Evaluate the ethical and governance implications of a historical blockchain governance failure [Evaluate]
- ES Español (Latinoamérica)

- EN English

3.73.5. Bibliography Back to top


Narayanan, A., Bonneau, J., Felten, E., Miller, A., and Goldfeder, S. (2016). Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction. Princeton University Press, 1st edition.
Antonopoulos, A. M. (2023). Mastering Bitcoin: Programming the Open Blockchain. O'Reilly Media, 3rd edition.
Bashir, I. (2023). Mastering Blockchain: A Deep Dive into Distributed Ledgers, Consensus Protocols, Smart Contracts, DeFi, and More. Packt Publishing, 4th edition.
Antonopoulos, A. M. and Wood, G. (2018). Mastering Ethereum: Building Smart Contracts and DApps. O'Reilly Media, 1st edition.
Solorio, K., Kanna, R., and Hoover, D. H. (2019). Hands-On Smart Contract Development with Solidity and Ethereum. O'Reilly Media, 1st edition.
Atzei, N., Bartoletti, M., and Cimoli, T. (2017). A survey of attacks on ethereum smart contracts (sok). In Principles of Security and Trust (POST). Springer.
Werner, S. M., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., and Knottenbelt, W. J. (2022). Sok: Decentralized finance (defi). In Proceedings of the 4th ACM Conference on Advances in Financial Technologies (AFT). ACM.
Filippi, P. D. and Wright, A. (2018). Blockchain and the Law: The Rule of Code. Harvard University Press, 1st edition.