Summary

This presentation discusses blockchain technology, its application in financial services, and the concept of distributed ledgers. It explores the principles of blockchain, including its decentralized structure, peer-to-peer communication, and the irreversibility of records.

Full Transcript

ISF ICT for 2204 IFIs According to an Accenture report blockchain is one of the most Week 02: Blockchain talked about topics in the present financial services for Business industry. There are 90%...

ISF ICT for 2204 IFIs According to an Accenture report blockchain is one of the most Week 02: Blockchain talked about topics in the present financial services for Business industry. There are 90% of bank executives who are interested in blockchain and currently their banks are exploring the use of blockchain. 100 90 80 70 60 50 40 30 20 10 0 - 03 -07 -11 -03 -07 -11 -03 -07 -11 -03 -07 -11 -03 -07 -11 -03 -07 -11 -03 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 bitcoin: (Worldwide) blockchain: (Worldwide) Blockchain—Next Generation of Internet DLT Mobile/ IoT Cloud Advanc ed Researc WWW h Projects Agency Internet Arpanet 196 197 199 3 9 4 1 Gist Behind Blockchain Every user of blockchain has access to the entire database of transactions and their complete Distributed history. No single participant controls the Database & information, and every participant can access it Potentially Trust without an intermediary. It assumes an Less environment where users do not necessarily know or trust each other. Peer-to-peer There is no intermediary. Communication occurs Communication directly between peers. Transactions can only be added. They cannot be changed. They will be chronologically ordered, Irreversibility of and available to all other participants. Various Records algorithms ensure that transactions in the database are correct, permanent, chronological and available to others. Some of the blockchain technologies available can execute preprogrammed business rules or business logic called “smart contracts”. This Smart Contracts means that execution of certain code can be triggered when certain events happen; like “pay Adapted from Harvard Business Review shipper when goods have been delivered” 4 Centralised Vs Decentralised Vs Distributed CENTRALISED Networks DECENTRALIS DISTRIBUTED ED One node does Nodes Nodes are only everything distribute work connected to to sub-nodes peers (P2P) Fully Fully Centralized Decentralized 5 Types of Distributed Databases Every blockchain is a distributed ledger, but not every distributed ledger is a blockchain. 6 Blockchain (Cont.) » Multiple blocks of data chained together through cryptographic function in such a way that it is not possible to modify data contained within those blocks (changing data will break the chain). Genesis Block Data SHA- Data SHA- Data … Prev_ha Prev_ha SHA- 256 256 Prev_ha sh: 0000 sh: 2zb1 256 sh: 7b2z Hash: Hash: Hash: 2zb1 7b2z 3dfv Block 1 Block 2 Block 3 7 Blockchain (Cont.) » Assume a hacker is trying to change the content of the Block 2: Data SHA- Data SHA- Data … Prev_ha Prev_ha SHA- 256 256 Prev_ha sh: 0000 sh: 2zb1 256 sh: 7b2z Hash: Hash: Hash: 2zb1 ax5j 3dfv Block 1 Block 2 Block 3 8 Bitcoin Blockchain » Signature » Validation » Consensus Protocol How Bitcoin Transaction Works Broadcast Validate Add the Transacti Transacti Transacti Block to on on to the on and the Request P-2-P Add to a Blockchai Network Block n Some The signed The network of Once a block is person transaction is nodes formed, requests a broadcasted to validates the consensus transaction. a P2P network transactions mechanism He/she with the help of of their choice determines must sign nodes – it goes and forms them which node cad it. to a pool of into a block with added its pending the help of block to the transactions known existing algorithms blockchain in such a way that is permanent 10 and Signing Transaction (Public and A private keys are “from Public Public key ~ Account link but it is Key A number Txn: impossible to $5 ascertain how) Private key ~ Password to Public Key B” Network can Private Txn Key A verify Txn Signature SHA-256 Netwo SHA-256 rk Is Hash broadcasted Signature value Hash to network = Public Key Txn value A?= + (The output is compared against the public key of A. If they match, the Signatur ownership of transaction and e integrity of the transaction message 11 is verified) Signing Transaction (Cont.) » The above process of signing and verifying the signature helps to establish the following facts: 1. The transaction was indeed initiated by the account number that is claimed as sender in the transaction message. 2. The original content of the transaction message was not modified as the transaction message was passing through the network. 𝑎𝑐𝑐𝑜𝑢𝑛𝑡 𝐴2 0 𝐵𝑇𝐶 𝑎𝑐𝑐𝑜𝑢𝑛𝑡 𝐵 → account A account B 12 Memory Pool » Signed transaction is broadcasted to the network and added to the pool of pending transactions which is called memory pool or mempool: Txn Txn0 Txn1 Txn2 … Txnn The network is comprised of “nodes” some of whom are simple nodes while others are “miners” 13 Nodes Vs. Miners » Nodes are devices that run a copy of the blockchain software, in our example Bitcoin blockchain software. » In the case of Bitcoin blockchain nodes also store a full copy of the blockchain. » A miner is a node that runs specialized type of hardware and uses it to validate transactions and add them in blocks to the Bitcoin blockchain. » In Bitcoin context, It is only miners who can validate and write the transactions to the blockchain. 14 Block » Miners pick up transactions of their choice from the mempool, verify them (how? see the next two slides) and arrange them in the block in form of this structure (Merkel tree): Txn_Ro ot Transactions are Merkel tree SHA consecutively 256 Hash0 Hash2 hashed in pairs until reaches the top 1 3 which is called SHA 256 SHA 256 Merkle root. Hash0 Hash1 Hash2 Hash3 SHA SHA SHA SHA 256 256 256 256 Txn0 Txn1 Txn2 Txn3 » Transactions that are in the same block are considered to happen at the same time. 15 Verification of a Transaction » Although we call it ledger, bitcoin blockchain does not store the individual accounts’ balances. It only stores verified transactions in their chronological order: LEDGER Transaction Value 01xf456 ⇢ rf7861x… 15.00 … 0 9dfgw72. ⇢ 01xf456 0.500.. … s46fzxc… ⇢ 01xf456 7.500 … rf7861x… ⇢ 9dfgw72 10.00 … 0 q45avc0 ⇢ 8uygshj 2.000 … … … … 16 Verification of a Transaction » Ownership of funds (Cont.) is verified through the links to other transactions—inputs and outputs. Inputs Previous output Amount From Signature address f5d8ee3… 4.800 9a43090… 7a88b90 … 1c91a59… 9.600 17b9f2d… c19d6d1 … 01xf456 ⇢ rf7861x 15 a0e9cea… 2.000 205b009… 88ffdfe… … … BTC Simplified transaction request Outputs Redeemed Amount To address Signature input abd38ba… 15.000 rf7861x… db02210 … e7ba5fd… 1.400 01xf456… ffdfec6… Real transaction request 17 Block-to-Block Hashing (the same picture as in the slides 18-19, only in more details…) Block 10 Block 11 Block 12 Prev_Has Prev_Has Prev_Has SHA h SHA h SHA h 256 256 256 Txn_Ro Txn_Ro Txn_Ro Nonce Nonce Nonce ot ot ot Hash01 Hash23 Hash01 Hash23 Hash01 Hash23 Hash0 Hash1 Hash2 Hash3 Hash0 Hash1 Hash2 Hash3 Hash0 Hash1 Hash2 Hash3 Txn0 Txn1 Txn2 Txn3 Txn0 Txn1 Txn2 Txn3 Txn0 Txn1 Txn2 Txn3 Who and how gets the ? right to add next block? Time 18 Consensus » Consensus is a mechanism to collectively agree on the chronological order in which blocks are added to the blockchain or in other words on the chronological order of transactions. » The type of the consensus mechanism used in the Bitcoin network is called proof-of-work. » All the full nodes will run a kind of competitive lottery— they all will race to solve the same mathematical puzzle and only the winner will have the right to add his/her block to the end of the current blockchain. » What kind of puzzle they will try to solve see on the next slide… Who and how gets the right to add next block? Time 19 Consensus: Proof of Work » According to the Bitcoin protocol, only blocks whose hashes start with a certain number of 0s can be added to the blockchain. » In order to achieve this the full nodes, who are also called miners, will keep on changing a part of the data inside the block called nonce until the hash of their block will start with the desired number of 0s. » At average it takes 10 minutes for some miner to solve this riddle. Who and how gets the right to add next block? Time 20 Consensus: Proof of Work » For example let’s say the desired number of zeroes = 8 Current block: Block 13 Current block hash: Prev_Has 000721e49c013f00c62cf59f2163542a9d h SHA-256 8df02464efeb615d31051b0fddc326 Prev_Has Nonce h No? Change the nonce and try to hash again! Current block: Block 13 Current block hash: Prev_Has 000000e49c013f00c62cf59f2163542a9d h SHA-256 8df02464efeb615d31051b0fddc326 Prev_Has Nonce h No? Change the nonce and try to hash again!... Current block: Block 13 Current block hash: Prev_Has 000000009c013f00c62cf59f2163542a9d h SHA-256 8df02464efeb615d31051b0fddc326 Prev_Has Nonce h Yes! The nonce is found that produces the desired number of 21 zeroes! Crypto- mining Hardware Security Block Block Block … 1 2 3 To successfully tamper with a blockchain you will need to: XT Tamper with all the subsequent blocks on the blockchain RE LE S IB S Redo the proof-of-work for each block IM TO NE CU PO Take control of greater than 50% of the P2P network SE 23 What’s so Revolutionary About the Blockchain? Blockchain enables the exchange of value (in its digitized form) over network without relying on any central authority or third party. For example, in case of bitcoin network, no trust is needed, in fact, because a special mathematical function protects every single aspect of the system. 24 Blockchain Types Blockchain Technology Stack » APPLICATION LAYER – interface that different type of users directly Ap Ap Ap Ap Ap Ap Ap Ap interact with. p p p p p p p p » NETWORKING LAYER – network of all devices running the Netwo Netwo Netwo Netwo blockchain protocol and keeping rk rk rk rk records of transactions with A1 A2 B1 B2 different level of read/write permission to the blockchain. » PROTOCOL LAYER – the encoded computational algorithms or sets Protocol Protocol B of rules by which the network participants come to the collective A agreement on the validity and chronological order of the information pieces. Figure source: Hileman, G., & Rauchs, M. (2017). Global blockchain benchmarking study. Cambridge Centre for Alternative Finance, 26 University of Cambridge, 122. Main Types of Blockchains Segmented by Permission Model Impact Read Write Commit Example Fundament Performanc al e Properties Public Open to permissionl Anyone Anyone* Bitcoin, Ethereum ⍟⍟⍟⍟ ⍟ anyone ess Open Authorise All or subset Public Open to d of permission Sovrin ⍟⍟⍟ ⍟⍟ anyone participan authorised ed ts participants Restricted to Authorise All or subset an Multiple banks d of Consortium authorised operating a shared ⍟⍟ ⍟⍟⍟ participan authorised set of ledger ts participants participants Closed Fully private Private Internal bank or restricted permission Network Network ledger shared to a limited ed operator operator between parent ⍟ ⍟⍟⍟⍟ set of (‘enterprise * Requires significant authorised only only company and investment either in mining hardware (proof-of-work model) or cryptocurrency ’) itself (proof-of-stake model). subsidiaries nodes Impact: from ⍟-less favourable to ⍟⍟⍟⍟-more favourable. Table adapted from: Hileman & Rauchs (2017) and Weber et al. (2017) 27 Types of Consensus Mechanisms Delegat Proof- Directe Proof- ed Proof- of- d of- Proof- of-Work Authori Acyclic Stake of- ty Graph Stake 28 Directed Acyclic Graph (DAG) » Directed Acyclic Graph is a type of graph where all of the edges are associated with a particular direction and link the set of vertices without forming any directed cycles such that any given vertex can follow a path that leads back to itself. C C A B A B E E D D G G F F CYCLIC ACYCLIC 29 Directed Acyclic Graph (DAG) » Therefore instead of(Cont.) blocks, transactions can be modelled as a DAG data structure through linking nodes that are involved in related transactions. 1 𝐶 𝐵$ C 𝐴 Directed edges = → $ transactions 1 B → 𝐵 Vertices = A nodes/wallet E accounts on a network D G F 30 Directed Acyclic Graph (DAG) (Cont.) » For a DAG to be accepted by the network, and ultimately committed to the blockchain transaction record, the consensus algorithm stipulates DAG closure as a requirement. » A graph possesses closure if, and only if, no outgoing edge leaves a closed set of connected vertices. Initial balance Initial balance = 𝐴 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + 𝐵𝑖𝑛𝑖𝑡𝑖𝑎𝑙 + 𝐶 𝑖𝑛𝑖𝑡𝑖𝑎𝑙=𝑇𝑜𝑡𝑎𝑙 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 =1 𝐴 $1𝐵 1 Final balance → Final balance 𝐴 𝑓𝑖𝑛𝑎𝑙 + 𝐵 𝑓𝑖𝑛𝑎𝑙 +𝐶 𝑓𝑖𝑛𝑎𝑙 =𝑇𝑜𝑡𝑎𝑙 𝑓𝑖𝑛𝑎𝑙 =0 A =0B 𝑇𝑜𝑡𝑎𝑙 𝑓𝑖𝑛𝑎𝑙 =𝑇𝑜𝑡𝑎𝑙 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 A — C link 𝐵$2𝐶 → forms DAG closure DAG Accepted ✔️, with between A, B closure &C 𝑇𝑜𝑡𝑎𝑙 𝑓𝑖𝑛𝑎𝑙 ≠ 𝑇𝑜𝑡𝑎𝑙 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 C DAG Rejected ✖️, no closure Initial balance = 1 Final balance 31 =3 Directed Acyclic Graph (DAG) (Cont.) Initial balance = Initial balance = 1 𝐴 $1𝐵 1 Final balance = → Final balance = 0 A 0B 𝐴 $1𝐷 𝐵$2𝐶 → → (double spent attempt) A—C link D closure C broken Initial balance = by D Initial balance = 0 1 Final balance = Final balance = 1 3 32 Smart Contracts Smart Contracts » Essentially “smart-contract” is just another account/node on the blockchain. But this account can have preprogrammed logic in this format “if this than that”. » Execution of this logic is automatically triggered by the events specified in those ”if this than that” clauses. » Thus, smart contracts can also request/validate transactions on the blockchain. Mining Mining node node EVM Node Smart Contract Send message to Externally invoke a contract owned function or send account ether to another Mining Mining account node node 34 Blockchain: Pro and Cons Blockchain Advantages » RESILIENCE/ SECURITY: The chain is still operated by most nodes in the event of a massive attack against the system. » RELIABILITY: This piece of technology was developed using blocks which contain data stored in more than one location—a redundancy that dramatically boosts reliability. » TRANSPARENCY: transactions of each public address are open to viewing. Using an explorer, and equipped with a user’s public address, it is possible to view their holdings and the transactions that they have carried out. » IMMUTABILITY/ TRACEABILITY: Confirmed blocks are very unlikely to be reversed, meaning that once data has been registered into the blockchain, it is extremely difficult to remove or change it. This makes blockchain a great technology for storing financial records or any other data where an audit trail is required because every change is tracked and permanently recorded on a distributed and public ledger. » DECENTRALIZATION/ DISINTERMEDIATION: The core value 36 of a blockchain is that it enables a database to be directly https://blockexplorer.com/ 37 Blockchain Myths Myth Reality Blockchains always require Blockchains are ‘trustless’ some degree of trust Transactions on a blockchain network can be Blockchains are immutable or reversed by network ‘tamper-proof’ participants under specific circumstances Blockchains are not Blockchains are 100% secure automatically more secure than other systems GIGO (‘garbage in, garbage out’) applies to every Blockchains are ‘truth blockchain that uses non- machines’ native digital assets and/or external data inputs 38 Business-Driven Blockchain Implementation [ Blockchain business framework/toolkit ] Case for the Blockchain or Not? Yes Question / Explanation No 1 Replaces a centralised Are you trying to replace a centralised system and/or authority? system and/or Remember, one of the key objectives should be to simplify business institution? ❏ process, and not to use a new technology to do essentially the same. 2 Requires inherent Ask yourself whether this characteristic helps you with achieving irreversibility/immuta your objective, or if it actually hinders you from doing what you bility? ❏ need to do. This is important because irreversibility is foundational to Blockchain. 3 Is it handling objects Are you transferring objects of value from one party, entity, to of value? ❏ another? Remember that value exists not only in monetary form. 4 Are there multiple More than one entity generates transactions that require writers to a shared ❏ modifications to the shared repository of information that is used by repository? multiple parties. 5 It targets Are there multiple stakeholders? Does the problem you are solving an ecosystem require (significantly) more than two participants? If it is just rather than a few ❏ a handful, integration might still be the way to go. If it you are parties? targeting the ecosystem, Blockchain could be right. 6 A level of mistrust Does the problem you are solving involve untrusted and possibly exist between entities unknown parties? Is there any form of information asymmetry that generate ❏ between stakeholders? transactions? 7 Do transactions For example, does the order of transactions has ultimate depend on/interact ❏ importance or are transactions collaboratively created by various with each other? writers? 40 Case for the Blockchain or Not? » If you answered YES to most of these questions, the blockchain implementation is possible and further research is needed to develop its detailed implementation. Ap Ap Ap Ap Ap Ap Ap Ap p p p p p p p p Netwo Netwo Netwo Netwo rk rk rk rk A1 A2 B1 B2 Protocol Protocol B A Use Cases Using Blockchain May Help… Source: Hileman, G., & Rauchs, M. (2017). Global blockchain benchmarking study. Cambridge Centre for Alternative Finance, 43 University of Cambridge, 122. Some of the Use Cases CROWDSOURCING FIN INSTITUTIONS SUPPLY CHAIN Obtaining input from a Simplify their Recording trades on a large number of people record-keeping for blockchain offers a way typically via the payments. to check the history of Internet. a product HEALTHCARE VOTING PROPERTY RECORDS With blockchain, Blockchain records Storing land records on medical history could could create tamper- a blockchain could cut be securely stored and proof election returns. down on costly title controlled by patients. research and 44 insurance. Use Case [ An Analysis example of using blockchain business framework/toolkit ] » Blockchain checklist » Implementation Blockchain-Based Voting System Yes Explanation / No 1 Replaces Yes It does replace centralised tallies. a centralised system and/or institution? 2 Requires inherent Yes It is the essential requirement for a voting system to ensure that irreversibility/immuta every voter casts only one vote which cannot be manipulated— bility? changed or destroyed—as well as no fraudulent or illegitimate votes can be added. 3 Is it handling objects Yes The value, in this case, is information that represents voters’ will of value? in the form of vote. 4 Are there multiple Yes A very large number of voters who collectively decide on their writers to a shared destiny. repository? 5 It targets Yes Voters, election candidates with their officers, election committee an ecosystem and international observers all have a great stake (great interest) rather than a few in the election process being carried out in an extremely fair and parties? impartial way. 6 A level of mistrust Yes Checking of ballot papers for their validity and counting the votes exist between is done by the members of the election committee, sometimes in entities that the presence of the election candidates or their officers. generate However, this process is completely obscure to the voters who transactions? can only trust that the process is carried out in full integrity. 7 Do transactions Yes Every voter can cast only one vote. If he tries to cast more than 46 depend on/interact one vote, all the subsequent votes should be rejected. Blockchain-Based Voting System (Cont.) » functionality to trace their own voting transaction » dynamic election results updates in real time Applicatio » biometric authentication n » ensure the widest platform compatibility with all types of electronic devices that voters might use » integration with the current electoral registry system » Integration with the offline voting system (not all voters would Network opt for a blockchain-enabled e-voting system, even despite ever-increasing electronic devices adoption) » token rewards integrated with other wallet systems or smart city » private, permissioned blockchain » Each constituent district is represented by a node (smart contract) that can read or write onto the blockchain Protocol » Fast throughput is crucial » Open-source blockchain such as Go—Ethereum could be deployed 47 TQ Recommended Reading Technical Explanation of Bitcoin for Everyone: http://billybitco.in/index.html How does the blockchain work? https://medium.com/s/story/how-does-the-blockchain-work-98c 8cd01d2ae Hileman, G., & Rauchs, M. (2017). Global blockchain benchmarking study. Cambridge Centre for Alternative Finance, University of Cambridge, 122. 49 Interesting Blockchain Related links: Bitcoin energy consumption index: https://digiconomist.net/bitcoin-energy-consumption Blockchain explorer: https://blockexplorer.com 50

Use Quizgecko on...
Browser
Browser