Skip to main content

Utilizing a Chain Fusion Governance Module (CGM)

This section serves as a follow-along guide to utilizing the CGM. For easier reading, two separate guides are provided for the two Archetypes, the ICP Treasury and the Chain Fusion Treasury Hub. However the general user flow is very similar. To follow this guide, no prior experience with creating proposals within DAOs on Q is assumed. However, there are some prerequisites to be able to follow this quide.

  1. You should have deployed, or be involved in an existing DAO with either an ICP treasury, or a Chain Fusion Treasury Hub. If this is not the case, please refer to the guide for setting up such DAO.
  2. You should have been onboarded as a DAO member to this DAO and have the permission to create proposals regarding the CGM. This means that you at least own some (fraction of) DAO Tokens.
  3. You should own some Q Tokens for gas.

Step-by-step Demo

Preparation: Getting Proposal Permissions

If you already have some voting power in the DAO, you can skip this step.

  1. Make sure that you are connected with the address, that holds the DAO token. Docs Version Dropdown

  2. Approve & deposit theDAO tokens to get voting power
    (This step requires signing two transactions. If your DAO already has a Constitution, you will also have to sign the constitution) Docs Version Dropdown

    You are now the proud member of a DAO that utilizes a CGM, or deployed one just for yourself. Let's get started!

Demo “ICP Treasury”

The following steps will take place in the "Governance" section of your DAO. You can navigate to this section on the left side in the DAO HQ

  1. Create a “ICP Treasury Module Voting” Proposal. When creating the proposal, select if you want to transfer native ICP tokens, or another ICRC token. Provide the following information: (This step requires signing one transaction)
    1. Token ID of the token you want to send (pre-set when choosing to transfer ICP tokens)
    2. The recipient’s principal ID when transferring ICRC tokens or the recipient account’s address for native ICP transfers.
    3. The amount of tokens to transfer (without decimals, so for transferring 1 ICP, enter 100000000 (10^8)).

Docs Version Dropdown Docs Version Dropdown

  1. Click on the proposal you just created and make sure to vote on the proposal on time. To Vote, click on the green "Vote" button in the top right. You will see the remaining time in the "Voting" block. (Voting requires signing one transaction) Docs Version DropdownDocs Version Dropdown
  2. Wait for the proposal to pass, then execute the proposal on Q to finalize it. The "Execute" button will appear at the same place the "Vote" button was. If you don't see the button, refresh the page and make sure that both the Voting, and the Veto Period are over. (Proposal Execution requires signing one transaction)
    Docs Version DropdownDocs Version Dropdown
  3. Execute the transaction on ICP. Therefore, just klick on the "Execute on ICP" button that appeared where the "Execute" and "Vote" buttons were. This executes the last proposal.
    1. If you for some reason forgot to "Execute on ICP" and multiple ICP Treasury Proposals have passed in the meantime, you can execute a specific proposal on the Canister Interface (Candid UI). To go to this interface, open the menu with the three little dots to the left of the Button and click on "See all Canister Functions". Docs Version Dropdown
    2. Then “CALL” icp_execute_message with the respective message ID. Be aware, that only successful proposals can be executed by the canister. Hence, the canister side message ID can differ from the DAO proposal ID. Docs Version Dropdown
  4. To check if a message was executed correctly, you can check the new balance of the recipient or the ICP Treasury canister on the token ledger canister or in the ICP explorer. You can see which token was sent, when looking at the proposal details in the DAO HQ. The Screenshots below are taken from the token canister. Docs Version DropdownDocs Version Dropdown

Demo “Foreign Chain Treasury via Chain Fusion Treasury Hub”

At this stage, we assume the user is already onboarded to the DAO and knows how to create a proposal. Hence, this demo focusses on the differences to the demo above and omits redundancies like acquiring voting power and voting on the proposal.

Again, this guide starts in the "Governance" section of your DAO. You can navigate to this section on the left side in the DAO HQ

  1. Create a Chain Fusion Treasury Hub Proposal and select whether you want to transfer the foreign-chain’s native token or specific ERC20 token. The Picture below demonstrates an ERC20 transfer, but the flow to transfer native tokens will be identical with the sole difference, that no token address needs to be provided. (This step requires signing a transaction)

    1. Note: When creating the proposal, pay attention to the Decimals of the token you want to send and add the matching number of trailing zeros. (i.e. 18 decimals for most tokens, including ETH, but 8 for USDC and 6 for WBTC)
      creating a new proposaladding the proposal details
  2. Click on the proposal you just created and make sure to vote on the proposal on time. To Vote, click on the green "Vote" button in the top right. You will see the remaining time in the "Voting" block. (Voting requires signing one transaction) voting on the treasury hub proposal

  3. Wait for the proposal to pass, then execute the proposal on Q to finalize it. The "Execute" button will appear at the same place the "Vote" button was. If you don't see the button, refresh the page and make sure that both the Voting, and the Veto Period are over. (Proposal Execution requires signing one transaction)
    executing the proposal on Q

  4. Execute the transaction on ICP to transmit the proposal result onto the foreign chain. Therefore, just klick on the "Execute on ICP" button that appeared where the "Execute" and "Vote" buttons were. This executes the last proposal.

    1. If you for some reason forgot to "Execute on ICP" and multiple ICP Treasury Proposals have passed in the meantime, you can execute a specific proposal on the Canister Interface (Candid UI). To go to this interface, open the menu with the three little dots to the left of the Button and click on "See all Canister Functions". executing the ICP transaction from the DAO Dashboard
    2. Then “CALL” evm_execute_message with the respective message ID. Be aware, that only successful proposals can be executed by the canister. Hence, the canister side message ID can differ from the DAO proposal ID. executing the ICP transaction directly on the canister
  5. To check if a message was executed correctly, you can look for the transaction on the foreign chain. There is multiple equivalent ways to do this. One is to check the latest transactions of the Token you sent. Another is checking the new balance of the recipient on the foreign chain or directly on the foreign-chain. To do this, you can use your preferred explorer of the foreign-chain.

    1. You can get the token or recipient address from the proposal. The foreign-chain treasury address is best found from your initial configuration proposal from setting up the CGM. You can also check the EVM address of the Chain Fusion Treasury Hub canister, when calling eth_address on the canister. Verify the latest token transactions