Update 007_eMoney_integration.md

This commit is contained in:
Will Ruddick 2020-06-30 06:31:32 +00:00
parent 2476d9fc9f
commit 00b270ba08

View File

@ -33,7 +33,7 @@ Configure - using our own system AfricasTalking API to automatically send Sarafu
The Reserve (xDAI) pulled out
> reserveOut_xDAI = CIC_reserve_b * (Math.pow(1 + (-1 * CIC_excahnge_amount) / CIC_supply_b, 1 / trr) - 1) --> this shoudl be calculated as it is done on contract
> reserveOut_xDAI = CIC_reserve_b * (Math.pow(1 + (-1 * CIC_excahnge_amount) / CIC_supply_b, 1 / trr) - 1) --> this should be calculated as it is done on contract
- Mpesa_out = reserveOut_xDAI **USD => KSH** rate
- **Mpesa_given = Mpesa_out - Mpesa_out*S22M (fee) this is the amount of Mpesa sent to the user**
@ -51,7 +51,7 @@ The Reserve (xDAI) pulled out
The amount cashed in = cash_in_amount
> const CIC_Created = CIC_supply_b * (Math.pow(1 + reserveIn_xDAI / CIC_reserve_b, trr) - 1);
> CIC_Created = CIC_supply_b * (Math.pow(1 + reserveIn_xDAI / CIC_reserve_b, trr) - 1) --> this should be calculated as it is done on contract
- **CIC_given = CIC_Created - CIC_created*FeeM2CC ()**
- Simulate as if done on blockchain .... new_cic_supply_b = cic_supply_b + CIC_given