Compare commits

...

66 Commits

Author SHA1 Message Date
WillRuddick 6eb35c6bd6
move to git lab 2020-05-15 12:17:28 +03:00
WillRuddick d59cecaa48
Update 005_Platform_Smoke_Testing.md 2020-05-05 16:00:30 +03:00
WillRuddick fd8ff6e883
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:59:42 +03:00
WillRuddick a29fa6b7e0
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:56:19 +03:00
WillRuddick 6d15f1ac9c
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:37:28 +03:00
WillRuddick 48ea3e0a4e
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:36:18 +03:00
WillRuddick 6febdcf9c1
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:34:45 +03:00
WillRuddick ee5d7c330a
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:34:19 +03:00
WillRuddick 90853e7229
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:32:43 +03:00
WillRuddick b901dd9f4d
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:31:09 +03:00
WillRuddick ad453324a7
Update 005_Platform_Smoke_Testing.md 2020-05-05 15:29:14 +03:00
WillRuddick 2007eaab0b
Rename 004_Platform_Smoke_Testing.md to 005_Platform_Smoke_Testing.md 2020-05-03 11:06:19 +03:00
WillRuddick c03efda528
Create 004_Platform_Smoke_Testing.md 2020-05-03 11:06:01 +03:00
WillRuddick 43c7efef29
Basic parameters and bonding curve usage 2020-05-03 09:20:01 +03:00
WillRuddick 8cad64b141
Update 004_Platform_Roles.md 2020-05-02 11:39:00 +03:00
WillRuddick 7a7f3341b5
Update 004_Platform_Roles.md 2020-05-02 11:38:10 +03:00
WillRuddick 8892a9555a
Update 004_Platform_Roles.md 2020-05-02 11:38:01 +03:00
WillRuddick b1a35bda03
Update 004_Platform_Roles.md 2020-05-02 11:37:48 +03:00
WillRuddick 296c83a791
Update 004_Platform_Roles.md 2020-05-02 11:35:34 +03:00
WillRuddick e0373c941e
Update 004_Platform_Roles.md 2020-05-02 11:35:16 +03:00
WillRuddick 77e4e74a75
Create 004_Platform_Roles.md 2020-05-02 11:34:54 +03:00
lash 00c32c253f
Update bug_report.md 2020-04-28 21:13:07 +02:00
WillRuddick e95f948464
Update 001_platform_incentives.md 2020-04-26 07:49:37 +03:00
WillRuddick e5f57a1436
Update 002_xdai_migration.md 2020-04-24 21:18:55 +03:00
WillRuddick 7539db9268
Update 002_xdai_migration.md 2020-04-24 19:50:41 +03:00
WillRuddick 0fbf589ee5
Rename xdai_migration.md to 002_xdai_migration.md 2020-04-24 19:48:42 +03:00
WillRuddick f3a4261941
Update 001_platform_incentives.md 2020-04-24 11:28:44 +03:00
WillRuddick 5070e4af03
Update 001_platform_incentives.md 2020-04-24 11:27:46 +03:00
WillRuddick b25b5dc63f
Update 001_platform_incentives.md 2020-04-24 11:05:17 +03:00
WillRuddick 8c80372d38
Rename 01_depth_bump.md to 003_depth_bump.md 2020-04-24 11:03:31 +03:00
WillRuddick cf8129edb1
Rename 02_platform_incentives.md to 001_platform_incentives.md 2020-04-24 11:02:36 +03:00
WillRuddick f3afbb3a84
Update and rename platform_incentives.md to 02_platform_incentives.md 2020-04-24 11:02:11 +03:00
WillRuddick 069a88f9e5
Update xdai_migration.md 2020-04-23 21:07:13 +03:00
WillRuddick 82510bfe19
Update platform_incentives.md 2020-04-23 21:06:01 +03:00
WillRuddick 7f828766ef
Update xdai_migration.md 2020-04-23 21:03:21 +03:00
WillRuddick e3a2b865f8
Update platform_incentives.md 2020-04-23 20:14:26 +03:00
WillRuddick 5740a1981a
Update platform_incentives.md 2020-04-23 20:04:17 +03:00
WillRuddick 9a021105f9
Update platform_incentives.md 2020-04-23 19:56:33 +03:00
WillRuddick 40c1d05c24
Update platform_incentives.md 2020-04-23 17:13:55 +03:00
WillRuddick 5a58eee9da
Update platform_incentives.md 2020-04-23 12:03:47 +03:00
WillRuddick e04c443727
Update platform_incentives.md 2020-04-23 12:03:04 +03:00
WillRuddick 58ff875491
Update platform_incentives.md 2020-04-23 12:01:45 +03:00
WillRuddick d756501742
Update platform_incentives.md 2020-04-23 09:04:59 +03:00
WillRuddick 17ea25747d
Update platform_incentives.md 2020-04-23 09:03:17 +03:00
WillRuddick a06ce4167a
Update platform_incentives.md 2020-04-23 08:59:35 +03:00
WillRuddick 669857fff8
Update platform_incentives.md 2020-04-23 08:55:21 +03:00
WillRuddick 76e7bb9a10
Update xdai_migration.md 2020-04-23 08:33:10 +03:00
WillRuddick e0f722d797
Update xdai_migration.md 2020-04-22 18:33:38 +03:00
WillRuddick e4e6c62107
Create platform_incentives.md 2020-04-22 18:33:18 +03:00
WillRuddick f27725d97f
Update and rename xdai_reserve.md to xdai_migration.md 2020-04-22 18:27:06 +03:00
WillRuddick 8ce6534bcc
Update xdai_reserve.md 2020-04-22 18:13:53 +03:00
WillRuddick bae365652c
Update and rename xdai_reserve to xdai_reserve.md 2020-04-22 18:07:48 +03:00
WillRuddick 124b815b02
Create xdai_reserve 2020-04-22 18:06:06 +03:00
lash 07c970e2cd
Update bug_report.md 2020-04-22 09:05:25 +02:00
WillRuddick f464a43226
Merge pull request #1 from GrassrootsEconomics/max-cash-out-feature
changing the cash out rules for Chamas
2020-04-22 09:46:34 +03:00
WillRuddick c90f8cc52b
Merge pull request #74 from GrassrootsEconomics/add-template
add empty template
2020-04-22 09:45:59 +03:00
WillRuddick a547972fda
Delete feature.md 2020-04-22 08:34:40 +03:00
WillRuddick 15663a9039
Create feature.md 2020-04-22 08:34:10 +03:00
WillRuddick d1e6167a85
Create feature.md 2020-04-22 08:33:14 +03:00
lash a64c0de1bc
Update bug_report.md 2020-04-21 19:21:54 +02:00
lash 0274e08477 Update issue templates 2020-04-21 19:19:35 +02:00
WillRuddick 718f56d43b
Update README.md 2020-04-20 10:21:19 +03:00
WillRuddick 709348dee7
added info about held roles 2020-04-19 15:15:59 +03:00
WillRuddick 8d1efeb28f
Create misc-commands.md 2020-04-17 10:26:34 +03:00
WillRuddick 6bd0056e04
Merge pull request #25 from nolash/cleanup-depth-bump
Cleanup test formatting, subsectioning of implementation
2020-03-16 12:50:26 +03:00
WillRuddick e1bb5cb26e
changing the cash out rules for Chamas 2020-03-06 12:59:54 +03:00
12 changed files with 267 additions and 9 deletions

