← All articles

The Resource-Delegation Trail

Key takeaways

  • A resource delegation lends Bandwidth or Energy from one address to another, and no TRX changes hands. The staked balance stays with the delegator the entire time.
  • Because nothing of value moves, a trace that follows transfers is blind to it. An account's Stake 2.0 delegation appears as a DelegateResourceContract transaction, and its reversal as an UnDelegateResourceContract. A delegation made by a smart contract appears as an internal transaction of the call that made it.
  • Those two contracts bracket the relationship in time: a grant, an optional lock period during which the delegator cannot pull it back, and a reclaim. The fields name the delegator, the receiver, the resource, and the amount.
  • A recurring delegation, where one address keeps another's operations funded top-up after top-up, is a real, ongoing economic tie that a value-only view never surfaces.

Most funding relationships on-chain are visible because value moves. A sends B some TRX, and the transfer is in B’s history. Resource delegation is the exception. One address can pay for another’s transactions indefinitely this way, and it leaves no transfer behind, because no transfer happens.

That makes delegation the quietest funding relationship TRON has, and one of the more useful once you know where it hides. This article is about the trail itself: what a delegation transaction is, what its reversal looks like, and how to read a sequence of them. The economics of why staking and delegation work this way is the subject of Stake 2.0. The subject here is narrower. It covers the transactions the relationship leaves behind.

A delegation moves no TRX

When an address delegates a resource, its staked TRX does not move. The delegator keeps the balance. What shifts is only the right to consume the Bandwidth or Energy that balance produces. The receiver transacts as though it had staked that TRX itself, and the underlying TRX stays where it was. The delegated share leaves the delegator’s own allowance for as long as the delegation stands. What the receiver consumes is booked to the receiver. On reclaim, a proportional share of that usage moves to the delegator and recovers over time.

A trace that follows TRX transfers and token movements passes over a delegation, because there is no value edge to follow. Two addresses can be in a months-long funding relationship, one carrying the other’s entire transaction cost, with nothing in either account’s transfer history to show it. The relationship is real, but the chain records it in a different place.

That place is the transaction type. When an account delegates, the delegation is a DelegateResourceContract, and undoing it is an UnDelegateResourceContract. Neither is a transfer, and neither shows up if those types are filtered out of a view.

A smart contract can delegate too, and it leaves a different record. Stake 2.0 added DELEGATERESOURCE and UNDELEGATERESOURCE opcodes to the TVM. A delegation made through them is recorded as an internal transaction of the contract call, noted delegateResourceOfEnergy or delegateResourceOfBandwidth, and no DelegateResourceContract exists for it. The internal transaction’s value field carries the delegated amount in sun, although no TRX moves. On 17 November 2026, a call to JustLend’s Energy-rental contract in block 88,083,940 included such an internal transaction. In it, the sTRX contract delegated Energy to a regular account inside a TriggerSmartContract transaction. Delegations made under the older Stake 1.0 model were recorded in a third place, the receiver_address field of a FreezeBalanceContract.

The chain also holds the current state of every delegation. A node returns it directly, for example through wallet/getdelegatedresourcev2, without reading any transaction. That query returns what stands now. An investigator reads when it started and how it changed from the transactions.

The two contracts and their fields

The grant and its reversal are small, and an investigator can read what happened from their fields.

Delegator OWNER_ADDRESS · STAKED TRX STAYS the balance never leaves this account ENERGY / BANDWIDTH CROSSES OVER [ NO TRX TRANSFER ] no value edge exists — a value trace sees nothing Receiver RECEIVER_ADDRESS · BORROWED RESOURCE transacts as if it had staked that TRX itself KEY [ RECORDED AS: DelegateResourceContract — NOT A TRANSFER ]
The resource crosses to the receiver, and the TRX does not move. There is no value edge, only a contract.

DelegateResourceContract carries:

FieldWhat it names
owner_addressThe delegator — the address that staked the TRX and is lending its resource.
receiver_addressThe address receiving the resource.
resourceWhich resource: Bandwidth or Energy.
balanceThe amount of staked TRX (in sun) whose resource is being delegated.
lock / lock_periodWhether the delegation is time-locked, and for how many blocks. The lock is off unless the delegator sets it.

UnDelegateResourceContract is the mirror image. It has the same four fields (owner_address, receiver_address, resource, balance), and it reclaims the delegated resource back to the delegator. It has no lock fields, because it reverses a commitment and makes no new one.

Read together, the pair gives the arrangement: who lent, to whom, which resource, and how much. For a single grant that is reclaimed in full, the two timestamps add how long it lasted.

The lifecycle: delegate, lock, reclaim

A delegation has a shape in time.

The DelegateResourceContract opens it. The lock is optional. Without it, the delegator can cancel at any time. If the delegator sets lock, the delegation cannot be reclaimed until lock_period blocks have passed. TIP-542 added the parameter so the two parties can write a fixed resource-lease term into the chain. Set lock with lock_period left at zero and it falls back to the default of 86,400 blocks, about three days. Set it higher and the lock runs longer, up to a governance-set maximum that stood at 864,000 blocks, about 30 days, on 17 November 2026. A delegation made by a contract through the TVM cannot be locked. Until the lock clears, the receiver keeps the resource and the delegator cannot pull it back.

