Projects
Overview
Governance and Voting System

Governance System

Governors fulfill a pivotal role as decision controllers overseeing the management of fractionalized assets. When ODC owners fractionalize their assets, they are empowered to select the Governor of the associated Fraction Token contract. This decision is foundational, determining the nature of the Governance mechanism applied.

The first option offers flexibility through choosing an external address like a multisig wallet, or another external contract. However, this choice leads to a non-democratized Governance system, where the designated Governor alone can initiate on-chain actions, excluding stakeholders' influence.

Alternatively, owners can opt for Nexera's custom Governance contracts, introducing a democratized approach. These contracts incorporate a dedicated Voting mechanism, allowing stakeholders to propose on-chain actions and cast votes based on their fraction balances. In this scenario, the Governor's role extends to overseeing the entire Voting process.

Types of Governance

In both Fungible and Semi-Fungible fractionalization, the Fractionalizer system features a custom Governor implementation and a specialized Voting token implementation, providing a democratized approach to the management of fractionalized assets.

Notably, Voting tokens (ERC20Votes and ERC1155Votes) maintain a history (checkpoints) of each account's voting power. This allows for the integration of complex voting mechanisms, such as quadratic voting or conviction voting.

Governance for Fungible Fractions

In the context of Fungible Fractionalization, the Fractionalizer system employs the GovernanceFungible implementation as the designated Governor. Additionally, Fungible Fractions, represented as ERC20 tokens, extend the ERC20Votes implementation. This extension is designed to manage the voting power of fraction owners, providing essential functionalities to the governance system.

Governance for Semi-Fungible Fractions

In the context of Semi-Fungible Fractionalization, the Fractionalizer system employs the GovernanceSemiFungible implementation as the designated Governor. Additionally, Semi-Fungible Fractions, represented as ERC1155 tokens, extend the ERC1155Votes implementation. This extension is designed to manage the voting power of fraction owners, providing essential functionalities to the governance system.


Workflow




The ProposalState enum defines the possible states of proposals:

enum ProposalState {
  NONEXISTING, // The initial state before a proposal is created
  REQUESTED, // The proposal is active and awaiting voting
  SUCCEEDED, // The proposal has successfully passed and executed.
  FAILED, // The proposal has failed to pass the required voting conditions
  CANCELLED // The proposal has been cancelled
}

Proposals are defined by the Proposal struct which encapsulates necessary data:

struct Proposal {
  address[] targets; // Addresses of the targeted contracts that the proposal is aiming at.
  uint256[] values; // Amounts *(in wei)* of native currency to send to each corresponding target address.
  bytes[] calldatas; // Calldata for the corresponding low-level calls to be executed in the proposal.
  string description; // Description of the proposal.
  uint256 startingTimestamp; // Unix Timestamp that denotes the start of the proposal's voting period.
  uint256 startingBlock; // Block number at which the proposal started.
  uint256 endingTimestamp; // Unix timestamp indicating when the proposal's voting period ends.
  uint256 expirationTimestamp; // Unix timestamp indicating when the proposal can be cancelled.
  ProposalState state; // Current state of the proposal.
  address creator; // Address of the proposal's creator.
}

The proposals mapping maps proposal IDs to their associated data (the corresponding Proposal struct instance).

mapping(uint256 => Proposal) public proposals;
  1. A fraction owner initiates a proposal.
  • A proposal defines on-chain actions that can be executed (in a single Tx), if the proposal obtains the required votes in favor.
/**
 * @notice This function is called by the users to propose.
 * @dev A `Proposal` struct is populated accordingly and assigned a unique ID within the `proposals` mapping.
 * @param targets Addresses of the targeted contracts for the proposal.
 * @param values Amounts *(in wei)* of native currency for each target.
 * @param calldatas Calldata for the corresponding low-level calls.
 * @param description Description of the proposal.
*/
function propose(
  address[] memory targets,
  uint256[] memory values,
  bytes[] memory calldatas,
  string memory description
) external;
  1. Any fraction owner can cast their vote on the proposal.

The voting period of a proposal concludes when the associated endingTimestamp is reached.

function castVote(uint256 proposalId, bool isVoteFor, string reason) external;
  1. A participant invokes the execute function provided by the Governor type contract.

If the proposal meets the necessary criteria and its data is accurate, the transaction completes successfully, and the proposal is marked as succeeded. Otherwise, the proposal is marked as failed.

function execute(uint256 proposalId) external returns (bool);
  1. Stale proposals can be cancelled when the associated expirationTimestamp is reached.
function cancel(uint256 proposalId) external;