Bitcoin Forum
April 27, 2024, 06:54:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do miners get transaction fees  (Read 170 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
Shymaa-Arafat (OP)
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
September 01, 2021, 04:43:57 PM
 #1

Do miners get the transaction fee in a UTXO or as the difference between total input & total output?
-I recall from MIT cryptocurrency lectures they say the difference in value goes to miners as a fee.
-Then I read this paper counting a fee UTXO out of every transaction (they are building equations according to this)
.
So is it possible both ways?or do they just have to subtract 1 from each EQ?
(It doesn't destroy their results, it's just they're writing it in clear words several times)
.
Ps
Sorry if the question is too simple for the group, I'm kind of a researcher not a real user
.
Thanks
1714200886
Hero Member
*
Offline Offline

Posts: 1714200886

View Profile Personal Message (Offline)

Ignore
1714200886
Reply with quote  #2

1714200886
Report to moderator
1714200886
Hero Member
*
Offline Offline

Posts: 1714200886

View Profile Personal Message (Offline)

Ignore
1714200886
Reply with quote  #2

1714200886
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714200886
Hero Member
*
Offline Offline

Posts: 1714200886

View Profile Personal Message (Offline)

Ignore
1714200886
Reply with quote  #2

1714200886
Report to moderator
Husires
Legendary
*
Offline Offline

Activity: 1582
Merit: 1284



View Profile WWW
September 01, 2021, 06:21:01 PM
 #2

One of the rules for the transaction to be valid is that the sum of the transaction’s inputs is equal to or greater than the sum of the outputs, and therefore all transactions must be spent from input to  output address, part of which comes back to wallet using change address, and the difference between them, which is given as a mining fee.

In other words, some of the input values ​​of any transaction are converted into fees. These are the fees that miners are allowed to take but cannot adjust their value.

Then the transaction is broadcast to each mempool of each full node.
Each miner has its own mempool that contain last unconfirmed transactions.
Finally, after mining the block, minner inserts the transactions from his mempool. These transactions are mainly based on fees, so whoever pays the highest can be listed first.

In other words, when you continue to broadcast your transaction and mempool is empty, the transaction containing 1 sat fee will be confirmed.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Shymaa-Arafat (OP)
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
September 01, 2021, 08:58:28 PM
 #3

None of this answer my simple question:
The fee is paid implicitly as the difference bet input &output?
- or through a UTXO containing it?
-Or both options possible?
Biffa
Legendary
*
Offline Offline

Activity: 3220
Merit: 1220



View Profile
September 01, 2021, 10:24:21 PM
 #4

Its not a separate payment its part of the total block reward.

So if you "found" a block solo mining your reward would be the 6.25 BTC plus the transaction fees in a single payment.

If you were pool mining, the 6.25 plus transaction fees would be shared out between the miners on the pool, in relation to how much they contribute to the pool.

Mine @ pools that pay Tx fees & don't mine empty blocks :: kanopool :: ckpool ::
Should bitmain create LPM for all models?
:: Dalcore's Crypto Mining H/W Hosting Directory & Reputation ::
Difidifi
Newbie
*
Offline Offline

Activity: 7
Merit: 9


View Profile
September 02, 2021, 03:53:06 PM
 #5

None of this answer my simple question:
The fee is paid implicitly as the difference bet input &output?
- or through a UTXO containing it?
-Or both options possible?
First of all: the way you phrased our question was everything but simple.
Secondly: the answer you received from Husires was a perfect explanation.
Take your time to read it through again, and you'll understand
Shymaa-Arafat (OP)
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
September 02, 2021, 04:13:35 PM
 #6

None of this answer my simple question:
The fee is paid implicitly as the difference bet input &output?
- or through a UTXO containing it?
-Or both options possible?
First of all: the way you phrased our question was everything but simple.
Secondly: the answer you received from Husires was a perfect explanation.
Take your time to read it through again, and you'll understand
The reply u r talking about answers as if it's just the title question without reading the post
.
Maybe I didn't phrase the title perfectly, but u should read the post before answering
So it would have been just a simple sentence
"No u do not have to include a UTXO for the fee"
Or
"No, either the paper u r mentioning probably had something mixed up, or u didn't understand what they meant"
...
Anyways, we don't grade answers here we are seeking a piece of info
Any non-malicious effort to help reaching knowledge is appreciated
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
September 02, 2021, 09:22:18 PM
 #7

A block 'pays' the base reward
 +
'the difference between total input & total output' of all transactions confirmed
This means all transactions in the block excluding the coinbase transaction.

How it pays that is up to the 'miner' or 'pool'
The coinbase (first) transaction output can send it all to one address, or break it up to 2 or more addresses,
just the total output must match the total block reward.

It typically goes to one or two outputs.
Some miners cannot handle a coinbase with many outputs, so this tends to promote pools to only use a small number of outputs.
Also, of course, if the coinbase has a large number of outputs, this will mean a larger block to distribute around the network, since the coinbase transaction is always unknown to any other miner/pool on the network before the block is found.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Sweminer777
Hero Member
*****
Offline Offline

Activity: 754
Merit: 500


1xBit the largest casino


View Profile
September 03, 2021, 07:11:44 AM
 #8

The transaction fee goes back to the chain and block.

A miner will get rewards of this " fee " when hitting a block.

In the end the fees are used as recycling system so there is always something to mine and chain won't die.

.
.1xBit.com..TICKET ..RUSH...
                                       ▄██▄▄
    ▄▄▄▀▀█████▀▀▄▄▄            ▄▄    ▄███████▄
  ▄▀      ▀█▀      ▀▄        ▄█████████████████▄
 ██▌       █       ▐██      ▄████████████████▀▀██
████▄▄   ▄▄█▄▄   ▄▄████   ▄████████████████▀████
██▀   ▀▀███████▀▀   ▀██▄▄██████████████▀▀███▄▄██
█        █████        ██████████████▀██████▀▀ ▄▀
█       █     █       ███████████▀▀███▀▀▀▀▄▀▀
 █▄▄▄▄▄▀       ▀▄▄▄▄█████████████▀▀
  ▀████▄       ▄███████████████▀▀
    ▀▀▀██▄▄▄▄▄███████████████
               ████████▀▀
               ▀█▄▄▀ ▀
██████████
██
██
██
██
██
██
██
██
██
██
██
██████████
.
BET ON
WORLD CUP &
COLLECT TICKETS!
|.
██████████
██
██
██
██
██
██
██
██
██
██
██
██████████
.
..TAKE PART..
mikeywith
Legendary
*
Offline Offline

Activity: 2212
Merit: 6359


be constructive or S.T.F.U


View Profile
September 09, 2021, 02:21:38 AM
 #9

-I recall from MIT cryptocurrency lectures they say the difference in value goes to miners as a fee.
-Then I read this paper counting a fee UTXO out of every transaction (they are building equations according to this)

How are these different from one another? they both lead to the same answer, let's assume a block with 2 transactions

input 1 = 10
input 2 = 15
output 1 =5
putout 2= 10

First method :

fees = (input 1 + input 2) - (output 1 + output 2 )
fees = (10 + 15) - (5 + 10 ) = 10

Second method

fees = (input 1 - output 1) + (input 2 - output 2)
fees = (10 - 5 )  + (15 - 10) = 10


As far as speed is concerned, getting the SUM of inputs and outputs and performing a single subtraction would most likely be a lot more effienct than performing n number of subtraction and then getting the SUM of all of them, but will the number differ? NO.

Now, on how the miner gets the block fees, they get it as an output that has no input, if the total difference between inputs and outputs was 1BTC and the block reward was 6.25BTC a new output will be created out of "nowhere" with a total value of 7.25BTC, if the coinbase transaction contains only 1 address the whole 7.25 will go to that address and if it contains 500 addresses it will go to all of them according to how the miner actually wants.

So to sum up, the fees themselves are NOT outputs but when the block is mined the fees become a new output spendable by the miner.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Shymaa-Arafat (OP)
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
September 09, 2021, 08:49:26 AM
 #10

Now, on how the miner gets the block fees, they get it as an output that has no input, if the total difference between inputs and outputs was 1BTC and the block reward was 6.25BTC a new output will be created out of "nowhere" with a total value of 7.25BTC, if the coinbase transaction contains only 1 address the whole 7.25 will go to that address and if it contains 500 addresses it will go to all of them according to how the miner actually wants.

So to sum up, the fees themselves are NOT outputs but when the block is mined the fees become a new output spendable by the miner.

There is a misunderstanding here when u talk about first method & 2nd method, that has nothing to do with my question.

This last part I quoted is the answer that I already asserted my doubts about it from earlier answers.
.
The motive of the Q was this paper which is written by5 authors, accepted, published, and funded that write equations based on the assumption that there is one explicit UTXO per transaction for fee. So, I was wondering where did they get that from, or they're just creating a hypothetical Bitcoin like Blockchain or what.

The paper title is
"A Storage Optimization Scheme for Blockchain Transaction Databases"
CSE2021, Vol.36, No.3

& I've already send to the corresponding author to hear their point of view/give them a chance to defend themselves/...etc
I informed them of the other bitcointalk question, I'll add a link to this too

Anyways, thanks for the effort.
songchunlai
Jr. Member
*
Offline Offline

Activity: 113
Merit: 1


View Profile
September 10, 2021, 06:00:37 PM
 #11

Turn on the solo mode of your Bitcoin core, and then connect all your ASIC devices to your Bitcoin core. You will have the opportunity to receive block rewards and transaction fees. 1Ph takes about one month.
Shymaa-Arafat (OP)
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
September 10, 2021, 06:05:49 PM
 #12

Turn on the solo mode of your Bitcoin core, and then connect all your ASIC devices to your Bitcoin core. You will have the opportunity to receive block rewards and transaction fees. 1Ph takes about one month.
There's some kind of mis understanding, I believe this Comment was meant to be elsewhere. I do not have an ASIC device, and the question was not about that at all
Shymaa-Arafat (OP)
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
September 10, 2021, 06:46:42 PM
 #13

Then you are in the WRONG AREA if the Forum.
This area is exclusively for BTC mining - not any of the plethora of crap coins/token schemes. Perhaps you should read the pinned post about Rules here...

I strongly suggest you move the thread to where is belongs such as Altcoin Discussion
1-The question discusses a paper about Bitcoin not altcoin,
 
2-I tried to end the thread by stating in each reply that I did find the answer or u may say asserted my belief that the paper was wrong in saying there is a fee UTXO for every Bitcoin transaction, but some still answering without reading the question.
3-I'm not trying to be aggressive in the previous reply, I honestly think the commenter probably intended to put that comment in another post.
NotFuzzyWarm
Legendary
*
Offline Offline

Activity: 3612
Merit: 2506


Evil beware: We have waffles!


View Profile
September 10, 2021, 06:54:48 PM
 #14

If you found the answer then just lock the thread.  Bottom left corner of page.  Wink

Sorry, scanned through the thread again and saw mention of "optimization of storage", thought of Filecoin and that led to the comment about alts. Post deleted

- For bitcoin to succeed the community must police itself -    My info useful? Donations welcome! 1FuzzyWc2J8TMqeUQZ8yjE43Rwr7K3cxs9
 -Sole remaining active developer of cgminer, Kano's repo is here
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
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!