Skip to content

Failure to validate channel_reserve_satoshis against dust_limit_satoshis #3350

Description

@morehouse

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions