Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

ERC-7760 proposes minimal proxies that can store fixed configuration data without using storage for that data, with additional variants that allow the current implementation address to be queried verifiably onchain.

This article explains the following proposal, with additional context and examples.

I also cover other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

ERC-7760 defines standardized minimal runtime bytecode for the ERC-1967 proxy patterns widely used in upgradeable contracts.

For more on ERC-1967, see the following article.

[ERC1967] How Contract Upgrades Work

The specification covers three proxy patterns:

  • Transparent proxy
  • UUPS (Universal Upgradeable Proxy Standard)
  • Beacon proxy

All three are upgradeable architectures that separate a logic contract (the implementation) from a proxy that holds the state. ERC-7760 defines a shared, minimal bytecode implementation for each pattern.

ERC-7760 proxies also support immutable arguments. These are values fixed at deployment and appended directly to the runtime bytecode. This allows a proxy to hold constant configuration data without allocating storage slots for it, potentially reducing gas costs and making the data efficient to retrieve.

The specification additionally defines variants that support onchain retrieval of:

  • The address of the current implementation contract.
  • Immutable arguments embedded in the proxy bytecode, which can also be read from the basic variants.

ERC-7760 brings together the following features.

Feature Description
Minimal bytecode Compact proxy implementations without unnecessary operations.
Three proxy patterns Transparent, UUPS, and Beacon.
Immutable arguments Fixed data stored at the end of the runtime bytecode.
Implementation queries Onchain retrieval of the implementation address through I-variants.
Ease of verification Standard bytecode that block explorers can recognize and verify automatically.

Motivation

The motivation for ERC-7760 is the wide variety of upgradeable proxy implementations, which makes verification, analysis, and optimization more difficult. The proposal aims to address these problems in several ways.

Automatic verification by block explorers

Different proxy implementations often have slightly different bytecode, so block explorers such as Etherscan may be unable to verify them automatically. ERC-7760 fixes the standardized executable bytecode layout so that matching proxies can be recognized and verified. Immutable arguments and embedded factory addresses must be accounted for when matching variants.

This enables:

  • Immediate identification of the proxy pattern.
  • Automated analysis of the implementation address.
  • Better interoperability between frontends and auditing tools.

Onchain retrieval of immutable arguments

Immutable arguments are placed at the end of the runtime bytecode. ERC-7760 standardizes their starting offsets for each variant, allowing contracts and external tools to locate and read them.

This offers several benefits:

  • Configuration data can be retained without storage slots.
  • Gas costs can be reduced.
  • Implementation code executing through the proxy can retrieve the arguments using an opcode such as EXTCODECOPY against the proxy address. CODECOPY alone reads the code currently being executed, not the proxy's bytecode in a delegatecall.
  • Tools can parse the arguments using the standardized bytecode layout.

Onchain verification of the implementation contract

Ordinary proxies differ in how their implementation addresses are obtained.

Pattern Location of the implementation
Transparent ERC-1967 implementation slot.
UUPS The same slot; the implementation contains the upgrade logic.
Beacon Resolved through the beacon contract.

For these patterns, ERC-7760 defines minimal proxy variants with a common mechanism for querying the implementation onchain. This enables block explorers and security tools to retrieve and verify the address using a consistent query convention.

Reducing gas through minimal implementations

Calls to the implementation go through delegatecall. Compact bytecode and optimized execution paths can reduce:

  • Deployment gas.
  • Runtime overhead, including unnecessary memory operations.
  • The amount of code that needs to be loaded or cached by execution clients.

ERC-7760 emphasizes:

  • Minimal forwarding logic, without upgrade logic in the UUPS and beacon variants.
  • Elimination of unnecessary checks and abstractions.
  • Minimal instruction sequences for implementation queries.

The goal is to retain upgradeability while keeping proxy overhead as low as practical.

Specification

General specifications

All proxies may append optional additional data (immutable arguments) to the end of their runtime bytecode. The data is embedded in the code rather than storage and can be retrieved both onchain and offchain.

Emitting ERC-1967 events, such as the Upgraded event, during initialization is optional. Indexers and block explorers must not assume that initialization always emits those events.

Onchain implementation queries in I-variants

