10

I have a contract which needs to be updated occasionally.

So I create a transaction, sign it and send it to the network.

When I do that, I state a gas-price.

The higher the gas-price is, the faster the transaction should execute, since miners normally choose higher requests first, in order to optimize their profit.

However, an idea came to me.

I suppose I'm not the first one, but I'll ask it anyway:

Why shouldn't I set up a miner account, which would mine only transactions with the lowest gas-price possible - 1 wei?

Then, I shall submit all of my contract-update transactions with a price tag of 1 wei.

Should some other miner catch them first (for some odd reason, because who would want to work for such a low price), I will end up paying 1 wei to that miner.

If I catch them first, the I gain back the 1 wei that I've spent.

In either case, I end up spending very little for updating my own contract (and a little more for server time, but I'm paying for that anyway since I need that Parity node up and running).

Is there any downside that I'm missing here?

Thank you very much!

  • It's funny how the first line on the ethereum wiki page says: "Becoming a miner is not recommended." Read that page or the answers below. – DaveIdito Jun 18 '18 at 19:31
  • 1
    "the lowest gas-price possible - 1 wei" BTW, the hyphen - indicates a negative value. If you wish to indicate a break in your sentence, you need a dash , or you could just use a colon. – Acccumulation Jun 18 '18 at 22:07
  • Surely you could make more money by mining someone else's transactions with a higher gas-price. – user253751 Jun 18 '18 at 23:06
  • @immibis: I'm not after making money here, I'm after not spending it. – goodvibration Jun 19 '18 at 5:27
  • @Acccumulation: I initially had it in round brackets, but then found myself using it in the next sentence, so need to move it outside of the brackets. The dash and the "1" are separated with a space, I figured that oughtta do it. – goodvibration Jun 19 '18 at 5:29
12

Why shouldn't I set up a miner account, which would mine only transactions with the lowest gas-price possible - 1 wei?

Yep, you can, but...

Should some other miner catch them first (for some odd reason, because who would want to work for such a low price), I will end up paying 1 wei to that miner.

For any given block, the rest of the network will (most likely) be prioritising transactions with the highest available gas prices. You will be competing against the rest of the network for that given block. Unless you can throw enough hashing power behind finding the PoW for the block you've constructed yourself, someone out there will beat you to it (for their version of the same block). You then have start over again, constructing the next-numbered block with your low-priced transactions.

10

In order to have a 1% chance of finding a block, you need 1% of the global hash rate. And that will cost you, a lot. A back of the envelope computation tells me you'd need about 1 million Nvidia GTX 1070 cards to have 1% of the current global hashrate. Oh and the electricity for running those would also cost, since they'd consume about 100 megawatts.

Also, assuming you have the investment made already and that you're able to mine several blocks per day and that would be enough for your app to work. Those low-fee transactions are actually missed profit.

It's either your app that pays the fees, or your farm, by mining unprofitable blocks.

2

I am assuming you are thinking about the Ethereum (global) and not a testnet.

Yes, you can BUT... the whole purpose of the mining is to put trust in a trustless network (like the global Ethereum network where you really don't know or trust the miners and other participants). This is achieved by making mining a diffcult and random process. Suppose you're imagining putting your transactions on the blockchain, charging only 1 wei, you can do so, but you would never know if you will be able to mine the block. The current mining algorithm is based on a Proof-of-Work algorithm called Ethash. Read more about Ethereum mining here.

So because mining by definition is a process where you are guaranteed a success rate only depending on computational capacity available to you, you would almost always be out of luck (unless you have a lot of computational capacity, but then you are spending a lot on running the mining machinery).

Additionally, miners actually also care a lot about the reward they get per block mined which is way more than a wei.

2

This would accomplish nothing but to make your transactions take longer to execute. For every one of your transactions you include in a block you mine, you give up the opportunity to include someone else's transactions, costing you precisely the amount that you would save.

Let's oversimplify a bit. Let's just pretend that 10 transactions fit in a block and every transaction pays 10 units. If you mine a block with other people's transactions in it, you make 100 units. If you mine a block with one of your transactions in it, you save the 10 units you would have had to pay, but you only make 90 units for that block. How did that help you?

So, no gain. But the loss is significant -- your transactions will have to wait until you mine a block, which may be a very long time.

  • I wasn't looking for gain, just to get my transaction done with no cost. But your last sentence answers my question pretty well. Thank you! – goodvibration Jun 19 '18 at 5:33
  • @goodvibration As you can see, it's not at no cost. You lose the revenue you would have gotten from including someone else's transaction in your block which precisely equals the cost of your own transaction. – David Schwartz Jun 21 '18 at 0:28
1

actions you include in a block you mine, you give up the opportunity to include someone else's transactions, costing you precisely the amount that you would save.

0

Suppose you are mining on a computer without GPU’s and 1MH/s is your approx hashrate, at current difficultly it will take approx 134 years to find a block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.