0%

Book Description

A practical blockchain handbook designed to take you through implementing and re-engineering banking and financial solutions and workflows using eight step-by-step projects

Key Features

  • Implement various end-to-end blockchain projects and learn to enhance present-day financial solutions
  • Use Ethereum, Hyperledger, and Stellar to build public and private decentralized applications
  • Address complex challenges faced in the BFSI domain using different blockchain platform services

Book Description

Blockchain technology will continue to play an integral role in the banking and finance sector in the coming years. It will enable enterprises to build transparent and secure business processes. Experts estimate annual savings of up to 20 billion dollars from this technology. This book will help you build financial apps using blockchain, guiding you through enhancing popular products and services in the banking and finance sector.

The book starts by explaining the essential concepts of blockchain, and the impact of blockchain technology on the BFSI sector. Next, you'll delve into re-designing existing banking processes and building new financial apps using blockchain. To accomplish this, you'll work through eight blockchain projects. By demonstrating the entire process, the book helps you understand everything from setting up the environment and building frontend portals to system integration and testing apps. You will gain hands-on experience with the Ethereum, Hyperledger Fabric, and Stellar to develop private and public decentralized apps. Finally, you'll learn how to use ancillary platforms and frameworks such as IPFS, Truffle OpenZeppelin, and MetaMask.

By the end of this blockchain book, you'll have an in-depth understanding of how to leverage distributed ledgers and smart contracts for financial use cases.

What you will learn

  • Design and implement blockchain solutions in a BFSI organization
  • Explore common architectures and implementation models for enterprise blockchain
  • Design blockchain wallets for multi-purpose applications using Ethereum
  • Build secure and fast decentralized trading ecosystems with Blockchain
  • Implement smart contracts to build secure process workflows in Ethereum and Hyperledger Fabric
  • Use the Stellar platform to build KYC and AML-compliant remittance workflows
  • Map complex business workflows and automate backend processes in a blockchain architecture

Who this book is for

