Cosmic Module

O

Qubits of DPK

March 23, 2026

Core Open Source

What This Module Is (Big Picture)

The investor module manages external investors who fund loans.
In some financial systems, loans are not funded entirely by the bank itself. Instead, investors provide capital that is used to fund lending.
This module enables:
  • tracking investors
  • allocating investor funds to loans
  • managing investor participation in loan portfolios
  • distributing loan repayments to investors
This allows financial institutions to raise capital from investors and share lending risk.

Layman Example

A bank originates a loan of ₹100,000.
Instead of funding the entire loan itself, the bank allows investors to participate.
Example:
If the borrower repays the loan, the repayments are distributed proportionally to the investors.
The fineract-investor module manages these investment relationships.

Where the Code Lives

Key Package

org.apache.fineract.portfolio.investor
Responsibilities include:
  • registering investors
  • tracking investor contributions
  • linking investors to loans
  • distributing repayments

Core Domain Entity:

Investor.java

Path
fineract-investor/src/main/java/org/apache/fineract/portfolio/investor/domain/Investor.java
This entity represents an external investor participating in loan funding.

Key fields on

Investor

Loan Participation Model

Investors participate in loans through loan portions.
Example
Loan amount = ₹100,000
Each participant owns a percentage share of the loan.

Repayment Distribution

When repayments occur, funds are distributed based on participation.
Example
Loan repayment = ₹10,000
The module calculates these distributions automatically.

Example Repayment Distribution Code

java
QUBITS OF DPK
1public Map<Investor, BigDecimal> distributeRepayment(
2        BigDecimal repaymentAmount,
3        Map<Investor, BigDecimal> investorShares) {
4
5    Map<Investor, BigDecimal> distribution = new HashMap<>();
6
7    for (Map.Entry<Investor, BigDecimal> entry : investorShares.entrySet()) {
8
9        BigDecimal investorShare = entry.getValue();
10        BigDecimal payment =
11                repaymentAmount.multiply(investorShare);
12
13        distribution.put(entry.getKey(), payment);
14    }
15
16    return distribution;
17}
This distributes repayments proportionally to investors.

Linking Investors to Loans

Relationship structure
Loan
Investor Participation
Investor
Each investor may fund multiple loans.

API Layer

Main controller
InvestorApiResource
Example endpoints
java
QUBITS OF DPK
1GET  /v1/investors
2POST /v1/investors
3GET  /v1/loans/{loanId}/investors
4POST /v1/loans/{loanId}/investors
These APIs allow administrators to:
  • register investors
  • allocate investors to loans
  • retrieve investment records

Read Services

Read services retrieve investor information.
Examples include:
  • retrieving investors
  • retrieving loan participation
  • retrieving investor portfolios
These services help generate investment reports.

Write Services

Write services manage investor relationships.
Responsibilities include:
  • registering investors
  • allocating funds to loans
  • updating investor participation
  • managing repayment distribution

Repository Layer

Exceptions

These prevent incorrect investment allocations.

How It All Connects (Full Flow)

Example: Investor funds a loan
java
QUBITS OF DPK
1Loan Origination
2Loan created
34Investor Allocation
5Assign investors
67Investment Validation
8Check funding coverage
910Database (loan investor table)

Why This Module Matters

Investor participation enables institutions to:
  • raise external capital
  • distribute lending risk
  • scale lending operations
This model is common in peer-to-peer lending and microfinance platforms.

One-Sentence Summary

fineract-investor manages external investors who fund loans and receive proportional repayments based on their investment share.