BOLT 2 has four requirements intended to ensure that channel peers always have funds at risk when broadcasting a revoked commitment.
- R1:
open_channel.channel_reserve_satoshis >= open_channel.dust_limit_satoshis
- R2:
accept_channel.channel_reserve_satoshis >= open_channel.dust_limit_satoshis
- R3:
open_channel.channel_reserve_satoshis >= accept_channel.dust_limit_satoshis
- R4:
accept_channel.channel_reserve_satoshis >= accept_channel.dust_limit_satoshis
Generally if a peer is allowed to have a channel reserve below their dust limit, then after spending their balance down to the reserve they have no on-chain funds at risk and are therefore incentivized to broadcast a revoked commitment instead of the latest commitment.
Eclair enforces all four requirements as a channel funder (R1, R2, R3, R4) but only enforces R1 and R4 as a channel fundee.
Impact
As channel fundee, failing to validate R2 means that the counterparty's commitment may omit their to_local output after spending down to the channel reserve, so they are incentivized to force close with a revoked commitment instead of the latest one.
Failing to validate R3 means that Eclair's own commitment may omit the to_local output after spending down to the channel reserve. This is generally only bad for the counterparty, not Eclair.
Suggested fix
Mirror the checks from the funder path to the fundee path.
Discovery
This issue was discovered by smite.
BOLT 2 has four requirements intended to ensure that channel peers always have funds at risk when broadcasting a revoked commitment.
open_channel.channel_reserve_satoshis >= open_channel.dust_limit_satoshisaccept_channel.channel_reserve_satoshis >= open_channel.dust_limit_satoshisopen_channel.channel_reserve_satoshis >= accept_channel.dust_limit_satoshisaccept_channel.channel_reserve_satoshis >= accept_channel.dust_limit_satoshisGenerally if a peer is allowed to have a channel reserve below their dust limit, then after spending their balance down to the reserve they have no on-chain funds at risk and are therefore incentivized to broadcast a revoked commitment instead of the latest commitment.
Eclair enforces all four requirements as a channel funder (R1, R2, R3, R4) but only enforces R1 and R4 as a channel fundee.
Impact
As channel fundee, failing to validate R2 means that the counterparty's commitment may omit their
to_localoutput after spending down to the channel reserve, so they are incentivized to force close with a revoked commitment instead of the latest one.Failing to validate R3 means that Eclair's own commitment may omit the
to_localoutput after spending down to the channel reserve. This is generally only bad for the counterparty, not Eclair.Suggested fix
Mirror the checks from the funder path to the fundee path.
Discovery
This issue was discovered by smite.