Types of Proposals and Outcomes

What Can Be Voted On?

  • Treasury expenditures (marketing, contributors, bounties)

  • Protocol upgrades or feature deployments

  • NFT utility changes (staking, roles, perks)

  • Partnerships and integrations

  • Ownership transfers or contract upgrades

Execution Logic

Once the proposal voting period ends, a user (or automated scheduler) can call execute_proposal to trigger the result.

Anchor Code

pub fn execute_proposal(ctx: Context<ExecuteProposal>) -> Result<()> {
    let proposal = &mut ctx.accounts.proposal;
    require!(!proposal.executed, CustomError::AlreadyExecuted);

    if proposal.votes_yes > proposal.votes_no {
        // Execute DAO action (e.g., fund transfer)
    }

    proposal.executed = true;
    Ok(())
}

Last updated