Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.3.6 docs #46

Merged
merged 47 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e103c24
(docs): setup MkDocs for Circles Protocol documentation
benjaminbollen Aug 21, 2024
8ef945d
(docs): about page
benjaminbollen Aug 21, 2024
1d108c8
(docs): add license for docs
benjaminbollen Aug 21, 2024
064110a
(docs): disclaimer
benjaminbollen Aug 21, 2024
6a175b3
(docs): improve the title of About page
benjaminbollen Aug 21, 2024
8779a35
(docs): documentation outline, a first proposal
benjaminbollen Aug 21, 2024
ef33f6a
(docs): correct indentation in overview
benjaminbollen Aug 21, 2024
a52e7aa
(docs): first draft of introduction
benjaminbollen Aug 21, 2024
e485a6d
(docs): first revision of intro/brief overview
benjaminbollen Aug 21, 2024
5b2c82b
(githubAction): quick add WIP hosting on fork
benjaminbollen Aug 21, 2024
d9e55fa
(docs): update github action for conda and folder docs/
benjaminbollen Aug 21, 2024
328cc21
(docs): improvements to introduction overview, purpose and key concep…
benjaminbollen Aug 22, 2024
b09fa8b
(docs): introduction:trust refinements
benjaminbollen Aug 22, 2024
2b13f15
(docs): intro/ on demrruage second pass
benjaminbollen Aug 23, 2024
448cfc9
(docs): re-polish demurrage section in introduction
benjaminbollen Aug 24, 2024
ffc0731
(docs): add note on normal transfer behaviour
benjaminbollen Aug 24, 2024
11edf78
Merge tag 'rc-v0.3.6-alpha' into 20240821-docs
benjaminbollen Aug 30, 2024
3e8256c
(docs): change preview branch name to v0.3.6-docs
benjaminbollen Aug 30, 2024
2ced93c
(docs): total supply and equilibrium of Circles in introduction
benjaminbollen Aug 30, 2024
572b19b
(docs): correct duration of mint in total supply
benjaminbollen Aug 30, 2024
1b787c6
(docs): compactify the conclusion
benjaminbollen Aug 30, 2024
3992639
(docs): start of flow matrix in depth explanation up to example
benjaminbollen Aug 30, 2024
0c0f331
(docs): net flow and consistency check of flow matrix
benjaminbollen Aug 30, 2024
2af3678
(docs): try local image for pushing img to server
benjaminbollen Aug 30, 2024
68ebe96
(docs): change image for brand-themed svg
benjaminbollen Aug 30, 2024
8d825b9
(docs): path transfers, section on group mint along path
benjaminbollen Aug 30, 2024
e5749ec
(docs): consented flow and conclusion for path based transfers
benjaminbollen Aug 31, 2024
6cdab5d
(docs/demurrage): first draft for demurrage
benjaminbollen Aug 31, 2024
03eb8d5
(docs): path-based transfers, remove other sketches
benjaminbollen Aug 31, 2024
900cdb4
(docs): demurrage, second pass
benjaminbollen Aug 31, 2024
b6e9261
(docs): demurrage, another pass; explain difference also demurrage vs…
benjaminbollen Aug 31, 2024
c9e630a
(docs): clean up nav
benjaminbollen Sep 2, 2024
8f9a749
(root): update readme
benjaminbollen Sep 2, 2024
4419f26
(docs): push change to trigger build on main repo
benjaminbollen Sep 2, 2024
20286ca
(docs): fix github action to deploy
benjaminbollen Sep 2, 2024
39001cd
(docs): try to fix github permissions for aboutcircles
benjaminbollen Sep 2, 2024
5abd8ab
(docs): fix nav and add to overview advanced topics.
benjaminbollen Sep 2, 2024
5ede709
(docs): first draft and skeleton for architecture overview
benjaminbollen Sep 2, 2024
1fbc9df
(docs): architecture overview, upto migration
benjaminbollen Sep 2, 2024
b206e98
(docs): draft on groups, policy and treasury
benjaminbollen Sep 2, 2024
aefcacf
(docs): rebalance nav
benjaminbollen Sep 2, 2024
4dbbb24
(docs): architecture, treasury
benjaminbollen Sep 2, 2024
11a213c
(docs): architecture / groups, policies and remarks
benjaminbollen Sep 2, 2024
710626f
(docs): architecture, token representations
benjaminbollen Sep 2, 2024
3fda243
(docs): legacy hub v1
benjaminbollen Sep 2, 2024
8b0c8fa
(docs): architectyre conclusion
benjaminbollen Sep 2, 2024
4c0f60c
(readme): link to the docs from the readme
benjaminbollen Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/deploy-mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy MkDocs to GitHub Pages

on:
push:
branches:
- v0.3.6-docs

jobs:
deploy:
permissions:
contents: write # This allows writing to the repository contents
pages: write # This allows deploying to GitHub Pages
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9

- name: Install dependencies
shell: bash -l {0}
run: |
cd docs/
conda install -c conda-forge --file requirements.txt

- name: Build site
shell: bash -l {0}
run: |
cd docs/
mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/site
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cache/
out/

# docs
docs/


# gas snapshot files
.gas-snapshot
Expand Down
105 changes: 49 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,88 @@
# Circles Protocol

## Introducing Circles Protocol v2
Circles is a decentralized protocol for creating and distributing fair and social money through personal currencies. Built on the Gnosis Chain, it utilizes smart contracts to manage the creation, distribution, and transfer of personal currencies using the ERC1155 multi-token standard.

We're excited to be working on Circles Protocol v2, where we focus on making things better for everyone who uses and builds on Circles. Learning from our journey since Circles began, we've tackled the challenges we faced in the early days.
## Key Concepts

