Definition

What is Checks-effects-interactions?

Checks-effects-interactions is the Solidity pattern of validating inputs first, updating your own state second, and calling external contracts last, which neutralises reentrancy.

By the time control leaves your contract, every invariant is already recorded, so a malicious callback finds nothing left to exploit. It costs nothing in gas and should be the default shape of any function that transfers value.

Go deeper

Related terms

Definition by , founder of Monsmith.

See it in practice

Open Monsmith, paste a contract, and watch the audit and profiler explain it.

Open the studio