A contract account is an Ethereum account at an on-chain address whose behavior is governed by smart-contract code. It has executable code, persistent storage and an ETH balance, which may be zero. The account is the on-chain entity that holds state and can hold assets; the smart contract is the program that determines what it can do. It is not necessarily a legal agreement.
How Execution Works
Execution begins when a transaction invokes the account’s code, either directly or through a call from another contract during that transaction. The Ethereum Virtual Machine (EVM) runs the code with the supplied inputs and relevant blockchain state. Depending on its logic and permissions, the program can update storage, transfer assets or call other contracts.
A contract account does not independently wake up when a deadline passes or another condition becomes true. Its code can check a condition only when invoked; an initiating transaction is still required. An external service may submit that transaction, but the service—not the contract acting on its own—provides the trigger.
Persistent State and Asset Handling
Persistent storage retains application data between transactions. It can record permissions, balances tracked by the application or whether an operation has already been completed. This allows later calls to act on earlier results rather than starting with an empty record each time.
A contract account can hold ETH directly at its address. Token ownership is generally recorded by the relevant token contract, rather than as part of the account’s native ETH balance. Moving those tokens requires calls that satisfy the token’s rules and the account’s own logic. These capabilities support applications such as token systems, exchanges and programmable wallets.
FinchTrade services
Get startedContract Accounts vs. Externally Owned Accounts
- Authorization: An externally owned account (EOA) uses its private key to authorize transactions. A contract account follows code-defined authorization rules, not a private key belonging to the contract address.
- Transaction Initiation: An EOA can originate a top-level transaction. A deployed contract instead acts through execution initiated by a transaction, even when its calls cause further activity across other contracts.
- Permissions: Contract logic can require multiple approvals or restrict particular actions rather than relying only on a single account signature. People or organizations may still control those permissions through keys, so code-based operation does not imply an absence of administrators.
The distinction is not simply “code versus no code.” EIP-7702 allows an EOA to authorize delegation to deployed code, which then executes in that EOA’s context, while the EOA retains its ability to originate signed transactions.
Gas Costs and Security Considerations
On-chain execution consumes gas, and Ethereum transaction fees are paid in ETH. The transaction sender pays the protocol fee; the contract account being called does not necessarily pay it from its own balance. More computation and storage writes generally require more gas. Network congestion can raise the price of gas or delay inclusion, making time-sensitive operations less predictable. Code optimization, batching or layer-2 execution may help with costs, but suitability depends on the application.
Code defects and faulty permissions can expose assets to theft, lock funds or allow unintended state changes. Testing, security reviews and careful access controls reduce risk but do not guarantee safety. Upgrade mechanisms, where present, also make the authority to change behavior relevant. A failed transaction can still incur fees for gas consumed, so unsuccessful execution is not necessarily cost-free.