Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

ColumnMeaning
base_idid in the m_collateral_base_value table for the particular base definition of a collateral
quality_standardQuality description (24 carat, 20 carat etc. for gold)
pct_to_baseQuality 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 .


The m_collateral table stores the actual collateral definition. For example if we want to store the definition of 24 carat gold, The `m_collateral`.`base_id` will store the `m_collateral_base_value` table id for the gold price entry. The `m_collateral`.`quality_standard` will store the definition of the collateral (24 carat in this case). The `m_collateral`.`pct_to_base` is the percentage value w.r.t. the base price of that collateral. 24 carat gold being the purest form will have this value as 100.0 (100%). Other definitions such as 22 carat will have values less than 100.0 in this column. In case of collaterals such as real estate there is no definition of purity as such, hence all collateral definitions will have 100.0 value in the `pct_to_base` column.

...

[
{
"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 ($)"
}
}
]
Implementation till now

https://github.com/karthikiyer/incubator-fineract/commit/1504cd8b54a03077e1722f6feb9c3025cf448fb5 tree/collateral-module

The above design is under review and will go through multiple changes which will be reflected in this document.