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 lender investment tracking in contract #13

@JosueBrenes

Description

@JosueBrenes

Feature Request ✨

📝 Title

Implement lender investment tracking in contract

🔍 Description

Implement functionality in the smart contract to track lender investments, including amounts, timestamps, returns, and investment status.

💡 Proposed Solution

  • Add data structures to track investments per lender
  • Implement functions to query investment history
  • Track returns and accumulated earnings
  • Events to notify investment changes
  • Query functions for frontend dashboard

🧠 Motivation / Related Problem

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

📸 Visuals / References

Required contract functionalities:

  • getLenderInvestments(address lender) - Returns all investments
  • getLenderTotalBalance(address lender) - Returns total balance
  • getLenderRewards(address lender) - Returns accumulated rewards
  • getLenderInvestmentHistory(address lender) - Returns history
  • Events: InvestmentMade, RewardsDistributed, WithdrawalMade

📚 Additional Notes

  • Priority: Feature (Contract Implementation)
  • Component: Smart Contract, Backend
  • Labels: enhancement, contract, lender, tracking
  • RELATED: Lenders UI dashboard issue
  • Consider gas optimization for frequent queries
  • Implement pagination for long histories
  • Ensure data consistency with UI mockups

Metadata

Metadata

Assignees

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