This project explores a decentralized approach to credit scoring by leveraging non-traditional data sources such as phone bills, utility payments, and other financial records. Built using Python, Solidity, and the Brownie framework, the system calculates credit scores off-chain and stores summarized results on-chain using a local blockchain network powered by Ganache.
To prototype a transparent credit scoring mechanism that:
- Uses alternative financial data to determine creditworthiness
- Stores credit score summaries on-chain for traceability
- Enables queries of credit score metadata per blockchain update
This system is aimed at individuals looking to build decentralized credit profiles using responsible financial behavior outside of traditional banking systems.
This project was a personal deep dive into decentralized development and scripting. Key learning milestones include:
- Git and Version Control: Applied Git in a structured project setting for the first time.
- Smart Contracts with Brownie: Learned how to write, deploy, and interact with Solidity contracts through Brownie and Web3.py.
- Data Processing in Python: Built a system that recursively searches for CSV files, cleans the data, and merges them into a unified format for score processing.
- Manual Blockchain Interaction: Gained hands-on experience deploying and updating contracts via the Brownie CLI with Ganache.
- Problem Solving:
- Faced early issues with overly strict data validation filters resulting in empty merged datasets.
- Adapted by loosening the cleaner logic to convert malformed data into usable formats instead of discarding it outright.
- Python – Data parsing, CSV compilation, blockchain interaction scripts
- Brownie – Smart contract development and deployment
- Solidity – Credit score contract logic
- Ganache – Local Ethereum network for development
- Web3.py – Python interface to interact with Ethereum blockchain
- Scans the entire project directory for CSV files
- Cleans and merges valid entries into one master CSV
- Ensures data consistency before blockchain submission
- Stores a mapping of
{userID: creditScore}on-chain - Designed for easy updates when new credit score data is available
- Manual update pipeline via the Brownie console
update_credit_scorespushes latest scores from the combined CSV
- Smart contract exposes a function to retrieve metadata about on-chain entries and version history
.
├── smart_contracts/
│ ├── contracts/
│ │ └── CreditScoreContract.sol
│ ├── scripts/
│ │ ├── deploy_credit_contract.py
│ │ ├── update_credit_scores.py
│ │ ├── query_credit_scores.py
│ │ └── show_block.py
├── CreditScoreCreation.py
├── CsvCompiler.py
├── DataSetCleaning.py
├── *.csv
├── DirectoryPathways.env
└── brownie-config.yaml
-
Start Ganache
-
Open Brownie Console
brownie console- Deploy the Smart Contract
run('scripts/deploy_credit_contract')- Compile and Merge CSVs
python CsvCompiler.py- Update Credit Scores On-Chain
run('scripts/update_credit_scores')- Query Metadata or Scores
run('scripts/query_credit_scores')Note: You’ll need Python, Brownie, and Ganache properly installed. See the Brownie Installation Guide for setup details.
- All code is thoroughly commented for ease of understanding.
- This project has no frontend interface; it operates entirely through the CLI.
- The focus is on demonstrating end-to-end credit score calculation and blockchain integration using open-source tools.
AUTHOR: Melvin Thoompunkal