FinBridge is a revolutionary decentralized peer-to-peer lending platform built on the Ethereum blockchain. It eliminates traditional financial intermediaries, allowing users to directly lend and borrow cryptocurrency in a trustless, transparent, and secure environment.
- Smart Contract Security - All transactions secured by audited smart contracts
- Auto-Calculated Interest Rates - Dynamic pricing based on loan amount and duration
- Instant Matching - Real-time loan request and funding system
- Transparent Analytics - Complete visibility into market metrics and performance
- Advanced Filtering - Sophisticated loan discovery and risk assessment tools
- No Intermediaries - Direct peer-to-peer transactions without banks
- Global Access - Available 24/7 to anyone with an Ethereum wallet
- React 18 - Modern UI framework
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Ethers.js - Ethereum blockchain interaction
- Shadcn/ui - Beautiful component library
- Solidity - Smart contract development
- Hardhat - Ethereum development environment
- OpenZeppelin - Security-focused contract libraries
- Ethers.js - Contract deployment and interaction
- Ethereum - Primary blockchain network
- MetaMask - Wallet integration
- Ethereum Sepolia - Development and testing
Before running FinBridge on Sepolia, ensure you have:
- Node.js (v16 or higher)
- npm or yarn
- MetaMask browser extension
- Git
- Sepolia ETH (get from faucet)
git clone https://github.com/your-username/FinBridge.git
cd FinBridgecd backend
npm install
npm run deploy:sepoliaEdit frontend/client/src/contracts/loan-abi.js:
export const LOAN_CONTRACT_ADDRESS = "0xa307518974eB04F6Cdb723e3a12eC7e194EE5Aa9";cd frontend/client
npm install
npm run devFrontend will be available at
http://localhost:5001
-
Add Sepolia Testnet to MetaMask:
- Network Name:
Sepolia Testnet - RPC URL:
https://rpc.sepolia.org - Chain ID:
11155111 - Currency Symbol:
SepoliaETH
- Network Name:
-
Import your wallet with Sepolia ETH
- Connect Wallet - Connect your MetaMask wallet to the application
- Create Loan Request - Set amount (0.01-1000 ETH) and duration
- Browse Marketplace - View and filter available loan requests
- Fund Loans - Lend to borrowers and earn interest
- Manage Portfolio - Track your loans and earnings
| Feature | Traditional Banks | FinBridge |
|---|---|---|
| Approval Time | Days to weeks | Instant |
| Interest Rates | Fixed, high fees | Market-driven, transparent |
| Global Access | Limited by geography | Available worldwide |
| Transparency | Opaque processes | Fully transparent |
| Intermediary Fees | High fees | Minimal gas fees only |
| Collateral Requirements | Extensive documentation | Crypto-based |
- Lower Costs - No banking fees, only minimal gas costs
- Speed - Instant loan processing and funding
- Security - Immutable smart contracts ensure trust
- Accessibility - Open to anyone with crypto wallet
- Better Returns - Competitive interest rates for lenders
- Flexibility - Customizable loan terms and amounts
- Transparency - All transactions visible on blockchain
FinBridge/
├── backend/
│ ├── contracts/
│ ├── scripts/
│ ├── test/
│ ├── hardhat.config.js
│ └── package.json
├── frontend/
│ ├── client/
│ │ ├── src/
│ │ │ ├── components/
│ │ │ ├── context/
│ │ │ ├── contracts/
│ │ │ ├── pages/
│ │ │ └── hooks/
│ │ └── package.json
│ └── package.json
├── README.md
└── SECURITY.md
- Loan Creation - Users can create loan requests with custom terms
- Automatic Interest Calculation - Dynamic rates based on amount and duration
- Secure Funding - Protected fund transfers between parties
- Loan Repayment - Automated repayment processing
- Event Logging - Comprehensive transaction history
Final Interest Rate = Base Rate (5.2%) + Amount Adjustment + Duration Adjustment
Amount Tiers:
• 0.1 - 1 ETH: +0%
• 1 - 10 ETH: +1%
• 10 - 50 ETH: +2%
• 50 - 100 ETH: +3%
• 100 - 500 ETH: +5%
• 500 - 1000 ETH: +7%
Duration Tiers:
• 7 - 30 days: +0%
• 31 - 90 days: +1%
• 91 - 180 days: +2%
• 181 - 365 days: +3%
Phase 2, Day 2 - Security Review:
-
1 Critical vulnerability fixed (Reentrancy)
-
2 Medium issues resolved
-
4 Low/Gas optimizations implemented
-
ReentrancyGuard protection on all state-changing functions
-
24-hour pause time lock for emergency stops
-
Proper interest rate calculation (basis points precision)
-
Comprehensive event emission for monitoring
-
Checks-Effects-Interactions pattern applied
Detailed Reports:
- SECURITY.md - Full security audit report
- GAS_REPORT.md - Gas optimization analysis
Average Gas Savings: 18%
| Function | Before | After | Savings |
|---|---|---|---|
createLoanRequest() |
180,000 | 165,000 | 8% |
fundLoan() |
95,000 | 78,000 | 18% |
repayLoan() |
85,000 | 68,000 | 20% |
Run the smart contract tests:
cd backend
npx hardhat testRun frontend tests:
cd frontend/client
npm testFinBridge is configured for Sepolia Testnet deployment with automatic Etherscan verification.
Create .env file in backend/ folder:
PRIVATE_KEY=your_metamask_private_key_here
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY
ETHERSCAN_API_KEY=your_etherscan_api_keyGet your API keys:
- Alchemy: https://alchemy.com (for RPC)
- Etherscan: https://etherscan.io/myapikey (for verification)
- Sepolia ETH: https://sepoliafaucet.com (for gas fees)
cd backend
npm installcd backend
npm run deploy:sepoliaThis will:
- Deploy contract to Sepolia
- Verify on Etherscan automatically
- Output contract address and explorer link
Edit frontend/client/src/contracts/loan-abi.js:
export const LOAN_CONTRACT_ADDRESS = "your_deployed_contract_address";Vercel:
cd frontend/client
npm install -g vercel
vercelNetlify:
cd frontend/client
npm run build
# Drag 'dist' folder to Netlify| Network | Chain ID | Contract Address | Explorer |
|---|---|---|---|
| Sepolia | 11155111 | 0x0102b9dcB6fA2Adfa7E78e01A8669e4e5b7674FB |
View on Etherscan |
cd backend
npx hardhat node
npx hardhat run scripts/deploy.js --network localhostWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Basic security mitigations implemented using OpenZeppelin libraries
- Reentrancy protection and access controls in place
- No formal security audit conducted
- Use at your own risk for educational purposes
- Discord: junaid_mollah_89812
- Twitter: @JunaidMollah5
- Email: junaidmollah17@gmail.com
- Phase 1: Core lending functionality
- Phase 2: Advanced filtering and analytics
- Phase 3: Mobile app development
- Phase 4: Multi-chain support
- Phase 5: Governance token launch
- Phase 6: Advanced DeFi integrations
Built with love by Junaid
