Who Can Upgrade an ERC-3643 Token's Code?
An ERC-3643 Implementation Authority is the contract that tells each proxy in a T-REX token suite which code to run. In the reference implementation, the owner of that authority can move all six contracts of every suite attached to it to a new version with one useTREXVersion call. Upgrade governance therefore depends on which authority your proxies point at and who owns it, not only on who holds the agent role.
TL;DR — Key Takeaways
- ✓The pointer: Each of the six T-REX proxies stores one address, its Implementation Authority, and asks it for the current code on every call. Change what the authority returns and the token changes.
- ✓The key: useTREXVersion is onlyOwner. Whoever owns the authority your proxies point at decides which version your token runs, including a shared reference authority you do not control.
- ✓The exit: changeImplementationAuthority moves a suite to its own authority, but only if the caller owns all six contracts and the new authority is on the same version.
- ✓The limit: Only the reference authority can add versions. A token-specific authority controls timing and can decline an upgrade; it cannot install code the reference never published.
- ✓The blind spot: T-REX uses its own storage slot and events, not the EIP-1967 ones. Monitors built for EIP-1967 proxies may not see a T-REX version change.

How does a T-REX proxy decide which code to run?
A T-REX proxy holds no code address. It stores the address of an Implementation Authority in slot 0x821f3e4d…2aafc and, on every call, asks that authority for the current implementation before running it with delegatecall.
A T-REX (Token for Regulated EXchanges) suite is six contracts, each behind its own proxy: the token, the identity registry, the identity registry storage, the modular compliance contract, the claim topics registry and the trusted issuers registry. In TokenProxy.sol on the main branch, the fallback function reads the authority address, calls getTokenImplementation() on it, and delegates the call to whatever address comes back. The other five proxies follow the same pattern with their own getters.
The consequence is that the token's logic is not fixed at deployment and is not fixed per token. It is whatever the authority returns at the moment of the call. The ERC-3643 documentation describes the design as a way to upgrade the protocol “without redeploying all the smart contracts, thus preserving their state and addresses.” Holders keep the same token address while the code behind it changes.
None of this is in the standard itself. The Final ERC-3643 specification does not mention proxies, upgrades or an Implementation Authority; the mechanism belongs to the T-REX reference implementation. Our guide to RWA token standards covers where ERC-3643 sits among the alternatives. This article covers only who can replace its code.
“store the implementationAuthority contract address using the ERC-3643 implementation slot in storage; the slot storage is the result of keccak256(“ERC-3643.proxy.beacon”)”
AbstractProxy.sol, ERC-3643 reference implementation (main branch), developer comment
What can the owner of an Implementation Authority change?
The owner selects the current version with useTREXVersion, and every proxy pointing at that authority runs the new code from the next call. On the reference authority, the owner can also register new versions with addTREXVersion.
Versions are keyed by three uint8 numbers, major, minor and patch, and each version maps to six implementation addresses. The functions in TREXImplementationAuthority.sol on the main branch break down as follows:
| Function | Who can call | What it does |
|---|---|---|
addTREXVersion | Owner, and only on the reference authority | Registers a new version; all six addresses must be non-zero and the version must not exist yet |
useTREXVersion | Owner | Sets the current version; reverts if the version is already in use or does not exist in this authority |
addAndUseTREXVersion | Owner (both inner calls are owner-gated) | Registers and activates a version in one transaction |
fetchVersion | No owner check in the code; reverts on the reference authority | Copies a version from the reference into an auxiliary authority; does not activate it |
changeImplementationAuthority | Owner of all six suite contracts | Points a token's proxies at a different authority |
setTREXFactory, setIAFactory | Owner, reference authority only | Changes the factory addresses the authority trusts |
The table shows the governance point. A version switch is one owner-signed transaction with no delay, vote or holder notice in the contract. If the owner key sits behind a multisig or a timelock, that protection comes from how the key is held, not from the T-REX code. The file was last changed on the main branch in commit debd471 on June 5, 2023; the latest releases listed in the repository are 4.1.3 and 4.2.0-beta1, both published June 12, 2025.
What is the difference between the reference authority and a token-specific one?
The reference authority is the one the TREXFactory returns from getImplementationAuthority, and it is the only one that can add versions. An auxiliary, token-specific authority can only copy versions from the reference and choose among them.
Each authority is deployed with a referenceStatus flag. In the code, getReferenceContract() asks the TREXFactory which authority it uses; there is no separate registry. deployTREXSuite in TREXFactory.sol deploys every new proxy with the factory's own authority address. A suite deployed through the factory therefore starts attached to the reference authority, alongside every other suite the factory has deployed and not moved.
That is the shared-upgrade case. While a token's proxies point at the reference authority, the owner of that authority decides when the token changes version, for every attached token at once. The issuer owns the token contract but does not own the switch.
Moving to a token-specific authority changes who holds the switch, but not who writes the code. Because addTREXVersion reverts outside the reference authority, an issuer on its own authority can run only versions the reference has published. What the issuer gains is the right to decide when to move and the right not to move.
| Question | Proxies on the reference authority | Proxies on a token-specific authority |
|---|---|---|
| Who can change the running version? | Owner of the reference authority | Owner of the token-specific authority |
| Who can add new code versions? | Owner of the reference authority | Nobody locally; versions come from the reference via fetchVersion |
| Can the issuer decline an upgrade? | No, unless it moves to its own authority first | Yes, by not calling useTREXVersion |
| Do other tokens move at the same time? | Yes, every suite still pointing at it | Only suites pointing at that authority |
How does an issuer move its token to its own authority?
By calling changeImplementationAuthority on the authority the token currently uses. The call reverts unless the caller owns all six suite contracts, and the new authority must run the same version as the old one.
The code checks ownership of the token, identity registry, modular compliance, identity registry storage, claim topics registry and trusted issuers registry, and reverts with “caller NOT owner of all contracts impacted” if any one fails. It then follows one of two paths:
- New authority, deployed for you: pass the zero address to the reference authority. The IA factory deploys an auxiliary authority, fetches and activates the reference's current version, and transfers ownership of the new authority to the token owner. Only the reference authority can take this path.
- Existing authority: pass its address. It must report the same current version, must not claim reference status unless it is the reference, and must be either deployed by the IA factory or the reference itself. Anything else reverts with “invalid IA”.
The old authority then calls setImplementationAuthority on each proxy. A proxy accepts that call only from its current authority, and only if the new authority returns non-zero addresses for all six implementations. Identity registry storage is treated differently because several tokens can share one: it is switched only if it still points at the calling authority.
One ownership detail deserves a check before any switch is planned. In the main-branch TREXFactory.sol, deployTREXSuite transfers ownership of five contracts to the token owner: the token, identity registry, trusted issuers registry, claim topics registry and modular compliance. We found no ownership transfer for a newly deployed identity registry storage in that function. Since changeImplementationAuthority checks that owner too, confirm on-chain who owns your identity registry storage. The factory owner can reassign ownership of a suite contract with recoverContractOwnership.
“calling this function requires ownership of ALL contracts of the T-REX suite”
TREXImplementationAuthority.sol, changeImplementationAuthority, ERC-3643 reference implementation (main branch)
Why might a proxy scanner miss the T-REX upgrade path?
EIP-1967 standardizes three proxy storage slots and three events. T-REX proxies use none of them: they store the authority in the 0x821f3e4d…2aafc slot and emit their own events, so a tool that checks only EIP-1967 may see nothing.
EIP-1967, a Final standard, places the logic contract at 0x360894a1…382bbc, the beacon at 0xa3f0ad74…133d50 and the admin at 0xb5312768…5d6103. Changes to each are signalled by Upgraded, BeaconUpgraded and AdminChanged. The T-REX Implementation Authority plays the role EIP-1967 calls a beacon, and the slot name in the source, “ERC-3643.proxy.beacon”, says as much. But it uses a different slot, a different getter interface (six named getters instead of one implementation()) and different events.
This is our inference from the code, not a tested result for any specific product: a block explorer, custody screen or monitoring rule that reads only the EIP-1967 slots could classify a T-REX token as non-upgradeable. Test any tool against a known T-REX deployment before relying on it, and read slot 0x821f3e4d…2aafc or call getImplementationAuthority() on each proxy directly.
“Beacons are used for keeping the logic address for multiple proxies in a single location, allowing the upgrade of multiple proxies by modifying a single storage slot.”
EIP-1967: Proxy Storage Slots (Final)
Which events should an issuer or auditor monitor?
Five events in the T-REX authority and proxy contracts track version and pointer changes. VersionUpdated is the one that means the running code has changed.
| Event | Emitted by | What it signals |
|---|---|---|
TREXVersionAdded | Reference authority | A new version is available; nothing has switched yet |
TREXVersionFetched | Auxiliary authority | A reference version was copied in and can now be activated |
VersionUpdated | Any authority | The current version changed; attached proxies now run new code |
ImplementationAuthorityChanged | The authority the token is leaving | A token moved to a different authority |
ImplementationAuthoritySet | Each proxy | That proxy now points at a new authority |
Two practical notes. First, the authority contract also declares an ImplementationAuthoritySet event with a different signature (a reference flag and a factory address), emitted once by its constructor; filter by contract and signature, not by name. Second, the version in VersionUpdated and TREXVersionAdded is an indexed struct, so confirm the number by calling getCurrentVersion() after the event. The authority inherits OpenZeppelin's Ownable, so watch its ownership transfers too: a new owner is a new holder of the upgrade switch.
How is upgrade authority different from agent-key risk?
Agent keys act inside the current code: they mint, burn, freeze and force transfers. The Implementation Authority owner replaces the code itself, which can change what every agent function does.
Boards and auditors tend to review the agent list because it is visible on the token contract. The authority pointer sits one level below it, in a storage slot on each proxy, and its owner is a different key on a different contract. Our analysis of ERC-3643 agent-key governance covers the first layer. A complete review covers both, because limits on agent keys only hold while the code that enforces them stays the same.
The same logic applies one layer further down. A protocol-level compliance design, of the kind described in our guide to smart contract compliance on a Layer-0, moves rules out of each token's code. It still has an upgrade path, and the same questions apply to it.
What should an issuer's upgrade governance review cover?
Six questions, each answerable from chain data or the offering documents. They apply to any platform, Blockmaze included: which upgrade key exists, who holds it, and how holders hear about a change.
| Question | How to answer it |
|---|---|
| Which authority do all six proxies point at? | Call getImplementationAuthority() on each proxy; they should agree, with shared identity registry storage as the known exception |
| Is it the reference or token-specific? | Call isReferenceContract() on the authority |
| Who owns it? | Call owner(); identify the entity and whether it is a multisig, a timelock or a single key |
| Which version is running? | Call getCurrentVersion() and match the six addresses from getContracts to audited code |
| Can the issuer exit to its own authority? | Confirm the issuer owns all six suite contracts, including identity registry storage |
| What do the offering documents say? | Check whether they disclose who can change the code and whether holders get notice before a version change |
The review matters most for issuers whose tokens were deployed through a shared factory and never moved, and for transfer agents and custodians who report on tokens they did not deploy. It matters less where the issuer already runs its own authority behind a disclosed multisig, though the version question still applies. Which live deployments use the reference authority is deployment-specific; this article names none. The legal terms of a security can stay fixed for years while its code can change in one transaction, so the gap between the two is worth closing in writing.
Sources: TREXImplementationAuthority.sol, ITREXImplementationAuthority.sol, IAFactory.sol, AbstractProxy.sol, TokenProxy.sol and TREXFactory.sol, ERC-3643 reference implementation, main branch; ERC-3643 repository releases; ERC-3643 documentation, Proxies; Tokeny documentation, T-REX implementation contracts; EIP-1967: Proxy Storage Slots; ERC-3643 specification. Sources checked November 3, 2026. The statement that a version switch affects every attached suite follows from reading the proxy fallback code; the point about EIP-1967 scanners is our inference and has not been tested against any named tool; the governance review questions are editorial recommendations. Not legal advice.
Frequently Asked Questions
Does the ERC-3643 standard require tokens to be upgradeable?
No. The Final ERC-3643 specification on eips.ethereum.org does not mention proxies, upgrades or an Implementation Authority. Upgradeability comes from the T-REX reference implementation maintained in the ERC-3643 GitHub repository, where each contract in the suite is deployed behind a proxy. A conforming token could be deployed without proxies, so the upgrade path has to be checked deployment by deployment.
Can a token-specific Implementation Authority install custom code?
Not in the reference code. addTREXVersion reverts unless the contract is the reference authority, so an auxiliary authority can only copy versions the reference has already added, through fetchVersion, and then select one with useTREXVersion. Owning your own authority gives you control over when your token changes version, and the ability to stay put, but not the ability to write new versions into it.
What does changeImplementationAuthority require from the caller?
The caller must own all six contracts of the suite: the token, identity registry, modular compliance, identity registry storage, claim topics registry and trusted issuers registry. The new authority must run the same version as the current one and must either be the reference or have been deployed by the IA factory. Passing the zero address to the reference authority deploys a new authority owned by the token owner.
Will a standard proxy scanner show that a T-REX token can be upgraded?
Not necessarily. The T-REX proxy contracts store the Implementation Authority address in their own slot, 0x821f3e4d...2aafc, and emit their own events. EIP-1967 defines different slots for the implementation, beacon and admin, with Upgraded, BeaconUpgraded and AdminChanged events. A tool that reads only EIP-1967 slots may report nothing for a T-REX token, so test the tool against a known deployment.
Which event shows that a T-REX token's logic has changed?
VersionUpdated, emitted by the Implementation Authority when useTREXVersion sets a new current version. Every proxy that points at that authority runs the new code from the next call. A change of authority shows up as ImplementationAuthorityChanged on the old authority and ImplementationAuthoritySet on each proxy. Because the version is an indexed struct in the event, read getCurrentVersion after the event to confirm the number.
Related Articles
On-Chain Governance Models for Compliant Real-World Asset Protocols: A Layer-0 Perspective
Generic blockchain governance cannot satisfy the accountability, audit, and regulatory override requirements of compliant RWA protocols. This guide explains what purpose-built governance looks like and how to evaluate it.
Why Did 2026's Oracle Failures Involve No Exploit?
Oracle misconfiguration, not code exploits, drove two 2026 lending losses. Detection took minutes; the governance timelock took five days.