28
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!--
please keep explanations in this section brief
-->
**Did you read _all_ the READMEs and are system requirements fulfilled?**
**What did you try to do?**
**What did you expect should have happened?**
**What happened instead?**
**What were the exact steps you took?**
---
<!--
here you can indulge more detailed rants about the problem
-->

20
.github/ISSUE_TEMPLATE/feature.md vendored Normal file
View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

BIN
CIC-math-examples.xlsx Normal file

Binary file not shown.

View File

@ -1,7 +1,2 @@
## Community Inclusion Currencies (CICs) Documentation ## Community Inclusion Currencies (CICs) Documentation -
+ White Paper: https://docs.google.com/document/d/1Wmnpjc5bX1b8XP1kNtiZCqurMYw__4sNmdHjtSnnLWQ/edit?usp=sharing Please visit https://gitlab.com/grassrootseconomics/cic-docs/-/blob/master/README.md
+ Frequently Asked Questions: https://docs.google.com/document/d/1qtlOEL4pqW1vOL893BaXH9OqRSAO3k0q2eWbVIkxEvU/edit?usp=sharing
+ Blog: https://grassecon.org/blog
+ CIC Platform: https://github.com/teamsempo
+ CIC Blockchain Smart Contract: https://github.com/GrassrootsEconomics/CIC-Liquid-Token
+ Data - Transaction Datasets: https://www.grassrootseconomics.org/research

