Let's assume we have some NFT minting drop with more than 1000s of participating buyers who try to spend the same output, all at the same time. How does the chain decide who gets to spend the output? Is it first-in (the buyer who submitted the tx first), completely random, or something else?
-
4The first transaction who makes it into the mempool will be the one spending the output. And in case there is congestion on the blockchain and multiple transactions make it into different mempools (on different nodes), the one who is adopted in a block first will be the one spending the UTxO.– George - APEX Stake PoolNov 3, 2022 at 21:29
-
@George-APEXStakePool So as long as each person submits around the same time of a new block being minted, it's basically random which out of all the txs in the mempool will be included on-chain?– et97Nov 3, 2022 at 22:00
-
3Not quite random, the first transaction that enters the mempool of the block producer chosen to create the next slot will win, Its not quite random, but it will effectively look like its random.– Erik de Castro LopoNov 4, 2022 at 0:42
-
Stake Pool Operators can figure out which future slot in the current epoch they are due to mint, but if you are not an SPO you will not be able to figure out which SP is next to mint a block.– Erik de Castro LopoNov 4, 2022 at 0:43
-
@George-APEXStakePool I think you should answer the question with what you said in this comment, for future references.– Falcon StakepoolMar 28 at 10:34
1 Answer
The first transaction who makes it into the mempool will be the one spending the output. And in case there is congestion on the blockchain and multiple transactions make it into different mempools (on different nodes), the one who is adopted in a block first will be the one spending the UTxO.