\section{Message Layer} \label{MessageLayer}

Each relay node is caching packets for a customizable duration, mixes their ordering before passing them on to the next downstream relay node (or recipient) so that packets are hard to link for an outside observer. In addition to this mixnet functionality, HOPR leverages onion encryption: Each packet is encrypted by the sender multiple times such that only the chosen relay nodes can decrypt it, read the next destination and pass on the payload which now has one onion encryption layer less. This does not only increase security by requiring all nodes and the recipient to decrypt the plain-text message but it also makes incoming and outgoing packages indistinguishable for a passive observer. Beyond traditional onion routing, HOPR packets do not only contain information of where to send the packet but also contain a payment. The payment is credited for the node that successfully relaid the packet to the next downstream node in a privacy-preserving fashion.
