<p>It can't.</p>
<p>But that doesn't mean different smart contracts can't interact. The interaction must simply happen in the same transaction.</p>
<p>As an example, imagine you have some Uniswap-like liquidity pool as one UTxO and another UTxO belonging to an auction contract. Then you can use the pool to swap tokens and then use the swapped tokens to bid in the auction, all in one transaction. That transaction will have both UTxO's as inputs (plus additional inputs for the funds that you swap) and updated UTxO's for both the liquidity pool and the auction as outputs.</p>
<p>You have to think differently when working with the EUTxO-model, but that model is at least as powerful as the accounting model used by Ethereum.</p>

CC BY-SA 4.0
2021-05-02T19:25:12.447Z
2021-05-02T19:25:12.447Z
Lars Brünjes
<p>In simple words, it probably can't (even thought we do know the final Plutus design yet).</p>
<p>If two smart contacts needs to interact between each other, they need to provide each other inputs to consume, just like it would be the case with end-user.</p>

CC BY-SA 4.0
2021-05-01T07:53:09.183Z
2021-05-01T07:53:09.183Z
Marek Mahut - StakeNuts
<p>If the &quot;context&quot; of a smart contract can see only the transaction where it sits and its inputs-outputs, how can a smart contract interact with other smart contracts living in different transactions?</p>

CC BY-SA 4.0
2021-05-01T05:07:07.853Z
Since everything is on the block chain, I find it hard to believe that a smart contract can only see a specific transaction? Maybe you can elaborate?
Ahmedie-m
CC BY-SA 4.0
2021-05-01T07:51:37.007Z
@Ahmedie-mi it is true, on Cardano, smart contact can only consume the input transactions. It does work only with the UTXO set and does not keep the entire blockchain in memory.
Marek Mahut - StakeNuts
<smart-contract><plutus>
How can smart contracts interact each other?
# How can smart contracts interact each other?

(Asked by: username_0 on 2021-05-01)

If the "context" of a smart contract can see only the transaction where it sits and its inputs-outputs, how can a smart contract interact with other smart contracts living in different transactions?

**Tags:** smart-contract, plutus
> **Comments:**
> **username_1**: Since everything is on the block chain, I find it hard to believe that a smart contract can only see a specific transaction? Maybe you can elaborate?  
> **username_2**: @Ahmedie-mi it is true, on Cardano, smart contact can only consume the input transactions. It does work only with the UTXO set and does not keep the entire blockchain in memory.  

---

## 2 answers

### Answer by username_3 on 2021-05-02. Score: 18 | Accepted answer

It can't.

But that doesn't mean different smart contracts can't interact. The interaction must simply happen in the same transaction.

As an example, imagine you have some Uniswap-like liquidity pool as one UTxO and another UTxO belonging to an auction contract. Then you can use the pool to swap tokens and then use the swapped tokens to bid in the auction, all in one transaction. That transaction will have both UTxO's as inputs (plus additional inputs for the funds that you swap) and updated UTxO's for both the liquidity pool and the auction as outputs.

You have to think differently when working with the EUTxO-model, but that model is at least as powerful as the accounting model used by Ethereum.


---

### Answer by username_2 on 2021-05-01. Score: 3

In simple words, it probably can't (even thought we do know the final Plutus design yet).

If two smart contacts needs to interact between each other, they need to provide each other inputs to consume, just like it would be the case with end-user.


---

