C
C
Chvalov2016-10-06 22:52:14
bitcoin
Chvalov, 2016-10-06 22:52:14

How to find out what the commission will be before withdrawing funds in bitcoin?

There is a site where money is transferred between internal wallets of users in bitcoin cryptocurrency.
The scheme of work is as follows:

  1. The money goes to the user's internal bitcoin wallet account
  2. If the transfer is between site users, use the move command
  3. If the withdrawal to someone else's account, use sendfrom
But the problem was that we scored for the withdrawal fee and some users have a negative balance.
After that, we decided to deduct the commission from the sum for withdrawal, so as not to go into the red.
But there are a couple of misunderstandings here :
It says https://bitcointalk.org/index.php?topic=5796.0 that a transaction cannot be sent without a fee, and here the answer says the opposite How to send BTC without a fee?
Now the question is: If each transaction can have its own commission, not taking into account the paytxfee value, then how can I find out by RPC what the commission will be before sending funds in order to cancel it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Moseychuk, 2016-10-06
@fshp

You yourself specify the commission, at least zero. The protocol does not regulate the size of the commission in any way. At all.
Another thing is that miners first of all take transactions with a higher commission into the block, and a transaction with a zero commission can wait for days to be included in the block.

I
Ivan Tikhonov, 2016-10-07
@polym0rph

If the transfer is between site users, use the move command

What for? Classic off-chain. Draw balances, and spend real bitcoins only when requesting an external withdrawal.
The transaction can be without commission. In the same way, there may not be miners who are ready to accept this into their block. The amount of the minimum required commission is not only calculated for each transaction, based on the age of the coins, volume and size in kilobytes ( more details here ), but recently the network load is also taken into account. If the workload is high, then it makes sense to increase the commission, and vice versa. Many services for this have a fixed commission, which is obviously higher than necessary, and it is deducted from the client during the transfer, of which the client is warned of course. That is, to send X, you need to have at least X + commission on your balance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question