OUT_OF_ENERGY: what it means and how to fix it
OUT_OF_ENERGY means a smart-contract call exhausted the energy available to the sending address before execution completed. The transaction's state changes may have been reverted while the network still charged for computation already performed. Before retrying, inspect the transaction receipt and actual error, estimate the call's energy requirement, and make sure sufficient energy is delegated to the sender.
What to check before retrying
Start with the failed transaction itself. Confirm that it actually reports OUT_OF_ENERGY, estimate the same contract call using current chain state, and compare the estimate with the sender's available energy. You can delegate energy to the sender, hold enough TRX for any network fee, or obtain energy through staking. If you consider renting, a live quote is available only when current market offers can satisfy the requested amount and term; compare the displayed quote with the alternatives before submitting an order.
Why a failed transaction may still cost TRX
When a contract call runs out of energy, its state changes may be reverted even though the network has already performed computation. The transaction receipt shows the result, resource usage, and any fee actually charged; check it instead of inferring the cost from the error name alone.
Why raising the fee limit may not help
The fee limit caps how much TRX may be charged for a smart-contract transaction; it does not delegate energy or correct another transaction error. A higher limit may allow the network to charge more TRX when the sender's energy is insufficient, but the transaction may still fail. Estimate the transaction and inspect its actual error before changing the limit.
Reducing repeat failures
For repeated or automated transfers, estimate the energy required by the actual contract call and recipient state, monitor the sender's available energy, and arrange resources before submitting the transaction. Re-estimate after relevant contract or network changes, and do not assume that a previous successful transfer or rental means the next call has enough energy.
When the error is not really about energy
Read the actual error and transaction receipt. A bandwidth shortage concerns a different resource, so adding energy will not resolve it. Validation errors and contract reverts can have other causes as well; address the reported failure rather than assuming that every unsuccessful transfer needs more energy.
Frequently asked questions
Will a failed transaction's TRX fee be refunded?
TRX actually charged as a network fee is generally not refunded merely because the transaction's state changes were reverted. Check the receipt and fee breakdown to distinguish a network charge from other balance changes before retrying.
How much energy should I arrange?
There is no reliable fixed amount for every transfer. The requirement depends on the contract call and current state, including the recipient's state. Estimate the intended transaction, allow reasonable headroom, and check the sender's available energy just before submission. A rental quote can be shown only when live market offers can fill the request; it indicates a price, while the transaction outcome still depends on the transaction itself.
I rented energy and it still failed. Why?
First confirm that the energy was delegated to the address sending the transaction, not to the token recipient. Then compare the sender's available energy with a fresh estimate and inspect the receipt and actual error. Correct delegation addresses only an energy shortfall; it does not resolve a validation error, bandwidth shortage, or contract revert with another cause.
Does OUT_OF_ENERGY apply to plain TRX transfers?
A plain TRX transfer does not execute a token contract and normally uses bandwidth rather than smart-contract energy. It may still fail for other reasons, so inspect the error returned for that transaction.