Key takeaways
fee_limitcaps the Energy a contract call may draw from its caller, staked Energy included. The TRX burned for the caller's Energy never exceeds it. It is set in the signed transaction before broadcast.- A call that runs out of Energy fails with the result
OUT_OF_ENERGY. Its state changes are rolled back, and it is charged its whole Energy allowance, including the part it had not used. A call that exits throughREVERTis charged only the Energy it used. Neither charge is refunded. - A contract's deployer can pay part or all of each call's Energy through
consume_user_resource_percent. The deployer's share is capped byorigin_energy_limitand by the Energy the deployer has available. - The limit, the result, and the payer are all readable in the transaction and its receipt. A reader finds the caller's Energy, the caller's TRX burn, and the deployer's share as separate fields in the receipt.
A contract call can consume a large amount of Energy, and it can fail after consuming it. The network charges a plain TRX transfer Bandwidth, plus flat TRX fees when the sender creates the recipient’s account, attaches a memo, or uses two or more signatures. No contract code runs in a plain transfer, so it uses no Energy. That difference is why contract execution has rules of its own: the caller sets a limit, a failure has a defined price, and a contract’s deployer can pay part of the cost for its users.
This article covers those three rules and what each one leaves on the record. It does not cover the Energy resource itself or how its price is set. Those are in what a transaction actually costs.
fee_limit: the caller’s limit
Every contract call has a fee_limit field, which the TRON documentation describes as capping “the Energy budget that the caller can cover for this transaction, expressed in sun.” A call draws Energy from the caller’s staked Energy first and then burns TRX to buy the rest. The TRX burned never exceeds fee_limit. The documentation calls it a “safety cap” against runaway Energy use.
The limit also applies to the staked part. The documentation says fee_limit “always applies, regardless of how much Energy you have staked.” The caller’s allowance for one call is the smaller of two amounts: the caller’s staked Energy plus what the caller’s TRX balance could buy, and fee_limit divided by the Energy price. A low fee_limit can therefore cause a call to run out of Energy even when the caller has ample stake.
The value is bounded. A valid fee_limit runs from 0 up to a maximum that governance sets, chain parameter No. 47, and the node rejects a transaction outside that range before it executes. On 17 November 2026 TronGrid showed the maximum at 15,000,000,000 sun, which is 15,000 TRX. Committee proposal 79 set that value, with an expiration time of 4 December 2022, and a later proposal can change it.
For a reader, fee_limit is part of the transaction’s signed envelope. It is fixed at signing and visible whether or not the call succeeded. It should not be read as the signer’s estimate of the cost. TronWeb v6.5.2 fills in 150 TRX when the caller passes no value, and the documentation’s recommended sizing formula “typically over-budgets”.
Running out of Energy: rolled back and charged in full
A failed call is still charged, and the charge depends on how the call failed.
When a contract call exhausts the Energy available to it, execution stops with the result OUT_OF_ENERGY. The node rolls back every state change the call made. The TRON documentation says that “all Energy available to that execution is counted as consumed, including any unused remainder.” The same rule applies to a timeout and to an invalid instruction. The java-tron documentation describes a crash, bug, or timeout as an unexpected interruption, where “the system will deduct all available Energy for the transaction as a penalty”.
A REVERT is the milder case. When a contract exits through a REVERT instruction, “only the Energy for the instructions executed up to that point is deducted.” State is rolled back on both paths, and the documentation says the consumed Energy “is not refunded” on either.
The whole allowance is not the same as the whole fee_limit. An investigator can see the difference in one call to the USDT contract, read from TronGrid on 17 November 2026. It had used 10,048 Energy when it failed with OUT_OF_ENERGY, and it was charged its full allowance of 13,880 Energy, which burned 1.388 TRX. Its fee_limit was 100 TRX.
A failed contract call therefore stays on-chain as a costed transaction. A reader finds the result and any Energy charged in the receipt, and the fee_limit in the transaction. An investigator can read from it that a call was attempted, that it did not complete, and what it cost.
Sponsored execution: when the deployer pays
A contract’s deployer can take on part or all of the Energy cost of calls to the contract.
Two parameters on the contract split the cost. consume_user_resource_percent is an integer from 0 to 100, the share of each call’s Energy the caller pays. At 60 the caller covers 60% and the deployer covers the other 40%. At 0 the deployer covers everything. origin_energy_limit caps the Energy the deployer will cover on a single call. The deployer’s share comes out of the deployer’s own available Energy, and the deployer’s TRX is never burned for it. The share actually paid is the smallest of three amounts: the configured share, that limit, and the Energy the deployer has available. Only the deployer can change the two settings after deployment.
For a contract deployed by a transaction, the protocol sets no default under which the caller pays all. TronWeb v6.5.2 fills in a caller share of 100 unless the deployer chooses another value. A contract created by another contract is given a caller share of 100 by the node.
A caller using a fully sponsored contract can therefore spend little or no Energy of its own, but only while the deployer has Energy behind the setting. The documentation is direct about the limit: “if the developer’s account has insufficient Energy, the remaining cost falls entirely to the caller.” When the split is between 1 and 99, the caller’s own budget also limits the deployer’s contribution, so the caller still needs a sufficient fee_limit.
The setting is an offer. The payment is in the receipt. On 17 November 2026 TronGrid showed the USDT contract set to a caller share of 30, but its deployer account had 9,329 Energy and all of it was used. In 28 blocks read from TronGrid that day, a reader finds a deployer share in 28 of 2,360 USDT receipts.
Reading a contract call’s record
The limit is a signed field. fee_limit is present on successes and failures alike. A reader can take it as the most Energy the call could have drawn from its caller. It may be a library default, so a reader cannot take it as what the signer expected to pay.
The result is in the receipt. OUT_OF_ENERGY and REVERT are separate results, and the node charges them differently. A failed call is an attempt that did not complete, and it can matter to a reader as much as a success.
The payer is in the receipt as well. energy_usage is the caller’s own Energy, energy_fee is the TRX the caller burned, and origin_energy_usage is the deployer’s share. A call with no fee was not always paid by the deployer. The caller’s own stake or Energy delegated to the caller can also cover it. A reader can attribute the payment to the deployer only from origin_energy_usage.
From a contract call’s record, a reader can recover the limit its caller signed, how the execution ended, and whose resources paid for it. To read one, open the receipt before drawing a conclusion from the fee alone.
Sources
- FeeLimit & Energy cost — TRON Developer Hub —
fee_limitas the cap on “the Energy budget that the caller can cover for this transaction, expressed in sun,” applied “regardless of how much Energy you have staked”, with the ceiling a chain parameter: “The maximum allowed value is currently 15,000 TRX on Mainnet (15 × 10⁹ sun) — but this is a chain parameter (getMaxFeeLimit, parameter #47).” Also the contract-sponsorship model:consume_user_resource_percent(0–100, the caller’s share),origin_energy_limit(the deployer’s per-call cap), the deployer/caller split formula,wallet/updatesetting, the role offee_limitas a “safety cap”, the TronWeb default of 150 TRX, and the sizing formula that “typically over-budgets”. - VM exception handling — TRON Developer Hub — on
OUT_OF_ENERGY, a timeout, or an invalid instruction “all Energy available to that execution is counted as consumed, including any unused remainder”, whileREVERTcharges only the Energy used. State is rolled back on both, and consumed Energy is refunded on neither. - Resource Model — TRON Developer Hub — read on November 26, 2026 (UTC): “Every on-chain transaction consumes Bandwidth.” and “Smart contract calls additionally consume Energy.”
- Paying for resources & Energy sharing — TRON Developer Hub — read on November 26, 2026 (UTC): a direct TRX transfer to an unactivated address “incurs an account creation fee of 1 TRX on Mainnet”. The network burns a further 0.1 TRX when the sender’s staked or delegated Bandwidth cannot cover the transaction.
- Resource Model — java-tron documentation — a
REVERTinstruction deducts “only the Energy for the instructions executed up to that point”; an unexpected interruption deducts all available Energy as a penalty; consumed Energy “is not refunded”; the deployer’s share is deducted from the deployer’s available Energy and its TRX is not burned; and “if the developer’s account has insufficient Energy, the remaining cost falls entirely to the caller.” - tronprotocol/java-tron — VMActuator at GreatVoyage-v4.8.2.4 — the reference client’s rules: the
fee_limitrange check, the caller’s Energy allowance as the smaller of stake plus balance andfee_limit, and the spending of the whole remaining allowance on an exception. - tronprotocol/java-tron — ReceiptCapsule at GreatVoyage-v4.8.2.4 — the deployer’s share as the smallest of the configured share,
origin_energy_limit, and the deployer’s available Energy. - tronprotocol/java-tron — Manager at GreatVoyage-v4.8.2.4 — the fixed fees outside the resource model:
consumeMultiSignFeechargesgetMultiSignFeewhen a transaction carries more than one signature, andconsumeMemoFeechargesgetMemoFeewhen its data field is not empty. - tronprotocol/java-tron — Tron.proto at GreatVoyage-v4.8.2.4 —
fee_limitas a field of the signedraw_data; the separateREVERTandOUT_OF_ENERGYresults; and the receipt fieldsenergy_usage,energy_fee, andorigin_energy_usage. - tronprotocol/java-tron — Program at GreatVoyage-v4.8.2.4 — a contract created by another contract is given a
consume_user_resource_percentof 100. - tronprotocol/tronweb — TransactionBuilder.ts at v6.5.2 — the library’s defaults: the instance
feeLimitwhen a call passes none, and a caller share of 100 when a deployment passes none. - TronGrid — wallet/getchainparameters — on-chain record, read on November 17, 2026 (UTC):
getMaxFeeLimit15,000,000,000 sun. Proposal 79, read the same day fromwallet/listproposals, set parameter No. 47 to that value with an expiration time of December 4, 2022 at 06:00 UTC. On November 26, 2026 (UTC) the same endpoint returnedgetCreateNewAccountFeeInSystemContract,getMemoFee, andgetMultiSignFeeat 1,000,000 sun each, which is 1 TRX, andgetCreateAccountFeeat 100,000 sun. - TronGrid — wallet/gettransactioninfobyid — on-chain record, read on November 17, 2026 (UTC), for transaction
6d53092002d4ed7bf74cc83149e20d938ff0f6986ef180595bf58fce6adbede8: a call to the USDT contract with resultOUT_OF_ENERGY,energy_usage_total13,880,energy_fee1,388,000 sun,energy_penalty_total7,736, andusedEnergy[10048]in itsresMessage. The same transaction, read the same day fromwallet/gettransactionbyid, has afee_limitof 100,000,000 sun. - USDT contract settings and receipts — on-chain record, read through the public TronGrid API on November 17, 2026:
wallet/getcontractshowedconsume_user_resource_percent30 andorigin_energy_limit10,000,000 forTR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t;wallet/getaccountresourceshowed its deployer with an Energy limit of 9,329, all used; and in blocks 88,088,388 to 88,088,418, less three that could not be read, anorigin_energy_usagewas present in 28 of 2,360 USDT receipts.