Open quinn-dougherty opened 3 years ago
resource written by Morgan.
The Cardano mempool is designed to be "fair". Transactions are processed in a FIFO order regardless or how much in fees they pay
source: https://github.com/input-output-hk/cardano-node/issues/3247
This lives here at src/considerations/throughput.md
Description
n
people.Imagine alice and bob each withdraw 10 liquidity tokens at the same time. Well, the pools can't support them each doing so for the same price, the unfair solution is as far as I know status quo for the life of the day trader: by essentially random chance or microseconds-difference in transaction submission, either alice or bob pays more for their 10 liquidity tokens. Something fair would be "if two people perform the same action at the same time, that action should be performed at the same price".
The way we see it (per a phonecall with Isaac) is that the unfair solution is valid as long as we're clear that that's what we're doing, while the fair solution would be nice.
Deliverable
I think the audit language should basically recapitulate/summarize Nick's poolpicking and Morgan's parallelization documents with respect to properties like this.
Notes
Isaac met someone who claimed that their concurrency solution had the strong form of this property. They did it by making all transactions length two in UTXOs: the first UTXO would calculate a transaction plan that takes the current state of the market and fixes prices for the transactions, and the second executes with those prices.