solidity
solidity copied to clipboard
block.coinbase should not be payable
Good catch, the coinbase does not need to be actually payable, since the "coinbase transaction" is not executing any code.
there are use cases where you would want to send eth to the miner
see: https://ethresear.ch/t/flashbots-frontrunning-the-mev-crisis/8251
@thegostep given your last comment, are you suggesting it should or should not be payable?
I think it should default to non-payable for consistency but still work with payable(block.coinbase).transfer()
I guess this should have been changed in 0.8.0 along with the types of the other addresses. Do we consider it a bug or just a missing feature?
It doesn't actually hurt anyone, so I would just schedule for 0.9
block.coinbase is the address that receives the block reward (ETH emission) and priority fees. Why shouldn't it be payable? As I understand it, payable denotes an address's ability to receive ETH. I would assume that many interactions with the coinbase address involve sending ETH to it, such as for conditional payments related to MEV. So, why make Solidity less convenient for developers in these scenarios?
Good catch, the coinbase does not need to be actually payable, since the "coinbase transaction" is not executing any code.
This still holds. Even staking withdrawals follow the same non-executing logic.