atomicDEX-API
atomicDEX-API copied to clipboard
enhancement(utxo): improve trade and withdraw fee calculations
UTXO Fee Improvements:
- fee-per-kb calculation and improvement: Ensure UTXO fee calculation is based on transaction size and some improvements.
- Custom Fee Options: Enable users to select low, default/normal, or high priority fee levels for UTXO withdrawals.
Withdraw using UtxoPriority::Low
{
"userpass": "SamopE160!",
"method": "withdraw",
"mmrpc": "2.0",
"params": {
"to": "RCKfmv1X4oZHhGgb9mVD8XnkubAerWEcQ4",
"max": false,
"coin": "DOC",
"amount": "1000",
"fee": {
"type": "UtxoPriority",
"priority": "Low",
}
}
}
#1835
@borngraced please resolve conflicts in this PR
I think I have a general question: Why do we use 'fee per KB' units? I see in explorers or wallets that usually 'fee per vB' is used. Would this not be more convenient for users if we use the same? Then users may check actual fees in explorer and use it in our wallet without conversion. (BTW maybe some users may not clearly understand the 'vByte' idea but this should not be a problem as they can just use it directly 'as is')
ps @borngraced I see that PR lint fails