This book is for blockchain and Dapps developers, or anyone looking for a guide to building innovative and highly secure solutions in the fintech domain using real-world use cases. Developers working in financial enterprises and banks, and solution architects looking to build brand new process flows using blockchain technology will also find the book useful. Experience with Solidity programming and prior knowledge of finance and trade are required to get the most out of this book.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Blockchain Development for Finance Projects
  3. About Packt
    1. Why subscribe?
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Section 1: Blockchain Payments and Remittances
  7. Blockchain in Financial Services
    1. Present-day banking and finance systems
    2. Understanding blockchain technology
    3. Blockchains for financial services
    4. How to approach implementing a blockchain solution
    5. Implementation strategies 
    6. Popular distributed ledger platforms for financial applications
      1. Ethereum 
      2. Hyperledger Fabric
      3. Stellar
    7. Summary
  8. Building a Blockchain Wallet for Fungible and Non-Fungible Assets
    1. Technical requirements
    2. Understanding ERC20 and ERC721 smart contract standards
    3. Writing the smart contract code 
      1. Creating the ERC20 Token contract
      2. Creating the ERC721 Token contract
    4. Migrating the smart contract code using Truffle
    5. Creating the token wallet frontend using ReactJS
      1. Setting up the React app
      2. Adding token interfaces to our app
      3. App components
      4. Container.js
      5. App.js
    6. Running our app
    7. Connecting to the main Ethereum network
    8. Summary
  9. Designing a Payment Gateway for Online Merchants
    1. Technical requirements
    2. Defining our blockchain payment ecosystem
    3. Generating dynamic merchant addresses using HD wallets
    4. Creating an e-commerce website and payment gateway
      1. Shoes.js
      2. Container.js
      3. Writing the App.js file and declaring the methods 
        1. newPayment()
        2. PaymentWait()
        3. MMaskTransfer()
        4. startTimer()
        5. tick()
        6. bCheck() – running a persistent balance check 
        7. Using the componentDidMount() method to map the Shoes array
        8. render()
      4. Running the gateway app
    5. Creating an API for generating dynamic payment addresses
    6. Building the merchant HD wallet 
      1. App.js
        1. Constructor()
        2. componentDidMount()
        3. render()
        4. getAccountTransactions()
    7. Running the payment ecosystem
    8. Summary
  10. Corporate Remittances and Settlement
    1. Technical requirements
    2. Understanding the blockchain corporate remittance application and network layout
    3. Setting up the Hyperledger Fabric Bankchain network
      1. Creating the crypto-config file
      2. Creating the configtx file
      3. Creating the docker-compose files
      4. Launching the network
    4. Creating blockchain identities for the banks
      1. Creating the admin user
        1. Creating a utility to enroll the admin user
        2. Changes for Bank B
        3. Running the utility
      2. Creating the bank users
        1. Creating a utility to register users
        2. Changes for the Bank B utility
        3. Running the utilities
    5. Building the corporate remittance contract
      1. Writing the corporate remittance contract
      2. Deploying the corprem smart contract
    6. Setting up the IPFS network
      1. Downloading the binary and installing IPFS
      2. Initializing the IPFS nodes
      3. Generating a key file for the network
      4. Configuring the nodes
      5. Bootstrapping the nodes
      6. Starting the nodes and testing the network
    7. Setting up the bank databases
      1. Installing postgresql 
      2. Creating the bank databases
      3. Creating the database relations
      4. Inserting test customer data into the customers table
    8. Building the bank backend servers 
      1. Creating the app environment
      2. Writing the backend server code
        1. Creating an endpoint to fetch customer data
        2. Creating an endpoint to post payment requests
        3. Creating a service to get transaction details
        4. Writing a method to publish documents to the IPFS network
        5. Writing a method to submit transactions to the blockchain network
        6. Writing a method to update the customer's balance
        7. Writing a method to add transactions to the database
      3. Changes for backend server for Bank B
    9. Building the transaction listeners for the banks
      1. Creating the app environment
      2. Writing the transaction listener code
        1. Writing the transaction listener method
        2. Writing a method to fetch compliance documents from IPFS
      3. Changes for transaction listener for Bank B
    10. Creating the corporate remittance app frontend in React
      1. Creating the React project environment
      2. Building the container component
      3. Building the AppLogin component
      4. Building the Transfer component
      5. Building the ViewTransactions component
      6. Writing the methods in the App.js file
        1. Writing the constructor 
        2. Writing a method for setting the user account
        3. Writing methods to toggle between app components
        4. Writing methods to handle input fields
        5. Writing a method to submit payment requests
        6. Writing a method to fetch customer transactions
        7. Writing a method to set the current user balance
    11. Running the corporate remittance app
    12. Summary
  11. Enabling Cross-Border Remittances with Real-Time KYC/AML Verification
    1. Technical requirements
    2. Designing a workflow for blockchain cross-border remittance
      1. Understanding how a payment request works
    3. Setting up a test network
    4. Creating user accounts
      1. Writing the createAccount utility
      2. Running the createAccount utility
      3. Creating the USD asset
        1. Creating a new asset object
        2. Extending trustlines to receive accounts
        3. Writing the utility
        4. Running the utility
      4. Funding the user accounts with USD
        1. Writing the utilities
        2. Running the utities
    5. Setting up the bank domains 
      1. Updating the hosts file
      2. Issuing the self-signed certificates for the domains
      3. Setting up the http server and stellar.toml file
      4. Setting up the bank's internal databases
    6. Setting up the federation servers
    7. Setting up the compliance server
    8. Setting up the bridge server
    9. Setting up the callbacks server
    10. Building the bank portal
      1. Building the bank portal backend 
      2. Building the bank portal frontend 
        1. Creating the React project environment
        2. Mapping the USD asset 
        3. Writing the App.js file
    11. Running the remittance platform
    12. Summary 
  12. Section 2: Blockchain Workflows Using Smart Contracts
  13. Building a Letter of Credit Workflow Module Using Smart Contracts
    1. Technical requirements
    2. Understanding smart contracts and blockchain-based workflows
      1. Scope of an LC workflow project
      2. Setting up the LC workflow
    3. Creating a USD token for accounting
    4. Deploying a USD token for accounting
    5. Creating an LC Master smart contract
      1. Writing the contract
    6. Creating an LC smart contract
    7. Deploying the LC Master smart contract
    8. Creating the LC module React app
      1. Creating the React project environment
      2. Setting up the contract interfaces
      3. Building the React components
        1. Creating the BankLogin.js component
        2. Creating the BankTabCreate.js component
        3. Creating the SellerTabSettle.js component
        4. Creating the SellerTabView.js component
        5. Creating the Container.js component
      4. Writing the app methods and creating the App.js file
        1. Writing the constructor() method
        2. Using the componentDidMount method
        3. Building the session setters
        4. Writing the createLC method
        5. Writing the viewLC method
        6. Writing the viewSingleLC method
        7. Writing the settleLC method
    9. Running the LC module
    10. Summary
  14. Section 3: Securing Digital Documents and Files Using Blockchain
  15. Building a Tamper-Proof Document Storage System
    1. Technical requirements
    2. Tamper-proof document storage using blockchain 
    3. Setting up the Hyperledger Fabric network 
      1. Bringing the first network sample online
      2. Creating the admin and user identities
    4. Writing and deploying the DocsApp chaincode 
      1. Writing the DocsApp smart contract 
      2. Deploying the DocsApp smart contract
    5. Building the backend services
      1. Writing the backend server
        1. Building a method for listing files in a directory
        2. Building a method to write a file hash to the blockchain
        3. Building a method to write the MTH and the FTH to the blockchain
        4. Building a method to read MTH and FTH from the blockchain
        5. Building a function to compare the current hash signature of a file with the hash recorded in the blockchain
        6. Writing a backend service for securing a directory by recording hashes in the blockchain
        7. Writing a service to verify the last modified time and the file tree structure
        8. Writing a service to inspect and identify tampered files
    6. Creating a React frontend for the app
      1. Creating the React project environment
      2. Building the container component
      3. Building the PathMapper component
      4. Building the FolderBlock component
      5. Building the FolderBlockChkStatus component
      6. Writing the app methods 
        1. Creating a method to set the timer interval
        2. Creating a method to write the hashes to the blockchain
        3. Creating a method to check for a mismatch between the last modified time and the file tree structure
        4. Writing a method to check whether any files have been added or removed from the directory
        5. Writing a method for identifying tampered files from the list of files
    7. Running the tamper-proof application
    8. Summary
  16. Section 4: Decentralized Trading Exchanges Using Blockchain
  17. Building a Decentralized Trading Exchange
    1. Technical requirements
    2. Decentralized trading exchanges
      1. Basic components of a trading exchange 
      2. Scope of the decentralized exchange project
    3. Issuing the trading assets
      1. Writing the contracts
      2. Compiling the contracts 
    4. Orderbook smart contract
      1. Writing the contract
      2. Migrating all the contracts to the blockchain 
    5. Building the exchange app
      1. Building the app 
      2. Creating the React project environment
      3. Setting up the contract interfaces
      4. Writing the App.js file
        1. Displaying the orderbook
        2. Watching orderbook events
        3. Initiating a buy order 
        4. Initiating a sell order
        5. Setting the user asset balances
    6. Running the exchange app
    7. Summary
  18. Developing a Currency Trading Exchange for Market Making
    1. Technical requirements
    2. Introducing the distributed currency trading exchange
    3. Building the private test Stellar network
    4. Creating the user accounts
      1. Writing the CreateAccount utility
      2. Running the CreateAccount utility
    5. Creating trading currency assets
      1. Creating a new asset object
      2. Extending trustlines to receiving accounts
        1. Writing the utility
        2. Running the utility
      3. Transferring the assets from the issuing account
        1. Writing the utilities
        2. Running the utilities
    6. Building the currency trading exchange
      1. Creating the React project environment
      2. Setting up the asset interfaces
      3. Writing the App.js file
        1. Setting the default user account
        2. Setting the account balance
        3. Displaying the orderbook
        4. Displaying successful trades to the user
        5. Buying and selling assets
        6. Setting the active trading asset pair
    7. Running the currency exchange
    8. Summary
  19. Looking into the Future
    1. Summarizing our journey
    2. Extending concepts to other applications
    3. The road ahead – some additional blockchain concepts
    4. Conclusion
  20. Appendix: Application Checklist
    1. Application checklist 
      1. Design checklist  
      2. Development checklist  
      3. Testing checklist
      4. Deployment checklist
  21. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
3.230.1.23