Typically, transactions on the Ethereum network, are initiated by users. They involve the transfer of Ether (ETH) or other tokens from one externally owned account (EOA) to another, or they can be a call to a smart contract. These transactions are explicitly requested and signed by the user and are visible and traceable on the Ethereum blockchain.

What are Internal Transactions?

Internal transactions are transactions that occur when a smart contract automatically triggers or interacts with another contract within the Ethereum network. These are not transactions in the traditional sense, as they are not initiated directly by users and do not appear on the Ethereum blockchain as individual transactions. Instead, they are secondary effects of executing smart contracts. For example, if a smart contract transfers Ether to an address as part of its logic, this transfer is considered an internal transaction. Internal transactions play a critical role in executing complex operations on the Ethereum network.

Internal Transactions vs. Normal Transactions

Here are some key differences between normal transactions and internal transactions in Ethereum:

Initiation and Execution

Normal transactions are initiated by an EOA and are explicitly signed with the private key of the account owner. Internal transactions are initiated by smart contract code when certain conditions within the contract are met. They are executed as a result of the logic defined in the smart contract, which can be triggered by a normal transaction.

Visibility and Traceability

Normal transactions are fully visible on the Ethereum blockchain. They are recorded on the blockchain and can be viewed using block explorers like Etherscan.

While the outcome of internal transactions (like state changes) is recorded on the blockchain, the internal transactions themselves are not directly traceable on the blockchain. Specialized tools or methods are sometimes required to infer their occurrence.

Gas and Fees

Normal transactions require a fee (Gas) to be paid by the initiator of the transaction. This fee is paid in ETH and depends on the transaction's complexity and the network's current demand.

For internal transactions, gas is still consumed when these transactions occur, as they are the result of smart contract execution. However, the Gas is paid for by the original normal transaction that triggered the smart contract.

Importance of Internal Transactions

Internal transactions are crucial for advanced operations in the Ethereum network. They allow for more complex interactions within smart contracts, enabling dApps to offer more functionality to users.

Use Cases of Internal Transactions

  • Batch Processing for Efficiency: Internal transactions can process multiple actions in a single step, making transactions more efficient and cost-effective, particularly useful in sending out multiple payments or executing a series of related contract operations simultaneously.

  • Complex DeFi Operations: In DeFi, internal transactions handle complicated financial tasks like yield farming or managing liquidity pools, involving interactions with various protocols and assets.

  • Automated Token Distribution: They enable smart contracts to automatically distribute tokens or digital dividends to multiple addresses, such as paying out profits to investors or token holders.

  • Conditional Operations within Contracts: These transactions are used for executing specific actions when certain conditions are met in a smart contract, for example, in decentralized autonomous organizations (DAOs), internal transactions can be used to automate processes based on governance votes. For instance, if a proposal is approved by a majority vote, a smart contract can automatically execute the agreed-upon actions as internal transactions.

Future of Internal Transactions in Ethereum

One key driver of the prevalence of internal transactions is account abstraction.

Account Abstraction

Account abstraction is a proposed feature for Ethereum that aims to simplify the user experience and increase the flexibility of accounts on the Ethereum network. In the current model, there are two types of accounts: externally owned accounts (EOAs), controlled by private keys, and contract accounts, controlled by their contract code. Account abstraction proposes to treat all accounts more uniformly, allowing them to be controlled by a contract's code, even for basic transactions.

With account abstraction, user accounts could engage in more complex operations that are typically reserved for smart contracts. This could lead to an increase in internal transactions as more complex contract-like behaviours are embedded in regular account activities.

Also, the abstraction of accounts could lead to new use cases for smart contracts, potentially increasing the volume and variety of internal transactions. This is because account abstraction allows for more programmable and automated actions directly from user accounts, which could involve multiple internal transactions as part of their logic.

Conclusion

Internal transactions play a vital role in the functionality and scalability of Ethereum. As Ethereum continues to advance, particularly with developments like account abstraction, the role and importance of internal transactions are set to expand dramatically. They are crucial for the seamless operation and innovative capabilities of smart contracts and decentralized applications, making them indispensable in Web3.