Funding cycle
What everyone needs to knowβ
- Projects can configure funding cycles to create rules to follow over set amounts of time.
- A funding cycle's parameters can't be changed while it is in progress, but the project owner can propose reconfigurations to an upcoming cycle at any time.
- Funding cycles roll over automatically. If there is a reconfiguration in place and it has been approved by the current cycle's ballot, it will be used. Otherwise, a copy of the current funding cycle will be used with an updated
start
time and discountedweight
. - The mechanics of each project can vary dramatically depending on how its funding cycles are configured over time. Become familiar with how projects work to get a better understanding of how these decisions can be made.
What you'll want to know if you're buildingβ
- A funding cycle is represented as a
JBFundingCycle
data structure. - It is possible to create funding cycles that allow for total flexibility, total rigidity, or anything in between. Flexibility can be useful for rapid experimentation and evolution, whereas rigidity can be useful for dependability and trust. Anyone can configure a project's first funding cycle alongside creating the project with a call to
JBController3_1.launchProjectFor(...)
, and the project's owner can issue a reconfiguration to subsequent funding cycles with a call toJBController3_1.reconfigureFundingCyclesOf(...)
. - If a project has a current funding cycle, it can be found by reading from
JBFundingCycleStore.currentOf(...)
. A project's upcoming funding cycle can be found by reading fromJBFundingCycleStore.queuedOf(...)
. The funding cycles that carry each original configuration can be found by reading fromJBFundingCycleStore.get(...)
.JBController3_1.currentFundingCycleOf(...)
andJBController3_1.queueFundingCycleOf(...)
can also be used to get a reference to the funding cycle's metadata alongside. - A funding cycle's
ballot
property is useful for setting rules by which any proposed reconfiguration to subsequent cycles must adhere. This is useful for community oriented projects as it can prevent a project owner from maliciously updating an upcoming cycle's configuration moments before it begins without the broader community's consent. A funding cycle's ballot status, which is aJBBallotState
enumeration, can be found by reading fromJBFundingCycleStore.currentBallotStateOf(...)
. - Look through the
JBFundingCycleStore
contract for a complete list of relevant read functions, write functions, and emitted events. Several properties ofJBController3_1
andJBSingleTokenPaymentTerminalStore3_1
also store information relative to funding cycle configurations.