Skip to content

Glossary

Counterfactual Contract

A contract that has a known on-chain address (via CREATE2) but has not actually been deployed — funds can be sent to it before code is on-chain.

CREATE2 makes a contract's deployment address deterministic from the deployer, a salt, and the init code. The address can be computed off-chain before deployment — meaning you can send funds to "the address where the contract will exist" and only deploy it when you actually need to use the funds.

Smart-contract wallets (Safe, ERC-4337 wallets) lean heavily on counterfactual deployment: a user's wallet exists at a known address even before its first transaction, which keeps the onboarding gas cost out of the user's first interaction.