Differences Between Ethereum and Thanos

Thanos is designed to be equivalent to the EVM and introduces as few changes to the Ethereum protocol as possible. However, there are some key differences in the way Ethereum and Thanos work that developers should be aware of.

Opcodes

Address Aliasing

Address Aliasing is an important security feature that affects the behaviour of transactions sent from L1 to L2 in Smart Contracts. If you are using cross-chain transactions, please read this section carefully. Note that the CrossChainMessenger handles address aliasing internally.

When a transaction is sent from L1 to L2 using EOA, the sender address on L2 is set to the sender address on L1. However, if the transaction is triggered by a smart contract on L1, the sender address on L2 will be different.

Due to the behaviour of the CREATE opcode, the same address can be shared on both L1 and L2, but the bytecode of the smart contracts can be different. These contracts share the same address but are essentially two different smart contracts and cannot be treated as the same. As a result, the sender of a transaction sent from L1 to L2 by a smart contract cannot be the address of the L1 smart contract, and the L1 smart contract can behave as if it were the L2 smart contract (because the two contracts share the same address).

To prevent this type of impersonation, when a transaction is sent from L1 to L2 by a smart contract, the sender of the transaction is slightly modified. Instead of appearing to originate from the actual L1 contract address, the L2 transaction appears to be sent from an 'alias' version of the L1 contract address. This alias address is derived by adding a fixed offset to the real L1 contract address, ensuring that it doesn't collide with other addresses on L2, and that the original L1 address can be easily recovered from the alias address.

This change to the sender address only applies to L2 transactions sent by L1 smart contracts. In all other cases, the sender address of the transaction is set according to the same rules used in Ethereum.

Transactions

Transaction Fees

In Thanos, transactions must pay an L1 Data Fee in addition to the standard Execution Gas Fee expected in Ethereum. For more details, refer to the Transaction Fee guide.

EIP-1559 Parameters

Thanos calculates its base fee using EIP-1559, just like Ethereum. However, the EIP-1559 parameters used in Thanos differ from those used in Ethereum.

Mempool Rules

Unlike Ethereum, Thanos does not have a public mempool. The Thanos mempool is only visible to the Sequencer, which executes transactions in order of priority fee (highest fee first).

Last updated