Author: Tim Daubenschütz
Date: 2023-10-16
Have comments? => attestate/kiwistand#106
Today, a Kiwi News link submission is the same as an upvote. Both are represented as the following JSON structure:
The system classifies one such message as a submission if it is the first mention of that link in href
, and as an upvote if it is any following mention of that link.
The protocol isn't aware of a difference between upvote and submission. But this has been a mapping since implemented by all Kiwi News clients.
There now, however, arises an issue where a user can manipulate the timestamp of a message, hence, becoming credited by the current Kiwi News frontend as the original submitter of link.
This attack vector to steal a user's submission attribution comes from the fact that upvotes aren't content-addressing the submission directly and that all messages within the Kiwi News Protocol have a user-definable timestamp property.
To harden the protocol, we must therefore come up with an attribution-safe method of crediting original link submitters that isn't open for timestamp manipulation.
We propose a new type of upvote that allows crediting a specific original link submitter by creating an upvote message that specifically points at the submission object, and not at the to-be-upvoted hyperlink of the original submitter. The schematic below visualizes the difference between the current upvoting structure (called "version 1") and the proposal ("version 2").
We do not propose any major changes to the data model. However, we propose that a message's href
must now also allow to point at an internal link-submission message with a lower timestamp. A pseudo code of this new validation logic follows
Four validations are fundamentally new here:
href
value is looked up for its respective submission value in the database. If it doesn't exist, we consider the upvote invalid.href
must not point to another upvote.In its current implementation, Kiwi News Protocol doesn't properly cryptographically credit the submitter of a link as an imposter can spoof the user-defined timestamps in messages.
Spoofing user-defined timestamps will continue to remain a problem in some uses cases of Kiwi News. We can, for example, imagine a front-running bot that constantly submits the latest links of others.
Still, by making upvotes point directly at the content digest of a submission, we are ensuring that, going forward, upvotes are permanently credited to a submitter.
Kiwi News Protocol did have a weak pre-conceived notion of upvoting and submitting links beforehand. E.g. a user could only submit one normalized URI ever. However, by now making upvotes explicitly part of the message data model, by looking at the validation logic in the "Rationale" section, it is becoming clear that the complexity has increased. We are inspired about designing Kiwi News Protocol as a "narrow waist," however, it seems by giving up this property we are able to significantly cryptographically hardening the upvote's attribution.
At the point of writing this document, it isn't entirely clear what the usefulness of this protocol hardening achieves. We know that cryptographic-hardness can be beneficial in the future when wanting to redeem karma scores onchain. However, there are many more protocol-hardening improvements necessary first before this can be considered.
Until then, however, the proposal can prevent a user from taking credit of all submissions.
It may make sense to give a tolerant deprecation period during which it is possible to still submit old-style upvotes until all Kiwi News clients have implemented the new upvoting data structure. We think that the new upvoting structure can go live any time and that, from that moment on, e.g. a 1-2 month deprecation period can be set.
As only the main client ("Kiwi News") implements karma and attribution for addresses, it is out of scope of this document how they should deal with the old, non-cryptographically hardened karma.
Copyright and related rights waived via CC0.