Skip to content

Commit 02a599f

Browse files
committed
various 2.1 related updates
1 parent 5d5e641 commit 02a599f

26 files changed

+2599
-3364
lines changed

next-env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

pages/allo/_meta.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"title": "Core Concepts"
66
},
77
"cloneable-strategies": {
8-
"title": "Cloneable Strategies"
8+
"title": "Cloneable Strategies",
9+
"display": "hidden"
910
},
1011
"pool-roles": {
1112
"title": "Pool Roles"
1213
},
1314
"fees": {
14-
"title": "Fees"
15+
"title": "Fees",
16+
"display": "hidden"
1517
},
1618
"guides": {
1719
"type": "separator",
@@ -24,7 +26,8 @@
2426
"title": "Building On Allo"
2527
},
2628
"working-with-pools":{
27-
"title": "Working with Pools"
29+
"title": "Working with Pools",
30+
"display": "hidden"
2831
},
2932
"auditing-a-strategy":{
3033
"title": "Auditing a Strategy",
@@ -36,7 +39,7 @@
3639
},
3740
"code":{
3841
"title": "Source Code",
39-
"href": "https://github.com/allo-protocol/allo-v2/blob/main/contracts/core/Allo.sol",
42+
"href": "https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.sol",
4043
"newWindow": true
4144
}
4245
}

pages/allo/flow-of-funds.mdx

+33-57
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@ import Image from 'next/image'
22

33
# Flow of Funds
44

5-
While there is a lot of nuance in how pools get allocated by Allocation
6-
Strategies, generally speaking there are four steps in the life cycle of a pool.
7-
Each step is handled by the Allo core contract (`Allo.sol`), though some of
8-
these methods are implemented by the allocation strategy attached to a pool.
9-
10-
A pool's allocation strategy is what determines how funds are both allocated and
11-
distributed. But to make implementing consistent front ends on Allo easier,
12-
allocation strategies assume that they are being called by `Allo.sol`, which
13-
implements an `allocate()` and `distribute()` method
14-
5+
While there is nuance in how pools get allocated by Strategies, there are
6+
generally four steps in the life cycle of a pool.
7+
Each step is invoked on [`Allo.sol`](/allo), which calls the relevent
8+
method on the strategy.
159
<div className="my-10">
1610
<Image
1711
src="/Flow of funds - 1.png"
@@ -25,79 +19,61 @@ implements an `allocate()` and `distribute()` method
2519

2620
The Allo core contract has two methods for creating a pool:
2721

