nostr/nips/14.md

2.4 KiB

NIP-14

Reputation Scheme

draft optional author:fiatjaf author:arcbtc

A special event with kind 6, meaning "rating". It is supposed to have the following attributes:

tags MUST contain an entry identifying the profile being rated, in the form ["p", "<pubkey, as a hex string>"].

content MUST be a JSON object serialized as a string with the desired categories and a rating for each. The category can be any string, the rating must be a number between 0 and 100.

For example, if someone wants to say their dentist, represented by their public key "abcdef", is very good as a dentist, can't attest to their full honesty and they're don't drive very well, they would have something like

{
  ...
  "kind": 6,
  "tags": [["p", "abcdef"]],
  "content": "{\"honest\": 77, \"driver\": 25, \"dentist\": 95}",
  ...
}

These ratings can be used by anyone who can get their hands on it. For example, an app that uses Nostr to coordinate car ride sharing could use just the "driver" rating and nothing else, but it could also use the "honest" value.

An app could choose to prompt users to manually select "friends" from whom they will see ratings of third parties; or they could trust some relay to prevent sybil reputation attacks (i.e., trust that a relay won't allow someone to create a million good ratings of themselves, for example, and then just count the ratings that are all supposed to come from real people); finally, apps could also implement automatic webs-of-trust if they, for example, decide that the rating "judge" will be considered as a factor for hopping between users. More detailed examples below:

Web-of-trust example

  • Carol rates Derek as honest: 90.
  • Alice wants to purchase a thing online from Derek.
  • Alice doesn't know Derek and also doesn't know Carol, therefore Alice cannot make a decision to trust Derek based on anything.
  • However Bob knows Carol and Bob thinks Carol wouldn't go out giving random ratings to people online, therefore Bob publishes a rating for Carol: judge: 95.
  • Alice thinks that Bob is also a reasonable person in the matter of judging others on the internet, so Alice also rates Bob with judge: 95.
  • Alice's app fetches all these rating events on the background and builds a local web-of-trust for her. So when Alice browses Derek's profile she sees honest: 90 with an implied trustworthiness of 95% * 95% = 90% and now she can decide to trust Derek based on that.