For an application, each user maintains:
Points to note:
Let $K$ be a constant identity derivation path.
For each interaction, Alice must create a ZK proof which ensures the other participants (verifiers) that she is a valid member of the app and her identity commitment is part of the membership Merkle tree.
The anti-spam rule is also introduced in the protocol. e.g.:
Users must not make more than N interactions per epoch.
In other words:
Users must not send more than one message per second.
The anti-spam rule is implemented with a Shamir Secret Sharing Scheme^1. In our case the secret is the user's secret key, and the shares are parts of the secret key. If Alice sends more than one message per second, her key can be reconstructed by the Network, and thus she can be banned. For these claims to hold true, Alice's ZK proof must also include shares of her secret key and the epoch.
For secret-sharing, we'll use a linear polynomial:
$$ A(x) = a_1 x + a_0 $$
Where:
$$ a_1 = \hash(a0, N\text{external}) $$
$$ N_\text{external} = \hash(\text{epoch}, \text{RLN_ID}) $$
$\text{rln_identifier}$ is a unique constant per application.
We will also use the internal nullifier $N_\text{internal}$ as a mechanism to make a connection between a person and their messages without revealing their identity:
$$ N_\text{internal} = \hash(a_1, \text{RLN_ID}) $$
To send a message $M$, we must come up with a share $(x, y)$, given the above polynomial.
$$ x = \hash(M) $$ $$ y = A(x) $$
We must also use a zkSNARK to prove correctness of the share.
hello.In the case of spam, the secret key can be retrieved from the SSS shares and the Network can use this to add the Merkle root into the set of slashed users, therefore disabling their ability to send future messages and requiring them to register with a new key.
$$ (x_1, y_1) $$ $$ (x_2, y_2) $$
$$ a0 = \sum{j=0}^{k-1} yj \prod{\begin{smallmatrix} m\,=\,0 \ m\,\ne\,j \end{smallmatrix}}^{k-1} \frac{x_m}{x_m - x_j} $$
Given $a_0$, a zkSNARK can be produced to add the Merkle root from the membership tree to the banned set.
Further messages from the given key will not be accepted for as long as this root is part of that set.
{{#include ../../../script/research/rln/rlnv1/signal.zk}}
{{#include ../../../script/research/rln/rlnv1/slash.zk}}