TRON permission and resource terms
Brief definitions. Detailed breakdowns with steps are in the guides.
TRC20 (TRC-20)
Contract token standard in the TRON network. USDT in TRON is issued as a TRC20 contract TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t. The token balance is stored in this contract, not in the wallet address itself.
The standard describes the transfer, approve, transferFrom, allowance, and balanceOf functions.
approve
A TRC20 contract function by which an address owner grants another address (spender) permission to spend their tokens. The approve call does not move tokens itself, but it creates the right to move them.
A new approve call for the same spender replaces the previous limit, rather than adding to it.
allowance
Current permission size: how many tokens a specific spender can still spend from a specific address. The value is read by the allowance(owner, spender) function. The typical finite limit is consumed upon spending; maximum values may be processed differently depending on the implementation.
A very large value (e.g., the maximum uint256 number) effectively means unlimited access.
spender
The address that received permission via approve. Usually, this is a smart contract for an exchange, swap service, or DApp, but it can also be a regular address. The right to spend tokens belongs to the spender, not the site through which the permission was granted.
transferFrom
A function by which the spender spends tokens from the owner's address within the allowance. The owner's signature is not needed for this: it was already given during approve. This is why forgotten unlimited permissions are dangerous.
revoke
Revoking permission: calling approve for the same spender with an amount of 0. This is a regular transaction, it is signed by the owner, and it consumes Energy and Bandwidth. Revoking does not return tokens already spent.
Energy
TRON network resource for executing smart contracts, including approve, revoke, and TRC20 transfers. Energy can be obtained by staking TRX or leasing; if it is insufficient, the missing part is paid by burning TRX.
Bandwidth
A resource consumed based on the transaction size in bytes. The account receives a small free daily volume; beyond that, Bandwidth is paid in TRX or through staking.
Owner and active permissions
TRON account management rights. Owner permission gives full control, including changing the rights themselves. Active permissions allow selected types of operations. Each right specifies a list of keys, their weights, and a signature threshold.
A foreign key can gain authority based on its weight, threshold, and allowed operations. This is a separate mechanism, not related to approve, and revoking allowance does not eliminate it.