# Reimbursements
# Introduction
A reimbursement describes an amount of money transferred from a project's wallet to a lender's wallet. This amount represents a portion of the amount owed by the borrower to a lender with interests.
# Reimbursement calculation
For reimbursement calculation, we use two method : Infine & Linear. Both method are explained in below section. Once the reimbursement is calculated, reimbursement data is stored in three different collections.
# Reimbursement plan
In reimbursement plan, we store reimbursement information for every project. It stores a summary of reimbursement.
Column | DataType | Description |
---|---|---|
_id | ObjectId | Primary key of the collection |
total | Integer | Total amount of respective project need to reimburse |
totalAmortization | Integer | Total amount of amortization of respective project need to reimburse |
totalInterest | Integer | Total amount of Interest of respective project need to reimburse |
reimbursementTerms | Array | Reimbursement Terms associated with this Reimbursement Plan |
paid | Boolean | Determines whether the reimbursement plan is complete |
projectId | ObjectId | Project associated with reimbursement |
createdAt | datetime | Created date and time |
updatedAt | datetime | Updated date and time |
# Reimbursement term
In reimbursement terms, we store reimbursement information for every project for specific term. It stores a summary of reimbursement for a specific term.
Column | DataType | Description |
---|---|---|
_id | ObjectId | Primary key of the collection |
totalReimbursementTerm | Integer | Total amount of respective project need to reimburse for that term |
totalReimbursementTermAmortization | Integer | Total amount of amortization of respective project need to reimburse for that term |
totalReimbursementTermInterest | Integer | Total amount of Interest of respective project need to reimburse for that term |
reimbursements | Array | Reimbursement associated with this Reimbursement Term |
paid | Boolean | Determines whether the reimbursement term is complete |
executionAt | datetime | ideal date and time when reimbursement term should be triggered |
projectId | ObjectId | Project associated with reimbursement term |
createdAt | datetime | Created date and time |
updatedAt | datetime | Updated date and time |
reimbursedAt | datetime | Actual date and time when reimbursement was triggered |
# Reimbursement
In reimbursement , we store reimbursement information for every lender who has invested in a specific project.
Column | DataType | Description |
---|---|---|
_id | ObjectId | Primary key of the collection |
title | String | Title of project |
total | Integer | Total amount to be reimburse |
amortization | Integer | Total amortization amount to be reimburse |
interest | Integer | Total interest amount to be reimburse |
incomeTax | Integer | Total income tax to be paid |
socialTax | Integer | Total social tax to be paid |
from | integer | Project wallet id |
to | integer | Lender wallet id |
paid | boolean | reimbursement payment status |
taxPaid | boolean | tax payment status |
contractUrl | String | Url where the investment contract is store |
projectId | ObjectId | Project associated with reimbursement |
userId | ObjectId | User associated with reimbursement |
executionAt | datetime | ideal date and time when reimbursement should be triggered |
investmentId | ObjectId | Investment associated with this reimbursement |
createdAt | datetime | Created date and time |
updatedAt | datetime | Updated date and time |
reimbursedAt | datetime | Actual date and time when reimbursement was triggered |
transactionId | Integer | Transaction id for payment between project wallet and user wallet |
taxTransactionId | Integer | Transaction id for payment between project wallet and tax wallet |
# Reimbursement types
# Early
INFO
Early reimbursement can only be done by the admin. To perform this action you need to follow the steps given below:
First login to admin panel.
Go to projects listing section.
Then follow these steps for finding the project for which you want to do early reimbursement.
TIP
You can only do early reimbursement for the projects whose status is SUCCESSFUL
. So filter out projects based on SUCCESSFUL
status.
Once you found the desired project, open the menu of actions.
Click on Reimbursement option.
- A dialog with details of reimbursements will open, click on Early Reimbursement.
- Now you will see confirmation dialog. Click on Yes to confirm the early reimbursement for the project.
# Infine amortization
Infine amortization is applied when the borrower create a project with AMORTIZING BONDS i.e Bonds with infine reimbursement. In this amortization, borrower would be paying fixed interest to lender for n number of year where n is decide by borrower. On the last of payment, borrower would be payment the interest plus amortization amount.
TIP
Eg. Consider a lender investing Euro 1000 in Project A and Project A provides a rate of interest of 5% per year for 5 year.
Sr No | Date | Amortization | Interest | Total |
---|---|---|---|---|
1 | 2022-03-01 | 0 | 50 | 50 |
2 | 2023-03-01 | 0 | 50 | 50 |
3 | 2024-03-01 | 0 | 50 | 50 |
4 | 2025-03-01 | 0 | 50 | 50 |
5 | 2026-03-01 | 1000 | 50 | 1050 |
# Linear amortization
Linear amortization is applied when the borrower create a project with CONSTANT ANNUITY i.e Bonds with constant annuity. In this amortization, borrower would be paying fixed interest to lender for n number of year where n is decide by borrower. On every reimbursement, borrower would return certain amount from amortization.
TIP
Eg. Consider a lender investing Euro 1000 in Project A and Project A provides a rate of interest of 5% per year for 5 year.
Sr No | Date | Amortization | Interest | Total |
---|---|---|---|---|
0 | 2022-03-01 | 180 | 50 | 230 |
1 | 2023-03-01 | 189 | 41 | 230 |
2 | 2024-03-01 | 198 | 32 | 230 |
3 | 2025-03-01 | 208 | 22 | 230 |
4 | 2026-03-01 | 225 | 11 | 236 |
# Reimbursement cron
# Typology
TODO: complete docs (description, when it occurs, etc.)
# Error handling
Whenever a reimbursement triggers there are multiple possibilities that fund transfer might fail. eg. Insufficient wallet balance, API unavailable etc.
These types of issue are handled by paid fails in every reimbursement plan, reimbursement term and reimbursement. So whenever a fund transfer fails, it handle in next cron where it is executed again.