Skip to content

Commit 58b2b19

Browse files
authored
Merge pull request #2 from change-code-io/dev
First draft on contribution guide, CC minting flow, and IOU/hypercert schemas
2 parents b4b170b + c188a5a commit 58b2b19

16 files changed

+394
-4
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. ...
16+
2. ...
17+
3. ...
18+
4. ...
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Device:**
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
27+
28+
**Additional context**
29+
Add any other context about the problem encountered.
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**List who else might be interested in this feature**
17+
Tell us who else might benefit from this change.
18+
19+
**Describe alternatives you've considered**
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
**Additional context**
23+
Add any other context or screenshots about the feature request here.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

change-credits/cc-minting.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
label: Minting Change Credits
3+
order: -2
4+
---
5+
6+
Because Change Credits are only minted following confirmation of realized, tangible, and verifiable impact, there the process by which these assets are created follows a number of steps and involves multiple types of actors.
7+
8+
### Participants
9+
10+
Good Generator
11+
: A Good Generator is the implementing organization responsible for seeing the planned impact results achieved. It is through the actions of this entity, often an NGO or social enterprise, that positive externalities are produced. Because contributions and funds can be seamlessly fractionalized and divided, a Good Generator can also be a collection of multiple contributors working collaboratively.
12+
13+
Change Code
14+
: Change Code acts to provide all necessary infrastructure for the creation and management of Change Credits through its *Changescape*. While Change Code is not involved in the measurement or verification of any results produced, it is responsible for assessing the legitimacy and compliance of any organizations seeking to mint Change Credits.
15+
16+
Partner
17+
: Partners financially contribute to the positive externalities embodied in Change Credits. They fund the delivery of impact by pre-purchasing Change Credits in advance.
18+
19+
Verifier
20+
: Verifiers exist to both validate, measure, and quantify any impact produced. Verifiers are defined by the Good Generator of the project with a focus on local context and relevant expertise. Verification can be conducted by a single individual or organization or the responsibility can be dispersed through a set of Verifiers with a specified quorum required.
21+
22+
### Minting Flow
23+
24+
```mermaid
25+
sequenceDiagram
26+
actor Verifier
27+
actor Good Generator
28+
actor Change Code
29+
Good Generator-->Change Code: propose impact goal for review
30+
create participant hypercert (ERC1155)
31+
Good Generator->>hypercert (ERC1155): mint impact goal
32+
actor Change Code
33+
create participant Token Bound Account (ERC6551)
34+
Change Code->>Token Bound Account (ERC6551): deploy treasury account
35+
actor partner
36+
loop
37+
partner->>Token Bound Account (ERC6551): send $
38+
Token Bound Account (ERC6551)->>partner: mint IOUs (ERC20)
39+
Token Bound Account (ERC6551)->>Good Generator: remit funding received
40+
end
41+
loop
42+
Good Generator-->Good Generator: implement project
43+
Good Generator->>hypercert (ERC1155): submit evidence
44+
Verifier--xhypercert (ERC1155): review evidence
45+
Change Code--xhypercert (ERC1155): assign token quantity
46+
Change Code->>Token Bound Account (ERC6551): mint Change Credits (ERC721)
47+
end
48+
Loop
49+
partner->>Token Bound Account (ERC6551): return IOUs
50+
Token Bound Account (ERC6551)->>partner: receive Change Credits
51+
end
52+
```
53+
54+
The above sequence diagram overviews how Change Credits are created. While the system supports alternative flows to facilitate various forms of financing, we can consider this base form to have x steps.
55+
56+
1. The Good Generator submits an impact goal and plan for review by Change Code, as part of their onboarding process. Once approved to mint via the Changescape, the Good Generator mints their hypercert, signalling the beginning for their project.
57+
2. After the projects' hypercert has been deployed, Change Code deploys an associated Token Bound Account (TBA) to act as a treasury for the project to receive funds into and mint tokens from.
58+
3. Partners begin contributing funds into the project's TBA in exchange for IOUs redeemable for Change Credits once the latter begin to be minted. These funds are then remitted to an account from which the Good Generator can spend to cover the costs of their work. This process can be done in an open-ended asynchronous manner, with funds being contributed to the project through the project's lifespan.
59+
4. As the Good Generator carries out their work to produce impact, they periodically submit evidence for review. This evidence is stored as records tied to their original hypercert and can be accessed by specified Verifiers.
60+
5. Once evidence is confirmed by Verifiers, Change Code intakes the data provided to assign a quantity of Change Credits to be created and mints them via the project's TBA.
61+
6. With Change Credits minted and available via the TBA, the project's Partners can redeem their IOUs and receive their proportional share of Change Credits.