I-variants (implementation-query variants) embed the logic for returning the implementation address directly in the proxy's runtime bytecode.

Their query behavior is as follows:

  1. Call the proxy with calldata of exactly one byte.
  2. The proxy immediately returns the implementation address without forwarding that calldata through delegatecall.
  3. The returned address is left-zero-padded to 32 bytes.

A caller can retrieve the current implementation using a low-level call without invoking a conventional Solidity function.

Before trusting the returned address, a verifier must perform the following checks:

  1. Retrieve the executable proxy bytecode preceding any immutable arguments using EXTCODECOPY.
  2. Zero out any embedded factory address in the retrieved bytecode.
  3. Check that the hash of the normalized bytecode matches the expected hash specified for the standard variant.
  4. If the hash differs, do not trust the returned implementation address.

This prevents an unverified contract masquerading as an I-variant from supplying a fabricated implementation address.

Minimal ERC-1967 transparent upgradeable proxy

The transparent proxy in ERC-7760 is designed around a factory account authorized to perform upgrades.

The factory typically has the following characteristics:

  • It deploys the proxy, although an EOA may deploy it on the factory's behalf.
  • It is the account authorized to invoke the proxy's storage-writing upgrade path.
  • Its address is embedded immutably in the bytecode.

The runtime contains instructions that let the factory write arbitrary values to arbitrary storage slots. Initialization code may therefore omit setting the implementation slot, which the authorized factory can initialize later.

The upgrade logic does not emit ERC-1967 events. Indexers must not rely on those events alone to track implementations.

The factory uses the following calldata format for an upgrade.

js
abi.encodePacked(
    uint256(uint160(implementation)), // 新しい実装アドレス
    bytes32(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc), // ERC-1967実装スロット
    "" // 実装にdelegatecallされる初期化データ
)

Transparent proxy

20-byte factory variant
text
3d3d3373________________________________________14605757363d3d37363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6052573d6000fd5b3d6000f35b3d356020355560408036111560525736038060403d373d3d355af43d6000803e6052573d6000fd
14-byte factory variant
text
3d3d336d____________________________14605157363d3d37363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e604c573d6000fd5b3d6000f35b3d3560203555604080361115604c5736038060403d373d3d355af43d6000803e604c573d6000fd

The shorter address representation further reduces the size of the runtime bytecode.

Transparent proxy (I-variant)

This version includes the implementation query logic.

20-byte factory variant
text
3658146083573d3d3373________________________________________14605D57363d3d37363D7f360894a13ba1A3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6058573d6000fd5b3d6000f35b3d35602035556040360380156058578060403d373d3d355af43d6000803e6058573d6000fd5b602060293d393d51543d52593df3
14-byte factory variant
text
365814607d573d3d336d____________________________14605757363d3D37363d7F360894A13Ba1A3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6052573d6000fd5b3d6000f35b3d35602035556040360380156052578060403d373d3d355af43d6000803e6052573d6000fd5b602060233d393d51543d52593df3

Minimal ERC-1967 UUPS proxy

The UUPS proxy contains no upgrade logic of its own. Its initialization code must store the implementation address at the following slot.

text
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
Basic Variant
text
363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3
I-variant
text
365814604357363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3

Minimal ERC-1967 beacon proxy

The beacon proxy also has no upgrade logic of its own. Initialization must set the beacon address in the ERC-1967 beacon slot used by the runtime bytecode. The proposal's prose refers to the implementation slot here, but the supplied bytecode reads the distinct beacon slot (beginning with 0xa3f0ad74). The beacon then resolves the current implementation.

Basic Variant
text
363d3d373d3d363d602036600436635c60da1b60e01b36527fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50545afa5036515af43d6000803e604d573d6000fd5b3d6000f3
I-variant
text
363d3d373d3d363d602036600436635c60da1b60e01b36527fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50545afa361460525736515af43d600060013e6052573d6001fd5b3d6001f3

Rationale

Why PUSH0 is not used

ERC-7760 deliberately avoids the PUSH0 opcode introduced by EIP-3855, in order to maintain broader EVM compatibility.

For more on EIP-3855, see the following article.

[EIP3855] Introducing the PUSH0 Opcode

