<p>Whichever transaction the block producer decides to include in block will succeed. Only one can succeed though.</p>
<p>The auction datum exists on a UTxO and each UTxO can only be spent once. In the case of the auction, the validator requires a new UTxO with a new Datum is created to replace the spent TxO. That new Datum isn't visible until the next block though.</p>
<p>Concurrency is a popular topic of conversations in the community and there are many ways a dApp designer can allow participants to interact concurrently. It often requires architectures that are unique to Cardano. Check out <a href="https://cardano.stackexchange.com/a/3765/1130">this post</a> which includes a lot of helpful resources about concurrency.</p>

CC BY-SA 4.0
2022-01-15T03:26:53.107Z
To add to the above, this is a simple example and doesn't have concurrency support in it. A more complex script would likely have some sort of concurrency model.
Samuel Leathers
CC BY-SA 4.0
2022-01-14T00:41:03.970Z
2022-01-14T00:50:47.797Z
2022-01-14T00:50:47.797Z
Mitchell Turner
<p>In the English Auction example, let's say both wallet 2 and 3 submit a transaction to bid at the same time.
(In the simulator, I just don't add a wait time between wallet 1&amp;2 bids).
When Wallet 1 closes the auction, nothing happens in the simulator - only the first transaction is seen :</p>
<p><a href="https://i.sstatic.net/Au4Ns.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Au4Ns.png" alt="enter image description here" /></a></p>
<p>In general, how does Cardano handle a situation when 2 wallets (say from different geographical locations) submit transactions at the same time ? Do both transactions fail or just 1 ?</p>

<plutus-pioneer-program>
How does the English Auction contract handle concurrency?
# How does the English Auction contract handle concurrency?

(Asked by: username_0 on 2022-01-13)

In the English Auction example, let's say both wallet 2 and 3 submit a transaction to bid at the same time.
(In the simulator, I just don't add a wait time between wallet 1&2 bids).
When Wallet 1 closes the auction, nothing happens in the simulator - only the first transaction is seen :

[![enter image description here](https://i.sstatic.net/Au4Ns.png)](https://i.sstatic.net/Au4Ns.png)

In general, how does Cardano handle a situation when 2 wallets (say from different geographical locations) submit transactions at the same time ? Do both transactions fail or just 1 ?

**Tags:** plutus-pioneer-program

---

## 1 answers

### Answer by username_1 on 2022-01-14. Score: 1

Whichever transaction the block producer decides to include in block will succeed. Only one can succeed though.

The auction datum exists on a UTxO and each UTxO can only be spent once. In the case of the auction, the validator requires a new UTxO with a new Datum is created to replace the spent TxO. That new Datum isn't visible until the next block though.

Concurrency is a popular topic of conversations in the community and there are many ways a dApp designer can allow participants to interact concurrently. It often requires architectures that are unique to Cardano. Check out [this post](https://cardano.stackexchange.com/a/3765/1130) which includes a lot of helpful resources about concurrency.

> **Comments:**
> **username_2**: To add to the above, this is a simple example and doesn't have concurrency support in it. A more complex script would likely have some sort of concurrency model.  

---

