SEFI Governance Tutorial: On-Chain Private Voting for SecretSwap!

Darren Chiu
5 min readJul 27, 2021

Background

The SEFI Governance module on SecretSwap is live on mainnet, making it the world’s first truly private voting application on blockchain, secured by Secret Network — the data privacy platform for Web3. This application introduces on-chain governance for SecretSwap, a front-running resistant cross-chain and privacy-first AMM. SecretSwap is built on Secret Network, leveraging its encrypted “secret” smart contracts to ensure security and privacy. $SEFI is a governance token for Secret DeFi and SecretSwap, and it’s also a Secret Token native to Secret Network that provides privacy by default to its holders. Now $SEFI holders can directly participate in governance with encrypted voting for SEFI funding and text proposals!

View and interact with the SecretSwap: https://secretswap.io

Learn more about Secret Network: https://scrt.network

Purpose

This guide is intended to educate users how to participate in SEFI Governance to interact with private on-chain voting on SecretSwap.

Pre-Requisites

  • Install Keplr wallet, an open-source browser extension wallet for the Cosmos interchain ecosystem at https://wallet.keplr.app/
  • Own minimal SCRT in Keplr to be used as gas fees
  • Own SEFI tokens in Keplr to be used as voting stake

Instructions

Access SecretSwap and Stake SEFI

The amount of SEFI you have staked on SecretSwap will be equivalent to the voting power in SEFI governance (1:1 ratio).

1. Navigate to the SecretSwap application at https://app.secretswap.io.

2. Navigate to Governance tab and click Participate in Governance, which will bring up the SEFI staking pool* used for governance.

3. Input the amount of SEFI you want to stake and click Earn. You will be prompted by Keplr to confirm your address activity.

4. Create a viewing key for staked SEFI by clicking on the magnifying glass. Since SEFI is a privately encrypted token, you will need a viewing key to see the amount of SEFI you have in the staking contract.

*Note: Be sure to use the new SEFI Staking pool created for SEFI governance. If you have any SEFI staked in the SEFI Staking (OLD) pool, you will need to migrate your staked SEFI to the newer pool in the Earn tab.

— —

Create a proposal

Proposals for SEFI governance are text-based. SEFI governance text proposals will not make direct parameter changes to the underlying application code, so successful text proposal changes must be directly implemented by the SecretSwap developer community.

1. View your voting power in the Governance tab once you have staked your SEFI to the SEFI Staking pool.

2. Click Create Proposal to create your proposal.

3. Populate details for the text proposal and click Create Proposal*.

*Note: To make a SecretSwap governance text proposal, an address must stake a minimum of 300,000 SEFI. This SEFI staking requirement exists to prevent on-chain proposal spam. However, the specific staking minimum parameter is subject to further change upon a successful governance proposal to change it.

— —

Vote on an active proposal

Voting is simple: the more SEFI you have in the SEFI staking pool, the more voting power you have (1:1 ratio). Withdrawing or depositing SEFI after you vote will change the weight of your vote up until the voting deadline upon which your vote is finalized. This fluidity means you can add or withdraw liquidity from the SEFI staking contract while simultaneously participating in governance.

1. View active proposals that have been submitted on-chain.

2. Review details of an active proposal and click Vote.

3. Click Yes / No to submit your proposal vote. You will be prompted by Keplr to confirm the vote transaction. You can change your vote at any time during the active voting period.

View results of a proposal

At the end of the proposal voting period, results will be publicly displayed together with the vote distribution. This protects the privacy of individual votes while simultaneously publicizing the aggregate results. If the proposal does not reach quorum (33% of total SEFI voting power in the staking contract) by the end of the voting period, then all of the voting results will stay private in perpetuity.

Whats Next?

SecretSwap continues to rapidly innovate by leveraging the power and encryption of secret contracts. With decentralized governance via Secret Voting now incorporated into SecretSwap, it will be exciting to see how the Secret community governs Secret DeFi going forward!

One thing is certain: privacy in combination with decentralized governance is the key to unlocking the full value of a decentralized future and empowering DeFi users around the world!

Join the SecretSwap communities:

Telegram: https://t.me/secretswap

Forum: https://forum.scrt.network/c/secretswap/48

Secret Discord: https://chat.scrt.network

--

--