PUSH0 is a relatively recent opcode and may be unavailable on older chains or some EVM-compatible networks. The proxies use previously established opcodes to maximize compatibility with EVM environments that support the other required instructions.

Further optimized variants using PUSH0 could be standardized in a separate future ERC.

Optimization priorities

ERC-7760 prioritizes:

  • Minimizing runtime gas.
  • Minimizing bytecode size.

The design first minimizes the cost of forwarding calls and branching at runtime, then reduces the code size as far as possible. Proxy logic executes repeatedly, so ongoing execution costs can matter more over the lifetime of a proxy than its one-time deployment cost.

What minimal means

All of these proxies use handcrafted EVM bytecode. They were designed to be as compact as practical at the time of development, although further optimizations may become possible.

For bytecode already deployed in production, however, the following benefits may outweigh small gas savings:

  • Automatic verification using a stable bytecode layout.
  • Immediate recognition by block explorers.
  • Compatibility with existing tools.

Historically, the ERC-1167 minimal proxy was not the theoretical minimum. The 0age minimal proxy achieves smaller bytecode and lower runtime gas costs. ERC-1167 remains useful because ecosystem compatibility and straightforward verification are more important than a marginal optimization. ERC-7760 adopts the same approach by emphasizing stable bytecode layouts.

Design of the transparent upgradeable proxy

Embedding the factory address

The transparent proxy embeds the address of the factory authorized to perform upgrades directly in its bytecode. This avoids an SLOAD to retrieve the administrator address on every proxy call.

The factory can implement authorization logic such as:

  • Multisignature approvals.
  • Administrator rotation.
  • Timelock controls.

This permits flexible administration even though the factory address itself is fixed.

Upgrade instructions that write arbitrary slots

The upgrade path accepts the following:

  • An arbitrary 32-byte value.
  • An arbitrary 32-byte storage slot.

The factory can use these inputs to write the specified value to the specified slot. This design:

  • Keeps bytecode compact.
  • Supports additional storage slots that may be needed in the future.
  • Avoids unnecessary restrictions on an already privileged upgrade path.

An implementation executed through delegatecall can already modify any proxy storage slot. Restricting the factory's storage-writing path alone would not remove that underlying capability. Security depends on authorization and the trustworthiness of the implementation.

14-byte factory address subvariants

Deploying the factory at a vanity address with leading zero bytes allows the proxy bytecode to be shortened. An address with six leading zero bytes requires only 14 bytes to represent its nonzero portion.

The proposal chooses 14 bytes as a tradeoff between the following factors.

Consideration Description
Address search difficulty Generating an address with too many leading zero bytes becomes difficult.
Bytecode reduction A 14-byte representation provides meaningful bytecode savings.

The 14-byte variant is intended to balance the cost of address mining against the resulting optimization.

Design of I-variants

I-variants enable verifiable onchain retrieval of the current implementation.

Once the proxy's executable runtime bytecode has been verified against the standardized variant:

  • The implementation query logic is known to be embedded in the bytecode.
  • The query path has the verified behavior, rather than relying on arbitrary external logic.
  • The proxy cannot simply substitute a fabricated return value through an alternative query implementation. This does not imply that the implementation address itself is immutable or that a beacon is trustworthy.
Why one byte of calldata?

Implementation queries use exactly one byte of calldata. This distinguishes them from two common call formats.

Call type Calldata length
Ordinary ETH transfer 0 bytes
Solidity function call 4 bytes or more
Implementation query 1 byte

The convention avoids collision with ordinary function calls while enabling a low-cost branch.

Why events are omitted

Omitting ERC-1967 events from the upgrade bytecode, and permitting initialization to omit them, offers several advantages:

  • Smaller bytecode.
  • Lower deployment gas.
  • Lower execution costs.

Block explorers and indexers can track the implementation by reading the relevant ERC-1967 slots directly, including resolving the beacon when applicable. Events are therefore not functionally necessary for determining the current implementation.

Why immutable arguments are not appended to calldata

Some standards append additional data to the end of calldata. ERC-7760 does not use that approach for forwarding immutable arguments.

The reasons are:

  • Avoiding compatibility issues with other ERCs.
  • Avoiding unexpected security consequences from modifying calldata.

