Introduction
This post discusses possible DOS/spam attacks faced by a free-route mixnet such as the one we are trying to design for Logos services and also suggests some possible solutions to address them.
We envision a pluggable DoS and Sybil protection: we will come up with a good default, but deployments that have some internal validation for trusted nodes should be able to just plug that in with a bit of tinkering.
Thinking about DOS/Spam protection of a mixnet
When we think of DOS/Spam protecting a mixnet, following are possible attack surfaces to analyze. There may be more, but as of now we are focusing on the most important ones listed below.
- whether an attacker can spam a mix node and bring it down or make it unusable. If this is possible, then the attacker can just bring the whole mixnet down or make it unusable.
- whether an attacker can spin up many mix nodes in the mixnet in order to deanonymize or compromise security of the users. This is similar to Sybil attack described for any computer system.
DOS/Spamming a mix node
Since mixnets use onion routing and fixed packet sizes, where each mix node transforms incoming messages before forwarding them, spam protection must be addressed at the individual node level rather than at the network level as a whole (unlike Waku-RLN-Relay).
Additionally, every node in the path must prove the message is not spam, not just the originator. This is because mixnet design ensures that newly injected messages are indistinguishable from forwarded messages, making each hop equally responsible for validation.
Sybil attack on the mixnet
Mixnets rely on the principle that a user cannot be deanonymized as long as there is at least one honest node in their chosen path. This makes two properties critical: a large node pool and random path selection. However, this security model breaks down if an attacker can spin-up numerous malicious nodes, polluting the node pool and increasing the probability of controlling all nodes in a userâs path. Therefore, protecting against Sybil attacks is essential for maintaining mixnet security.
Potential Solutions for Spam protection
The solution should consist of a membership mechanism probably guarded with some stake in order to address sybil issue and should also provide some sort of rate-limiting mechanism in order to prevent spam/DOS.
Any potential solution should retain mixnet anonymity properties such as sender/receiver unlinkability and also ensure any new identities introduced should remain unlinkable to the user. Note that it is ok if membership in the mixnet (i.e., being a participant) may be discerned.
Proof Of Work
Each mix node can do a proof-of-work and attach it before sending a message out i.e a node publishing a message or a node just relaying message it has received.
An advantage of this approach is since each mix node anyways adds a delay, instead of that they can just do this proof-of-work which would take time before sending the message out.
A major disadvantage of this technique is the fact that Logos nodes are heterogeneous in nature ranging from mobile devices to laptops to servers which means that a user with better hardware capacity can still spam the network.
We can think of using an algorithm like RandomX that Monero uses, but that would still require a large amount of RAM which would become infeasible for mobile devices.
This approach provides only spam/DOS protection. However there is no PoW algorithm that has properties of working with mobile devices and at the same time not provide huge advantage for other types of devices especially ones with higher resources. Hence this approach cannot be considered unless above condition is satisfied.
It would have to be combined with another membership based approach in order to provide sybil resistance.
Non-interactive VDF client puzzles
We can use non-interactive Verifiable Delay Function (VDF) client puzzles similar to the ones explained in this paper with some modifications to DOS/Spam protect the mixnet.
Following are some properties of such an approach which makes it suitable for our use-case
- uses sequential computation and non-parallelizable hence fairness can be achieved in a heterogeneous network of devices
- can be made non-interactive as explained in the paper which suits the case of mixnet as it reduces overhead of multiple interactions between the mix nodes
- can be augmented with verifiable random inputs such as Logos Blockchain hash to handle pre-computation attacks
- verification time far lower than proof-generation time
- replay attack as mentioned in the paper can be addressed by adding additional puzzle inputs(such as peerId of next node) along with maintaining a local cache of recently seen messages
- computation time varies little bit across device types (even best possible hardware will only gain
~10x- as per AI), this may benefit mixnet use case because entry nodes (all mobile devices would fall under) would only publish new messages into mixnet whereas intermediate/exit nodes (laptops and other devices) would relay other messages through the mixnet as well and hence have higher traffic than edge devices.
Considering the above advantages, we can come up with a solution by applying some modifications in comparison to the paper
- use global pre-defined public parameters: hash function, Time Parameter, RSA modulus N
- use Logos Blockchain hash for randomness
- add peerID (next hop) in puzzle input to prevent replay attacks
- maintain a local cache of recently seen messages to prevent replay attacks
Performance Considerations
The VDF approach requires careful parameter tuning:
- Time parameter T determines the minimum delay per hop
- Verification overhead is minimal (milliseconds)
- Proof size adds approximately ~400 bytes to each message header
Here is a quick performance analysis done using AI
This approach only addresses DOS/spam protection and does not address sybil attacks. Hence this would have to be combined with an approach such as Semaphore that addresses sybil attacks.
Semaphore
Semaphore from PSE is an approach to maintain anonymous group membership which when stored on-chain and coupled with a stake would act as a very good mechanism to provide sybil resistance for the mixnet. Each mix node would have to attach some sort of signal/proof in each message that it sends out to indicate membership.
The Semaphore proof adds approximately 200-300 bytes to each message header. This approach only addresses sybil attack but can be coupled with other DOS/Spam protection approaches in order to provide complete protection to the mixnet.
Using a combination of 2 approaches would require including more data in the messageHeader which in turn would increase packetSize for each packet vs a single approach.
RLN
Rate Limiting Nullifiers is a well known privacy preserving Spam/DOS protection mechanism that is being used in Waku-Relay. This would make an easy and perfect candidate to be reused for protecting the mixnet as well since it is well tested and integrated in Waku-Relay. But since mixnet is unique in its own way as in each message in the path is unique and doesnât traverse through all the nodes in the network. This would make it challenging to use RLN as is and needs to be adapted in order to be used.
A potential approach would be for each mix node (including entry and intermediary nodes) to attach RLN proofs to messages they send out or relay in the mixnet. As a message(not the underlying payload) transforms while traversing the mixnet (due to onion routing), the same RLN proof cannot be reused across nodes for verification. If the same proof is used at each hop, an observer would be able to link all transformed messages and deanonymize users, breaking the core anonymity property of the mixnet.
Another challenge with RLN is that mix nodes are unaware of already-spent nullifiers since the mixnet is not a broadcast network like Waku-Relay. This enables replay attacks where a user can generate one RLN proof and send the same message to every node in the mixnet, exceeding their rate limit. To address this, an additional gossip layer would be needed for mix nodes to broadcast used nullifiers, enabling detection and stake slashing of cheaters. This augmented RLN approach assumes the gossip layer itself is spam-protected, likely using another RLN instance.
This approach addresses both spam protection and sybil attacks as memberships are baked into its design.
Ticket based - economically protected
Use some sort of a ticket-based system where each message published or relayed through the mixnet requires a cryptographic ticket issued based on prior purchase or stake. This approach provides both economic incentives for mix nodes to perform regular operations and natural spam deterrence through cost-per-message economics. The design could be similar to HOPRâs Proof-of-Relay mechanism or can be completely different and should be thought through considering Logos mixnet design.
Key Properties
- Spam Protection: Economic cost per message naturally rate-limits abuse
- Sybil Resistance: Nodes must stake capital to obtain ticket-issuing credentials
- Economic Incentivization: Mix nodes earn revenue for relaying messages, moving beyond tit-for-tat assumptions
- Privacy Considerations: Ticket validation must not compromise sender anonymity or enable message linking
Integration with Logos Incentivization
This approach directly ties into tokenomics and the broader incentivization framework being researched separately for Logos services. Key integration points include:
- Off-chain payment protocols for ticket purchase
- Stake slashing mechanisms for misbehavior
- Revenue distribution to relay nodes
- Ticket pricing that balances accessibility with spam prevention
Research Requirements
Significant research is needed to:
- Determine if HOPRâs specific ticket mechanism suits Logos mixnetâs free-route architecture
- Design privacy-preserving ticket issuance and validation protocols
- Model economic parameters (ticket pricing, stake requirements, revenue distribution)
- Integrate with the ongoing incentivization work for Logos services
Recommendation: Consider this a long-term approach to be pursued once the incentivization framework becomes more concrete and a short-term spam protection solution is operational.
Comparison of Approaches
Note that this table was generated using AI, so information such as overhead would be an approximation.
| Approach | Spam Protection | Sybil Resistance | Mobile-Friendly | Message Overhead |
|---|---|---|---|---|
| PoW | â | â | â | ~32 bytes |
| VDF Puzzles | â | â | â | ~400 bytes |
| Semaphore | â | â | â | ~200-300 bytes |
| RLN | â | â | â | ~300 bytes |
| Tickets | â | â | â | ~100-200 bytes |
| VDF + Semaphore | â | â | â | ~700 bytes |
Recommendations
Based on the analysis above:
Short-term
Option-1: Implement VDF-based puzzles combined with Semaphore for membership, as this provides both spam protection and sybil resistance while remaining mobile-friendly. This combination offers:
- Fair resource usage across heterogeneous devices
- Strong sybil resistance through staked membership
- Reasonable message overhead (~400-800 bytes)
- No additional gossiping required
This does require some research into the VDF puzzle suggested by the referenced paper.
Option-2: Investigate adapted RLN approach. Use Logos-Messaging/Waku-Relay for nullifier gossip as it already has spam protection via another RLN.
Long-term
Integrate with economic incentivization models using ticket-based systems as the tokenomics mature. This aligns with broader Logos service incentivization work.
Open Questions
These are some of the open questions that require further thought and inputs.
- how memberships(whichever approach chosen) would be distributed for Logos installations in order to have sybil resistance? We want each Logos installation node to participate in the mixnet but at the same time want to prevent attackers from creating numerous installations to conduct Sybil attacks. Whatâs the tradeoff between accessibility (easy onboarding for legitimate users) vs. security (preventing fake installations)?
- how do we ensure that there are significant intermediate/exit nodes(core nodes) in the mixnet and not end up with having too many entry nodes(mobile devices/edge nodes)? The side effect of this would be that number of nodes to relay messages would be far lesser than nodes only sending messages and would lead to network bottlenecks and poor message throughput. What incentives can encourage core node operation, and how do we prevent a âtragedy of the commonsâ where everyone wants to use the mixnet but few want to run relay nodes?
- how much should be the rate-limit for a node in mixnet to send messages? We should ideally have differentiated rate limits based on role of the mix node i.e entry only node might get lower rate limit and intermediate nodes should get higher rate limits as they also relay/forward otherâs messages.
- what specific behaviors should trigger stake slashing? How to detect and prove misbehavior in a privacy-preserving way without compromising the unlinkability properties of the mixnet?
Potential Next Steps??
- Short Term implementation: Further analyze the chosen approach and build proof-of-concept or do a POC with RLN
- Design membership stake requirements: Economic analysis to determine optimal stake amounts for sybil resistance
Would appreciate feedback/comments wrt above approaches so that further steps can be taken.
Also would be happy to analyze any alternative approaches that get proposed. ![]()
