Sitemap
TRON

The scalable, available layer 1 network to decentralize the web.

Follow publication

TRON Virtual Machine vs Ethereum Virtual Machine

--

The TRON Virtual Machine (TVM) exhibits fundamental compatibility with the Ethereum Virtual Machine (EVM), with notable distinctions in the following aspects:

  1. The TVM employs an Energy model instead of the Gas model. energyPrice is a network parameter (it can be changed by committee proposals), currently set at 210 SUN on Mainnet. Unlike the fluctuating Gas prices and the presence of a basefee in the EVM, the TVM’s GASPRICE and BASEFEE opcodes both return the energyPrice.
  2. The Energy consumption of the majority of TVM opcodes aligns with their EVM counterparts, with certain opcodes exhibiting lower Energy costs, such as SLOAD and CALL.
  3. The prefix for contract addresses generated via CREATE2 in the TVM is different from the EVM. The TVM utilizes the 0x41 prefix, determined by the formula (where ++ represents string concatenation):

    keccak256(0x41++ address ++ salt ++ keccak256(init_code))[12:]
  4. TRX can be transmitted to contracts through two mechanisms: standard transfers and TriggerSmartContract invocations carrying a callValue. Standard transfers bypass the execution of the contract’s fallback function.

Differences in Instructions

Differences in Precompiled Contracts

New Features of the TVM

Instructions

Precompiled Contracts

--

--

TRON
TRON

Published in TRON

The scalable, available layer 1 network to decentralize the web.

No responses yet