Instead, use the following opcode to read the arguments directly from the end of the proxy bytecode.

text
EXTCODECOPY

Why initialization code is not fixed

ERC-7760 does not prescribe the initialization bytecode. It requires only the relevant initialization state:

  • For UUPS and beacon proxies, correctly initialize the relevant ERC-1967 slot (the implementation slot for UUPS and the beacon slot used by the supplied beacon runtime).

Other initialization logic can be designed separately by each project.

Out-of-scope components

The following components are deliberately left outside the standard.

Component Reason
Proxy factory Authorization mechanisms and deployment strategies vary.
I-variant verification logic Requirements differ by chain and application.
Beacon contract Upgrade strategies are project-specific.

These components can introduce serious vulnerabilities if implemented incorrectly. ERC-7760 therefore defines only the minimal proxy core, leaving the surrounding logic to implementers who must design it carefully.

Reference implementations

Minimal ERC-1967 transparent upgradeable proxy implementation

Minimal ERC-1967 transparent upgradeable proxy implementation (basic variant)

ERC1967MinimalTransparentUpgradeableProxyLib.sol
pragma solidity ^0.8.0;

library ERC1967MinimalTransparentUpgradeableProxyLib {
    function initCodeFor20ByteFactoryAddress() internal view returns (bytes memory) {
        return abi.encodePacked(
            bytes13(0x607f3d8160093d39f33d3d3373),
            address(this),
            bytes32(0x14605757363d3d37363d7f360894a13ba1a3210667c828492db98dca3e2076cc),
            bytes32(0x3735a920a3ca505d382bbc545af43d6000803e6052573d6000fd5b3d6000f35b),
            bytes32(0x3d356020355560408036111560525736038060403d373d3d355af43d6000803e),
            bytes7(0x6052573d6000fd)
        );
    }

    function initCodeFor14ByteFactoryAddress() internal view returns (bytes memory) {
        return abi.encodePacked(
            bytes13(0x60793d8160093d39f33d3d336d),
            uint112(uint160(address(this))),
            bytes32(0x14605157363d3d37363d7f360894a13ba1a3210667c828492db98dca3e2076cc),
            bytes32(0x3735a920a3ca505d382bbc545af43d6000803e604c573d6000fd5b3d6000f35b),
            bytes32(0x3d3560203555604080361115604c5736038060403d373d3d355af43d6000803e),
            bytes7(0x604c573d6000fd)
        );
    }

    function initCode() internal view returns (bytes memory) {
        if (uint160(address(this)) >> 112 != 0) {
            return initCodeFor20ByteFactoryAddress();
        } else {
            return initCodeFor14ByteFactoryAddress();
        }
    }

    function deploy(address implementation, bytes memory initializationData)
        internal
        returns (address instance)
    {
        bytes memory m = initCode();
        assembly {
            instance := create(0, add(m, 0x20), mload(m))
        }
        require(instance != address(0), "Deployment failed.");
        upgrade(instance, implementation, initializationData);
    }

    function upgrade(address instance, address implementation, bytes memory upgradeData) internal {
        (bool success,) = instance.call(
            abi.encodePacked(
                // The new implementation address, converted to a 32-byte word.
                uint256(uint160(implementation)),
                // ERC-1967 implementation slot.
                bytes32(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc),
                // Optional calldata to be forwarded to the implementation
                // via delegatecall after setting the implementation slot.
                upgradeData
            )
        );
        require(success, "Upgrade failed.");
    }
}

Minimal ERC-1967 transparent upgradeable proxy implementation (I-variant)

ERC1967IMinimalTransparentUpgradeableProxyLib.sol
pragma solidity ^0.8.0;