28-
1. The `createPool` method
29-
2. The `createPoolWithCustomStrategy` method
30-
31-
While there are some differences between the two methods, they both create
32-
a pool for a given Profile in the Registry, and associate an allocation strategy
33-
to it. You can read more about the differences between the two and which to use
34-
in [Working with Pools](/allo/working-with-pools).
22+
1. The [`createPool`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#create-pool) method
23+
2. The [`createPoolWithCustomStrategy`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#create-a-pool-with-custom-strategy) method
3524

36-
Finally, you can create and fund the pool simultaneously through both methods or
37-
you can create the pool and then fund it separately with the `fundPool` method
38-
on `Allo.sol`.
25+
This first method for creating a pool creates a new pool by
26+
cloning an already deployed one. This makes it simple to make use of existing
27+
on-chain strategies. If you're using a custom or newly developed strategy, then you
28+
would deploy it to chain, and use the second method (`createPoolWithCustomStrategy`).
3929

4030
Some things to note:
4131
- Pools must be created by a Profile from the Registry
4232
- Pools can be created with an initial balance of 0 and funded later
43-
- Technically, anyone can fund a pool
33+
- By default, anyone can fund a pool
4434

4535
## Funding a Pool
4636

4737
A pool can be funded when it is created and/or it can be funded afterwards. You
48-
can do either or you can do both. If funding the pool after creating it, then you'll use the `fundPool` method on `Allo.sol`.
38+
can do either or you can do both. If funding the pool after creating it, then use
39+
* The [**`fundPool`**](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#fund-pool)
40+
method
4941

50-
Pools can also be funded with either native Ether or an ERC20 token. Note though
42+
Pools can be funded with either native Ether or an ERC20 token. Note though
5143
that a pool can only distribute one token, which is determined when the pool is
5244
created. Trying to call `fundPool` with a token other than the one used when the
53-
pool was created will cause the method to revert with an error. Pools should
54-
always be funded using the `fundPool` method and you should never transfer funds
55-
directly to `Allo.sol`
45+
pool was created will cause the method to revert with an error. **Pools should
46+
always be funded using the `fundPool` method and **you should never transfer funds
47+
directly to `Allo.sol`**
5648

5749
Once a pool has been funded, there is no way to withdraw funds from the pool
58-
other than to distribute them through the allocation strategy.
50+
bypassing the terms defined by the strategy. Strategies will have a
51+
[`withdraw`](https://github.com/allo-protocol/allo-v2.1/tree/dev/contracts/strategies#functions)
52+
method, though conditions for its use will vary.
5953

6054
Some things to note:
6155
- The address that creates the pool doesn't have to be the one that funds it
62-
- Technically, anyone can fund a pool
63-
- The protocol fee is taken on the pool
6456
- Pools can only distribute one token (including native Ether)
65-
- Never send funds to `Allo.sol`. Funds sent to `Allo.sol` are considered a gift
66-
to the Allo protocol team and will be used to buy pizza. If you ask nicely,
67-
we'll share the pizza with you.
57+
- Never directly transfer funds to `Allo.sol`
6858

6959
## Allocating Funds
7060

71-
While allocation strategies handle the implementation of allocating a pool,
72-
the act of allocating is done through `Allo.sol`. This allows for
73-
interoperability between strategies and gives every front end built on Allo
74-
a consistent interface for every strategy. So allocating to any pool, using any
75-
allocation strategy should be done through the `allocate()` method on
76-
`Allo.sol`.
77-
78-
Every pool is created with one allocation strategy that follows
79-
[`IStrategy.sol`](). The allocation strategy of a pool cannot be changed once
80-
the pool is created.
61+
While strategies define the terms of allocation, the act of allocating is done
62+
through `Allo.sol`. This provides a consistent interface for use.
63+
* The [`allocate`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#allocate-funds-to-strategy)
64+
method
8165

8266
Some things to note:
83-
- Regardless of your allocation strategy, you'll call `allocate()` on `Allo.sol`
84-
- Writing allocation strategies is a large topic and you can read more about it [here]().
67+
- Allocate can probably only be called by pool managers
68+
- Strategies can be simple or complex. You can read more about them [here](/strategies).
8569

8670
## Distributing Funds
8771

88-
Any distribution from any pool, using any allocation strategy will be done
89-
through the `distribute()` method on `Allo.sol`. This is for the same reasons
90-
that every allocation is done through `allocate()`: to provide a consistent
91-
interface for front ends and make strategies interoperable (a front end
92-
shouldn't need to care what allocation strategy a pool is using).
93-
94-
What happens when someone called `distribute()` is determined by the allocation
95-
strategy.
96-
97-
It's important to note here that Allo keeps track of a pool's total balance, but the
98-
allocation strategy should keep track of each distribution to avoid things like
99-
double spending or over spending.
72+
Again, strategies define the terms of distribution, but the method is invoked
73+
through `Allo.sol`. This provides a consistent interface for use.
74+
* The [`distribute`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#distribute-funds-to-recipients)
75+
method
10076

10177
Some things to note:
102-
- Regardless of your allocation strategy, you'll call `distribute()` on `Allo.sol`
78+
- Distribute can probably only be called by pool managers
10379
- Allocation strategies are responsible for managing how a pool is distributed, not `Allo.sol`

pages/allo/index.md

+34-74
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,60 @@
11
# Allo
22

3-
The Allo core contract (`Allo.sol`) plays a couple of key roles. This is where
4-
you create and fund pools, assign them an allocation strategy, and manage them.
5-
`Allo.sol` is primarily how you'll interact with an allocation strategy too.
3+
The Allo core contract ([`Allo.sol`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.sol))
4+
is the command center for pools. This is where pools are created and funded, assigned
5+
an allocation strategy, and more. It is mostly through `Allo.sol`you will interact
6+
with a strategy too.
67

7-
If you're building a front end application on top of the protocol, you should
8-
only have to integrate with the core contract.
8+
There is a wealth of sequence diagrams and developer-oriented information in
9+
the bundled [**Allo.md**](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md).
910

1011
## Creating a Pool
1112

1213
One of the key responsibilities of the Allo core contract is to create and
13-
manage pools of tokens that can be allocated using a strategy. Allo provides two
14-
ways of doing this:
14+
manage pools. Allo provides two ways of doing this:
1515

16-
1. The `createPool` method
17-
2. The `createPoolWithCustomStrategy` method
16+
1. The [`createPool`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#create-pool) method
17+
2. The [`createPoolWithCustomStrategy`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#create-a-pool-with-custom-strategy) method
1818

19-
The first method for creating a pool (`createPool`) creates a new pool by
20-
cloning a strategy provided as part of Allo. This saves gas and makes it easier
21-
to deploy a pool from the front end. If you're using your own strategy, then
22-
you'll use the second method (`createPoolWithCustomStrategy`).
19+
This first method for creating a pool creates a new pool by
20+
cloning an already deployed one. This makes it simple to make use of existing
21+
on-chain strategies. If you're using a custom or newly developed strategy, then you
22+
would deploy it to chain, and use the second method (`createPoolWithCustomStrategy`).
2323

24-
Further reading:
25-
26-
* [Working with Pools](/allo/working-with-pools)
27-
* [Building on Allo](/allo/building-on-allo)
24+
Once created, a pool and a specific strategy deployment are permanently linked. A strategy
25+
cannot be used for a different pool later, but they are easily cloned. It is best to
26+
only create a pool once you are certain the choice of strategy is final.
2827

2928
## Adding and removing funds
3029

31-
At some point, you need to fund the pool before you can start allocating it. You
32-
can do this at pool creation, by sending tokens or Eth when you call
33-
`createPool` or `createPoolWithCustomStrategy`. Or you can do this after the
34-
fact by calling the `fundPool` method on Allo.
35-
36-
If you're building an application on Allo or writing an allocation strategy,
37-
this is a useful thing to consider. Depending on what you're building and what
38-
you want to solve for, it might not be the case that the funds someone want to
39-
allocate are secured when they create the pool - they could need to fundraise
40-
for a while first. That's why we've separated creating and funding a pool. Your
41-
allocation strategy and/or front end application should take this into account
42-
too.
30+
The pool will need funds before you can start allocating them. This
31+
can be done:
32+
1. At pool creation by sending tokens or ETH when you call
33+
`createPool`/`createPoolWithCustomStrategy`
34+
2. After the fact by calling [**`fundPool`**](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#fund-pool)
4335

44-
Also note that once a pool is funded, the only way to distribute those funds is
36+
Note that once a pool is funded, the only way to distribute those funds is
4537
through the allocation strategy. You cannot change which allocation strategy is
4638
tied to a particular pool.
4739

48-
Further reading:
49-
50-
* [Working with Pools](/allo/working-with-pools)
51-
* [Building on Allo](/allo/building-on-allo)
52-
5340
## Managing a Pool
5441

55-
Allo creates two roles for every pool:
56-
57-
1. The pool admin
58-
2. The pool managers
59-
60-
The admin will be the value of `msg.sender` when `createPool` or
61-
`createPoolWithCustomStrategy` is called (i.e. the address creating the pool is
62-
the admin).
63-
64-
When a pool is created, you can pass a list of addresses that will be given the
65-
manager role. There are also two methods for managing the pool managers:
42+
Allo creates two roles to help manage every pool:
6643

67-
1. `addPoolManager`, for adding an address as a pool manager
68-
2. `removePoolManager`, for removing an address as a pool manager
44+
* Pool admin - the address that created a pool
45+
* Pool managers - optional list of addresses
6946

70-
Only the pool admin can call `addPoolManager` or `removePoolManager`.
47+
Managers and admin (may) have authority to update a pool's metadata, and have say in
48+
determining fund allocation (i.e. approving or rejecting applications). The specifics
49+
will vary depending on the strategy.
50+
Pool managers can also be added or removed later, but only by the Admin:
7151

72-
The reason for this role system is two fold:
73-
74-
1. To determine which addresses can update data about the pool
75-
2. Optionally, for use in an allocation strategy when determining which addresses can allocate from a pool
76-
77-
Further reading:
78-
79-
* [Pool Roles](/allo/pool-roles)
52+
* [`addPoolManager`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#add-pool-managers)
53+
and [`removePoolManager`](https://github.com/allo-protocol/allo-v2.1/blob/dev/contracts/core/Allo.md#remove-pool-managers)
8054

8155
## Fees
8256

83-
Allo protocol has two methods for taking fees on pools: a percentage fee and
84-
a base fee. The base fee applies at pool creation and is the cost of creating
85-
and running pool on Allo. The percentage fee is taking from the pool before it
86-
is distributed. Only the percentage fee is implemented, at the time of writing.
87-
88-
At the time of writing, the protocol fee is set to 2.5% of matching funds. If
89-
you're using an allocation strategy like
90-
[`DonationVotingStrategy`](https://github.com/allo-protocol/allo-v2/tree/main/contracts/strategies/donation-voting),
91-
the fee is not taken from donations. The fee only applies to the pool managed by
92-
Allo and not funds that pass through `allocate()`.
93-
94-
The fee is determined through [Gitcoin's
95-
governance](https://gov.gitcoin.co/t/gitcoin-dao-governance-process-v3/10358)
96-
process and uses GTC as the voting token.
97-
98-
Further reading:
57+
Allo protocol supports a fee structure, but it is not widely used today.
9958

100-
* [Fees](/allo/fees)
59+
* A base fee applies at pool creation and is the cost of creating and running pool on Allo
60+
* The percentage fee is taking from the pool before it is distributed

pages/allo/working-with-pools.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import Image from 'next/image'
99
/>
1010
</div>
1111

12-
Pools handle the implementation of allocation strategies in Allo. While the
13-
details of how a pool of funds will be allocated and distributed are reserved
12+
Pools are tied to strategies in Allo. While the
13+
terms of how a pool of capital will be allocated/distributed are reserved
1414
for the strategy contract, those contracts should not be called directly.
1515
Instead, a pool will be created that links to the strategy and all interactions
1616
with that strategy will happen through `Allo.sol`.

pages/development/allo-improvement-proposals.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Cards, Card } from 'nextra/components'
44

55
Allo Improvement Proposals (AIPs) are protocol updates or new features proposed
66
by members of the Allo community. AIPs can be used to propose new functionality,
7-
discuss technical issues, and record design decisions.\ After vetting your idea
7+
discuss technical issues, and record design decisions. After vetting your idea
88
through a community discussion, a formal AIP can be submitted for a peer review.
99
Everyone is welcome to participate in the AIP process!
1010

pages/development/getting-involved.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ Below you will find some ways to start, but please don't feel limited by them.
55

66
## Join the Community
77

8-
We maintain an [Allo Devs Telegram](https://t.me/+2OHfGICIvPQxODFh) group that
8+
* We maintain an [Allo Devs Telegram](https://t.me/+2OHfGICIvPQxODFh) group that
99
is a good resource for asking questions, getting feedback on ideas, and
1010
connecting with other developers.
1111

12-
Another great place to discuss among community and developers is the
12+
* Another great place to discuss among community and developers is the
1313
[Gitcoin Discord](https://discord.gg/gitcoin).
14-
1514
This server has dedicated `⁠👷🏾|grants-lab-builders` & `⁠🔨|allo-protocol-builders`
1615
channels. Find them by agreeing to the server rules, and from the `👋|start-here`
1716
channel gaining the **DAO Visitor** role. Then from the new `👋🏾|dao-start-here`
@@ -20,14 +19,13 @@ channel react with `⚒️` to get access to these dedicated builder spaces.
2019

2120
## Building
2221

23-
A great way to get involved is to create your own [allocation
24-
strategy](/strategies). The pieces of an allocation strategy give you a lot of
22+
A powerful way to master the protocol is to create your own [strategy](/strategies).
23+
The pieces of an allocation strategy give you a lot of
2524
room to explore and play around with different mechanisms.
2625

2726
Another way to contribute to the Allo ecosystem is to build new tools (front
28-
ends, apps, products, etc) for communities to allocate capital. Allo Protocol
29-
serves as the base-layer, but we need devs like you to build interesting
30-
products on top of it!
27+
ends, apps, products, etc) for communities to allocate capital. [Allo.Expert](https://allo.expert/)
28+
is a great place to dive deeper on this.
3129

3230
When in doubt, post in the above `⁠🔨|allo-protocol-builders` channel or
3331
the Allo Devs Telegram group.

0 commit comments

Comments
 (0)