Accepting an Initiative
Function Signature
function acceptInitiative(uint256 initiativeId) external payableParameters
| Parameter | Type | Description |
|---|---|---|
initiativeId | uint256 | ID of the initiative to accept |
Access Control
Access control is determined by the board's AcceptanceCriteria configuration:
enum AcceptancePermissions {
Permissionless, // Anyone can accept if threshold is met
OnlyOwner // Only the board owner can accept
}
enum ThresholdOverride {
None, // Everyone (including owner) must meet threshold
OnlyOwner // Owner can bypass threshold requirement
}Permission Combinations
| permissions | thresholdOverride | Who Can Accept | Threshold Required |
|---|---|---|---|
OnlyOwner | None | Owner only | Yes, always |
OnlyOwner | OnlyOwner | Owner only | No (owner bypasses) |
Permissionless | None | Anyone | Yes, always |
Permissionless | OnlyOwner | Anyone | Owner: No, Others: Yes |
Pre-conditions
- Initiative must exist -
initiativeId <= initiativeCount - Initiative must be in Proposed state - Cannot accept already Accepted or Expired initiatives
- Caller must have permission - Based on
AcceptanceCriteria.permissions - Threshold must be met - Unless caller is owner and
thresholdOverrideisOnlyOwner
Threshold Calculation
The acceptance threshold is calculated dynamically:
threshold = max(
totalSupply * thresholdPercentTotalSupplyWAD / 1e18,
minThreshold
)Query the current threshold:
uint256 threshold = signals.getAcceptanceThreshold();What Happens When Accepting
When an initiative is accepted:
- State changes to
Accepted(irreversible) - Acceptance timestamp is recorded (
acceptanceTimestamp = block.timestamp) - Supporters can redeem their locked tokens (after release timelock)
Automatic Integrations
Incentives
Incentive credits are recorded when locks are created, and rewards are paid during redemption after acceptance.
Impact on Token Locks
Redemption Timeline
Locked tokens become redeemable based on releaseLockDuration:
Immediate Release (releaseLockDuration = 0): Supporters can redeem immediately after acceptance.
Timelocked Release: Supporters must wait for acceptanceTimestamp + releaseLockDuration before redeeming.
Board Cancellation: If the board is cancelled via cancelBoard(), all locks become immediately redeemable regardless of release timelock.
Events Emitted
event InitiativeAccepted(uint256 indexed initiativeId, address indexed actor)Validation & Errors
| Error | Condition | Solution |
|---|---|---|
Signals_InvalidID | Invalid initiative ID | Use valid ID (1 to initiativeCount) |
Signals_IncorrectInitiativeState | Initiative not in Proposed state | Only accept Proposed initiatives |
OwnableUnauthorizedAccount | Caller not owner (when OnlyOwner) | Must be board owner |
Signals_InsufficientSupport | Weight below threshold | Wait for more support or use owner bypass |
Client-side checks: Use getAcceptanceCriteria, getWeight, getAcceptanceThreshold, and getInitiative to surface eligibility and threshold status in UIs.
Related Functions
// Query functions
function getInitiative(uint256 initiativeId) external view returns (Initiative memory)
function getWeight(uint256 initiativeId) external view returns (uint256)
function getAcceptanceThreshold() external view returns (uint256)
function getAcceptanceCriteria() external view returns (AcceptanceCriteria memory)
function releaseLockDuration() external view returns (uint256)
// Owner functions for managing initiatives
function acceptInitiative(uint256 initiativeId) external payable
function expireInitiative(uint256 initiativeId) external payable
// Emergency actions
function closeBoard() external // Closes board, locks remain timelocked
function cancelBoard() external // Cancels board, all locks immediately redeemableAcceptance criteria are set at deployment time and cannot be changed post-deploy.
