Cointegrity

Cross-Contract Communication

Web3 / smart contracts

Cross-contract communication refers to the mechanisms and patterns that enable one smart contract to call functions on another contract, exchange data, and coordinate state changes across multiple contract instances on the same blockchain. Communication methods include direct contract calls (using contract addresses and ABI encoding), delegatecalls for code execution in another contract's context, message passing through events and off-chain listeners, and standardized interfaces like ERC-20 and ERC-721 that define common interaction patterns. Effective cross-contract design is crucial for building composable DeFi systems where protocols can integrate with each other's functionality.

Example

Uniswap v3 uses cross-contract communication extensively, with the router contract calling the swap function on individual pool contracts, which in turn interact with token contracts using the ERC-20 interface to transfer assets between users and pools.

Why It Matters

Cross-contract communication enables the composability that makes DeFi powerful—allowing protocols to build on each other's functionality. Without reliable inter-contract communication patterns, the ecosystem would fragment into isolated systems rather than interconnected "money legos" that create emergent financial primitives.

Category: smart contracts, blockchain technology

Definition maintained by Cointegrity. See our editorial policy for review standards on regulatory and compliance terms.

Explore the full Web3 Glossary — 2,094+ expert-curated definitions. Need guidance? Talk to our consultants.