In Circles v2, we make it easier and more inviting for users and developers to engage with Circles. Our goal is to foster an ecosystem of products and experiences building on Circles. We've also been busy updating our technology, using the latest in cryptography to enhance performance, scalability, and to bring a new level of privacy to the Circles experience.
- **Personal Currencies**: Each individual can mint their own currency at a rate of one Circle per hour.
- **Trust Networks**: Currencies become valuable and transferable through trust relationships between participants.
- **Demurrage**: A 7% annual cost applied to held currencies, encouraging circulation and maintaining equity.

## Why build Circles ?
## Features

Our standard money system is based on debt, primarily from banks. Repaying this debt requires more than the initial amount due to interest, ensuring a consistent return of funds to these financial institutions. This system indirectly encourages anticipating future economic growth, which can increase our demand on the planet's resources.
- Retroactive minting for up to 14 days
- Path-based transactions through trust connections
- Flexible economic interactions between individuals, organizations, and groups
- Equilibrium mechanism balancing issuance and demurrage

In Circles UBI, we introduce "Time Circles" (TiC), a money system backed by the equal passage of time for all people. Every hour, each individual can seamlessly add one TiC to their account, unconditionally. To ensure TiC remains a meaningful measure of value, we implement a decay mechanism: tokens diminish in value over time. This equilibrium between token creation and decay ensures a stable balance for everyone, today and for future generations.
## Documentation

Understanding "Time Circles" also means recognizing what they are not. While this brief overview may not capture the full depth of the discussion, let's set a clear foundation from the outset.
For more details on Circles and details of the implementation please refer to [https://aboutcircles.github.io/circles-contracts-v2/](https://aboutcircles.github.io/circles-contracts-v2/)

Time Circles is not a panacea for all economic challenges, but it is essential to understand its intended purpose. TiC isn't a promise of a universal standard of living across diverse regions. Instead, it's a commitment that no person should be completely without financial means. Think of TC as a baseline currency available to all.
## Getting Started

Time Circles encourages circular spending. Its true worth will be determined by the quality and range of goods and services available for TiC. While other currencies may prioritize store-of-value, TiC complements this financial landscape, emphasizing circulation and utility.
🐲 **Beta Status**: This repository is in beta and actively developed in the open. While initial reviews are on-going, we welcome community engagement for wider testing and integration. As AGPL-licensed software, it's provided as-is. We encourage thorough review and testing before any production use.

Lastly, two crucial parameters underpin the TiC system. The first parameter straightforwardly defines the unit: one token for every human, every hour. The second parameter establishes the decay rate of TiC. With a vision for sustainability across generations, our approach is retrospective: taking an optimistic human lifespan of 80 years as a benchmark, a token minted today should, after those 80 years, carry negligible value.

## Specifications
### Prerequisites

🐉 **warning**: here be dragons. This repository is under construction and neither functionally complete or externally reviewed. It is shared publicly to enable early discussion, but should not be considered ready for use.
- [Foundry](https://book.getfoundry.sh/getting-started/installation)

For questions, contact maintainer: Ben <[email protected]>
### Installation

## Setting up development environment

This Solidity project uses Foundry as a toolkit. If you don't have Foundry installed yet, see instructions [below](#foundry-as-toolkit)

### Using Foundry to build the contracts
1. First, you'll need to clone the repository to your local machine:
1. Clone the repository:
```bash
git clone https://github.com/CirclesUBI/circles-contracts-v2
git clone https://github.com/aboutcircles/circles-contracts-v2
cd circles-contracts-v2
```

### Compiling the contracts
1. To compile the contracts, use the following command:
2. Install dependencies:
```bash
forge build
forge install
```
Upon successful compilation, you'll find the generated artifacts (like ABI and bytecode) in the specified output directory, by default `out/`.
### Building

2. To format the code, you can run:
1. Compile the contracts:
```bash
forge fmt
```
or only check the correct formatting without changing the code:
```bash
forge fmt --check
forge build
```

### Testing the contracts
1. To test the contracts, use the following command:
### Testing

1. Run the test suite:
```bash
forge test
```
or to report on gas usage:
2. For a gas report:
```bash
forge test --gas-report
```
2. To create a snapshot file to disk of each test's gas usage, use:
### Deployment

To deploy to the Chiado testnet:

1. Copy `.env.example` to `.env` and set your private key and API keys.
2. Run the deployment script:
```bash
forge snapshot
./script/deployments/chiadoDeploy.sh
```

### Deploying the contracts
#### Chiado
To deploy the contracts to the Chiado testnet, run `./chiadoDeploy.sh` and supply a private key and API keys in `.env` file in the root directory (copy `.env.example` and set private information):
```shell
./script/deployments/chiadoDeploy.sh
```
## Contributing

## Foundry as toolkit
Contributions are welcome! Please feel free to submit a Pull Request.

Foundry consists of:
## License

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
This project is licensed under the [AGPL-3.0 License](LICENSE).

You can find the installation guide for Foundry in their [book.getfoundry.sh - Getting started](https://book.getfoundry.sh/getting-started/installation)
## Disclaimer

Here we re-iterate the most important steps to get you started.
This project is under active development. The code has not completed externally reviews and should not be used in production environments without proper review and testing.

1. You can install precompiled binaries with their toolchain installer:
```bash
curl -L https://foundry.paradigm.xyz | bash
```
and follow the instructions in the terminal.
To instead build from source, see their getting started guide.
## Contact

For questions or support regarding this project, please contact:

- About Circles <[email protected]>
- Ben <[email protected]>

We appreciate your interest and feedback!
Loading
Loading