OPCODE 0x46 BLOCKREWARD
EIP-698 proposes the addition of a new opcode, 0x46 BLOCKREWARD, to the Ethereum Virtual Machine (EVM). This opcode would return the block reward for any finalized block, including the base reward, uncle payments, and gas. The motivation behind this proposal is to provide a consensus system agnostic solution that is useful for decentralized pool operations and any contract that benefits from knowing a block reward payout, such as merge mined tokens. The specification for this opcode is that after block n, all clients should process it as follows: Value: 0x46, Mnemonic: BLOCKREWARD, Î´: 0 (nothing removed from stack), Î±: 1 (block reward added to stack), Description: Get the block's reward emission, GasCost: Gbase, Where: Âµ's â¡ IHR. The rationale behind this proposal is that it would be useful for contract mining pools, where ad hoc groups combine resources to reduce variance in payouts. The proposal is backwards compatible with currently deployed contracts and current clients. The implementation details are not provided in this EIP, but further reading is suggested for those interested.
This EIP adds an additional opcode to the EVM which will return a finalized blocks reward value.
In the EVM, the 0x40 opcodes are reserved for
Block Information. Currently reserved opcodes are:
This EIP would add an additional opcode,
0x46 BLOCKREWARD, which would return the block reward for any finalized block. The finalized block reward would include the base reward, uncle payments, and gas.
Per EIP-649 ( #669 ) periodic block reward reductions/variance are now planned in the roadmap, however, this EIP is consensus system agnostic and is most useful in decentralized pool operations and for any contract that benefits from knowing a block reward payout(i.e. Merge mined tokens)
n all clients should process opcode
0x46 as follows:
0nothing removed from stack
1block reward added to stack
Get the block's reward emission
µ'<sub>s</sub> ≡ I<sub>HR</sub>
Contract Mining Pools
For distributed consensus systems(staking pools and mining pools) ad hoc groups combine resources in order to reduce variance in payouts. Broadly, pool operations function by allowing a collective of miners / stakers to verify their contribution to solving PoW or staking share by periodically submitting solutions which are is representative of the miners probability of finding a true block.
In all these schemes
B stands for a block reward minus pool fee and
p is a probability of finding a block in a share attempt (
D is current block difficulty).
Some common methods of mining pool payout are pay-per-share,
R = B * p, proportional [
R = B * (n/N) where
n is amount of a miners shares, and
N is amount of all shares in this round.], and pay-per-last-N-shares [
R = B * (n/N) where miner's reward is calculated on a basis of
N last shares, instead of all shares for the last round]. All of these methods are predicated on knowing the block reward paid for a given block. In order to provide a trust minimized solution,
0x46 can be used to call a blocks reward for computing payouts.
Merge mined tokens
Contracts could create tokens which could be variably ‘minted’ as a function of block reward by calling
Currently deployed contracts
This EIP would be incompatible with currently deployed clients that are not able to handle
0x46 and would process all transactions and block containing the opcode as invalid.
Implementation should occur as part of a coordinated hardfork.
The Yellow Paper Appendix H. Virtual Machine Specification section H.2
Copyright and related rights waived via CC0.
Adopted by projects
Not miss a beat of EIPs' update?
Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.View all