From a2f6b39b9097caf60fcfa8023e6101067b6a0faa Mon Sep 17 00:00:00 2001 From: toadlyBroodle Date: Sun, 5 Mar 2023 12:27:48 +0900 Subject: [PATCH] add value_minimum attribute, poll_option syntax fix --- 69.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/69.md b/69.md index 6ddfe0f1..82deae59 100644 --- a/69.md +++ b/69.md @@ -2,7 +2,7 @@ `draft` `optional` `author:toadlyBroodle` -A poll note is a [nostr event](01.md) (kind `6969`) for conducting paid polls. A poll presents two or more voting options, which participants my vote on by sending regular [zap events](57.md) which include an additional `poll_option` vote tag. Poll results may be blinded, until after users have voted. Polls may specify a `closed_at` time, after which results should be unblinded, closed to new votes, and the tally considered final. Poll options may be tallied by either satoshi `value` or vote `count`. Polls may additionally specify a `consensus_threshold`. +A poll note is a [nostr event](01.md) (kind `6969`) for conducting paid polls. A poll presents two or more voting options, which participants my vote on by sending regular [zap events](57.md) which include an additional `poll_option` vote tag. Poll results may be blinded, until after users have voted. Polls may specify a `closed_at` time, after which results should be unblinded, closed to new votes, and the tally considered final. Poll options may be tallied by either satoshi `value` or vote `count`. Polls may additionally specify a `value_minimum` to include votes in the tally and a `consensus_threshold` for assessing the state of consensus. ## Purpose @@ -17,6 +17,7 @@ A poll event: * MUST specify a primary `tally_method`: either `value` OR `count` * SHOULD specify a `closed_at` time: * a `closed_at` value of less than or equal to the `created_at` field indicates a poll SHOULD NOT be closed. +* MAY specify a `value_minimum` satoshi value for zapped votes to be included in the tally * MAY include a `consensus_threshold` (0-100), representing a percentage threshold for any single vote option to achieve poll consensus * a `consensus_threshold` of '0' indicates no threshold is specified. @@ -29,8 +30,9 @@ A poll event: "tags": [ ["e", <32-bytes hex of the id of another event>, ], ["p", <32-bytes hex of the key>, ], - ["poll_options": "[[0, 'poll option 0 description string'], [1, 'poll option 1 description string'], [, 'poll option description string']]"], + ["poll_options", "[[0, 'poll option 0 description string'], [1, 'poll option 1 description string'], [, 'poll option description string']]"], ["tally_method", "value"||"count"], + ["value_minimum", "minimum zap value to vote"], ["consensus_threshold", "required percentage to attain consensus <0..100>"], ["closed_at", "unix timestamp in seconds"], ], @@ -60,6 +62,7 @@ The zap request event (kind `9734`): To avoid ambiguity of results, strict adherence to the following rules is vital when tallying and rendering poll outcomes. A tallying client: +* MUST clearly indicate the `tally_method` and `value_minimum` (if specified) to potential participants before vote submission * MUST tally poll results according to the primary `tally_method` specified: * when tallying by `value`, clients: * MUST include full satoshi values from all relevant zap events @@ -70,6 +73,8 @@ A tallying client: * MUST NOT include zapped satoshi values in the tally * MUST NOT count votes from anonymous users * MUST treat the vote option with the most unique votes as the winning option +* if a `value_minimum` is specified, clients: + * MUST ONLY include zaps exceeding the satoshi `value_minimum` in the tally * when a `closed_at` time is specified, clients: * MUST NOT include late votes received after `closed_at` time * SHOULD publicly blind results until after a user's vote has been received