Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Low] XDM - Fees are locked away forever if a channel to a destination is not successfully opened #2804

Open
vanhauser-thc opened this issue May 30, 2024 · 3 comments
Labels
audit Audit results

Comments

@vanhauser-thc
Copy link
Collaborator

Issue Description

In the current implementation, if an attempt to open a channel to a destination fails, the associated fees are locked away indefinitely. This issue arises because the system does not have a mechanism to refund or reclaim fees for unsuccessful channel openings. As a result, users lose their funds permanently, leading to financial losses and reduced trust in the platform.

Risk

Users permanently lose their fees, leading to direct financial harm to the users (Domain operators).

Mitigation

Currently only an opened channel can be closed. We recommend to also allow closing a channel in ChannelState::Initiated state to allow to recover funds.

@vanhauser-thc vanhauser-thc added the audit Audit results label May 30, 2024
@vanhauser-thc vanhauser-thc changed the title [LOW] XDM - Fees are locked away forever if a channel to a destination is not successfully opened [Low] XDM - Fees are locked away forever if a channel to a destination is not successfully opened May 30, 2024
@vedhavyas
Copy link
Contributor

Channel can be in init state, if the dst_chain does not have the src_chain in the allowlist. If we allow closing the channels in the init state, then there could be small DDOS. Since user can claim their reserve back, they will open many channels to dst_chain and dst_chain will reject opening channel and then user can close the channel and claim their deposit. Ofcourse there is fee to initiate channel open request but its not that big.

I'm thinking protocol could take a percentage of reserve if the channel is in init state. This is dis-incentivze the user to open many channels to dst_chain that does not allow src_chain.
thoughts @dariolina

@vanhauser-thc
Copy link
Collaborator Author

I agree, keeping a percentage when closing a channel that is in init state sounds like a way to dis-incentivze users.

@vedhavyas
Copy link
Contributor

I have a PR open here - #2829
That should allow closing channels in init state but take a portion of reserve fee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Audit results
Projects
None yet
Development

No branches or pull requests

2 participants