As I understand it, a smart contract can "call" other smart contracts. So what happens when two smart contracts call each other in a recursive loop? Does the whole network break down and die?

2 Answers 2


They will run out of gas.

Each smart contract can only be invoked by a transaction. Transactions costs fees and executing contracts costs gas, which are a kind of additional fees for each executional step. If one smart contract calls another contract, it has to create a new transaction which only works if the contract has access to enough ether to pay the fees and the gas.

One malicious user could create two contract accounts talking to each other in a loop and stuff them with loads of ether. But this will cost a lot. And the whole network wont break down.

And in the end, they will run out of gas.

  • 1
    Great explanation, although the terminology may be a bit misleading. Only EOAs can create transactions. When a contract calls another contract, that is referred to as an internal contract call. Commented Sep 11, 2021 at 15:18

Another interesting thing to consider is contract creation.

As outlined in the Solidity FAQ, contracts can create other contracts but "cyclic creations are not possible".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.