In my scenario, I would like to keep a restriction on the min value on a transaction.

For example, if A is to transfer some ETH to B, the min amount he can is > 0.01 ETH. So that a miner cannot include transactions < 0.01 ETH.

How can I achieve this? Any idea would help.

1 Answer 1


You cannot influence the miner in any way through the structure of your smart contract. What you can do, however, is limit the user's ability to send greater than or less than a certain amount of funds, which it looks like you are trying to do.

In this case, you would include the following line in the function being called:

require(msg.value > 0.01 ether);

This will cause the transaction to fail if someone sends less than that amount in.

  • The case I was talking about was 1-1 micro payments. I need to get this with miner level. Suppose if somehow we limit the Tx value to 0.1 ETH, and the miner includes a lesser value, is there no way to reject it in geth source code? The motive behind this is to prevent spamming of micro value Tx. Dec 3, 2018 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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