Bitcoin Forum
May 11, 2024, 08:19:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Simple logic to avoid confusing tx fee with transaction amount  (Read 1013 times)
Itoo (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 1


View Profile
May 12, 2016, 04:06:05 AM
Merited by ABCbits (1)
 #1

I was thinking about the person that accidentally sent about 300 btc as a fee and .001 as the transaction amount, and it occurred to me that some simple logic could be put in place to avoid that. Just add a check to see whether the tx fee is larger than the amount being transferred and if so, either warn the user or reject the transaction or whatever. I don't recall what wallet he was using, but I haven't heard that any wallet has such simple logic yet....

The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715415585
Hero Member
*
Offline Offline

Posts: 1715415585

View Profile Personal Message (Offline)

Ignore
1715415585
Reply with quote  #2

1715415585
Report to moderator
1715415585
Hero Member
*
Offline Offline

Posts: 1715415585

View Profile Personal Message (Offline)

Ignore
1715415585
Reply with quote  #2

1715415585
Report to moderator
1715415585
Hero Member
*
Offline Offline

Posts: 1715415585

View Profile Personal Message (Offline)

Ignore
1715415585
Reply with quote  #2

1715415585
Report to moderator
Itoo (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 1


View Profile
May 12, 2016, 04:09:15 AM
Last edit: May 12, 2016, 04:19:23 AM by Itoo
 #2

And just as I post that I see frejectAbsurdFee in main.cpp. I'll see if my limited skills can determine if that fits the bill
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
May 12, 2016, 04:21:03 AM
 #3

Bitcoin core will reject and transaction with an "absurdly high fee". This means that it will not accept it to the mempool and will not relay it. I don't remember what the exact threshold for this is, but I think it is actually fairly low.

goregrind
Full Member
***
Offline Offline

Activity: 149
Merit: 100


View Profile
May 12, 2016, 08:30:55 AM
 #4

I was thinking about the person that accidentally sent about 300 btc as a fee and .001 as the transaction amount, and it occurred to me that some simple logic could be put in place to avoid that. Just add a check to see whether the tx fee is larger than the amount being transferred and if so, either warn the user or reject the transaction or whatever. I don't recall what wallet he was using, but I haven't heard that any wallet has such simple logic yet....



The reason this simple logic doesn't work is because there are valid transactions where the amount transferred is less than the tx fee.

woot?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
May 12, 2016, 09:51:47 AM
 #5

Bitcoin core will reject and transaction with an "absurdly high fee". This means that it will not accept it to the mempool and will not relay it. I don't remember what the exact threshold for this is, but I think it is actually fairly low.

AFAIK its still accepted and relayed, its just refused if you create a TX with a fee over x*min_relay_fee or 0.1 BTC. Not exact numbers just from memory.

Im not really here, its just your imagination.
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 275


View Profile
May 12, 2016, 11:42:35 AM
 #6

It's possible the person wasn't using Bitcoin Core at all, and crafted the transaction themselves.

I just find it unlikely someone would spend 9x 30BTC outputs in a raw transaction that was only a test, and ignore the absurdly high fee warning .


Bitwasp Developer.
Itoo (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 1


View Profile
May 12, 2016, 01:49:15 PM
 #7


The reason this simple logic doesn't work is because there are valid transactions where the amount transferred is less than the tx fee.

I mentioned just showing a warning, that allows users to still do what they want....

But why would anyone do this regularly? I can think of some fringe scenarios, but unless you're the miner collecting the fee, you lose money on the deal. So it doesn't make sense for someone to do intentionally under normal circumstances.

Itoo (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 1


View Profile
May 12, 2016, 01:50:55 PM
 #8

Bitcoin core will reject and transaction with an "absurdly high fee". This means that it will not accept it to the mempool and will not relay it. I don't remember what the exact threshold for this is, but I think it is actually fairly low.

Aah, I ran into fRejectAbsurdFee while looking into it. I have yet to figure out the criteria for an absurd fee but I'll post it here when/if I do.
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!