← All articles

Contract Accounts vs. Externally Owned Accounts

Key takeaways

  • TRON has two kinds of account. An externally owned account (EOA) is controlled by whoever holds its private key, and a contract account is controlled through its deployed code.
  • A directly deployed contract's address is computed from the deploy transaction's ID and the deployer's address. No key goes into it, and no one holds a private key for it.
  • Both kinds carry the same 0x41 / "T" prefix, so an investigator cannot tell them apart by the address string. The account's type field, wallet/getcontract, and the ISCONTRACT opcode show whether an address is a contract.
  • A contract cannot sign for another account. An investigator can rule it out as the party signing for a wallet, however often it appears in that wallet's history.

TRON’s Developer Hub describes two account types. An externally owned account, or EOA, is controlled by a private key. A contract account is deployed bytecode, “controlled entirely by its code and access rules.” The node marks each contract account with the Contract type. An address that nobody has used yet has no account at all.

The two look the same. Both are 21-byte addresses with the 0x41 prefix, both appear as a Base58 string that starts with “T”, and both hold balances and have a transaction history. The node records which accounts are contracts, but the address string does not show it.

An investigator can settle one attribution question early. The Developer Hub says “No one holds the private key for a contract account.” A contract therefore cannot sign for a wallet, and a check of the account type rules it out as that wallet’s signer.

A key on one side, code on the other

An EOA is operated by signature. The Developer Hub says an account is “identified by an address and controlled by a private key.” The key pair is ECDSA over secp256k1, “the same elliptic curve as Bitcoin and Ethereum.” How a TRON Address Is Built covers the steps from that key to the “T” address. An account’s permissions decide which keys can sign and with what weight, and The TRON Account Model covers them.

A contract account exists because someone deployed code. The bytecode at its address is fixed. A proxy contract passes its calls to a separate implementation, and an upgrade can replace that implementation, so what a proxy does can change. Ethereum’s documentation draws the same line between an account “controlled by anyone with the private keys” and “a smart contract deployed to the network, controlled by code.”

How a contract account comes to exist

An account creates a contract account directly by deploying it. The account sends a CreateSmartContract transaction, which is contract type 30, and the transaction carries the contract’s compiled bytecode. The Fullnode API’s wallet/deploycontract endpoint builds the unsigned transaction and returns a precomputed contract_address with it. The address is usable only after the signed transaction succeeds.

The node then stores a SmartContract record with fields that include origin_address, contract_address, abi, bytecode, and code_hash. When code_hash is set, it is the Keccak-256 hash of the code the node stores at the address, which is the code wallet/getcontractinfo returns. For a contract deployed after TRON’s Constantinople switch was on, that is the runtime code, without the constructor. It is not a hash of the creation bytecode in the same record. A contract deployed before the switch can have an empty code_hash until the virtual machine first asks for it. The record keeps the sending account in origin_address, because the node rejects a deploy whose owner_address differs from it. Smart Contracts and the TVM covers how the code then runs.

A contract can also create another contract inside the TVM, through CREATE or CREATE2. In java-tron v4.8.2.4, the new contract’s origin_address is set to the creating contract, and the new account is named CreatedByContract. USDD is an example. On 17 November 2026, TronGrid showed that USDD, at TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz, had as its origin_address a contract named UsddFab, at THuAY3Dqaf5EMdUPcQtmFew85ZSTEENAYk. The origin_address of UsddFab was an account of the ordinary Normal type.

Where a contract address comes from

A wallet address is normally derived from a key pair. Wallet software hashes the public key with Keccak-256, keeps the last 20 bytes, and adds the 0x41 prefix. By default the account’s permissions list that address as the only key, so the holder of the matching private key can sign for the account. An account’s permissions can be changed to list other keys.

A contract address is not derived from a public key. For a direct deploy, java-tron computes it as sha3omit12(txRawDataHash ‖ ownerAddress). That is the deploy transaction’s ID followed by the deployer’s address, hashed with Keccak-256, cut to the last 20 bytes, and given the 0x41 prefix. The Developer Hub describes the same thing in prose: the network “returns a contract account address derived from the deployment transaction’s ID and the deployer’s address.”