View File

@ -17,7 +17,7 @@ The Transaction csv fields:
1. id - internal transaction ID number 1. id - internal transaction ID number
1. timeset - date and time of transaction 1. timeset - date and time of transaction
1. transfer_subtype - internal typing: DISBURSMENT = from Grassroots Economics, RECLEMATION = Back to GE, STANDARD = a trade between users, AGENT = when a group account is cashing out 1. transfer_subtype - internal typing: DISBURSMENT = from Grassroots Economics, RECLEMATION = Back to GE, STANDARD = a trade between users, AGENT = when a group account is cashing out (see held_roles) below
1. transfer_use - The category the sender marked the transaction as - used for 'confidence' later for the user category - note this will be changed to boolean 1. transfer_use - The category the sender marked the transaction as - used for 'confidence' later for the user category - note this will be changed to boolean
1. tx_hash - hashed transaction address on blockchain 1. tx_hash - hashed transaction address on blockchain
1. source - wallet ID of sender 1. source - wallet ID of sender
@ -42,6 +42,7 @@ The user summary csv fields:
1. comm_tkn - Their token name (each user only has 1 token) currenlty only Sarafu 1. comm_tkn - Their token name (each user only has 1 token) currenlty only Sarafu
1. bal - current balance of [comm_tkn] as of file date 1. bal - current balance of [comm_tkn] as of file date
1. location - User input (village name) 1. location - User input (village name)
1. held_roles - Standard transactions are between Beneficiaries, anything to an Admin is a Reclemation or from and Admin is a Disbursment and anything to a Agent is a Agent_out
1. gender 1. gender
1. business_type - Input by GE staff based on what the users sell 1. business_type - Input by GE staff based on what the users sell
1. ovol_in - total number of tokens that came into this account from non-STANDARD transactions 1. ovol_in - total number of tokens that came into this account from non-STANDARD transactions

1
misc-commands.md Normal file
View File

@ -0,0 +1 @@
git clone https://gitlab.com/nolash/grassroots-app

View File

@ -7,3 +7,6 @@ Overview
Modules Modules
Functions Functions
Chama Max Cash out = min([balance/2,standard volume_outward]) 1x per month

View File

