Voting via Meta Governance

Note: GovernanceModule is not available for Optimism.

What is the GovernanceModule:

The Governance Module is a module that enables participating in on-chain governance of component tokens held in the SetToken. Examples of intended protocols include Compound, Uniswap, AAVE and Maker governance. Note: all actions are submitted on-chain and therefore is out of scope for any off-chain governance systems (e.g. Snapshot).

Initializing the GovernanceModule:

All modules need to be added to the SetToken as the first step. Learn how to add a module to your SetToken in this section.

Once you have added the GovernanceModule to the SetToken, you must initialize the SetToken on the GovernanceModule:

/**
 * Initializes this module to the SetToken. Only callable by the SetToken's manager.
 *
 * @param _setToken        Instance of the SetToken to initialize
 */
function initialize(ISetToken _setToken);

Registering to Vote:

In order to register to vote in governance using components in the SetToken, you must be operating as the manager of your SetToken. Note: not every governance protocol requires registration for voting. E.g. Compound and Uniswap require registering before voting while Aave does not.

/**
 * SET MANAGER ONLY. Register for voting for the SetToken
 *
 * @param _setToken                 Address of SetToken
 * @param _governanceName           Human readable name of integration (e.g. COMPOUND) stored in the IntegrationRegistry
 */
function register(
    ISetToken _setToken,
    string memory _governanceName
)

Simply input the setToken address and governanceName which is associated with the adapter.

The governance name is a string specifying which governance protocol to register. This string is registered in the IntegrationRegistry. Currently, Set Protocol supports these protocol's governance:

Contract

Exchange Name

Compound Bravo

"CompoundBravoGovernanceAdapter"

Uniswap

"UniswapGovernanceAdapterV2"

Snapshot Delegation

"SnapshotGovernanceAdapter"

Aave V2

"AaveGovernanceV2Adapter"

Voting in a Proposal:

In order to vote in governance using components in the SetToken, you must be operating as the manager of your SetToken. Note: votes are executed as a block in the SetToken. This means the manager of the SetToken controls the governance power of each of the underlying components.

Call the vote function with inputs as follows:

/**
 * SET MANAGER ONLY. Cast vote for a specific governance token held in the SetToken. Manager specifies whether to vote for or against
 * a given proposal
 *
 * @param _setToken                 Address of SetToken
 * @param _governanceName           Human readable name of integration (e.g. COMPOUND) stored in the IntegrationRegistry
 * @param _proposalId               ID of the proposal to vote on
 * @param _support                  Boolean indicating whether to support proposal
 * @param _data                     Arbitrary bytes to be used to construct vote call data
 */
function vote(
    ISetToken _setToken,
    string memory _governanceName,
    uint256 _proposalId,
    bool _support,
    bytes memory _data
)

The proposalId is specific to the underlying protocol's governance. The support indicates whether to support or reject the proposal. The data field is used to construct vote calldata for protocols that require additional parameters.

Last updated