From 533b09b4b51deb5ae9a9b0e16a423cdf473b6b03 Mon Sep 17 00:00:00 2001 From: Will Ruddick Date: Tue, 30 Jun 2020 06:41:09 +0000 Subject: [PATCH] User interface --- spec/007_eMoney_integration.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/spec/007_eMoney_integration.md b/spec/007_eMoney_integration.md index b3801ee..407e715 100644 --- a/spec/007_eMoney_integration.md +++ b/spec/007_eMoney_integration.md @@ -9,10 +9,12 @@ Configure - using our own system AfricasTalking API to automatically send Sarafu - blockchain_CIC_Supply = the total supply of the CIC on the blockchain - blockchain_CIC_reserve = the total reserve (xDAI) of the CIC on the blockchain - trr = the connector weight on blockchain converter between supply and reserve + - FLoat CIC: THe amount of CIC supply we have in our master wallet + - FLoat Mpesa: THe amount of Mpesa supply we have in our PayBill account - total_CIC_sent = the total amount of CIC that has been sent to users from our Float account - this needs to be updated for each conversion and when clearing - - total_CIC_Reserve_Sent = the total amount of Reserve that has been sent to users from our Float account - this needs to be updated for each conversion and when clearing + - total_CIC_Reserve_Sent = the total amount of Reserve (xDAI) that has been sent to users from our Float account - this needs to be updated for each conversion and when clearing - total_CIC_recieved = the total amount of CIC that has been sent to users from our Float account - this needs to be updated for each conversion and when clearing - - total_CIC_Reserve_recieved = the total amount of Reserve that has been sent to users from our Float account - this needs to be updated for each conversion and when clearing + - total_CIC_Reserve_recieved = the total amount of Reserve (xDAI) that has been sent to users from our Float account - this needs to be updated for each conversion and when clearing - CIC_supply_b: **blockchain_CIC_Supply** - **total_CIC_sent** + **total_CIC_recieved** = this simulates/tracks the changes to the blockchain - CIC_reserve_b: **blockchain_CIC_reserve** - **total_CIC_Reserve_Sent** + **total_CIC_Reserve_recieved** = this simulates/tracks the changes to the blockchain - CIC_excahnge_amount = the amount of CIC they user has sent to exhange @@ -46,7 +48,7 @@ The Reserve (xDAI) pulled out - *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 - *time* No limit - - *CIC given* The amount of CIC given should be calculated as follows: + - *Mpesa_excahnge_amount* The amount of CIC given should be calculated as follows: - reserveIn_xDAI = Mpesa_excahnge_amount **KSH => USD** rate The amount cashed in = cash_in_amount @@ -61,6 +63,29 @@ The amount cashed in = cash_in_amount - total_CIC_Reserve_recieved+= reserveIn_xDAI +### Exchange Rate ### + +When dislaying the SPOT price or excahnge rate to a user we should use the following formula: +> Exchange Price = CIC_reserve_b / (CIC_supply_b * trr) + + +### User Interface ### + +- When a user chooses to ``Redeem```: + - They should enter the amount (limited to the max in their balance) + - They should get a confirmation Based on the above equations: + - The user should be asked you will revice **Mpesa_given** for **CIC_excahnge_amount**: Please type your PIN to confirm + - The user should get a Mpesa responce for recieving the Mpesa + +- When a user chooses to ``Contribute```: + - They should enter the amount of Mpesa they wish to contribute + - They should get a confirmation: + - Based on the above equations: + - The user should be asked you will revice **CIC_given** for **Mpesa_excahnge_amount**: Please type your PIN to confirm + - They will then get instructions on USSD as well as a SMS on how to send Mpesa or Bonga boints to our Lipa na Mpesa + + + ### Security ### - Balance alerts: On both Mpesa and CIC balances: The paybill from which Sarafu is sent needs to send a sms and email alert when low - Failure alerts: If the API session fails an sms and email alert should be sent