Hey y'all, i'm currently learning on how to craft Onchain tx as efficient as possible while still getting my transaction confirmed (preferably in <10 minutes).
I concluded that :
  1. Personally, P2TR address is the best address to use.
  2. Knowing the exact tx size before deciding feerate matters a lot.
  3. If i know the exact size, i can guess the best feerate by looking at several previously confirmed block.
  4. For several reasons, i can't avoid small UTXOs.
  5. Having as many inputs as possible per tx is better (as long as i can postpone Onchain spending)
I think i got the basics right, but some advanced questions like :
  • Does transaction fee counted as output ?
  • How does Onchain wallet determine the destination address type for change output ? (Specifically on Blixt, Zeus, Samourai & Green)
  • What is the biggest amount of input or output possible in a single transaction ?
I can't seem to find answer anywhere and would be thankful to have my questions answered by others here. Suggestions (not LN) are also appreciated
Does transaction fee counted as output ?
No.
How does Onchain wallet determine the destination address type for change output ?
Usually based on the input from which is extracted. Some wallets I think can let you choose the type of change output. For example, what you can do:
  • create 2 wallets in Sparrow, one P2TR and one segwit native
  • make a tx with 1 input and 2 outputs: 1 output to a destination you want to pay and all the rest, calculated exactly, to an address of the 2nd wallet, the segwit one.
In this way you will keep away your small change from your main taproot wallet with bigger UTXOs. When you accumulate a lot of small UTXOs consolidate them into a LN channel and close it when you are done with it, into another wallet.
What is the biggest amount of input or output possible in a single transaction ?
I don't think there's a limit.
reply
Informative reply indeed, thanks @DarthCoin🫡
reply
The same here. I tried finding the answers but I couldn't and then gave up. Thanks for asking.
reply