The command center Allo.sol
calls to strategy contracts to determine logic around recipient
eligibility, allocation, and token distribution. Every pool is created with a strategy, which it is
tied to. You may choose to create a custom strategy, or clone an existing one.
All strategies, including custom ones, inherit a
BaseStrategy.sol
(opens in a new tab)
that defines the common interface. This interface is how the strategy is able to be
used even when calling from Allo.sol
.
There is a wealth of developer-oriented information in the bundled Strategy ReadMe.md (opens in a new tab).
Strategies
While allocation mechanisms (opens in a new tab) can vary significantly, Allo generalizes the pattern to the register-allocate-distribute flow.
This flow addresses the following:
- Recipient Eligibility: Who is eligible to receive funding from a pool? How is that eligibility determined?
- Allocation: How does your strategy allocate from the pool? You can have token-holders vote, pool managers give approval, or something else entirely.
- Distribution: Once funds have been allocated, how are they distributed? In a lump-sum, in milestone-based payments, as a stream, or something else?
Allo provides a standard pattern for implementing these, but what they do is entirely up to you. You're encouraged to look over existing examples (opens in a new tab), allo.expert (opens in a new tab), and beyond for inspiration.
Strategy Library
The Strategy Library (opens in a new tab) includes a variety of useful components.
- Example contracts (opens in a new tab), to be used out of the box or as reference
- Extensions (opens in a new tab)/ Libraries (opens in a new tab) to provide readily reusable components, taking grunt work out of custom development
- BaseStrategy.sol (opens in a new tab) to provide a common pattern for calling of strategy methods
Please note that these strategies are presented as-is, and some components may not be audited.