Skip to content

Accepting an Initiative

Function Signature

function acceptInitiative(uint256 initiativeId) external payable

Parameters

ParameterTypeDescription
initiativeIduint256ID 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

permissionsthresholdOverrideWho Can AcceptThreshold Required
OnlyOwnerNoneOwner onlyYes, always
OnlyOwnerOnlyOwnerOwner onlyNo (owner bypasses)
PermissionlessNoneAnyoneYes, always
PermissionlessOnlyOwnerAnyoneOwner: No, Others: Yes

Pre-conditions

  1. Initiative must exist - initiativeId <= initiativeCount
  2. Initiative must be in Proposed state - Cannot accept already Accepted or Expired initiatives
  3. Caller must have permission - Based on AcceptanceCriteria.permissions
  4. Threshold must be met - Unless caller is owner and thresholdOverride is OnlyOwner

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:

  1. State changes to Accepted (irreversible)
  2. Acceptance timestamp is recorded (acceptanceTimestamp = block.timestamp)
  3. 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

ErrorConditionSolution
Signals_InvalidIDInvalid initiative IDUse valid ID (1 to initiativeCount)
Signals_IncorrectInitiativeStateInitiative not in Proposed stateOnly accept Proposed initiatives
OwnableUnauthorizedAccountCaller not owner (when OnlyOwner)Must be board owner
Signals_InsufficientSupportWeight below thresholdWait 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 redeemable

Acceptance criteria are set at deployment time and cannot be changed post-deploy.