This repository was archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
57 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,57 @@ | ||
# Aragon Fundraising App | ||
<h1 align="center"> | ||
<img src="./.github/images/icon.svg" alt="Aragon Fundraising" width="200"> | ||
<br> | ||
Aragon Fundraising | ||
<br> | ||
</h1> | ||
|
||
<h4 align="center"> | ||
A continuous fundraising apps suite for <a href="https://www.aragon.org" target="_blank">Aragon</a> organizations. | ||
</h4> | ||
|
||
<p align="center"> | ||
<a href="https://badge.fury.io/js/electron-markdownify"> | ||
<img | ||
src="https://travis-ci.org/AragonBlack/fundraising.svg?branch=next" | ||
alt="Build" | ||
> | ||
</a> | ||
<a href="https://www.gnu.org/licenses/agpl-3.0"> | ||
<img | ||
src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" | ||
alt="License" | ||
> | ||
</a> | ||
<a href="https://en.cryptobadges.io/donate/0x233373130f7d859c1d743d01b7dfa09b9667a69a"> | ||
<img | ||
src="https://en.cryptobadges.io/badge/micro/0x233373130f7d859c1d743d01b7dfa09b9667a69a" | ||
alt="Donate" | ||
> | ||
</a> | ||
<a href="https://twitter.com/AragonBlackTeam"> | ||
<img | ||
src="https://img.shields.io/twitter/follow/AragonBlackTeam?label=Follow" | ||
alt="Follow" | ||
> | ||
</a> | ||
</p> | ||
|
||
## Architecture | ||
|
||
 | ||
|
||
## Contracts | ||
|
||
### BondingCurve | ||
## Packages | ||
|
||
#### Interface | ||
|
||
```text | ||
function buy(uint256 _value) external payable; | ||
function sell(uint256 _amount) external; | ||
``` | ||
### NPM Packages | ||
|
||
#### Roles | ||
| Package | Version | Description | | ||
| -------------------------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------- | | ||
| [`@ablack/fundraising-bancor-formula`](/apps/bancor-formula) | | `BancorFormula` computation contract | | ||
| [`@ablack/fundraising-batched-bancor-market-maker`](/apps/batched-bancor-market-maker) | | Automated market-maker batching orders filled through the `BancorFormula` | | ||
| [`@ablack/fundraising-tap`](/apps/tap) | | Control the flow of funds from a reserve to a beneficiary | | ||
| [`@ablack/fundraising-aragon-fundraising`](/apps/aragon-fundraising) | | `API` providing a single entry-point to interact consistently with all fundraising-related contracts | | ||
|
||
| | Description | Grantee | | ||
| :---------- | :----------------------------------------- | ------------: | | ||
| `BUY_ROLE` | Buy bonds against ETH or ERC-20 collateral | `ANY_ADDRESS` | | ||
| `SELL_ROLE` | Redeem bonds for ETH or ERC-20 collateral | `ANY_ADDRESS` | | ||
|
||
### CollateralPool | ||
|
||
#### Interface | ||
|
||
```text | ||
function deposit(address _token, uint256 _value) external payable; | ||
function transfer(address _token, uint256 _value) external; | ||
function execute(address _target, bytes _data) external; | ||
``` | ||
|
||
#### Roles | ||
|
||
| | Description | Grantee | | ||
| :------------------ | :-------------------------------------------------------- | ----------------------------------------------: | | ||
| `DEPOSIT_ROLE` | Deposit ETH or ERC-20 into the `CollateralPool` | `BondingCurve` contract\[s\] | | ||
| `TRANSFER_ROLE` | Transfer ETH or ERC-20 out of the `CollateralPool` | `BondingCurve` contract\[s\] and `Tap` contract | | ||
| `SAFE_EXECUTE_ROLE` | Execute balance neutral transactions on external contract | `Voting [BOND]` contract | | ||
|
||
#### Notes | ||
|
||
Depending on the token address the contract must also hook into the `BondingCurve` contract to let it \[optionally\] update its `vBalance` state variable \[thus reflecting the requested changes in the price curve\] | ||
|
||
### Tap | ||
|
||
#### Interface | ||
|
||
```text | ||
function updateTokenTap(address _token, uint256 _tap) external; | ||
function removeTokenTap(address _token) external; | ||
function updateVault(address _vault) external; | ||
function withdraw() external; | ||
``` | ||
|
||
#### Roles | ||
|
||
| | Description | Grantee | | ||
| :---------------- | :--------------------------------------------------------------------------------------- | -----------------------: | | ||
| `UPDATE_TAP_ROLE` | Update tap rate | `Voting [BOND]` contract | | ||
| `WITHDRAW_ROLE` | Initialize ETH or ERC-20 `transfer` on the `CollateralPool` to the discretionary `Vault` | `ANY_ADDRESS` | | ||
|
||
#### Notes | ||
|
||
Implementing the tap system as an external contract owning TRANSFER_ROLE over the `CollateralPool` contract provides more modularity than implementing it directly into the `CollateralPool` contract. | ||
|
||
The tap contract upon initialization allows the user to set the max percentage the tap can be raised per 30-day period. |