change-credits/foundations.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
label: Foundations
3+
order: -1
4+
---
5+
6+
Change Credits are a novel *financial* primitive supporting resource allocation, verification, and tracking of positive externalities (social and environmental impact).
7+
8+
They are the basis and grounding of Change Code's economic engine, providing a real-world tangible link to underpin a new form of beneficial currency.
9+
10+
## Supporting Primitives and Infrastructure
11+
12+
Before expanding on the architecture and processes involved in Change Credits directly, we should first recap (or introduce) some of the existing open-source tools and standards leveraged here.
13+
14+
### Hypercerts
15+
16+
Hypercerts are on-chain, tokenized claims of positive impact. To be more precise, hypercerts represent *claims* of *work* done toward some beneficial outcome, be that work toward social or environmental impact or the building of a public good.
17+
18+
A complete list of the on-chain token data and off-chain metadata included in a hypercert can be found in the [documentation](https://hypercerts.org/docs/implementation/metadata). Importantly for our purposes and designs, there is no included support for verification that the work was completed or efficacious. This will therefore be addressed using another foundation public good, the Ethereum Attestation Service (EAS). However, the hypercerts specification does include a field for a list of contributors. Change Credits takes advantage of this encoding to record contributions of the actual work being done, while tracking *financial partners* through ownership of Change Credits themselves.
19+
20+
### Ethereum Attestation Service (EAS)
21+
22+
Change Code leverages the EAS to allow experts and representatives of affected communities to verify (attest to) any work done that is claimed to be impactful or contribute to a public good.
23+
24+
While not tokens themselves (more on that [here](https://docs.attest.org/docs/core--concepts/attestations-vs-x)), these attestations are cryptographically secured and can be used by project partners and the public to confirm all verifications of a project's work.
25+
26+
### Token Standards
27+
28+
To maintain maximum compatibility across existing wallets and infrastructure, the Change Credits architecture leverages only broadly accepted ERC token standards. Change Credits themselves are minted as NFTs (non-fungible tokens) through the ERC721 standard.
29+
30+
+++ ERC721
31+
ERC721 is the most widely adopted token standard for NFTs. The standard is well tested, and enjoys near universal support across wallet implementations.
32+
+++ ERC1155
33+
Hypercerts adhere to the ERC1155 standard for semi-fungible tokens. This mixed standard, existing in the divide between fungible and non-fungible tokens, offers ideal flexibility for the unique requirements of the hypercerts standard.
34+
+++ ERC20
35+
ERC20 tokens are fully fungible and well suited for liquidity and open exchange. IOUs issued in anticipation of Change Credits are minted as ERC20 tokens to support the emergence of free exchange by holders who may wish to access liquidity.
36+
+++ ERC6551
37+
Referred to as "token bound accounts" (TBAs), ERC6551 tokens function as a form of smart contract wallet where an account is simultaneously able hold or mint tokens itself and be considered a token (an NFT more specifically) in its own right. Change Code leverages TBAs to serve as *treasury accounts* for the receipt of funds into projects and the minting of Change Credits.
38+
+++

change-credits/index.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
icon: container
2+
expanded: true
3+
order: -3
4+
label: Change Credits

contributing/community-conduct.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
label: Community Code of Conduct
3+
order: -1
4+
---
5+
6+
## Our Pledge
7+
8+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
9+
10+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment for our community include:
15+
16+
* Demonstrating empathy and kindness toward other people;
17+
* Being respectful of differing opinions, viewpoints, and experiences;
18+
* Giving and gracefully accepting constructive feedback;
19+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience;
20+
* Focusing on what is best not just for us as individuals, but for the overall community;
21+
22+
Examples of unacceptable behavior include:
23+
24+
* The use of sexualized language or imagery, and sexual attention or advances of any kind;
25+
* Trolling, insulting or derogatory comments, and personal or political attacks;
26+
* Public or private harassment;
27+
* Publishing others' private information, such as a physical or email address, or revealing any pseudonymous identity without their explicit permission;
28+
* Other conduct which could reasonably be considered inappropriate in a professional setting
29+
30+
## Enforcement Responsibilities
31+
32+
Change Code's leadership is responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33+
34+
Change Code has the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35+
36+
Enforcement of this code will sometimes be a challenging exercise in judgement and conflicting values. We recognize that members may not always agree with a given course of action or remedy, but Change Code commits to always being transparent in how decisions have been made.
37+
38+
## Scope
39+
40+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
41+
42+
Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to Change Code's leadership at [[email protected]](mailto:[email protected]). All complaints will be reviewed and investigated promptly and fairly.
47+
48+
Change Code is committed to respecting the privacy and security of the reporter of any incident.
49+
50+
## Attribution
51+
52+
This Code of Conduct is modified from the Contributor Covenant, version 2.1, available [here](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

contributing/contribution-guide.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
label: Contribution Guide
3+
order: -2
4+
---
5+
6+
## Community Conduct
7+
8+
We are all people, all community members first, and developers second. All developers and other contributors agree to uphold Change Code's rules of [Community Conduct](./community-conduct.md).
9+
10+
## Contributing
11+
12+
Change Code strives to work in public and release code as open source whenever possible. If you would like to contribute to any of our repositories just follow the steps below.
13+
14+
1. Fork the repository.
15+
2. Create a new branch (`git checkout -b feature-branch-name`).
16+
3. Make your changes
17+
4. Commit any changes you've made (`git commit -am 'commit description'`).
18+
5. Push the code to your forked origin (`git push origin feature-branch-name`)
19+
6. Navigate back to the Change Code repository you forked from and create a new pull request.
20+
21+
When making a pull request, do your best to describe the changes made and your motivations for doing so. While we're excited for your to participate alongside us, please understand that certain changes may not align with the our current roadmap or requirements. If we're unable to incorporate your work, we'll always do our best to explain why.
22+
23+
To join our discussions, you can find us over on [Console](https://app.console.xyz/c/changecode). We always welcome new voices!
24+
25+
## Issue Reporting
26+
27+
If you have a feature request or encounter a bug in any of our work, we invite you to report it with a Github issue in the relevant repository. We've provided pre-templates to help improve reporting.
28+
29+
## Commitment to Open Source Code
30+
31+
Change Code is committed to open source code. The majority of our work is released under the [Mozilla Public License 2.0 (MPL2)](https://www.mozilla.org/en-US/MPL/2.0/).

contributing/index.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
icon: code-of-conduct
2+
expanded: true
3+
order: -6
4+
label: Community Conduct and Contributor Guide

data-schemas/hypercerts.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
label: Hypercerts
3+
order: -1
4+
---
5+
6+
Change Code leverages the Hypercerts protocol, in turn developed from the ERC1155 token standard for semi-fungible tokens. While adhering to the requirements of the standard, Change Code modifies *how* some of the schema fields are used, adapting them to our theory of change and implementation needs.
7+
8+
## ERC1155 Fields
9+
10+
Name | `CC Hypercert | {Good Generator} {Index}`
11+
: The Hypercert name mirrors the name used for a project's IOUs. The concept of an index is again used to support single organizations working across multiple initiatives.
12+
13+
Description
14+
: A description, not exceeding 200 characters, of the work to be done by the project.
15+
16+
Image
17+
: While the image field is required by the Hypercerts standard, we do not believe a single immutable image to be valuable for the purposes of serious impact validation. To satisfy this requirement, the Changescape backend will automatically generate and provide an image to satisfy the requirement.
18+
19+
## Hypercert Dimensions
20+
21+
work_scope
22+
: A list of tasks to be done by the project. In development parlance this is a list of *outputs*--e.g. # of solar panels installed, kilos of supplies, $ of direct aid, # of vaccines.
23+
24+
work_timeframe
25+
: The time period during which the work for the project is to be carried out. In line with the Hypercerts standard, this is represented as an ordered pair of UTC timestamps.
26+
27+
impact_scope
28+
: Inside the Changescape `impact scope` is used to refer thematically to projects by category. For example, the [UN Sustainable Development Goals (SDGs)](https://sdgs.un.org/goals) or the [Ecological Benefits Framework (EBF)](https://ebfcommons.org/lex-icons/). Because the Hypercerts data is only aspirational, it would be premature to immutably publish indicators, which are instead reserved to be published only once verified inside Change Credits.
29+
30+
impact_timeframe
31+
: The time period during which impact *outcomes* will be measured and calculated. For Hypercerts inside the Changescape, the start time is set equal to the start time for the `work_timeframe` while the end time is set for the end of the work period plus five (5) years. Again this data is represented as an ordered pair of UTC timestamps.
32+
33+
contributors
34+
: A list of participants (organizations) that are contributing to the work done in the project. Each element in the list is composed of an on-chain address, a name, and a weight. The purpose of the weight is to signal relative contribution and may optionally be used to weight distributions among contributors.
35+
36+
rights
37+
: As of version 1.0 of the Hypercerts standard, this value can only be set to *public display*. As it is a required field, Change Code simply applies the default value but does not otherwise use this information.
38+
39+
hidden_properties
40+
: In development
41+
42+
## Example Hypercert Dimensions
43+
44+
```
45+
"hypercert": {
46+
"work_scope": {
47+
"name": "Work Scope",
48+
"value": ["sustainable land management"],
49+
"excludes": [],
50+
"display_value": "sustainable land management"
51+
},
52+
"impact_scope": {
53+
"name": "Impact Scope",
54+
"value": [SDG 13], [SDG 15]
55+
"excludes": [],
56+
"display_value": "SDG 13 - Climate Action", "SDG 15 - Life on Land"
57+
},
58+
"work_timeframe": {
59+
"name": "Work Timeframe",
60+
"value": [1704096000, 1735711200],
61+
"display_value": "2024-01-01 -> 2024-12-31"
62+
},
63+
"impact_timeframe": {
64+
"name": "Impact Timeframe",
65+
"value": [1704096000, 1893477600],
66+
"display_value": "2024-01-01 -> 2030-12-31"
67+
},
68+
"contributors": {
69+
"name": "Contributors",
70+
"value": ["0xa1fa1fa000000000000000000000000000000000", "Project Developer", 0.9], ["0xa1fa1fa000000000000000000000000000000000", "Carbon Standards Body", 0.1]
71+
"display_value": "Project Developer", "Carbon Standards Body"
72+
},
73+
"rights": {
74+
"name": "Rights",
75+
"value": ["Public Display"],
76+
"display_value": "Public Display"
77+
}
78+
}
79+
```
80+
81+
Additional details on the Hypercerts implementation itself can be found in the documentation [here](https://hypercerts.org/docs/implementation/metadata).

data-schemas/index.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
icon: ruby
2+
expanded: true
3+
order: -5
4+
label: Token Implementations and Data Schemas

0 commit comments

Comments
 (0)