How Energy Is Shared Across Nested TRON Calls
Nested TRON calls share one transaction budget, but contracts can cover part of the cost. The call path, deployer limits and fee limit decide what the user pays.
Onchain Report Newsroom#f1b43d3 min read
Nested TRON calls draw Energy from the same transaction execution, so each contract call adds to the work the transaction must cover. Energy is the network resource that pays for smart contract computing. This matters when one action, such as a token transfer, runs through several contracts: the final bill reflects the full path, not just the first contract.
Think of a wallet calling contract A, which then calls contract B. The TRON Virtual Machine runs both calls inside one transaction. Each cross-contract call has overhead, and each instruction inside both contracts uses Energy. To understand how much Tron Energy a batch of USDT payouts may need, see how to size Tron Energy for batch payouts. The same principle applies to nested calls: count the work across the whole route.
Does each nested call get a fresh Energy allowance?
No. A nested call uses Energy passed to it from the running transaction. A contract can set a limit for an internal call; if it does not, the call can receive the remaining Energy. That does not create a second transaction budget. It divides or forwards the budget already available to the outer call.
If an inner call runs out of the Energy sent to it, it can return failure to the contract that called it. The outer contract may catch that result and continue, or it may treat the failure as a reason to stop. If the overall execution exceeds what the caller and any contributing deployer can cover, the transaction can fail for lack of Energy.
Who pays when contracts call each other?
The deployer of a contract can choose to cover part of the Energy cost for calls into it. The share is set by consume_user_resource_percent: a lower caller percentage means the deployer is set to cover more. The deployer’s contribution is capped by its origin_energy_limit and available staked Energy. If it cannot cover its share, the shortfall falls back to the transaction caller.
That makes the route important. A user may start at a contract that offers a subsidy, but a later contract in the chain can have different settings. One subsidy does not automatically make every step free. The caller’s fee_limit sets the maximum Energy cost they can cover for that transaction.
How can you estimate a nested call’s Energy?
Start with the full execution path, then check where its Energy may come from:
- List each contract the transaction calls, including token contracts.
- Estimate the total Energy for the same method and similar input data, since branches and storage changes can affect the work.
- Check each relevant contract’s caller share and deployer limit.
- Set the caller’s fee limit to cover the expected shortfall, with room for variation.
For routine use, the practical rule is simple: budget for the entire call chain, then subtract only subsidies you have confirmed are available. Nested calls let contracts combine actions in one transaction, but convenience does not remove the Energy cost; it changes where the work happens and who may pay for it.