Collateral Module
Goals
- Implement a module that deals with collateral as an independent and dynamic entity of the Mifos X core system.
- Remove the current tight coupling between loans and collaterals.
Background
The collateral module currently implemented is a very basic and limited implementation. Currently the implementation expects a loan entry to be already presented in the system to create a corresponding collateral for that loan. This leads to 1-1 mapping between the collaterals and loans. This means that every time a new collateral has to be defined even when an exact same collateral scheme already exists with another loan. This leads to huge amount of data duplication. Also a user interested in wanting to research the different collaterals options available before taking a loan cannot do so.
By developing the collateral module we will maintain the collaterals as a separate entity. This way a single collateral definition can be associated with multiple loans. The base price of the underlying security can be adjusted dynamically without affecting the loan products. The user will also have an option to custom build a collateral as a combination of several individual collateral definitions. Even the financial institutions will have the option to roll out various collateral schemes based on specific use cases.
DB Design
Foreign Keys:
`m_loan_collateral`.`collateral.id` Refers `m_collateral`.`id`
Columns (Explanation)
m_collateral_base_value
Column | Meaning |
---|---|
type_cv_id | Thee code value table id of the particular collateral |
base_price | The base unit price of the collateral (eg: 31000 for (10 grams)gold, Rs. 5000/sq ft for real estate etc.) The base unit is pre decided. |
m_collateral
Column | Meaning |
---|---|
base_id | id in the m_collateral_base_value table for the particular base definition of a collateral |
quality_standard | Quality description (24 carat, 20 carat etc. for gold) |
pct_to_base | Quality value of the collateral as a percentage of the base quality ( 24(100%) carat, 20(83.33%) carat etc. for gold ) |
The m_collateral_base_value will mention the current market value of any collateral. It can be changed dynamically. For example If the Current market price of gold is 31k/10 grams, we will create an entry for gold collateral in m_code_value , refer it in the m_collateral_base_value and store 31k in the `m_collateral_base_value`.`base_price` column. This is the base value which will be used for all gold based collaterals created .
Basic Algorithm for Collateral value calculation
Basic Algo
[
{
"id": 6,
"collateralDetails": {
"codeValueName": "Gold Loan",
"quality": "22 carat",
"basePrice": 12.75,
"pctToBase": 77.5
},
"value": 29.64375,
"quantity": 3,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 7,
"collateralDetails": {
"codeValueName": "Gold Loan",
"quality": "24 carat",
"basePrice": 12.75,
"pctToBase": 80
},
"value": 51,
"quantity": 5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 11,
"collateralDetails": {
"codeValueName": "Gold Loan",
"quality": "trial quality",
"basePrice": 12.75,
"pctToBase": 75
},
"value": 57.375,
"quantity": 6,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
https://github.com/karthikiyer/incubator-fineract/tree/collateral-module
The above design is under review and will go through multiple changes which will be reflected in this document.