library ERC1967IMinimalTransparentUpgradeableProxyLib {
    function initCodeFor20ByteFactoryAddress() internal view returns (bytes memory) {
        return abi.encodePacked(
            bytes19(0x60923d8160093d39f33658146083573d3d3373),
            address(this),
            bytes20(0x14605D57363d3d37363D7f360894a13ba1A32106),
            bytes32(0x67c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e60),
            bytes32(0x58573d6000fd5b3d6000f35b3d35602035556040360380156058578060403d37),
            bytes32(0x3d3d355af43d6000803e6058573d6000fd5b602060293d393d51543d52593df3)
        );
    }

    function initCodeFor14ByteFactoryAddress() internal view returns (bytes memory) {
        return abi.encodePacked(
            bytes19(0x608c3d8160093d39f3365814607d573d3d336d),
            uint112(uint160(address(this))),
            bytes20(0x14605757363d3D37363d7F360894A13Ba1A32106),
            bytes32(0x67c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e60),
            bytes32(0x52573d6000fd5b3d6000f35b3d35602035556040360380156052578060403d37),
            bytes32(0x3d3d355af43d6000803e6052573d6000fd5b602060233d393d51543d52593df3)
        );
    }

    function initCode() internal view returns (bytes memory) {
        if (uint160(address(this)) >> 112 != 0) {
            return initCodeFor20ByteFactoryAddress();
        } else {
            return initCodeFor14ByteFactoryAddress();
        }
    }

    function deploy(address implementation, bytes memory initializationData)
        internal
        returns (address instance)
    {
        bytes memory m = initCode();
        assembly {
            instance := create(0, add(m, 0x20), mload(m))
        }
        require(instance != address(0), "Deployment failed.");
        upgrade(instance, implementation, initializationData);
    }

    function upgrade(address instance, address implementation, bytes memory upgradeData) internal {
        (bool success,) = instance.call(
            abi.encodePacked(
                // The new implementation address, converted to a 32-byte word.
                uint256(uint160(implementation)),
                // ERC-1967 implementation slot.
                bytes32(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc),
                // Optional calldata to be forwarded to the implementation
                // via delegatecall after setting the implementation slot.
                upgradeData
            )
        );
        require(success, "Upgrade failed.");
    }
}

Minimal ERC-1967 UUPS proxy implementation

Minimal ERC-1967 UUPS proxy implementation (basic variant)

ERC1967MinimalUUPSProxyLib.sol
pragma solidity ^0.8.0;

library ERC1967MinimalUUPSProxyLib {
    function initCode(address implementation, bytes memory args)
        internal
        pure
        returns (bytes memory)
    {
        uint256 n = 0x003d + args.length;
        require(n <= 0xffff, "Immutable args too long.");
        return abi.encodePacked(
            bytes1(0x61),
            uint16(n),
            bytes7(0x3d8160233d3973),
            implementation,
            bytes2(0x6009),
            bytes32(0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076),
            bytes32(0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3),
            args
        );
    }

    function deploy(address implementation, bytes memory args)
        internal
        returns (address instance)
    {
        bytes memory m = initCode(implementation, args);
        assembly {
            instance := create(0, add(m, 0x20), mload(m))
        }
        require(instance != address(0), "Deployment failed.");
    }
}

Minimal ERC-1967 UUPS proxy implementation (I-variant)

ERC1967IMinimalUUPSProxyLib.sol
pragma solidity ^0.8.0;

library ERC1967IMinimalUUPSProxyLib {
    function initCode(address implementation, bytes memory args)
        internal
        pure
        returns (bytes memory)
    {
        uint256 n = 0x0052 + args.length;
        require(n <= 0xffff, "Immutable args too long.");
        return abi.encodePacked(
            bytes1(0x61),
            uint16(n),
            bytes7(0x3d8160233d3973),
            implementation,
            bytes23(0x600f5155f3365814604357363d3d373d3d363d7f360894),
            bytes32(0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4),
            bytes32(0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3),
            args
        );
    }

    function deploy(address implementation, bytes memory args)
        internal
        returns (address instance)
    {
        bytes memory m = initCode(implementation, args);
        assembly {
            instance := create(0, add(m, 0x20), mload(m))
        }
        require(instance != address(0), "Deployment failed.");
    }
}

Minimal ERC-1967 beacon proxy implementation

Minimal ERC-1967 beacon proxy implementation (basic variant)

ERC1967MinimalBeaconProxyLib.sol
pragma solidity ^0.8.0;

