Calculating fee in unsigned PSBT

Running into a chicken-and-egg problem with calculating fees for unsigned PSBT transactions: to calculate the fee, I need the virtual size of the transaction (let's say I have the fee rate in sats/vB from a 3PBP). To calculate the virtual size of the transaction I need the finalized transaction with change output...which requires knowing the fee.

The only solution I can think of is signing a dummy PSBT with a dummy change output, get the virtual size, then sign the real PSBT with the proper change output. This seems cumbersome as I'd have to sign multiple PSBTs every time I want to send some Bitcoin.

Is there a better way to do this?



from Recent Questions - Bitcoin Stack Exchange https://ift.tt/8cBV5zi
via IFTTT

Popular posts from this blog

Do Kwon’s Detention Prolonged Until 2024 As Montenegro Responds To Extradition Requests

Sam Bankman-Fried Trial Begins Tomorrow: 3 Reasons Ex-SEC Official Foresees Conviction

Future of Bitcoin encryption and security in a QC era