Open fulldecent opened 2 years ago
I propose an other alternative. How about conditionally include a transaction based on a programmable condition about blockhash? This would allow to use the existing sandwich infrastructure.
Or maybe it already exists.
Rationale
MEV exists for manipulating
BLOCKHASH
.Why should this feature exist?
Because it is MEV.
What are the use-cases?
Gaming. Random drops.
Discussion
I do understand that controlling the
BLOCKHASH
for just one bit equals the electricity cost of mining one block.So the fee offered for this control must exceed that. Also, these fees can be combined—if multiple people want a
BLOCKHASH
that is an even number, they can both pay the fee.Going forward with proof of stake, the cost of mining goes to zero. So I think this pricing will become a lot more accessible.
The most important thing at this time is to discuss now if this might be implemented.
Implementation
Do you have ideas regarding the implementation of this feature?
Here are reusable components used in discussions below
The
BlockhashDesirability
smart contract interface is defined as follows:Then we publish a singleton public utility contract,
FLASHBOTS_BLOCKHASH_BOUNTY
implementing:Flashbots under proof of work
A searcher wants to influence the
BLOCKHASH
. In this example they are sending Ether to a commit-reveal coin flip that has a desirable result If theBLOCKHASH
that tx is included in has zero in the last bit:TX_HEADS
which starts the commit-reveal.TX_HEADS
transaction and the bounty ID to the miner.takeBountyForPublishingDesiribleBlock
.takeBountyForPublishingDesiribleBlock
. This bounty is very large.Under proof of stake
TX_HEADS
which starts the commit-reveal.TX_HEADS
transaction and the bounty ID to the miner.takeBountyForPublishingDesiribleBlock
. This bounty is large.takeBountyForPublishingDesiribleBlock
. This bounty is small.Are you willing to implement this feature?
Maybe