library ERC1967MinimalBeaconProxyLib {
    function initCode(address beacon, bytes memory args) internal pure returns (bytes memory) {
        uint256 n = 0x0052 + args.length;
        require(n <= 0xffff, "Immutable args too long.");
        return abi.encodePacked(
            bytes1(0x61),
            uint16(n),
            bytes7(0x3d8160233d3973),
            beacon,
            bytes23(0x60195155f3363d3d373d3d363d602036600436635c60da),
            bytes32(0x1b60e01b36527fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6c),
            bytes32(0xb3582b35133d50545afa5036515af43d6000803e604d573d6000fd5b3d6000f3),
            args
        );
    }

    function deploy(address beacon, bytes memory args) internal returns (address instance) {
        bytes memory m = initCode(beacon, args);
        assembly {
            instance := create(0, add(m, 0x20), mload(m))
        }
        require(instance != address(0), "Deployment failed.");
    }
}

Minimal ERC-1967 beacon proxy implementation (I-variant)

ERC1967IMinimalBeaconProxyLib.sol
pragma solidity ^0.8.0;

library ERC1967IMinimalBeaconProxyLib {
    function initCode(address beacon, bytes memory args) internal pure returns (bytes memory) {
        uint256 n = 0x0057 + args.length;
        require(n <= 0xffff, "Immutable args too long.");
        return abi.encodePacked(
            bytes1(0x61),
            uint16(n),
            bytes7(0x3d8160233d3973),
            beacon,
            bytes28(0x60195155f3363d3d373d3d363d602036600436635c60da1b60e01b36),
            bytes32(0x527fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b3513),
            bytes32(0x3d50545afa361460525736515af43d600060013e6052573d6001fd5b3d6001f3),
            args
        );
    }

    function deploy(address beacon, bytes memory args) internal returns (address instance) {
        bytes memory m = initCode(beacon, args);
        assembly {
            instance := create(0, add(m, 0x20), mload(m))
        }
        require(instance != address(0), "Deployment failed.");
    }
}

Security

Security of the transparent proxy factory

In the ERC-7760 transparent proxy pattern, the factory address embedded in the bytecode holds the authority to invoke the proxy's upgrade path. The security of the system therefore depends heavily on the factory's access controls.

In particular, the following conditions must be considered:

  • Strictly restrict which accounts can change the implementation.
  • Prevent unauthorized external accounts from invoking arbitrary storage writes.
  • Consider mechanisms such as multisignature approvals, timelocks, and role management so that compromise of a single key need not immediately compromise the system.

The transparent proxy includes a powerful upgrade operation that can write any value to any storage slot. This balances flexibility with minimal bytecode size, but it also has important consequences.

Factory state Consequence
Secure factory with appropriate policy Implementation updates and other authorized writes proceed according to that policy.
Compromised factory Arbitrary proxy storage can be modified.

The factory's authorization design is therefore a critical security boundary for the transparent variant. Even a secure implementation contract cannot compensate for a compromised upgrade authority.

Calldata length collisions in I-variants

I-variants reserve calls with exactly one byte of calldata for implementation queries. Such calls bypass normal delegatecall forwarding and immediately return the implementation address.

The rationale is:

  • Zero-byte calldata would collide with ordinary ETH transfers.
  • Calldata of four bytes or more can contain ordinary function selectors.
  • One byte provides a compact reserved query format.

There is a compatibility caveat. Some implementations may:

  • Interpret one-byte calldata as meaningful input.
  • Implement a custom low-level protocol using msg.data.length == 1.

For such implementations, calls through an I-variant never reach the implementation when calldata has that length. The proxy interprets them as implementation queries instead.

Intended call Proxy behavior
Invocation using one byte of calldata Returns the implementation address instead of forwarding the call.

Ordinary Solidity function calls are unlikely to encounter this problem because they include a four-byte function selector.

However, care is required in cases such as:

  • Low-level protocols written primarily in assembly.
  • Specialized contracts that interpret calldata as a raw binary stream.
  • L2 or cross-chain communication implementations with custom encoding.

When choosing an ERC-7760 I-variant, ensure that the implementation does not rely on receiving one-byte calldata as meaningful input.

Conclusion

This article covered ERC-7760, a proposal for minimal upgradeable proxies that can store fixed configuration data in bytecode and, through I-variants, allow verifiable onchain queries of the current implementation. I hope it clarified how these variants work.

If you have questions, feel free to reach out by direct message on Twitter.

Twitter @cardene777

I also publish content on other platforms.