When paying fee in the BTC TX building process, there will be an extra collection if the change amount is in range of:
0 < changeAmount < minUtxoSatoshi
Here we have a new suggestion to NOT create a change output if the changeAmount is less than the cost of creating a change output, which generally equals to the value of minUtxoSatoshi. Currently, the default value of minUtxoSatoshi on the mainnet is 10,000 shannon, therefore the overall logic here is as follow:
if (changeAmount >= 10000) {
createChangeOutput(changeAmount);
} else {
// don't create a change output
// treat the changeAmount as an extra fee to the miner
}
Idea
When paying fee in the BTC TX building process, there will be an extra collection if the change amount is in range of:
Here we have a new suggestion to NOT create a change output if the changeAmount is less than the cost of creating a change output, which generally equals to the value of
minUtxoSatoshi
. Currently, the default value ofminUtxoSatoshi
on the mainnet is10,000
shannon, therefore the overall logic here is as follow:Reference
The idea was originally posted here: https://github.com/ckb-cell/rgbpp-sdk/pull/176#discussion_r1608069118