@ -0,0 +1,60 @@
# Current Platform Incentives spec
<!--
valid status values are: Pre-draft|Draft|Proposal|Accepted
-->
* Authors: Will Ruddick <willruddick@gmail.com> (grassecon.org)
* Date: 2020.04.22
* Version: 1
* Status: Pre-draft
## Rationale
The current system seeks to maximize circulation in order to fill market gaps and help CIC users to support eachother.
## Currently
Grassroots Economics started with a pool of 8 Million Sarafu tokens (which they value 1:1 with Kenyan Shillings ala buy backs). Of which 90% will have been distributed to users as below by the end of April 2020.
The following are all rules are platform based (not blockchain contract based). Note that these rules are for the Sarafu CIC only and are not meant to be the rules for other CIC creators.
1. *airdrop-selfservice*: New users get 50 Sarafu (a CIC) (Shown as Disbursement in database)
1. *airdrop-full-profile*: New users that fill out their profiles (name, business, location, gender) get additional 400 Sarafu (a CIC) (must call office line) (Shown as Disbursement in database)
1. *referral*: Users that are the 1st to send a new user at least 20 tokens in the 1st 24 hours get 100 Sarafu - after that new user has begun to trade with another user (not the referrer) (Shown as Disbursement in database)
1. *chama bonus*: Savings Groups (aka Chamas are groups of users that save and give loans to eachother) get 10,000 Sarafu divided between their members after 2 months of trading.(Shown as Disbursement in database)
1. *chama redemption*: Savings Groups can redeem 50% of their Sarafu Balance for Kenyan Shillings up to a maximum of 30k Sarafu each month but must have spent (and/or given loans) of at least as much as they want to cash out. (Shown as Agent_out in database) Cashing out is done using donor funds by Grassroots Economics Foundation and Sarafu is valued 1:1 with Kenyan shilligns using eMoney (Mpesa).
1. *usage bonus*: Users get a daily or weekly Sarafu bonues depending on how they trade. They are ranked by the number of other people they trade above 20 Sarafu with and awarded based on their percentage of such overall trade. (Possibly moving to k-cycle centrality).(Shown as Disbursement in database)
1. *Holding Fee*: If an account if dormant (no trades in or out) for 7 days 20 Sarafu are deducted and added back to the pool. (Shown as Reclaimation in database)
1. *Donation bonues* Anyone with Mpesa or Bonga points can send them to Grassroots Economics to receive additional Sarafu (Shown as Disbursement in database) Donors can give Grassroots Economics funds to support the Sarafu buy-back and operations
## After
After the migration to xDAI (https://github.com/GrassrootsEconomics/CIC-Docs/blob/master/spec/xdai_migration.md)
anyone (with access to blockchain) in the world can contribute reserve in the form of xDAI. xDAI is a stable token to the US dollar and can be purchased with USD.
With a reserve in xDAI each Sarafu token will now have spot price or excahnge price to xDAI given by P = R/(S*TRR)
Where R = the amount of xDAI in reserve, S= the total supply of Sarafu, and TRR = Target Reserve Ratio = that ratio of R/S such that the echange price is 1:1.
1. Grassroots Economics will continue with all the above incentives for Sarafu and to buy the vouchers off on a regular basis 1:1 from Savings groups.
1. Any funds going into the reserve will increase the price and mint additional Sarafu following a bonding curve.
Anyone with a webApp or MetaMask can add xDAI and mint more Sarafu (+) increase the value of all Sarafu
Anyone with a webApp or MetaMask can add send Sarafu to the converter contract to destroy it and withdraw reserve (-) decreasing the value of all Sarafu.
1. As the reserve of Sarafu is depleted and the exchange price drops Grassroots Economics as well as other donors will add more reserve and mint more tokens to distribute.
1. Grassroots Economics will destroy Sarafu it collects to pull out excess reserve and convert that xDAI to Kenyan shillings to continue with Savings Group buy backs.
1. A % fee on conversion between reserve and supply in both directions is done on blockchain and added to the reserve.
## Implementation
### Workflow
### Variables
### Interface
## Testing
<!--
Please describe what test vectors that are required for this implementation
-->
## Changelog
<!--
Please remember to describe every change to this document in the changelog using
serial number:
* version 1:
-->

View File

@ -0,0 +1,55 @@
# xDAI Migration spec
<!--
valid status values are: Pre-draft
-->
* Authors: Will Ruddick <will@grassecon.org>
* Date: 2020.04.22
* Version: 1
* Status: Pre-draft
## Rationale
We want to give donors and community mambers a way to contribute to and cash out from Community Inclusion Currencies with National Currency. By connecting to a reserve that is stable to the US dollar called xDAI we bring some stability and the ability for many to support local communities. We also enable any CICs that have xDAI as a reserve to convert to any other CIC with xDAI as reserve.
## Before
Currently we are using a virtual reserve a generic ERC20 token. We have 2 Million of those reserve tokens against 8 Million Sarafu issued (the current Kenyan CIC). (Call those Sarafu_1 or S1)
## After
We have 40,000 xDAI to put as the reserve and are looking at minting O(16Million) tokens (called Sarafu_2 S2)
with a connector weight (target Reserve Ratio) of 0.25 (25%) and an inital price of roughly 0.01 Sarafu to a xDAI (USD stable)
## Implementation
Each existing user should have a completley new wallet and private key for security reasons and be given the same balances they currently have with the new (xDAI reserve) Sarafu. Roughly 8Million Sarafu_1 in wallet will be replaced with Sarafu_2
### Workflow
1. Synch db <->Blockchain - ensure synronization between our db (USSD interface) and blockchain
1. Create group of govenors on a multi-sig wallet with the power to assign the facilitator address of all blockchain contracts.
1. Create a white list for token users
1. Deploy contracts to create Sarafu_2, set inital variables - deposit reserve and mint tokens
1. Migration - New wallets for users - Replicate user accounts with new token Sarafu_2
### Variables
1. Synch variables, - synch frequency - and limitations
2. Contract variables (reserve ratio (0.25), reserve amount (40k xDAI), number of Sarafu_2 (16Million), convert fee 0.005 (0.5%))
3. Migration speed - how often is synching done between USSD db and blockchain
4. 3rd party Fiat <-> xDAI conversion costs and speed
### Interface
This migration will all be done at code and command line level, while some testing can be done on the platform gui
## Testing
1. Check db<->blockchain synch - verify they are synched and we can do external transactions and handle RPC failure
1. Token Governance
1. Contract deplyment - conversions, transfers all work as expected
1. Migration - new wallets match old wallets
1. Store old blockchain wallet IDs (as a list with old POA wallets)
## Changelog
<!--
Please remember to describe every change to this document in the changelog using
serial number:
* version 1:
-->

View File

@ -0,0 +1,39 @@
# Public View Only
1. View public data only and no ability to edit
# Private View Only
1. View private data and no ability to edit
Private data inlcudes, names, phone numbers, location
# Enroller
1. See private data
1. Add users
1. Edit user fields
1. Pin reset
1. Initial Disbursement only (1 time per user with a max of 400)
1. Disbursement (besides initial) and reclamation (with approval of Admin)
# Admin
1. See private data
1. Add users
1. Edit user fields
1. Pin reset
1. Disbursement and reclamation (without approval)
1. Give approval to Enrollers
# Super Admin
1. Assign the roles (Suber Admin, Enroller, View Only)
1. See private data
1. Add users
1. Edit user fields
1. Pin reset
1. Disbursement and reclamation (without approval)
1. Give approval to Enrollers

View File

@ -0,0 +1,56 @@
## USSD Menu Staging (```*483*061#```)
-----------------------
## User Creation
* Create a new user via self service (Dial the code above with a phone number not in the system)
* ensure user is setup correctly and given (50) tokens
* ensure user can set their profile information and check the information
* See my profile
* Change my business, name, location
* Check balance
* Change pin
* Opt out of market place
* ☐ Create a new user via webpage
## User Types
* ☐ Change a user type to Group and Agent
* ☐ Change an existing user type to Chama and Agent and test features work like exchange - then back to User and test again
## Pin Reset
* ☐ Reset pin for a user
## Disburse Reclaim
* ☐ Disburse and reclaim a token from menu
## Change language
* ☐ English / Kiswahili (do this entire process in both languages -- checking spellings)
## Send
* ☐ Send to registered number
* ☐ Verify both parties got the receipt SMS after a transfer
* ☐ recheck the balance of each user to verify on our platform
* ☐ recheck the balance of each user to verify on blockchain
* ☐ Send to number not registered
* ☐ Verify both you and they both got a SMS
* ☐ Send from an account with insufficient balance
* ☐ Verify SMS with balance
## Market place
* ☐ Check all Business categories
* ☐ Check all directory entries on Directory
## Exchange
* ☐ Check exchange rate
* ☐ Create a Token Agent
* ☐ Create a Chama
* ☐ Check that Exchange doesnt work for a normal user
* ☐ Check that Exchange only works for a Chama to and Agent
* ☐ Check that a 2nd Exchange doesn't work (should only allow it once ever 30 days)
* ☐ Check that regular transfers do not work to an Agent
*
## Help
* ☐ Correct helpline 0757628885