Under Construction This DApp is in development

Governance & DAO Module

OmniSocial enables decentralized community coordination through native DAO creation, proposal management, and reputation-weighted voting.

This module is designed to be developer-extensible and user-accessible—powering everything from small creator communities to protocol governance.

🧱 Architecture Overview

OmniSocial’s governance layer consists of two core contracts:

  • DAOFactory: deploys new DAOs and tracks them

  • DAO: each deployed instance is a fully functioning, upgradeable DAO with proposal, voting, and execution logic

Other integrated systems:

  • ReputationModule: reputation-based voting weights

  • Timelock: optional execution delay (for moderation and safety)

  • ProposalRegistry: indexing proposals for frontend/subgraph use

🏗 DAOFactory Contract

Used to create and register new DAOs on-chain.

createDAO(...)

function createDAO(
  string memory name,
  address[] memory initialMembers,
  uint256[] memory initialRep,
  uint256 quorum,
  uint256 votingPeriod,
  bool useTimelock
) external returns (address newDAO);

Params:

  • name: DAO identifier (used in metadata & .omni subdomain)

  • initialMembers: addresses of founding members

  • initialRep: reputation scores assigned to each founder

  • quorum: % of total rep needed for a vote to pass

  • votingPeriod: time window (in seconds) for each vote

  • useTimelock: enable/disable proposal delay before execution

🧠 DAO Contract

Each DAO contract is independent and manages its own proposals, votes, and execution state.

📜 Proposal Lifecycle

  1. Create Proposal

  2. Voting Period

  3. Quorum Check

  4. Execution (or Expiry)

  5. Post-execution events/logs


createProposal(...)

function createProposal(
  string memory title,
  string memory description,
  bytes[] calldata actions
) external returns (uint256 proposalId);
  • title / description: Proposal metadata

  • actions: array of encoded function calls to execute if approved

The proposal is stored with a unique ID, state is set to Active.


castVote(...)

function castVote(uint256 proposalId, bool support) external;
  • Requires the sender to have non-zero reputation in the DAO

  • Votes are weighted by current reputation score at time of vote


executeProposal(...)

function executeProposal(uint256 proposalId) external;
  • Checks that proposal passed quorum and voting period is over

  • If useTimelock is true, the execution is delayed until after a set buffer

⏳ Timelock (Optional)

If enabled:

  • Proposal is marked Queued upon passing vote

  • Can only be executed after minDelay (e.g., 24 hours)

  • Delay ensures DAO members can veto or leave if they disagree

🔄 Example: Proposal Flow

// 1. Creator submits proposal to update DAO metadata
dao.createProposal(
  "Update Community Banner",
  "We propose changing the DAO profile banner image",
  [abi.encodeWithSignature("updateBanner(string)", "ipfs://QmNewHash")]
);

// 2. Members vote during active window
dao.castVote(1, true); // support
dao.castVote(1, false); // against

// 3. After voting ends, and if quorum met
dao.executeProposal(1); // triggers updateBanner(...)

🧾 Proposal Metadata Example (for frontends)

{
  "id": 1,
  "title": "Fund a New Podcast",
  "description": "Proposal to allocate 100 OMNI to fund a podcast series.",
  "actions": [
    {
      "target": "0xFundingContract",
      "value": 0,
      "data": "0xa9059cbb000000000000000000000000..."
    }
  ],
  "status": "Active",
  "votesFor": 320,
  "votesAgainst": 50,
  "quorum": 300,
  "votingEnds": 1715529600
}

📊 Subgraph Support

You can query DAOs and their proposals using GraphQL:

query AllDAOs {
  daos {
    id
    name
    quorum
    votingPeriod
  }
}
query DAOProposals($daoId: ID!) {
  proposals(where: {dao: $daoId}) {
    id
    title
    description
    status
    votesFor
    votesAgainst
  }
}

Last updated

Was this helpful?