Skip to main content
Version: v1.3

EVM Compatibility in IOTA Smart Contracts

The evm core contract provides EVM support in IOTA Smart Contracts. It stores the EVM state (account balances, state, code, etc.) and provides a way to execute EVM code to manipulate the state.

The EVM core contract runs on top of the ISC layer, which provides the rest of the machinery needed to run smart contracts, such as signed requests, blocks, state, proofs, etc.

However, the ISC EVM layer is also designed to be as compatible as possible with existing Ethereum tools like MetaMask, which assume that the EVM code runs on an Ethereum blockchain composed of Ethereum blocks containing Ethereum transactions. Since ISC works in a fundamentally different way, providing 100% compatibility is not possible. We do our best to emulate the behavior of an Ethereum node, so the Ethereum tools think they are interfacing with an actual Ethereum node, but some differences in behavior are inevitable.

Properties and Limitations

Here are some of the most important properties and limitations of EVM support in IOTA Smart Contracts:

No Enforced Block Time

There is no guaranteed block timeBlock Time refers to the average amount of time it takes for a new block to be added to a blockchain. This metric is critical as it determines the network speed and efficiency in processing transactions and maintaining consensus.. A new EVM "blockData objects processed by nodes: they contain single transactions. A block is composed of 1) block header (auxiliary information to identify the block); 2) transaction/data; 3) signature." will be created only when an ISC block is created, and ISC does not enforce an average block timeBlock Time refers to the average amount of time it takes for a new block to be added to a blockchain. This metric is critical as it determines the network speed and efficiency in processing transactions and maintaining consensus.. This means that block times are variable; a new block will be created as soon as needed.

The Magic Contract

A dedicated Ethereum contract exists to manage Layer 1 tokens and ISC functionalities, introducing commands like isc.send(...) for token transfers.

Gas Fees

As in Ethereum, gas fees depend on the current network usage. As in an auction, if there is a high demand, users will compete and try to outbid each other's transactions. This means gas prices increase in periods of high usage and decrease when the usage goes down. However, unlike Ethereum, the chain owner can set the minimum gas fee.

Current Gas Fee

You can get the minimum gas fee by querying the eth_gasPrice using the JSON-RPC API.