<aside> <img src="/icons/computer-chip_lightgray.svg" alt="/icons/computer-chip_lightgray.svg" width="40px" /> SIM Applet Conversion: Fidutam is converted into a SIM applet using Java Card technology. This allows the application to be executed directly on a SIM card, eliminating the need for an additional device and ensuring scalability. The Java Card technology allows Java-based applications to run on smart cards and similar small memory footprint devices, making it ideal for 2G phones. The conversion process involves compiling the Java code into a CAP file (Java Card Applet) which is then loaded onto the SIM card using a card reader and APDU commands.

<aside> <img src="/icons/command-line_lightgray.svg" alt="/icons/command-line_lightgray.svg" width="40px" /> Hosting on WhatsApp: The application is hosted on the familiar WhatsApp interface using the WhatsApp Business API and Twilio Library. This makes the application easily accessible to users. The Twilio Library is used to create a WhatsApp bot that interacts with users through natural language processing (NLP). The NLP model is trained using TensorFlow and converted to a TensorFlow Lite model to run on the limited resources of a SIM card. The model is trained on a corpus of financial and banking related conversations to understand and respond to user queries.

<aside> <img src="/icons/window_lightgray.svg" alt="/icons/window_lightgray.svg" width="40px" /> User Authentication: For user authentication, Fidutam utilizes the Hyperledger Aries with Interledger Protocol for the payment channel implementation and IPFS for off-chain storage of the user's data and transaction history. This allows transactions to occur without the need for constant internet connectivity or electricity. The Interledger Protocol is used to create a payment channel between the user and Fidutam, allowing for the transfer of funds. The user's data and transaction history are stored off-chain on IPFS, a distributed file system that allows for data to be stored and accessed without a central authority.

<aside> <img src="/icons/code_lightgray.svg" alt="/icons/code_lightgray.svg" width="40px" /> Input/Image Processing: Fidutam uses the user's personal information, selfie image, and satellite coordinates, as inputs. The selfie image is processed using a convolutional neural network (CNN) implemented with Keras. The CNN processes features of the image, breaking it down into individual pixels and then extracting the hexcode of each pixel. These hexcodes are then concatenated into a large string.

<aside> <img src="/icons/snippet_lightgray.svg" alt="/icons/snippet_lightgray.svg" width="40px" /> Decentralized Identities (DIDs): With the uPort SDK and Hyperledger protocol, DIDs and verifiable credentials are used to construct a user’s digital signature on the blockchain. The digital signature is then added to the Hyperledger Fabric blockchain. The user's personal information and selfie are hashed using the AES-256 algorithm and the hash is used as the user's DID. The DID is then registered on the blockchain using a smart contract.

<aside> <img src="/icons/code-scan_lightgray.svg" alt="/icons/code-scan_lightgray.svg" width="40px" /> QR Code Generation: With QRCode, a QR code with a unique identifier that corresponds to the user's public digital DID and wallet is generated. This enables secure third-party financial or ID-based interactions.

<aside> <img src="/icons/barcode_lightgray.svg" alt="/icons/barcode_lightgray.svg" width="40px" /> Microloan Distribution: Fidutam uses a smart contract to trigger a pre-determined $50-100 to be transferred to the user upon successful verification of their identity through the QR code linked to their public identifier. The smart contract is implemented using Solidity and runs on the Ethereum blockchain. The loan data is linked to the user's DID and stored on the blockchain. The loan data includes the amount, the date of issuance, and the repayment date. This data is encrypted and stored on the blockchain, ensuring transparency and security.

<aside> <img src="/icons/database_lightgray.svg" alt="/icons/database_lightgray.svg" width="40px" /> Database Management: Apache Cassandra is used for data management and distribution. To ensure robustness, a data partitioning strategy using consistent hashing was implemented. This distributes the data across multiple nodes and reduces load on a single node. A replication factor of 3 ensures multiple copies of the data are maintained across different nodes, providing redundancy and increasing fault tolerance.

<aside> <img src="/icons/network_lightgray.svg" alt="/icons/network_lightgray.svg" width="40px" /> Performance Optimization: Performance profiling tools were used to refactor the code using techniques such as caching, lazy loading, and off-chain computation. This reduced the number of database queries and load on the blockchain network, improving the overall performance of the contract. Caching is implemented using Redis to store small, frequently accessed data locally, reducing the need for database queries. Lazy loading is used to load data on demand, reducing the initial load time. Off-chain computation is achieved by performing calculations and processing data off the blockchain, reducing the load on the blockchain network.

<aside> <img src="/icons/looped-square_lightgray.svg" alt="/icons/looped-square_lightgray.svg" width="40px" /> Codebase and Languages: The codebase is organized into modules based on functionality. The front-end module is written in Java using the JavaFX library. The back-end module is written in Python using the Flask web framework. The blockchain module is written in Solidity for the smart contracts and Go for the chaincode. The database module is written in Java for the Cassandra database. The image processing module is written in Python using the Keras library for the CNN. The encryption module is written in Java using the Java Cryptography Extension (JCE) for the AES-256 encryption. The NLP module is written in Python using the TensorFlow library. The codebase is managed using Git for version control and Jenkins for continuous integration and deployment.

</aside>

</aside>

</aside>

</aside>

</aside>

</aside>

</aside>

</aside>

</aside>

<aside> <img src="/icons/cursor-click_lightgray.svg" alt="/icons/cursor-click_lightgray.svg" width="40px" /> Packing in and Frontend The frontend of the application is developed using JavaFX, a Java library for building rich internet applications. The application is divided into modules, each responsible for a specific feature, such as user authentication, transaction processing, or data caching. These modules communicate with each other through well-defined interfaces, ensuring that changes in one module do not affect the others. The application is then compiled into a Java Card applet, which is a Java application designed to run on smart cards and similar small memory footprint devices. The applet is then installed onto the SIM card using the SIM Toolkit (STK), a standard developed by the GSM association that enables applications to interact with the network and the handset. The STK provides a set of commands that the applet can use to interact with the user, send SMS messages, or access the network, allowing the application to function without an internet connection.

</aside>