๐ Energy Calculation Overview
TRON's Energy calculation is performed by the TRON Virtual Machine (TVM) during smart contract execution. The TVM assigns a specific Energy cost to each operation (opcode), and the total Energy consumed is the sum of all opcode costs multiplied by their execution frequency.
This guide explains the complete Energy calculation method, from the TVM's internal mechanics to the practical formula users can use to estimate transaction costs.
Energy is not a flat fee โ it's a dynamic cost based on the computational complexity of the smart contract operation.
โ๏ธ The TVM Opcode Cost Model
The TRON Virtual Machine (TVM) executes smart contract bytecode. Each bytecode operation (opcode) has a predefined Energy cost that reflects its computational intensity.
| Opcode Category | Examples | Relative Energy Cost |
|---|---|---|
| Basic Arithmetic | ADD, SUB, MUL, DIV | Low |
| Memory Operations | MLOAD, MSTORE, MCOPY | Medium |
| Storage Operations | SLOAD, SSTORE | High |
| Flow Control | JUMP, JUMPI, PC | Medium |
| Crypto Operations | SHA3, EC operations | Very High |
TRON's TVM is EVM-compatible but uses a different fee schedule optimized for TRON's resource model and lower costs.
๐ The Energy Calculation Formula
Simplified User Formula:
65,000 Energy ร 210 sun = 13,650,000 sun = 13.65 TRX
๐ Detailed Opcode Energy Costs
Below is a representative sample of TRON TVM opcode Energy costs. These values are based on the TVM fee schedule and may be updated through governance.
| Opcode | Description | Energy Cost |
|---|---|---|
| ADD | Addition | 2 |
| MUL | Multiplication | 3 |
| DIV | Division | 5 |
| MLOAD | Memory load | 3 |
| MSTORE | Memory store | 3 |
| SLOAD | Storage load | 200 |
| SSTORE | Storage store | 20,000 |
| SHA3 | Hash operation | 30 |
| JUMP | Jump | 1 |
| JUMPI | Conditional jump | 1 |
SSTORE (storage write) costs 20,000 Energy โ this is why complex contracts with many storage operations consume much more Energy.
๐งฎ Example Calculations
Example 1: USDT TRC20 Transfer
A standard USDT transfer executes a specific sequence of TVM opcodes, resulting in ~64,285โ65,895 Energy.
Energy Required: ~65,000
Energy Price: 210 sun/unit
TRX Burned: 65,000 ร 210 = 13,650,000 sun = 13.65 TRX
Example 2: Simple Smart Contract Call
A simple contract call with limited storage operations may consume ~15,000โ30,000 Energy.
Energy Required: ~20,000
TRX Burned: 20,000 ร 210 = 4,200,000 sun = 4.2 TRX
Example 3: Complex DeFi Contract
DeFi protocols with multiple storage operations may consume 100,000+ Energy.
Energy Required: ~100,000
TRX Burned: 100,000 ร 210 = 21,000,000 sun = 21 TRX
๐ฐ Energy Price & Governance
The Energy price (210 sun/unit) is a network parameter set by TRON governance. It can be changed through on-chain proposals voted on by Super Representatives and TRX holders.
- Current Price: 210 sun/unit
- Price Changes: Rare, but possible through governance
- Impact: Higher price = higher TRX burn cost
Always check the current Energy price on TronScan under "Network Parameters" before estimating costs.
๐ Practical Energy Calculation Tips
- Use TronScan: View actual Energy consumption of past transactions to estimate future costs.
- Estimate high: Budget 65,000 Energy for USDT transfers (safe upper bound).
- Consider activation: Unactivated wallets consume ~1,600 more Energy.
- Rent Energy: Renting is often cheaper than burning TRX โ up to 80%+ savings.
65,000 Energy = ~13.65 TRX burned (at 210 sun/unit). For most USDT transfers, this is a reliable estimate.