From 70f1be5866a69768e4cc63447e2268a15e70ad3f Mon Sep 17 00:00:00 2001 From: abhay-raizada Date: Tue, 25 Jun 2024 14:08:23 +0530 Subject: [PATCH] Polls On Nostr --- 118.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 118.md diff --git a/118.md b/118.md new file mode 100644 index 0000000..86201c6 --- /dev/null +++ b/118.md @@ -0,0 +1,36 @@ +# NIP-118 + +## Polls + +`draft` `optional` + +The purpose of this nip is to create a mechanism for polling on nostr. +The NIP aims to have the following properties. + +1. Provide a method for gauging eligibility. Only eligible votes should be counted. +2. Provide a method for maintaining anonymity. Participants should be able to not reveal their identities to everyone, yet their votes should be counted. +3. Provide a mechanism for verifiability. Participants should be able to verify that their votes have been counted, under an eligibility criteria. + +## Events + +### Poll Content + +The poll event is defined as a `kind:1068` event. This event carries over the `name` , `description` and `field` tags as defined in [nip-101](https://github.com/nostr-protocol/nips/pull/1190/files). +This event has no other tags and completely defines the poll content, which is uneditable. + +### Responses + +The response event is the same as the one on [nip-101](https://github.com/nostr-protocol/nips/pull/1190/files) + +### Eligibilty + +Eligibility to a vote is determined by another `kind:30180` event that can be created by anyone and is essentially a reference to a list of pubkeys, the author of the eligibility event is interested in. The eligibility event MUST contain an "e" tag to the poll event, and +"list" tags which references either a `kind:3` (contact list) or a `kind:30000`(follow sets) containing a list of "p" tags. + +### Counting Results. + +Results can be counted for different eligibility events, by querying for `kind:1069` events only authored by the pubkeys mentioned in the eligibility event. + +### Anonymous Voting + +For people that wish to maintain anonymity, while still having their votes counted can do so by signing the response event with a random private key and sending over the corresponding pubkey to the author of a `kind:30180` eligibility event. The author of the eligibility event may demand "proofs of eligibility" before adding the pubkey in any of the lists.