JBFundingCycle
Code
https://github.com/jbx-protocol/juice-contracts-v3/blob/main/contracts/structs/JBFundingCycle.sol
Definition
/**
@member number The funding cycle number for the cycle's project. Each funding cycle has a number that is an increment of the cycle that directly preceded it. Each project's first funding cycle has a number of 1.
@member configuration The timestamp when the parameters for this funding cycle were configured. This value will stay the same for subsequent funding cycles that roll over from an originally configured cycle.
@member basedOn The `configuration` of the funding cycle that was active when this cycle was created.
@member start The timestamp marking the moment from which the funding cycle is considered active. It is a unix timestamp measured in seconds.
@member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`.
@member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received.
@member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`.
@member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time.
@member metadata Extra data that can be associated with a funding cycle.
*/
struct JBFundingCycle {
uint256 number;
uint256 configuration;
uint256 basedOn;
uint256 start;
uint256 duration;
uint256 weight;
uint256 discountRate;
IJBFundingCycleBallot ballot;
uint256 metadata;
}
number
is the funding cycle number for the cycle's project. Each funding cycle has a number that is an increment of the cycle that directly preceded it. Each project's first funding cycle has a number of 1.configuration
is the timestamp when the parameters for this funding cycle were configured. This value will stay the same for subsequent funding cycles that roll over from an originally configured cycle.basedOn
is theconfiguration
of the funding cycle that was active when this cycle was created.start
is the timestamp marking the moment from which the funding cycle is considered active. It is a unix timestamp measured in seconds.duration
is the number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but newstart
timestamp and a discountedweight
.weight
is a fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received.discountRate
is a percent by how much theweight
of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicitweight
. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out ofJBConstants.MAX_DISCOUNT_RATE
.ballot
is an address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time.metadata
is extra data that can be associated with a funding cycle.