Opcodes serve as fundamental building blocks for transactions and fee mechanisms; these are essentially blockchain execution instructions. On the Ethereum blockchain, each opcode has a [[gas]] cost assigned to it, which determines the amount of gas required to execute that operation on the blockchain. With smart contract data, you can think of opcodes as toll booth operators charging those who pass through the blockchain. In this analogy, costs are set based on cargo weight. To execute a heavy operation, for example, the opcode will define a higher computational cost. While opcodes do exist in Bitcoin, they are more often used to verify the validity of transactions and to enforce certain conditions. For example, Bitcoin supports multi-sig transactions, where multiple parties need to provide their signatures to authorize a transaction. > [!example] Bitcoin Examples > `OP_CHECKMULTISIG` is the opcode used to enforce the condition that correct number of signatures is provided before executing the transaction. > >>[!quote] >>`OP_RETURN` allows for the insertion of arbitrary data into the blockchain, which can be useful for some purposes but can also be spammy in low-fee environments. Other blockchains can use it to secure themselves by embedding what are basically “checkpoints” into the Bitcoin blockchain, and there was a two-year period where that was very popular. In other words, a considerable percentage of the fees in 2018, 2019, and 2020 were not associated with moving bitcoins around, but rather were for other non-bitcoin purposes that eventually migrated to other blockchains or just went away. [Lyn Alden](https://www.lynalden.com/bitcoin-energy/)