Every input to that function is public, and no key material enters it. The address identifies code, and no one holds a key that signs for it.

An address is not proof that a key exists, even for an account of the Normal type. A TRX transfer to a validly formed address that has no account creates a Normal account there, and the node does not check that a key pair produced it. On 17 November 2026, TronGrid showed a Normal account holding about 773,802 TRX at the address whose 20 bytes are all zero.

[ TWO DERIVATIONS · ONE ADDRESS SHAPE ] KEY-PAIR ADDRESS DEPLOYED CONTRACT Private key ECDSA · SECP256K1 [ DERIVE ] Public key SAME SCHEME AS ETHEREUM [ HASH ] Keccak-256 HASH OF THE PUBLIC KEY [ KEEP LAST 20 BYTES ] [ PREFIX 0x41 ] T-address 0x41-PREFIXED ADDRESS [ FROM A KEY PAIR ] Can sign KEY-HOLDER, BY DEFAULT No key input NO KEY PAIR IS USED deploy-tx hash ‖ deployer address EVERY INPUT IS PUBLIC [ HASH ] sha3omit12(txHash ‖ deployerAddr) KECCAK-256 · LAST 20 BYTES [ PREFIX 0x41 ] T-address 0x41-PREFIXED ADDRESS [ SAME 0x41 / T ] STRING DOES NOT TELL THEM APART [ NO KEY-HOLDER ] Cannot sign NO ONE HOLDS A KEY FOR IT KEY [ NO KEY MATERIAL ENTERS THE CONTRACT FORMULA · NO ONE HOLDS A KEY FOR IT ]
The two derivations produce the same address shape, but only the key-pair address comes from a key.

A contract created by another contract gets its address from a different formula. Through the TVM’s CREATE opcode, the new address is sha3omit12(rootTransactionId ‖ nonce). The nonce is a counter kept for the root transaction that increases with each internal action, and it is not Ethereum’s per-sender nonce. CREATE2 uses a third formula, built from the creating contract’s address, a salt, and the hash of the new code. Ethereum computes a CREATE address from an RLP encoding of the sender and its nonce, and its CREATE2 formula starts with the byte 0xff where TRON’s starts with 0x41. An address predicted with either Ethereum formula is wrong on TRON.

Telling them apart on-chain

The account’s type field is the direct check. The protocol’s Account message has an AccountType enum with the values Normal (0), AssetIssue (1), and Contract (2). Over the HTTP API, wallet/getaccount shows a contract with "type": "Contract" and leaves the field out for a Normal account. AssetIssue is a type that java-tron gives to witness accounts created at genesis. An investigator can see from a Normal type that the account is not a contract, and cannot see from it that anyone holds a key for the account.

A wallet/getcontract query returns the SmartContract record for a contract address. The record includes origin_address, documented as the “Address of the contract creator.” For a directly deployed contract it can also hold the bytecode, the ABI, a name, and code_hash, and some of those fields can be missing. On 17 November 2026 the record for TronBet, a contract deployed directly in October 2018, had no code_hash. A record for a contract created by another contract can lack bytecode, ABI, and name.

An empty reply from wallet/getcontract means only that the address has no contract record. The API reference says that ordinary accounts, missing addresses, and some invalid addresses can also return {}, “so an empty object does not establish address validity.” Pair it with wallet/getaccount, which also returns {} when the address has no account.

Contracts need the same fact while they run, so the TVM has a TRON-specific opcode, ISCONTRACT (0xD4), which pushes “true if address is a contract.”

