Skip to main content

This site is for educational purposes only. Nothing here constitutes financial advice.

Back to all terms
CEI
security

Checks-Effects-Interactions

The structural pattern that eliminates reentrancy bugs: every function should perform (1) checks (require statements validating inputs and state), (2) effects (all state mutations), then (3) interactions (external calls and ETH transfers). If state changes always happen before external calls, an attacker's callback sees the post-update state and cannot re-enter into stale-state code paths. CEI is the architecture; ReentrancyGuard is defence-in-depth on top.

Related terms

Every glossary term is educational only. Nothing on this page constitutes financial, investment, tax, or legal advice. Browse all 356 terms →