<p>If by &quot;flat rate&quot; you mean that each opcode costs the same amount in transaction fees, then yes, Bitcoin does have a &quot;flat rate&quot;. Opcodes don't have a direct fee themselves, the fee is based on the size of the transaction, and since each opcode is one byte, they have the same cost.</p>
<p>It is unnecessary to have an opcode cost scheme like Ethereum because opcodes are not very computationally expensive and do not have the same effects as Ethereum opcodes do. Bitcoin script is not Turing complete so it is impossible to loop. Each opcode can only be run a single time.</p>
<p>Furthermore, the more computationally expensive signature verification opcodes do have an additional cost in the form of the &quot;signature operations&quot; (sigops) limit. Sigops are factored into the calculation of a transactions weight which will then effect the transaction fee, but this effect is only present in extreme cases where there are a lot of sigops in a single transaction. Blocks are limited in the number of sigops that they can include.</p>

CC BY-SA 4.0
2020-12-07T03:55:40.483Z
Thank you.
The same thing happened at https://bitcoin.stackexchange.com/questions/100331/why-is-the-source-code-fee-calculated-higher-than-the-current-bitcoin-fee-amount.
I had MESSAGE_LIMIT = 80 set here, but can I think of this as the actual weight for the "op_return" opcode?
If you like, please answer.
ground clown
CC BY-SA 4.0
2020-12-07T16:39:38.930Z
@groundclown No. OP_RETURN isn't special. That is just how that particularly library is creating OP_RETURN outputs.
Ava Chow
CC BY-SA 4.0
2020-12-06T23:27:10.213Z
2020-12-06T23:27:10.213Z
Ava Chow
<p>The bitcoin opcode seems to have a flat rate, is that correct?
Or, if bitcoin has a price per opcode, please give me the link.
If it is a flat rate, please tell me why bitcoin does not have a mechanism like ethereum.</p>

CC BY-SA 4.0
2020-12-06T23:25:39.587Z
Are you asking about the transaction fees that are paid to miners?
RedGrittyBrick
<bitcoin-core><fee-estimation><opcodes>
The bitcoin opcode seems to have a flat rate
ground clown
# The bitcoin opcode seems to have a flat rate

(Asked by: username_0 on 2020-12-06)

The bitcoin opcode seems to have a flat rate, is that correct?
Or, if bitcoin has a price per opcode, please give me the link.
If it is a flat rate, please tell me why bitcoin does not have a mechanism like ethereum.

**Tags:** bitcoin-core, fee-estimation, opcodes

> **Comments:**
> **username_1**: Are you asking about the transaction fees that are paid to miners?  

---

## 1 answers

### Answer by username_2 on 2020-12-06. Score: 3 | Accepted answer

If by "flat rate" you mean that each opcode costs the same amount in transaction fees, then yes, Bitcoin does have a "flat rate". Opcodes don't have a direct fee themselves, the fee is based on the size of the transaction, and since each opcode is one byte, they have the same cost.

It is unnecessary to have an opcode cost scheme like Ethereum because opcodes are not very computationally expensive and do not have the same effects as Ethereum opcodes do. Bitcoin script is not Turing complete so it is impossible to loop. Each opcode can only be run a single time.

Furthermore, the more computationally expensive signature verification opcodes do have an additional cost in the form of the "signature operations" (sigops) limit. Sigops are factored into the calculation of a transactions weight which will then effect the transaction fee, but this effect is only present in extreme cases where there are a lot of sigops in a single transaction. Blocks are limited in the number of sigops that they can include.

> **Comments:**
> **username_0**: Thank you. The same thing happened at https://bitcoin.stackexchange.com/questions/100331/why-is-the-source-code-fee-calculated-higher-than-the-current-bitcoin-fee-amount. I had MESSAGE_LIMIT = 80 set here, but can I think of this as the actual weight for the "op_return" opcode? If you like, please answer.  
> **username_2**: @username_0 No. OP_RETURN isn't special. That is just how that particularly library is creating OP_RETURN outputs.  

---

