Aifba Exp - 1
Aifba Exp - 1
Subject: AI for Financial & Banking application Course Code: CSDL 8011
Semester: 8 Course: AI&DS
Laboratory no.:101 Name of subject teacher: Dr. Seema Ladhe
Name of student: Aaditya M.Sharma Roll no: VU2F2122050
Experiment No. 01
Theory:
What is a digital money transfer system?
A digital payment is the exchange of money from one payment account to another over a digital channel
of communication, such as mobile wireless data or SWIFT, or a digital device, such as a POS (Point of
Sales). There is no middleman or third-party organization like banks or financial institutions to function
physically as the enabler of these services.
By streamlining the current financial system, digital money transfers facilitate faster and more
affordable financial transactions. They may also make it simpler for central banks to implement
monetary policy effectively.
2. Main Functionality
• Genesis Block Creation:
o The blockchain starts with a predefined genesis block.
• Transaction Handling:
o The user inputs the sender, receiver, and transaction amount.
o The transaction is validated:
▪ If valid, a new block is added with the transaction details.
▪ If invalid (e.g., insufficient balance), an error is shown.
o The blockchain and user balances are updated accordingly.
• Blockchain Validation:
o At the end, the program verifies the integrity of the entire chain using is_chain_valid.
3. Key Features
1. Proof of Work (PoW):
o Ensures blocks are not added too easily, preventing spamming.
o Requires computational effort to find a suitable new_proof.
2. Balances:
o Tracks user balances to enforce transaction validity.
3. Immutability:
o The hash mechanism ensures that blocks cannot be tampered with without invalidating the chain.
4. Interactive Transactions:
o Allows users to input multiple transactions iteratively.
4. Example Execution
1. Genesis block is created and its hash is displayed.
2. Users input transaction details:
o If valid, the transaction is added to a new block, and the updated hash is displayed.
3. At any point, users can stop adding transactions.
4. The program validates the entire blockchain for integrity.
Output:
Conclusion:
This program demonstrates the fundamental principles of blockchain technology in a simplified and interactive
manner. By implementing core components such as blocks, hashes, proof-of-work, and transaction validation, it
showcases how a decentralized ledger ensures security, transparency, and integrity.
The proof-of-work mechanism introduces computational difficulty, ensuring that adding new blocks requires
effort, thus protecting against tampering. The program also incorporates a basic balance tracking system,
making it a practical example for simulating cryptocurrency transactions.
R1 R2 R3
DOP DOS Conduction File Record Viva -Voce Total Signature
5 Marks 5 Marks 5 Marks 15 Marks