Token-Based RLN: Summary
What is it?
Token-Based RLN is a modification of the standard RLN-v2 protocol that enables offline precomputation of rate-limiting proofs for mixnet nodes. Instead of deriving the polynomial share parameter x from message content (requiring online computation), it’s derived from precomputed cryptographic tokens.
This works for per-hop proof generation in mixnets described in section 9.2.2 where each hop in mix path must generate RLN proofs when forwarding messages to the next hop.
Regular RLN requires proof generation per message at each hop, creating significant latency as a message is traversing through the mixnet.
With this approach, Mix nodes precompute proofs removing this latency.
Trade-off
Within-epoch linkability: Messages from the same mixnode can be correlated (observers can see “MixNode A sent N messages to MixNode B”). However, this is not a privacy concern in mixnets because:
-
Linkability exists only at each hop level, not end-user traffic
-
Different threat models: RLN protects mixnet DoS; mixnet protects user anonymity
How It Works
Phase 1: Token Generation
-
Generate random epoch salt
-
Compute deterministic tokens:
token[i] = Hash(secretKey, epoch, i, epochSalt)
Phase 2: Proof Precomputation (Offline)
-
For each token, generate complete ZK proof with polynomial share
-
Store proofs for later use
Phase 3: Message Forwarding (Online)
-
Select unused proof
-
Attach to message (< 1ms operation)
Phase 4: Verification
-
Verify ZK proof
-
Check for duplicate nullifiers (spam detection)
-
If duplicate found: recover secret key via Lagrange interpolation and slash
Circuit Modification
The only circuit change from standard RLN-v2:
// Standard RLN-v2: x derived from message
x = Hash(messageHash, epoch)
// Token-Based RLN: x derived from precomputed token
token = Hash(secretKey, epoch, messageId, epochSalt)
x = Hash(token, epoch)
All other components (membership verification, rate limit enforcement, nullifier computation, slashing) remain identical to RLN-v2.
Security
-
Rate limiting enforced via nullifier tracking
-
Spam detection through duplicate nullifier identification
-
Secret key recovery and slashing via Shamir Secret Sharing
-
Users cryptographically bound to their registered rate limits
Note that spent nullifiers still would require to be shared/gossipped so that any node can catch and slash/penalize offending user/node.
References
-
Mixnet proposal: vacp2p/rfc-index#228
-
Standard RLN: 17/WAKU2-RLN-RELAY
*Note that this proposal has been written with the help of AI. *
It still need to be thought through as message is not linked to the generated proof.
Needs review and evaluation for any obvious flaws