Lesson 2

Mechanism of EOA (Externally Owned Account) Operation

In the blockchain world, EOA (Externally Owned Account) is the account type users interact with most directly. Controlled by a user's private key, it serves as the core tool for initiating transactions, interacting with smart contracts, and managing assets. Understanding how EOAs work helps grasp the essence of on-chain operations, security risks, and the underlying logic of the Web3 application ecosystem.

How EOAs Initiate Transactions and Signatures

The core function of an EOA is to initiate transactions. Users create transaction requests via wallet software (such as MetaMask or Trust Wallet). These requests contain information including sender address, recipient address, transaction amount, smart contract methods invoked, and additional parameters.

During transaction initiation, the EOA uses its private key to sign the transaction. The signature is a key mechanism that ensures the transaction is tamper-proof and verifiable. Nodes on the blockchain verify the transaction signature using the public key to confirm it was indeed initiated by the account owner.

The process for an EOA to initiate a transaction can be summarized as:

  1. User constructs transaction data
  2. Signs digitally using the private key
  3. Broadcasts the signed transaction to the blockchain network

This mechanism ensures the trustless nature of blockchain: the network doesn’t need to know the private key, only to verify the signature to confirm transaction legitimacy.

Gas Fees and Transaction Execution Process

Every transaction initiated by an EOA consumes Gas, which is how the blockchain network measures usage of computational resources. Gas fees not only incentivize miners or validators to process transactions but also prevent spam attacks on the network.

The transaction execution process includes:

  • Transaction submission: EOA sends the signed transaction to network nodes
  • Transaction verification: Nodes verify the signature and check if the account balance can cover Gas
  • Transaction packaging: Valid transactions are included in blocks by miners or validators
  • Execution and state update: Actions in the transaction (transfers, contract calls) are executed and account states updated on-chain

Gas settings directly impact confirmation speed and cost. Users can adjust Gas prices to prioritize transactions, which is especially important during network congestion.

EOA’s Core Role in the Current Web3 Ecosystem

EOA is a foundational component of Web3; nearly all user operations rely on it.

Its core roles include:

  • Asset controller: Possessing the private key means controlling all assets under that account
  • On-chain identity: The address itself serves as a user’s identity on-chain
  • Interaction interface: All DeFi protocols, NFT transactions, DAO voting actions are completed via EOA

Additionally, EOAs support extensions like Multi-Signature and Account Abstraction, making account operations more flexible and meeting complex application requirements.

Private Key Management and Security Risks

EOA security depends entirely on private key management. If a private key is compromised, assets in the account face direct risk. Common security practices include:

  • Using hardware wallets (such as Ledger or Trezor) to store private keys
  • Avoiding entering private keys on networks or untrusted devices
  • Setting up multi-signature accounts to distribute risk

On-chain operations also require vigilance against phishing sites, malicious contract calls, and social engineering attacks. Proper private key management and operational habits are the first line of defense for asset security.

Lesson 3: Smart Contract Accounts and On-Chain Programmable Accounts

In the blockchain ecosystem, smart contract accounts (Contract Accounts) are the core carriers of on-chain programmable logic. Unlike EOAs controlled by private keys, contract accounts operate based on code defined at deployment, enabling automated asset management, rule enforcement, and interactive operations.

Creation and Execution of Contract Accounts

Contract accounts are generated differently from EOAs—they are created through transactions. When deploying a contract, the transaction contains the contract code and initialization parameters, which are recorded by on-chain nodes to generate a unique address.

When executing contract account logic, all operations are triggered by transactions that can originate from an EOA or another contract account. Nodes execute instructions line by line according to the smart contract code, modifying the on-chain state or calling other contracts.

Key features of this mechanism include:

  • Automation: Executes preset logic without manual intervention

  • Composability: Contracts can call each other, enabling complex on-chain applications

  • Immutability: Code cannot be changed after deployment, ensuring rule consistency

In practice, the execution process of a contract account can be summarized as:

  1. An EOA or contract account initiates a call transaction

  2. The node reads the contract code and input data

  3. Logic is executed and state is updated

  4. The execution result is returned or an event notification is triggered

How Smart Contracts Control Assets and Logic

A contract account is not just a container for code—it also has asset management capabilities. All tokens and ETH received during deployment or execution belong to the contract account, with asset management fully governed by smart contract logic.

Through logic control, a contract account can enable:

  • Automated payments and settlements

  • Multi-signature or time-lock asset management

  • Conditional fund transfers

  • Interactions with other contracts to implement complex financial strategies

This programmatic control greatly reduces operational risks and provides flexible rule execution for on-chain financial applications.

Contract Account Applications in DeFi Protocols

In DeFi, nearly all core protocols rely on contract accounts to manage funds and logic. For example:

  • Lending protocols: Lending pools, collateral management, and interest calculation are all handled by contract accounts

  • Decentralized exchanges (DEX): Trade matching and liquidity pool management are automatically processed through smart contracts

  • Yield aggregation strategies: Auto-compounding, yield distribution, and fee management are all managed by contract accounts

Contract accounts enable DeFi protocols to perform complex financial operations without centralized intermediaries, maintaining transparency, verifiability, and automated execution. This is the value of on-chain programmable accounts—they are not only tools for asset management but also the core infrastructure of decentralized finance.

Disclaimer
* Crypto investment involves significant risks. Please proceed with caution. The course is not intended as investment advice.
* The course is created by the author who has joined Gate Learn. Any opinion shared by the author does not represent Gate Learn.