They (same fee-rated transactions) won't be confirmed based on "first comes, first serves" in mempools.
Are you sure of that?
I am not sure, but I don't think all miners/mining pools use the same criteria for how to prioritize transactions having the same fee rate. I think every miner/mining pool should have their own criteria.
I am not sure.
Mining pools and miners can include their own transactions with low fee rate in the block they successfully mine. For transactions that are not theirs, they will have different criteria for priority that is combination of fee rate and UTXO age.
Mining and consensus in Mastering Bitcoin.
Transaction Age, Fees, and PriorityTo construct the candidate block, Jing’s bitcoin node selects transactions from the memory pool by applying a priority metric to each transaction and adding the highest priority transactions first. Transactions are prioritized based on the “age” of the UTXO that is being spent in their inputs, allowing for old and high-value inputs to be prioritized over newer and smaller inputs. Prioritized transactions can be sent without any fees, if there is enough space in the block.
The priority of a transaction is calculated as the sum of the value and age of the inputs divided by the total size of the transaction:
Priority = Sum (Value of input * Input Age) / Transaction Size
In this equation, the value of an input is measured in the base unit, satoshis (1/100m of a bitcoin). The age of a UTXO is the number of blocks that have elapsed since the UTXO was recorded on the blockchain, measuring how many blocks “deep” into the blockchain it is. The size of the transaction is measured in bytes.
Another answer:
How do miners choose transactionsLet me walk you through the lifecycle of a transaction, and I think it'll become clearer.
A sender submits their transaction to the network. Every node checks whether the transaction is spending existing funds and whether it is otherwise valid. If so, they relay the transaction to their peers. This way, transactions disseminate to all participants in the network.
Some of the network participants, miners, continuously attempt to author new blocks. They assemble a block from the valid unconfirmed transactions they receive from their peers. They can choose any subset of the transactions they know about, but generally choose the transactions with the highest feerates to maximize their block reward. They could for example also prefer to include their own transactions, not include any transactions, or instead pick transaction by any other pattern (e.g. oldest first?)—this happens in traces, but usually reduces the revenue of miners, so works against their interests.
Using their draft for the next block, their block template, they repeatedly slightly change a field that takes a random input, the nonce, to see whether they can find a valid block using their template. When a miner exhausts the nonce space, they mix up the template in a different manner.
Once a miner discovers a block template for which the hash is below the difficulty target, they broadcast the new block to the network, extending the blockchain. All the transactions in the block are considered to have gotten their first confirmation and are now part of the blockchain. The successful author of the block pays the block reward out to themselves in the so-called coinbase transaction, the first transaction in the block. The reward can be spent when it has 100 confirmations.