Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Implement borrower loan tracking in contractΒ #12

@JosueBrenes

Description

@JosueBrenes

Feature Request ✨

πŸ“ Title

Implement borrower loan tracking in contract

πŸ” Description

Implement functionality in the smart contract to track borrower loans, including amounts, terms, payments, interest, and loan status.

πŸ’‘ Proposed Solution

  • Add data structures to track loans per borrower
  • Implement functions to query loan history
  • Track completed and pending payments
  • Automatic calculation of interest and penalties
  • Events to notify loan changes
  • Query functions for frontend dashboard

🧠 Motivation / Related Problem

To be able to display real data in the borrowers dashboard (UI), we need the contract to provide loan information in a structured and queryable way.

πŸ“Έ Visuals / References

Required contract functionalities:

  • getBorrowerLoans(address borrower) - Returns all loans
  • getBorrowerTotalDebt(address borrower) - Returns total debt
  • getBorrowerPaymentSchedule(address borrower) - Returns payment schedule
  • getBorrowerLoanHistory(address borrower) - Returns complete history
  • calculateInterest(uint256 loanId) - Calculates current interest
  • Events: LoanTaken, PaymentMade, LoanDefaulted, InterestAccrued

πŸ“š Additional Notes

  • Priority: Feature (Contract Implementation)
  • Component: Smart Contract, Backend
  • Labels: enhancement, contract, borrower, tracking
  • RELATED: Borrowers UI dashboard issue
  • Implement notification system for upcoming payments
  • Consider different loan types and terms
  • Ensure data consistency with UI mockups
  • Include functionality for partial and full payments

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions