Allo uses a single strategy contract to handle all logic around recipient eligibility, allocation, and token distribution. Every pool needs a pre-deployed strategy before it can be created. Developers can choose to create a custom strategy or use an existing one. You can read more on the Cloneable Strategies page.
If you're writing a custom strategy, we provide
BaseStrategy.sol (opens in a new tab)
that all strategies should inherit from. For more information, see the Writing
a Custom Strategy page. Strategies must
be deployed prior to creating a new pool.
Allocation strategies are responsible for three things:
- 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 set of functions for implementing these, but what they mean and how you'll use them depend a lot on what you're building. Explore each of these core concepts for more details, including examples of how they can be used to meet different requirements.
The Strategy Library (opens in a new tab) includes a variety of strategy contracts. These contracts can be used as is or as a starting point for a custom strategy.
Please note that these strategies are presented as-is and many of them have not been audited.