[ ONE ADDRESS · THREE WAYS TO ASK THE CHAIN ] T-address WHICH KIND OF ACCOUNT? TYPE FIELD Account.type = Contract (2) AccountType enum Normal 0 · AssetIssue 1 Contract 2 RPC QUERY wallet/getcontract → SmartContract record creator, plus code if stored origin_address = creator {} = no contract record TVM OPCODE ISCONTRACT opcode 0xD4 TVM instruction tests whether an address is a contract — at execution [ ANSWER: CONTRACT ] Disqualified as signer CODE, NOT A KEY-HOLDER — CANNOT SIGN FOR A WALLET KEY [ FOLLOW ORIGIN_ADDRESS TO THE CREATOR, A WALLET OR CONTRACT ]
The three checks, and what follows for attribution when the answer is a contract.

The origin_address field records the account that created the contract. No protocol message rewrites it after creation. An investigator learns from it who put the code there, which is a separate question from who controls the contract. The creator may be a wallet or another contract, so the type check applies to it as well. When the creator is a contract, its own origin_address leads one step further back. In the USDD read, that second step reached a Normal account.

The attribution consequence

A transaction’s signature has to come from a key in the sending account’s permissions. No one holds a private key for a contract account, so a contract cannot sign. It cannot start a transaction, and it cannot sign for another account.

A contract can still hold a role in another contract, because contract code can name any address as its owner or admin. On 17 November 2026, TronGrid showed USDT’s owner() returning a MultiSigWallet contract that requires 2 of its 3 owners to confirm. A contract runs only when a transaction calls it, and an EOA signed that transaction.

A contract account has no key-holder, so it cannot sign for a wallet.

An investigator can apply this directly. When a wallet’s most frequent counterparty resolves to a deployed contract, that contract is not the wallet’s controller. A token contract or a router that accounts for most of a wallet’s transactions is infrastructure the wallet used. The next step is the contract’s origin_address, and reaching a wallet from it can take more than one read.

Run the type check early. When a candidate address turns out to be a contract, move the inquiry to the account that created it and to the wallets that call it.