TIME ↓ [ FIRST TIMESTAMP ] [ +86,400 BLOCKS ] [ SECOND TIMESTAMP ] DelegateResourceContract GRANT · OWNER → RECEIVER · LOCK SET KEY Lock period, if set DEFAULT 86,400 BLOCKS · ~3 DAYS until it clears, the delegator cannot pull the resource back UnDelegateResourceContract RECLAIM · RESOURCE RETURNS no lock fields — the reversal, not a new commitment One grant, fully reclaimed: the gap is its lifetime
Grant, lock when the delegator sets one, and reclaim. The two contracts are the start and end of a dated relationship.

The UnDelegateResourceContract reverses all or part of it. When it lands, the reclaimed amount returns to the delegator’s allowance and the receiver loses that amount. For one grant reclaimed in full, the gap between the two transactions is the lifetime of that grant. An investigator can read it off the block timestamps without any off-chain information. Repeated grants complicate the reading. The node merges grants from one delegator to one receiver into a single record, kept separately for locked and unlocked amounts, and a reclaim can take back part of the amount. With several grants or a partial reclaim, the dates still bound the relationship, but a reclaim no longer closes one particular grant.

Reading the trail

The delegation transactions let someone following an address answer a question transfers cannot.

A recurring delegator is paying to keep the address running. One DelegateResourceContract is a favor. A pattern of them is a standing arrangement in which the same delegator tops the same receiver up again and again. The protocol asks for no renewal, since a delegation lasts until the delegator cancels it, so the repetition is a choice. It is evidence of a relationship, and it gives the delegator no key to the receiver. Someone is absorbing the ongoing cost of keeping that address operational, and an investigator can see it in the trail even though no money moved.

The reclaim is a signal too. An UnDelegateResourceContract ends the relationship only when it takes back everything the delegator still has delegated to that receiver. A partial reclaim shrinks the delegation and leaves it standing. When a delegator abruptly reclaims a delegation that has run for months, the reclaim marks a change, such as the funder stepping back or an arrangement being dissolved. The change is dated to the block the reclaim lands in.

The fields scope the tie. From resource and balance, an investigator can read what the delegator was covering and how much. A small Bandwidth delegation keeps an address able to send simple transfers. A large Energy delegation underwrites heavy contract activity. The size and type of the lend indicate the kind of operation the receiver runs.

None of this is visible to a view built around value. A delegation is a relationship without a payment. The trace it leaves is the pair of contracts that granted and reclaimed it, or the internal transactions of a contract that delegates. For an address that seems to transact for free, the first question to ask is who is delegating to it.

Sources

  • balance_contract.proto — tronprotocol/protocol — the DelegateResourceContract (owner_address, receiver_address, resource, balance, lock, lock_period) and UnDelegateResourceContract (owner_address, receiver_address, resource, balance) message definitions.
  • TIP-467: Stake 2.0 - A new TRON staking model — the Stake 2.0 model that separates staking from delegation, the DELEGATERESOURCE (0xde) and UNDELEGATERESOURCE (0xdf) TVM opcodes, reclaims “supporting partial cancellation by amount”, and the worked example in which the receiver’s usage returns to the delegator “in recovering”.
  • TIP-542: Resource delegating supports customizable lock period — the lock_period parameter (in blocks) and the 86,400-block (~3-day) default lock.
  • TRON Developer Hub. “Delegating resources” — primary; the lock is false by default, when the delegation can be canceled by the delegator at any time, and “After the lock expires, the delegation remains effective until the delegator explicitly revokes it.” The maximum lock period is governed by chain parameter #78, getMaxDelegateLockPeriod.
  • TRON Developer Hub. “Stake 2.0 Solidity SDK reference” — primary; a delegation made from a contract “has no lock parameters and creates an unlocked delegation.”
  • tronprotocol/java-tron — Program.java at GreatVoyage-v4.8.2.4 — a delegation made by the TVM opcode is added as an internal transaction noted delegateResourceOf plus the resource name, and its reversal as unDelegateResourceOf. DelegateResourceActuator.java and UnDelegateResourceActuator.java at the same commit hold the grant and reclaim bookkeeping: the delegated share leaves the delegator’s balance for that resource, grants to one receiver merge into one record per lock state, and a share of the receiver’s usage moves to the delegator on reclaim. A reclaim subtracts its amount from the unlocked record, and the actuator deletes that record only when its Bandwidth and Energy amounts are both zero. It removes the pair from the account index only when no locked record is left either.
  • TronGrid — wallet/gettransactioninfobyid — read 17 November 2026 for transaction e933c362a6f1c615bfacff408d6726d4dfa8cbd7f937024d59a7220b70fc1a35 in block 88,083,940: a TriggerSmartContract call to JustLend’s rental contract whose internal transactions include a delegateResourceOfEnergy from the sTRX contract TU3kjFuhtEo42tsCBtfYUAZxoqQ4yuSLQ5 to TX18hYSautWL4PQ25ZYv8ekKo7MLtkZY88. The same day, wallet/getdelegatedresourcev2 returned that delegation from chain state, and wallet/getchainparameters gave getMaxDelegateLockPeriod as 864,000.
  • smart_contract.proto — tronprotocol/protocol — the protocol definition of TriggerSmartContract, the transaction type that carries a delegation a contract makes.