What are Internal Transactions:
An internal transaction on Ethereum is the type of transaction initiated by a smart contract rather than a user.
Internal transactions are not recorded on the Ethereum blockchain in the same way that regular transactions are. They are stored off-chain, so they are not easily visible to users. This is done to save gas used by a smart contract, which is the fee that users pay to execute transactions on the Ethereum blockchain.
There are a few key differences between internal transactions and regular transactions:
- Internal transactions do not have cryptographic signatures, such as hash. This means that they cannot be verified by other users on the blockchain.
- Internal transactions can only be initiated by smart contracts. They cannot be initiated by users.
By monitoring internal transactions, algorithmic traders get a comprehensive overview of all of the actions and changes that took place in a smart contract when a transaction was executed. It is a valuable data point for trade strategy formulation and evaluation.
How do internal transactions operate?
When smart contracts are called to execute an operation, they initiate internal transactions within themselves. Internal transactions enable smart contracts to change each other’s state and communicate with one another in a secure fashion.
Internal transactions are used to perform a variety of tasks within the smart contract, such as:
- Transferring tokens between accounts
- Calling other smart contracts
- Modifying the state of the smart contract
Why are internal transactions important in DeFi?
Internal transactions are an essential part of the Ethereum ecosystem. They allow smart contracts to perform complex tasks that would be impossible with regular transactions.
Here are some examples of internal transactions:
- When you use a decentralized exchange to trade tokens, the exchange will use an internal transaction to transfer the tokens from your account to the other party's account.
- When you mint a new NFT, the smart contract that mints the NFT will use an internal transaction to transfer the NFT to your account.
- When you interact with a smart contract game, the game will use internal transactions to update your game state and to transfer tokens between players.
Internal transactions in DeFi trading
Internal transactions allow DeFi traders to come across and be aware of trading opportunities that standard mempool data does not reveal. In addition, internal transactions can detect malicious bot activity with trace-level logs, helping protect traders. They provide a way to get a full overview of an EVM state transition by looking at how smart contracts act with other smart contracts.
bloXroute internal transaction services
- internalTxsMempool - Feed of internal transactions pending in the mempool. This feed features content like logs, logIndex, and calls in addition to the entries available in newTxs and pendingTxs streams. The internal transaction mempool can only be viewed on BSC, but support for Ethereum and Polygon is coming soon. This feature offers traders the ability to discover trading opportunities before those that only subscribe to the mined internal transactions data stream.
- internalTxsMined - Feed of recently confirmed internal transactions. This feed features content like logs, logIndex, and callTrace in addition to entries available in newTxs and pendingTxs streams. Mined internal transactions can be viewed on 7 DEXs across Ethereum Mainnet, BSC, and Polygon.
By subscribing to these data streams, traders do not have to set up their own specialized nodes or infrastructure to view these transactions and simulate them, thus saving money on costly resources.