I’m trying to understand how liquidity pool like uniswap can be implemented in plutus.
Here is my understanding:
If I want to send a swap transaction, I have to consume the latest pool state (containing the token balances owned by the pool). Does it mean in any block there can be only one transaction per pool? If two or more users are trying to consume the latest UTXO, only one transaction will be successful and other users have to change their transactions to reference the new UTXO. Is my understanding correct?