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

Persist swapper fees for swaps #586

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Dec 1, 2024

This PR stores the swapper service fees for each swap type.

The service fee is reflected in the Payment in swapper_fees_sat. The Payment already contains the total fees in fees_sat, so from these two values a user can find the total swap network fees (total - service fees).

For chain swaps, this PR persists the service feerate instead of the service fee. In addition it also stores the server fees, which are a chain-swap-specific type of network fee (lockup tx fees paid by the server when locking up funds for the destination chain). These two new chain swap fields will later be used to validate the fees in Amountless Receive Chain Swaps.

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

Successfully merging this pull request may close these issues.

1 participant