Skip to main content

Difference Between Ethereum and Mantle

Mantle is developed based on the OP Stack architecture. While it shares many design similarities with Ethereum, there are differences when transitioning from Ethereum to Mantle.

Key Differences

Opcodes

While Mantle aims for Ethereum compatibility, there may be differences in supported opcode sets or their specific implementations. Developers transitioning from Ethereum should review and adjust their smart contracts accordingly. Refer to the table below for detailed information:

OpcodeSolidity equivalentBehavior
COINBASEblock.coinbaseIn mantle-V2 Tectonic, block coinbase is the SequencerFeeVault, which address is 0x4200000000000000000000000000000000000011
DIFFICULTYblock.difficultyRandom value. As this value is set by the sequencer, it is not as reliably random as the L1 equivalent.
NUMBERblock.numberL2 block number
TIMESTAMPblock.timestampTimestamp of the L2 block
ORIGINtx.originIf the transaction is an L1 ⇒ L2 transaction, then tx.origin is set to the aliased address of the address that triggered the L1 ⇒ L2 transaction. Otherwise, this opcode behaves normally.
CALLERmsg.senderIf the transaction is an L1 ⇒ L2 transaction, and this is the initial call (rather than an internal transaction from one contract to another), the same address aliasing behavior applies.

Unsupported Opcodes

The following opcodes are not supported in Mantle:

OpcodeImplementation InfoBehavior
TLOADTSTOREIntroduced in EIP-1153Manipulate state that behaves almost identically to storage but is discarded after every transaction
MCOPYIntroduced in EIP-5656An efficient EVM instruction for copying memory areas, enabled in Cancun upgrade
BLOBHASHIntroduced in EIP-4844Opcode to get versioned hashes, enabled in Cancun upgrade
BLOBBASEFEEIntroduced in EIP-7516Instruction that returns the current data-blob base-fee, enabled in Cancun upgrade

Blocks

As a rollup, Mantle's block structure may differ from Ethereum, including block construction time, block size, and more. Developers should familiarize themselves with Mantle's block specifications for optimal integration. Refer to this for more details.

Network Specifications

Mantle has distinct network specifications compared to Ethereum, particularly in JSON-RPC differences. Understanding these variances is crucial for a smooth transition to Mantle. Refer to this for more details.

Transaction Costs

As a rollup on Ethereum, Mantle's transaction cost composition differs from L1. Developers should understand Mantle's fee structure to optimize their applications' performance on Mantle Network. Refer to this for more details.

Solidity Support

Currently Mantle doesn't support the latest version of the Solidity. Make sure your Solidity compiler version is lower than v0.8.23 when you deploy the contract.