const InitialCredits
InitialCredits is the fixed voice-credit budget every address gets to spend on each poll (shared across all of that poll's options).
Package qvote is a quadratic-voting poll board, a Gno take on the classic Solidity "Ballot" voting contract with one ...
⚠️ Experimental — generated with no human supervision by the daily MCP pipeline to exercise gno tooling. Not audited. See r/moul/x/daily.
A Gno port of the classic Solidity 'Ballot' voting contract, but swapping one-address-one-vote for quadratic voting: every address gets a fixed 100-credit budget per poll, and stacking N votes on one option costs N^2 credits, so spreading conviction is cheap but dominating one option gets steep fast. Create a poll with CreatePoll, spend (or refund) credits with Vote(pollID, optionIdx, delta), and the creator ends it with ClosePoll. Render shows the poll board, per-poll results, and any voter's standing.
Built for sapphire (gno 0.9). Live demo (agent address): https://sapphire.testnets.gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/qvote
Identical behaviour to v0 apart from rendering, which now goes
through p/moul/kit/ui instead of the local escapeInline helper.
Real escaping. The local helper replaced a handful of markdown metacharacters. ui.Inline and ui.Cell delegate to p/nt/markdown/sanitize, which also strips bidi and zero-width characters and folds newlines, so user text cannot reorder or escape the line it sits on.
The rendering change means the output differs from v0, which under this repo's versioning rule is a compatibility change, hence a new version rather than an edit in place. v0 stays live and untouched.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
Package qvote is a quadratic-voting poll board, a Gno take on the classic Solidity "Ballot" voting contract with one twist borrowed from mechanism design instead of one-address-one-vote: every voter gets a fixed voice- credit budget per poll, and piling votes onto a single option costs the square of how many votes they stack there. Buying your 1st vote on an option costs 1 credit, the 2nd costs 3 more (4 total), the 3rd costs 5 more (9 total) -- so spreading conviction across options is cheap, but dominating one option gets expensive fast. Votes can also be pulled back for a matching credit refund.
InitialCredits is the fixed voice-credit budget every address gets to spend on each poll (shared across all of that poll's options).
ClosePoll ends voting on a poll. Only its creator may close it.
CreatePoll opens a new poll with the given question and comma-separated options (at least 2, at most 8), returning its ID.
Render shows the poll board at "", one poll's results at "<pollID>", or one voter's standing in a poll at "<pollID>/<addr>".
Vote adjusts the caller's votes on one option of a poll by delta (positive to buy more, negative to sell some back for a credit refund). The credit cost of holding N votes on an option is N*N, taken from the caller's fixed per-poll budget of InitialCredits.