Skip to main content

Ballots

Ballot Creation

To create a new ballot, call the newballot() action. Note that the account publishing the ballot must also be a member of the group they wish to publish the ballot under.

Ballot Statuses

Ballot statuses describe the current stage of a ballot's lifecycle. All new ballots begin with the setup status.

StatusDescription
setupBallot is being drafted.
votingBallot is currently open for voting.
closedBallot is closed and final results have been rendered.
cancelledBallot was cancelled, awaiting deletion.
archivedBallot is currently archived and can't be deleted.

Voting Methods

Voting Methods describe how a ballot will react to voters with different token balances. One method splits a voter's balance among all of their selections, and another casts their full balance on each selection, for example.

Voting MethodDescriptionRaw Token WeightTransformed Weight Per Selection
1acct1voteEvery voter gets 1 whole token vote, regardless of account balance. Zero balances don't count.0.01 TEST1.00 TEST Each
1tokennvoteRaw token weight is applied to each option selected.3.00 TEST3.00 TEST Each
1token1voteRaw token weight is split among all selections.3.00 TEST1.00 TEST Each
1tsquare1vRaw weight is split among selections and each weight squared. At ballot closure each option's total will be square-rooted3.00 TEST9.00 TEST Each
quadraticRaw weight is square-rooted and split among selections.3.00 TEST9.00 Each

Ballot Settings

Ballots have a range of settings that further alter their behavior.

SettingDescriptionDefault
lightballotMarks as a light ballot.false
revotableAllows revoting on the ballot.true
voteliquidConsiders voter's liquid balance into vote weight.false
votestakeConsiders voter's staked balance into vote weight.true

Table Breakdown

Table: ballots

Scope: self

Field NameField TypeDescription
ballot_namenameName of ballot.
categorynameBallot category name.
publishernameAccount that published the ballot.
statusnameBallot status.
titlestringBallot title.
descriptionstringTweet-length ballot description.
contentstringLink or hash of external content.
treasury_symbolsymbolTreasury that ballot belongs to.
voting_methodnameName of selected voting method.
min_optionsuint8_tMinimum ballot selections allowed on a vote.
max_optionsuint8_tMaximum ballot selections allowed on a vote.
optionsmap<name, asset>Map of Ballot Options and their current vote tallies.
total_votersuint32_tNumber of voters who participated on ballot.
total_delegatesuint32_tNumber of delegates who participated on ballot.
total_raw_weightassetTotal number of raw tokens cast on ballot.
cleaned_countuint32_tNumber of expired vote receipts that have been cleaned.
settingsmap<name, bool>Map of setting names and on/off states.
begin_timetime_point_secTime ballot voting is opened.
end_timetime_point_secTime ballot voting closes.