add Zap Voting section, change poll_options tag from nested json to multiple poll_option tags format, add rule for 1 vote per participant limit when min/max values equal, minor text edits

This commit is contained in:
toadlyBroodle 2023-03-23 11:10:49 +09:00
parent c7d87005be
commit b61e25cccc

41
69.md
View File

@ -6,12 +6,14 @@ A poll note is a [nostr event](01.md) (kind `6969`) for conducting paid polls. A
## Purpose
The purpose of poll notes is to conduct quantitative public opinion polls over nostr by requiring voters pay to participate. By tallying results to real satoshi valuations, nostr polls intend to provide superior signal compared to other free polling models. Imposing real monetary costs for participation should also discourage undesired participants attempting to sway results.
The purpose of poll notes is to conduct quantitative public opinion polls over nostr by requiring voters pay to participate. By tying results to real satoshi valuations, nostr polls intend to provide superior signal compared to other free polling models. Imposing real monetary costs for participation should also discourage undesired attempts to sway results.
Pollers may specify multiple `p` keys, to allow participants to choose which recipient they zap, regardless of their vote choice. The option for such distribution of funds should also incentivize participation by increasing voter optionality, poller authenticity, and legitimacy of results by mitigating certain in-authentic attack vectors.
Pollers may specify multiple `p` keys, to allow participants to choose which recipient they zap, regardless of their vote choice. The option for such distribution of funds should also incentivize participation by increasing voter optionality, poller authenticity, and legitimacy of results by mitigating certain unauthentic attack vectors.
By including a `value_maximum` limit, polls can stop single 'whale' votes discounting many smaller 'shrimp' votes. Likewise, by including a `value_minimum` limit, polls can make automated low-value vote flooding attacks prohibitively expensive. However, both limits remain optional to allow for freedom in poll design.
By setting `value_maximum` and `value_minimum` equal, a more traditional style poll may be designed, which weights each vote equal and limits each participant to a single vote.
The optional `consensus_threshold` is intended as a simple 'measuring bar', defined as the minimum percentage for any single `poll_option`'s percentage of the total tally to attain poll consensus status.
A careful balancing of all poll attributes should enable pollers to conduct tailored polls that deliver meaningful and valuable outcomes.
@ -22,11 +24,10 @@ A poll event:
* MUST specify an `e` tag that includes a primary hosting relay URL
* MUST specify 1 or more `p` tags, each including the same primary hosting relay specified in the `e` tag
* MUST contain a primary description string, specified in the `content` field
* MUST contain a `poll_options` tag, containing a serialized key-value array of vote options, formatted as below
* MUST include at least 2 voting options, each with its own unique description string
* MUST contain at least 2 `poll_option` tags, each specifying an index and a unique description string, formatted as below
* SHOULD specify a `closed_at` time:
* when specified, MUST include a valid [`ots` tag](03.md), proving original poll publishing time
* a `closed_at` value of less than or equal to the `created_at` field indicates a poll SHOULD NOT be closed.
* a `closed_at` value of null or less than or equal to the `created_at` field indicates a poll SHOULD NOT be closed.
* MAY specify a `value_maximum` satoshi value for zapped votes to be included in the tally
* MAY specify a `value_minimum` satoshi value for zapped votes to be included in the tally
* `value_minimum` MUST be less than or equal to `value_maximum`, when both are specified
@ -42,12 +43,9 @@ A poll event:
"tags": [
["e", <32-bytes hex of the id of the poll event>, <primary poll host relay URL>],
["p", <32-bytes hex of the key>, <primary poll host relay URL>],
["poll_options", "{
\"0\": \"poll option 0 description string\",
\"1\": \"poll option 1 description string\",
\"n\": \"poll option <n> description string\"
}"
],
["poll_option", "0", "poll option 0 description string"],
["poll_option", "1", "poll option 1 description string"],
["poll_option", "n", "poll option <n> description string"],
["value_maximum", "maximum satoshi value for inclusion in tally"],
["value_minimum", "minimum satoshi value for inclusion in tally"],
["consensus_threshold", "required percentage to attain consensus <0..100>"],
@ -59,17 +57,23 @@ A poll event:
}
```
## Zap vote format
## Zap voting
Poll options are voted on by sending [zap events](57.md) (referencing the original poll event's `e` and `p` values) that indicate their chosen vote option in a `poll_option`. To ensure all eligible votes are included in the tally, `e` and `p` tags must specify a primary hosting relay.
Poll options are voted on by sending [zap events](57.md) (referencing the original poll event's `e` and `p` values) that indicate their chosen vote option in a `poll_option` tag. To ensure all eligible votes are included in the tally, all `e` and `p` tags must specify the same primary hosting relay.
A voting client:
* SHOULD NOT allow submission of zap events with amounts greater than `value_maximum` (when specified)
* SHOULD NOT allow submission of zap events with amounts less than `value_minimum` (when specified)
* SHOULD NOT allow submission of zap events after `closed_at` time (when specified)
## Zap vote format
The zap request event (kind `9734`):
* MUST specify an `e` tag that references the original poll event
* MUST include a primary hosting relay URL in the `e` tag
* MUST incude exactly 1 `p` tag specifying the recipient's key, chosen from the original poll event's list of keys
* MUST include the same primary hosting relay URL in the `p` tag as is specified in the `e` tag
* MUST include exactly 1 `poll_option` tag
* MUST reference the vote option by its corresponding integer `n`, chosen from the original poll event's key-value array of predefined `polling_options`
* MUST include at least 1 `p` tag specifying the recipient's key, chosen from the original poll event's list of keys
* MUST include the same primary hosting relay URL in all `p` tags as is specified in the `e` tag
* MUST include exactly 1 `poll_option` tag which references the chosen vote option by its corresponding index `n`
* MUST include a valid `ots` tag, if the original poll event specifies a `closed_at` time
```json
@ -91,12 +95,13 @@ Polls results are tallied by summing the exact satoshi values from all eligible
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 `value_maximum`, `value_minimum`, and `closed_at` attributes (when specified) to participants before they vote
* MUST ONLY include full satoshi value amounts in option tallies from ALL eligible zaps that meet ALL following criteria:
* MUST ONLY tally zaps that reference the original poll event by its `e` tag value
* MUST ONLY tally zaps sent to a `p` key specified in the original poll event
* MUST ONLY include zap amounts less than or equal to `value_maximum`, if specified
* MUST ONLY include zap amounts greater than or equal to `value_minimum`, if specified
* if both `value_maximum` and `value_minimum` are specified AND are equal:
* MUST ONLY count 1 zap (the most recent) per participant (to allow for changes to vote choice, while enforcing 1 vote per participant)
* if a `closed_at` time is specified, clients:
* MUST ONLY tally zaps including a valid `ots` tag indicating a sent time greater than or equal to the original poll event's `ots` time
* MUST ONLY tally zaps including a valid `ots` tag indicating a sent time less than or equal to `closed_at` time