Separate TRON’s contract popularity surcharge from base Energy usage
Two calls with the same execution path can have different Energy costs in different maintenance windows. The dynamic Energy model adjusts the cost of frequently used contracts.
Inspect the contract’s observed penalty factor
Read wallet/getcontractinfo for the contract and inspect contract_state. Record the maintenance cycle and factor with the actual receipt. In this simplified example, all charged work belongs to one contract and a factor of 2500 represents a 25 percent addition to its base cost.
base = 40_000
factor_in_ten_thousandths = 2500
penalty = base * factor_in_ten_thousandths // 10_000
assert base + penalty == 50_000
Keep Energy consumption separate from the TRX charge
The example yields 50,000 Energy, including a 10,000-unit penalty. To evaluate a real multi-contract call, use its execution data because subcalls can touch contracts with different factors. Resource sharing, available Energy and the execution-time price determine the TRX actually burned. A changed penalty does not imply a price change in sun per Energy.