In Fintech, speed is everything. But speed without security is dangerous. I built this system to answer a critical question: How can we catch a thief before the money leaves the bank?
Instead of relying on AI black boxes, I wanted to understand the core logic of fraud detection by building a Rule-Based Engine from scratch. This script analyzes transaction batches and flags suspicious activity based on standard banking security protocols.
The system scans every transaction against a set of strict security rules:
-
Velocity Check (The "Stolen Card" Scenario):
- Logic: If a single card is used 4 or more times in a short batch, it triggers an alert.
- Why: Thieves often test stolen cards with small, rapid purchases.
-
High-Value Shield:
- Logic: Any transaction over 10,000โฌ is instantly flagged for manual review.
- Why: To prevent massive capital loss in a single hit.
-
Blacklist Protocol:
- Logic: Cross-references email domains against a known list of scam providers (e.g.,
scam-domain.xyz). - Why: Fraudsters rarely use legitimate corporate emails.
- Logic: Cross-references email domains against a known list of scam providers (e.g.,
- Python 3.10: Used for its speed in data processing.
- JSON: For handling structured transaction data.
- Algorithmic Logic: Custom-built filtering and aggregation loops (no external heavy libraries needed for this efficiency).
Want to see the detector in action?
- Clone the repo:
git clone [https://github.com/Anguis400/fraud-detection-system.git](https://github.com/Anguis400/fraud-detection-system.git)
- Run the analysis:
python main.py
- Check the logs: You will see a detailed report in the terminal showing exactly which transactions were rejected and why.
Developed by Anguis400 to demonstrate secure coding practices in Fintech.