16 Commits

Author SHA1 Message Date
nolash
40c0207015 Remove irrelevant content 2020-08-26 11:24:39 +02:00
b6eae9b930 Merge branch 'tags' into 'master'
adding tags

See merge request grassrootseconomics/cic-docs!14
2020-08-26 08:25:09 +00:00
2097f29585 adding tags 2020-08-26 08:24:53 +00:00
9b6eed1f0a Merge branch 'patch-1' into 'master'
Update 017_CIC Deployment.md

See merge request grassrootseconomics/cic-docs!13
2020-08-26 08:19:22 +00:00
d87b40cb79 Update 017_CIC Deployment.md 2020-08-26 08:18:37 +00:00
4c602526b6 Merge branch 'patch-1' into 'master'
Add new file

See merge request grassrootseconomics/cic-docs!12
2020-08-26 08:16:59 +00:00
795567b12f Add new file 2020-08-26 08:16:33 +00:00
e952927364 Merge branch 'lash/token-registration' into 'master'
Token registration and announcement framework

See merge request grassrootseconomics/cic-docs!11
2020-08-26 08:09:25 +00:00
8664af4937 Merge branch 'lash/extension-api-2' into 'master'
WIP extension APIs per 20200810

See merge request grassrootseconomics/cic-docs!10
2020-08-26 08:09:09 +00:00
f794a98f5a Merge branch 'lash/reserve-proof' into 'master'
Reserve proof format

See merge request grassrootseconomics/cic-docs!8
2020-08-26 08:08:01 +00:00
nolash
d45afab168 Restructure the registration mapping description 2020-08-21 17:05:38 +02:00
nolash
346de183de Add link resources 2020-08-21 16:25:40 +02:00
nolash
9166d0ae72 Add token platform registration description 2020-08-21 16:21:55 +02:00
nolash
a13f4cac2c Add 014 2020-08-10 09:25:11 +02:00
nolash
4faed30e2b Revert 2020-08-10 09:23:41 +02:00
nolash
b2947b89c6 WIP api extension specs per 20200810 2020-08-10 09:13:45 +02:00
3 changed files with 189 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# API EXTENSIONS FOR VIEWING NOTIFICATION DATABASE
## NOMENCLATURE
Values enclosed with `<>` are _required_.
Values enclosed with `[]` means _optional_.
No enclosure means _literal_.
## ADDED METHODS
Endpoints _added_ are found under /api/ext/
### `/api/ext/sms/` `/api/ext/sms/user/<user_id>/` `/api/ext/sms/<phone_number>/`
#### **GET**
Returns a list of latest sms notifications sent by the platform.
If `user_id` or `phone_number` is given, only entries for the affected user will be returned.
Accepts one query string:
```
limit: [uint] - maximum items to return (default: 100)
```
Response payload:
```
[
{
datetime: <string>,
number: <string>,
message: <string>,
},
...
]
```

View File

@@ -0,0 +1,121 @@
# CIC TOKEN PLATFORM REGISTRATION
This document describes the components and steps involved to announce a token registration to the network.
## RATIONALE
Although registering a new token on the Bancor contracts will emit events upon which CIC client code can act upon, the information available is limited to the token itself and the exchange only. Therefore, a way to specify additional metadata for the entity that should be associated with the token must be provided.
## OVERVIEW
The system consists of two smart contracts and a metadata schema. The schema describes the actual metadata, and the contracts provide the announcement of the token metadata availability, and a mechanism to locate where the metadata can be retrieved from.
A separate, more formal document will be written as a request for comment for decentralized metadata dissemination for institutionally identifiable information.
### CONTRACTS
The `DecentralizedStorageResolver` contract facilitates multiplexing of data resource locations across web2 and web3 networks. It is a separately maintained project with its own documentation. Its utility here is to let an entity specify one or more locations where the metadata for the registration can be retrieved.
The `CICRegistration` contract announces the availability of metadata for a given token. In essence it is a simple chain of mappings (names do not match contract properties):
```
{
'token_address': {
'token_announcer_address': {
'resolver_address': <address>,
'resolver_type': <bytes32>,
'resolver_chain': <bytes32>,
}
}
}
```
The `resolver_type` is a sha256 hash of a custom resolver id. The only three recognized values at current time are:
* `sha256(DecentralizedStorageResolver)`, the resolver mentioned above
* `sha256(ENS1)` - first generation ENS
* `sha256(ENS2)` - second generation ENS , which refers to the aforementioned contract.
`resolver_chain` is a custom chain identifier string, which identifies which and what type of decentralized consensus resource holds the resolver record. It has the following format:
```
<platform>:<version>:<network>:<chain>
```
Example values are:
* `ethereum:1:bloxberg:8995`
* `ethereum:1:main:1`
### SCHEMA
The schema defines how the metadata must be formatted. The data type is json, and has the following layout:
(TODO: write in official schema spec language instead if exists)
```
{
"schema_version": 1,
"network": "bancor",
"token": "<hex>",
"identities": {
"default": "<rfc-2426, must be unencrypted>",
"[recipient_hint]": "<rfc-2426, optionally encrypted>",
...
},
}
[] = optional value
<hex> = 0x-prefixed hexadecimal value
[recipient_hint] = (optional) arbitrary value that can be announced off-band to specific consumers, in order to instruct how to decrypt the values. Cannot be "default"
<entity> = arbitrary string specifying an organisation or person to associate with the token.
```
The actual organisation and person detail records are given in RFC-6350 vcard format. The **MINIMUM** amount of data the default entity can contain is:
```
BEGIN:VCARD
ORG: <organisation_name_to_register>
X-COUNTRY-CODE: <ISO 639-1 country_ode>
TZ:<tzdata>
END:VCARD
```
### SEMPO PLATFORM INTEGRATION
To register all necessary information for a new token with associated organisation and exchange, we require the following items of information:
- bancor registry address
- token address
- organisation name
- organisation country
- organisation timezone
- admin email
A new blockchain listener component is needed that monitors the `CICRegistration` contract for `TokenRegistration` events. The first iteration will have these limitations:
* Will only work with `DecentralizedStorageResolver`.
* Expect the record in the `DecentralizedStorageResolver` to already be available at time of announcement.
* Only use the default identity.
* Only read the minimum of entries required (see below). Any additional fields in the VCARD will be ignored for now.
* No encryption supported.
The minimum content of the VCARD for Sempo platform token metadata registration is:
```
BEGIN:VCARD
ORG: Acme Inc.
X-COUNTRY-CODE: ke
TZ:Africa/Nairobi
EMAIL: admin@acme.org
END:VCARD
```
### RESOURCES
* [CICRegistration contract](https://gitlab.com/grassrootseconomics/cic-contracts/-/blob/master/cic-registration/contracts/CICRegistration.sol)
* [DecentralizedStorageResolver contract](https://gitlab.com/nolash/resolvemux/-/blob/master/Resolver.sol)
* [RFC 6350](https://tools.ietf.org/html/rfc6350)

View File

@@ -0,0 +1,27 @@
# CIC TOKEN TOOLING
This document is WIP.
## RATIONALE
Simplify execution of network deployment, token deployment.
The tooling should faciliate the following functions:
* Bootstrap network
* Deploy new CIC token/converter pair
* List tokens in network
* Query registry for contracts in network
* Query CIC token supply
* Query converter stats (weight, supply, fee)
* Mint additional tokens
* Burn tokens
<!--all: simplify code (use web3 arg builders rather than manual ones)
1. 1+2: connect to wallet using jsonrpc
1. 2: enable initial tx to deposit reserve and first mint
1. 2+3: connect with my metadata registry contract (deduplication of token symbols)
-->