Skip to content

Avalanche-Team1-DAO-Kenya/Micro-Lending-System

Repository files navigation

Micro-Lending System

The Micro-Lending System is a decentralized peer-to-peer lending platform built on the Avalanche C-Chain. It enables borrowers to request loans and lenders to fund them, with smart contracts enforcing agreed repayment terms.

The system automates penalties for late payments and rewards timely repayments, ensuring trust and security without intermediaries.


🔎 Features

  • Loan Requests: Borrowers can submit loan requests with specified repayment terms, interest rates, and loan amounts.
  • Smart Contract Enforcement: Loan agreements are governed by smart contracts, ensuring compliance with repayment deadlines.
  • Automated Penalties & Rewards: The system applies penalties for late payments and rewards responsible financial behavior.
  • User Ratings & Reviews: Borrowers and lenders can be rated and reviewed based on their transaction history.
  • Lending & Repayment: Lenders can fund loan requests, and borrowers can repay loans under agreed terms.

🛠 Tech Stack

Languages:

Solidity JavaScript

Frameworks:

Avalanche React Node.js Express

Tools:

Hardhat Web3.js Metamask Axios React Router


📌 Setup Instructions

⯍ Clone the Repository

$ git clone https://github.com/Avalanche-Team1-DAO-Kenya/Micro-Lending-System
$ cd micro-lending-system

⯍ Install Dependencies

$ npm install

⯍ Compile Smart Contracts

$ cd smart-contracts
$ npx hardhat compile

⯍ Configure Avalanche Network

  • Edit the .env file in both the backend and smart contracts folders.
  • Add your Avalanche network details and private key (from your Metamask connected to Core Wallet).

⯍ Deploy Smart Contracts to Fuji Testnet

$ npx hardhat run scripts/deploy.js --network fuji
  • Copy the deployed contract addresses from the terminal.
  • Update the blockchainService.js file in the backend folder.
  • Update the config.js file in the frontend folder.

⯍ Run the Application

  • Open two terminal windows.

Frontend:

$ cd micro-lending-frontend
$ npm start

Backend:

$ cd micro-lending-backend
$ node app.js

⯍ Ensure Sufficient AVAX Balance

  • Make sure your Core Wallet has enough AVAX to cover transactions.

👥 Team Members

Name Role
Mark Andrew Kamau Smart Contract Developer
Rita Njoki Frontend Developer
Mark Andrew Kamau Backend Developer
Rita Njoki Integration

🧨Milestones

Waitlist Landing Page Integration Smart Contract Integration with Frontend & Backend

🎖 Objective

Add a waitlist landing page to gather potential user interest, build anticipation, and collect early feedback.

Tasks:

  • Design Landing Page: Create a form with fields for name, email, and interest level.
  • Backend Integration: Store LoanRequest submissions and fetch loan details from MongoDB.
  • Launch Page: Make the page public and share it via social media and newsletters.
  • User Reviews & Ratings: Add borrower and lender ratings to the landing page and dashboard.
  • Loan Enforcement: Implement automatic deductions from wallets for overdue loans.

⛓️ Avalanche Checkpoints

  • Using Avalanche for Transactions: The platform connects to Avalanche’s C-Chain to process lending transactions.
  • Deploying Smart Contracts: Lending contracts handle loan issuance, repayments, and penalties securely on Avalanche.
  • Leveraging Avalanche’s Speed & Low Fees: Fast transactions and low gas fees ensure affordable lending.

📢 Connect with Us

For updates and support, follow us on Twitter, LinkedIn, or join our Telegram Group. 🚀