⚠️ IMPORTANT DISCLAIMER: This project is NOT affiliated with the Federal Deposit Insurance Corporation (FDIC). It's an educational demonstration only. See DISCLAIMER.md for full legal notice.
This repository contains the code for an On-Chain FDIC Insurance Decentralized Application (DApp), which simulates insurance mechanisms similar to those provided by traditional deposit insurance using Ethereum smart contracts and a React.js frontend.
- Project Overview
- Features
- Technologies Used
- Project Structure
- Installation and Setup
- Usage
- License
- Acknowledgements
The On-Chain FDIC Insurance DApp is a conceptual demonstration of how deposit insurance can be managed in a decentralized manner using blockchain technology. It allows:
- Regulators to register banks and mark them as failed.
- Depositors to deposit funds into registered banks.
- Depositors to claim insurance if a bank fails.
Note: This project is for educational purposes and should not be used in production environments.
- Smart Contract: Implements the FDIC insurance logic using Solidity.
- Frontend DApp: Allows users to interact with the smart contract via a user-friendly interface.
- Ethers.js v6 Integration: Updated to work with the latest version of Ethers.js.
- Wallet Support: Compatible with MetaMask and can be extended to support other wallets.
- Solidity: Smart contract development.
- Truffle: Development environment for Ethereum.
- React.js: Frontend framework for building the user interface.
- Ethers.js v6: Library for interacting with the Ethereum blockchain.
- Ganache: Local blockchain for development and testing.
- MetaMask: Browser extension for interacting with the Ethereum network.
fdic-dapp/
├── contracts/
│ └── OnChainFDIC.sol # Smart contract implementing FDIC insurance logic
├── migrations/
│ └── 1_initial_migration.js # Initial migration script
├── frontend/
│ ├── public/
│ │ └── index.html # Entry point for the React app
│ ├── src/
│ │ ├── abis/ # ABI files generated by Truffle
│ │ ├── components/ # React components for the DApp
│ │ ├── BlockchainProvider.js # Context provider for blockchain interactions
│ │ ├── useFDICContract.js # Custom hook for interacting with the smart contract
│ │ ├── App.js # Main application component
│ │ └── index.js # Entry point for the React app
│ ├── package.json # Package manifest file
│ └── ...
├── build/
│ └── contracts/ # ABI files generated by Truffle during deployment
├── truffle-config.js # Configuration file for Truffle
├── package.json # Package manifest file
├── package-lock.json # Lockfile for npm dependencies
├── node_modules/ # Node modules directory
├── .git/ # Git repository metadata
├── .gitignore # File to ignore during version control
├── README.md # This file
└── INSTALL.md # Installation and setup instructions
Please refer to the INSTALL.md file for detailed installation and deployment instructions.
After installation and deployment, you can interact with the DApp by:
- Depositing Funds: Enter the bank's address and the amount you wish to deposit.
- Claiming Insurance: If a bank fails, you can claim insurance up to the insured amount.
- Regulator Actions: Using Truffle Console, you can register banks and mark them as failed.
This project is licensed under the MIT License.
-
Ethereum Community: For extensive documentation and support.
-
Truffle Suite: For simplifying Ethereum development.
-
Ethers.js: For providing a robust library to interact with Ethereum.
-
OpenAI's ChatGPT: For assistance in code generation and documentation.
-
NSF Award: This material is based upon work supported by the National Science Foundation under Award No. 2337771 (SBIR Phase I).
Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.