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

Exposing fees in ReverseSwapInfo #1111

Open
danielgranhao opened this issue Oct 23, 2024 · 2 comments
Open

Exposing fees in ReverseSwapInfo #1111

danielgranhao opened this issue Oct 23, 2024 · 2 comments
Assignees

Comments

@danielgranhao
Copy link
Contributor

Sending an onchain payment using a reverse swap results in a Payment that contains a ReverseSwapInfo. It would be useful if ReverseSwapInfo included the fees that were spent for the lockup and claim txs, as well as the swap provider fees. Right now we can only find out how much was spent on fees in total by comparing the sent LN funds and the resulting sent onchain funds.

@roeierez
Copy link
Member

Thanks @danielgranhao.
If we are changing the ReveseSwapInfo then let's also add the payment_hash so users can use payment_by_hash method to retrieve the associated payment.

@JssDWt
Copy link
Contributor

JssDWt commented Nov 15, 2024

Working on exposing the reverse swap fees.
I can add the fees for any new reverse swap, but not existing ones, because we don't have the data.

I was thinking about backfilling the fees for the existing swaps by looking at onchain transaction fees. But the tx ids are only persisted in the local storage, not the sync storage. So this data is lost when you lose your local data.

So a 2-fold question to @danielgranhao and @roeierez:

  • Is having the fees only for new swaps good enough?
  • It seems to me like we should store the claim and lockup tx ids in the sync database, why are they in the local database only? (it was added in this PR Include ReverseSwapInfo in Payment #728)

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

No branches or pull requests

3 participants