Bitcoin Forum
April 19, 2024, 08:12:35 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to decide transaction fee?  (Read 217 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
June 12, 2018, 04:38:02 AM
 #1

So if I want to make custom wallet web application, how to make transaction fee part?

So there are wallets that enable user to choosing fee from 3 stages, (low, standard, high) speed rises as fee rises.

Make this is easy, but how to choose/or decide exact fee for those 3 stages?

And if this fee is decided, it is static forever? or should be changed at times?


1713514355
Hero Member
*
Offline Offline

Posts: 1713514355

View Profile Personal Message (Offline)

Ignore
1713514355
Reply with quote  #2

1713514355
Report to moderator
1713514355
Hero Member
*
Offline Offline

Posts: 1713514355

View Profile Personal Message (Offline)

Ignore
1713514355
Reply with quote  #2

1713514355
Report to moderator
1713514355
Hero Member
*
Offline Offline

Posts: 1713514355

View Profile Personal Message (Offline)

Ignore
1713514355
Reply with quote  #2

1713514355
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713514355
Hero Member
*
Offline Offline

Posts: 1713514355

View Profile Personal Message (Offline)

Ignore
1713514355
Reply with quote  #2

1713514355
Report to moderator
1713514355
Hero Member
*
Offline Offline

Posts: 1713514355

View Profile Personal Message (Offline)

Ignore
1713514355
Reply with quote  #2

1713514355
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 12, 2018, 05:43:12 AM
Merited by ABCbits (2)
 #2

Going for static fees is a "bad idea"™. The bitcoin network is a very dynamic system. Currently, fees are around 1-5 sats/byte... 6 months ago they were 1000 sats/byte. If you had static fees, there is a high probability that you will underpay during periods of high network activity and increasing fees (and end up with "stuck" transactions and long confirmation times)... and that you will overpay during periods of low network activity and decreasing fees (and pay way more for fees than you should).

In my opinion, a "good" wallet will provide "presets" that dynamically change with current network conditions so that casual users can simply choose a low/standard/high setting... but also provide a "custom" setting for more advanced users so they can specify exactly what the fee rate used will be.

There is a nice overview of how fee estimation within Bitcoin Core is handled (or was, prior to v0.15) here: https://bitcointechtalk.com/an-introduction-to-bitcoin-core-fee-estimation-27920880ad0
The article regarding what happened from v0.15 with regards to fee estimation is here: https://bitcointechtalk.com/whats-new-in-bitcoin-core-v0-15-part-2-41b6d0493136

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
rpstatic
Jr. Member
*
Offline Offline

Activity: 53
Merit: 7


View Profile
June 12, 2018, 08:01:15 AM
 #3

There are many sites that show you stats about the current pending transactions and what fee they used, e.g.
https://bitcoinfees.earn.com/

So, you can write your own function to calculate the best fee according to this information or just search for an API that already provides suggestions.
Welsh
Staff
Legendary
*
Offline Offline

Activity: 3248
Merit: 4110


View Profile
June 13, 2018, 08:43:45 PM
 #4

There are many sites that show you stats about the current pending transactions and what fee they used, e.g.
https://bitcoinfees.earn.com/

So, you can write your own function to calculate the best fee according to this information or just search for an API that already provides suggestions.

These are estimations, and aren't always accurate. It's good for a reference point perhaps, but if you want to determine the optimal fee depending on the current network then I would suggest using: https://jochen-hoenicke.de/queue/#0,24h

This displays the fees which are getting included in transactions that are in the mempool. You could cross reference the two sites if you so wished.
aleksej996
Sr. Member
****
Offline Offline

Activity: 490
Merit: 389


Do not trust the government


View Profile
June 13, 2018, 10:30:26 PM
 #5

If your really want to add something neat, you should add RBF to your wallet, so if a user decides that he wants to increase the fee, he can make another transaction with a bigger fee.
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
June 15, 2018, 07:18:47 AM
 #6

There are many sites that show you stats about the current pending transactions and what fee they used, e.g.
https://bitcoinfees.earn.com/

So, you can write your own function to calculate the best fee according to this information or just search for an API that already provides suggestions.
Thanks for link. 
Then how about other coins?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
June 15, 2018, 07:24:09 AM
Last edit: June 15, 2018, 07:36:31 AM by bob123
 #7

Thanks for link.  
Then how about other coins?

What about reading the other answers?

Since you are able to build a web application, you shouldn't have any problems understanding the links mentioned by HCP:
There is a nice overview of how fee estimation within Bitcoin Core is handled (or was, prior to v0.15) here: https://bitcointechtalk.com/an-introduction-to-bitcoin-core-fee-estimation-27920880ad0
The article regarding what happened from v0.15 with regards to fee estimation is here: https://bitcointechtalk.com/whats-new-in-bitcoin-core-v0-15-part-2-41b6d0493136

You will be able to estimate the fee yourself after reading those articles. The implementation itself is trivial. Examples can be found on the internet.
By implementing it yourself you are independent from API service provider (which can have wrong information / downtimes and do not exist for all cryptos).

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!