Sources

  • Accounts and keys — TRON Developer Hub: the two account types, the private key that controls an account, “No one holds the private key for a contract account,” the secp256k1 key pair, the key-to-address steps, and the contract address as a function of the deploy transaction ID and the deployer’s address.
  • Smart contract deployment and invocation via HTTP API — TRON Developer Hub: CreateSmartContract built through wallet/deploycontract, the compiled bytecode the deploy carries, and the precomputed contract_address that becomes usable after the signed transaction succeeds.
  • GetContract — TRON Developer Hub API reference: the contract record a contract address resolves to, with origin_address as the “Address of the contract creator,” and the statement that ordinary accounts, missing addresses, and some invalid addresses can also return {}.
  • protocol/core/Tron.proto at master · tronprotocol/protocol · GitHub — the AccountType enum (Normal 0, AssetIssue 1, Contract 2) and the ContractType enum (CreateSmartContract 30).
  • smart_contract.proto — tronprotocol/protocol — the protocol definition of CreateSmartContract (owner_address, new_contract, call_token_value, token_id) and SmartContract (origin_address, contract_address, abi, bytecode, call_value, consume_user_resource_percent, name, origin_energy_limit, code_hash, trx_hash, version). None of the update messages in the file carries an origin_address field.
  • tronprotocol/java-tron — WalletUtil.java at GreatVoyage-v4.8.2.4 — node source at the GreatVoyage-v4.8.2.4 release: generateContractAddress for a direct deploy, sha3omit12(txRawDataHash ‖ ownerAddress), and generateContractAddress2 for CREATE2, built from the creating address, the salt, and the hash of the code.
  • tronprotocol/java-tron — TransactionUtil.java at GreatVoyage-v4.8.2.4 — node source: the same direct-deploy formula, and sha3omit12(rootTransactionId ‖ nonce) for contracts created through CREATE.
  • tronprotocol/java-tron — Hash.java at GreatVoyage-v4.8.2.4 — node source: computeAddress, which derives an address from a public key, and sha3omit12, the function both derivations use.
  • tronprotocol/java-tron — TransferActuator.java at GreatVoyage-v4.8.2.4 — node source: a TRX transfer to an address with no account creates a Normal account after checking only that the address is validly formed.
  • tronprotocol/java-tron — TransactionCapsule.java at GreatVoyage-v4.8.2.4 — node source: each signature must recover to an address that is a key in the sending account’s permission.
  • Smart contracts - java-tron — java-tron documentation: the CREATE address derivation and its nonce, a counter kept for the root transaction.
  • Opcodes — TRON Developer Hub: ISCONTRACT (0xD4), which pushes “true if address is a contract”, and TRON’s CREATE2 formula.
  • Ethereum accounts | ethereum.org — the same split between an externally owned account and a contract account, cited for the concept, and a CREATE address that comes from the creator’s address and nonce.
  • EIP-1014: Skinny CREATE2 — Ethereum’s keccak256(rlp([sender, nonce])) formula for a CREATE address.
  • GetContractInfo — TRON Developer Hub API reference: the endpoint returns “not only the bytecode but also the runtime bytecode of the contract”, and the runtime bytecode leaves out the constructor.
  • Upgrading smart contracts — TRON Developer Hub: the bytecode at a deployed contract’s address cannot be changed, and a proxy delegates calls to an implementation that an upgrade transaction can replace.
  • tronprotocol/java-tron — RepositoryImpl.java at GreatVoyage-v4.8.2.4 — node source: saving a contract’s code sets code_hash to the Keccak-256 hash of that saved code while the Constantinople switch is on.
  • tronprotocol/java-tron — VMActuator.java at GreatVoyage-v4.8.2.4 — node source: a deploy is rejected unless its owner_address equals the new contract’s origin_address, and, while the Constantinople switch is on, the code saved for a deploy is the code its constructor returned.
  • tronprotocol/java-tron — Program.java at GreatVoyage-v4.8.2.4 — node source: contract creation through CREATE and CREATE2, the origin_address set to the creating contract, the CreatedByContract account name, the later fill of an empty code_hash from the stored code, and the ISCONTRACT check for a contract record.
  • tronprotocol/java-tron — Manager.java at GreatVoyage-v4.8.2.4 — node source: genesis witness accounts are created with the AssetIssue account type.
  • TronGrid API: wallet/getcontract — read on 17 November 2026 for the stored records of USDD and its origin UsddFab, for the record of TronBet at TEEXEWrkMFKapSMJ6mErg39ELFKDqEs6w3, which had no code_hash, for the name of the contract that USDT’s owner() returns, and for the empty {} returned for Normal accounts and for an address with no account.
  • TronGrid API: v1/accounts/TEEXEWrkMFKapSMJ6mErg39ELFKDqEs6w3/transactions — read on 26 November 2026 for TronBet’s first transaction. It is the CreateSmartContract transaction 8fc0abf976e05dcd3d3faa2ab9ccf5d0184034ee40706f4951b1a108f6203a4b, in block 3,448,337, at 12:09:39 UTC on 23 October 2018. An ordinary account, TQ3Cy1rxoqRvkvYvbYD3mE3wbjzRCcSSTN, signed it, so no other contract created TronBet.
  • TronGrid API: wallet/getaccount — read on 17 November 2026 for the account type of the UsddFab origin, for the "type": "Contract" field on contract accounts and its absence on Normal accounts, and for the Normal account at T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb, the all-zero address, with a balance of 773,802,002,708 sun, and for the empty {} returned for an address with no account.
  • TronGrid API: wallet/triggerconstantcontract — read on 17 November 2026 for USDT’s owner(), and for the owner contract’s required() and getOwners() results. owner() returned TBPxhVAsuzoFnKyXtc1o2UySEydPHgATto, the contract that wallet/getcontract names MultiSigWallet. required() returned 2, and getOwners() returned three addresses. A second read on 26 November 2026 returned the same values.
  • GitHub API: git ref tags/GreatVoyage-v4.8.2.4 — read on 17 November 2026: the v4.8.2.4 release tag points at commit 4e8389f159d0782f1ebcd9dab2fd88388c0e6fe9, the commit the pinned java-tron entries read.