Making sense of the threshold formula in Conviction Voting

In the following weeks I will be able to write better documentation as Commons Swarm will be working on a dashboard to select conviction voting parameters, but for now I’m writing a quick post to explain how conviction voting threshold percentages are calculated.

The conviction threshold formula (which returns the amount of conviction needed for a proposal to pass) is as follows:

fb7bb87c93966d303fa9f82f9fd84bc2

These are the parameter definitions:

  • α (alpha): also known as decay, used to determine how fast conviction accrues or decays.
  • β (beta): also known as max ratio, used to determine the max amount of funds an individual proposal can request.
  • ρ (rho): also known as weight, used to fine-tune the difficulty to get funds from the common pool.
  • s (total staked): how much tokens are being staked in total at a certain point of time.
  • r (requested amount): funds that a specific proposal is requesting.
  • f (total funds): funds held by the common pool

Total staked (s) can not be lower than a certain amount, defined as a small portion of the token supply (S), known as minimum active stake percentage (m):

791a3d1dd1cb00564fc5cdf529dfa87e

Note that the threshold formula returns the amount of conviction required in absolute terms. In order to get the percentage in relation to the max conviction that total staked tokens could accrue, we have to divide the formula by:

e2b5478a9c20bb71cf07ff5863e54176

Resulting in this formula, which returns the conviction required in relative terms:

\frac{\rho}{(\beta-\frac{r}{f})^2}

Some time ago we used a spreadsheet similar to this one to decide the conviction voting parameters of 1hive DAO. It has two sections:

  • A parameter converter, which gives the parameters in the format needed by the smart contract (spreadsheet cells C5:F11).
  • A table that show different thresholds depending on how much funds are requested to the common pool (spreadsheet cells H3:J15).

As you may note, the spreadsheet does not contain the min active stake percentage parameter. This is because it uses the formula in relative terms to obtain the threshold in the form of a percentage. The threshold percentages are already in relation to the total staked tokens, and changing minimum active stake percentage (minThresholdStakePercentage in the contract) wouldn’t change the amounts either.

EDIT (June 9, 2021): I fixed the last formula.

10 Likes

Thanks for this! We touched on this topic during the recording of DAOn To Earth when we talked about conviction voting being an important pillar of a Garden Swarm. It is really cool to see the math behind how it works :pray:t4: