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

PrepareRefundResponse misleading: refund tx size and fee accurate only for non-cooperative case #487

Open
ok300 opened this issue Sep 13, 2024 · 0 comments

Comments

@ok300
Copy link
Contributor

ok300 commented Sep 13, 2024

prepare_refund returns a

pub struct PrepareRefundResponse {
    pub tx_vsize: u32,
    pub tx_fee_sat: u64,
    pub refund_tx_id: Option<String>,
}

However, to build that, we rely on LBtcSwapTx::size and BtcSwapTx::size from the Boltz client, which internally calculate the tx size only for the non-cooperative case.

This means we're now over-estimating the chain swap refund tx size and fees, as most refunds happen cooperatively.

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

1 participant