updated maths for float accounts
This commit is contained in:
parent
6a537899a8
commit
a8df7ca4f7
@ -1,15 +1,12 @@
|
|||||||
## Incoming Sarafu ##
|
## Incoming Sarafu ##
|
||||||
When users exchange CICfor National Currency we have to manually send them Mpesa.
|
When users exchange CIC <> National Currency we have to manually send them Mpesa or CIC.
|
||||||
We would like to automate this.
|
We would like to automate this.
|
||||||
|
|
||||||
## Outgoing Sarafu ##
|
|
||||||
When anyone sends us Mpesa on our paybill we have to manuall send them Sarafu
|
|
||||||
|
|
||||||
## Solution ##
|
## Solution ##
|
||||||
Configure - using our own system AfricasTalking API to automatically send Sarafu / Mpesa based on rules:
|
Configure - using our own system AfricasTalking API to automatically send Sarafu / Mpesa based on rules:
|
||||||
|
|
||||||
### Incoming Sarafu Rules ###
|
### Incoming Sarafu Rules - MPESA out###
|
||||||
- *white list* The chama (group accounts only) must only be able to cash out - using the exchange option to an Agent account
|
- *white list* The chama (group accounts only but eventually anyone) must only be able to cash out - using the exchange option to an Agent account
|
||||||
- *amount* The max cash out is the minimum of (30,000 Sarafu, half their balance, their total amount of outward trade volume to other users (standard transactions)
|
- *amount* The max cash out is the minimum of (30,000 Sarafu, half their balance, their total amount of outward trade volume to other users (standard transactions)
|
||||||
- *time* They can only cash out once per month
|
- *time* They can only cash out once per month
|
||||||
- *rate* The Sarafu (and their community) to Mpesa rate should be calculated as follows:
|
- *rate* The Sarafu (and their community) to Mpesa rate should be calculated as follows:
|
||||||
@ -22,12 +19,12 @@ The Reserve (xDAI) pulled out
|
|||||||
> const reserveOut_xDAI = total_reserve_b * (Math.pow(1 + (-1 * CIC_burn) / CIC_supply_b, 1 / trr) - 1);
|
> const reserveOut_xDAI = total_reserve_b * (Math.pow(1 + (-1 * CIC_burn) / CIC_supply_b, 1 / trr) - 1);
|
||||||
|
|
||||||
- Mpesa_out = reserveOut_xDAI **USD => KSH** rate
|
- Mpesa_out = reserveOut_xDAI **USD => KSH** rate
|
||||||
- reserve_given = reserve_out - CIC_created*fee (0.02)
|
- reserve_given = reserve_out - CIC_created*fee (0.02) (this is given to the user)
|
||||||
- Simulate as if done on blockchain .... new_cic_supply_b = cic_supply_b - CIC_burn
|
- Simulate as if done on blockchain .... new_cic_supply_b = cic_supply_b - CIC_burn
|
||||||
- Simulate as if done on blockchain .... new_total_reserve_b = total_reserve_b - reserveOut_xDAI
|
- Simulate as if done on blockchain .... new_total_reserve_b = total_reserve_b - reserveOut_xDAI
|
||||||
|
|
||||||
|
|
||||||
### Outgoing Sarafu Rules ###
|
### Outgoing Sarafu Rules - MPESA In###
|
||||||
- *white list* Only users sending via paybill receive Sarafu. Non users receive a invitation to join Sarafu sms (alert to admins there was a donation).
|
- *white list* Only users sending via paybill receive Sarafu. Non users receive a invitation to join Sarafu sms (alert to admins there was a donation).
|
||||||
- *amount* The max sarafu out is 20,000 Sarafu per user, KYC_limit max, supply_max
|
- *amount* The max sarafu out is 20,000 Sarafu per user, KYC_limit max, supply_max
|
||||||
- *time* No limit
|
- *time* No limit
|
||||||
|
Loading…
Reference in New Issue
Block a user