# Reimagining Onion Messages as an Overlay Layer

**URL:** <https://delvingbitcoin.org/t/reimagining-onion-messages-as-an-overlay-layer/1799>\
**Category:** Protocol Design\
**Tags:** lightning\
**Created:** [June 28, 2025, 1:56am UTC](https://delvingbitcoin.org/t/reimagining-onion-messages-as-an-overlay-layer/1799 "2025-06-28T01:56:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![MattCorallo](https://delvingbitcoin.org/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@MattCorallo](https://delvingbitcoin.org/u/MattCorallo)\
**Post date:** [June 30, 2025, 12:39pm UTC](https://delvingbitcoin.org/t/reimagining-onion-messages-as-an-overlay-layer/1799/3 "2025-06-30T12:39:14Z")

</div>

The reason the onion messages go over channel links is there’s an inherint anti-DoS protection to using your existing channel partners to accept onion messages for forwarding. What your proposal appears to be missing is a way to handle DoS/onion message peer selection in a useful way.

> [@roasbeef](#):
>
> Due to the embedded nature of the current deployment, onion messages travel over the same TCP connection between peers as gossip messages and channel updates. By maintaining this tight coupling, the current deployment path isn’t able to independently address quality of service concerns. Due to head-of-line blocking in TCP, any active gossip or channel update messages that remain unacked in the TCP window (or even an outbound application queue) will necessarily _block_ the processing of onion messages. This unnecessarily blocking once again hurts the payment experience, as it leads to increase latency of the time-to-payment-attempt.

There’s nothing in the spec that mandates this. It is how its implemented in most clients, today, indeed, but AFAIK all such clients have active queue management to address the QoS concerns. Future implementations that have issues here can, of course, establish parallel TCP connections to forward onion messages over, as you noted in your QUIC exploration.

---

_[View the full topic](https://delvingbitcoin.org/t/reimagining-onion-messages-as-an-overlay-layer/1799)._
