---
eip: 7936
label: ERC-7936
title: Versioned Proxy Contract Interface
status: Review
type: Standards Track
category: ERC
created: 2025-04-17
official: https://eips.ethereum.org/EIPS/eip-7936
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7936.md
canonical: https://eips.huatuo.xyz/eip-7936/
lang: en
tldr: A proxy interface that keeps several implementation versions registered at once, so callers can pin the exact version they trust instead of being forced onto whatever the admin upgraded to last.
tags: [proxy, upgradeability, versioning, security, erc]
---

# ERC-7936: Versioned Proxy Contract Interface

> Multi-version proxy contracts that allow callers to select implementation

**TL;DR:** A proxy interface that keeps several implementation versions registered at once, so callers can pin the exact version they trust instead of being forced onto whatever the admin upgraded to last.

## What problem does it solve?

Upgradeable proxies point at a single implementation. When the admin upgrades it, every caller is switched immediately. That causes two kinds of trouble:

- **Breaking changes.** An integrator built against the old interface can break the moment the implementation changes, and there is no standard way to roll out a new version gradually.
- **Trust in the admin forever.** If an admin key or governance process is compromised and a malicious implementation is deployed, users have no way to opt out except to stop using the contract.

ERC-7936 lets one proxy serve many versions side by side and lets each caller choose.

## How it works

The proxy keeps a registry mapping a `bytes32` version identifier (a semver string, a number, or a Git commit hash) to an implementation address, plus a **default** version.

| Function | Purpose |
| --- | --- |
| `registerVersion(version, impl)` | Add a version (admin) |
| `removeVersion(version)` | Remove a version (admin) |
| `setDefaultVersion(version)` | Choose what un-versioned calls use (admin) |
| `getImplementation(version)` / `getDefaultVersion()` / `getVersions()` | Read the registry |
| `executeAtVersion(version, data)` | Forward `data` to that version's implementation and return its result |

Rules from the spec: `executeAtVersion` must check the version exists, forward the call and return the data. Events `VersionRegistered` and `DefaultVersionChanged` must be emitted. Admin functions should be access-controlled. A `fallback` should route ordinary calls to the default version, so existing integrations keep working unchanged. Implementations may also use [ERC-1967](/eip-1967/) storage slots for tooling compatibility.

## Sample code

Calling a pinned, audited version from another contract:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IVersionedProxy {
    function getImplementation(bytes32 version) external view returns (address);
    function executeAtVersion(bytes32 version, bytes calldata data)
        external payable returns (bytes memory);
}

interface IVault { function deposit(uint256 amount) external returns (uint256 shares); }

contract PinnedUser {
    IVersionedProxy public immutable proxy;
    bytes32 public constant TRUSTED = bytes32("1.0.0");

    constructor(IVersionedProxy p) { proxy = p; }

    function deposit(uint256 amount) external returns (uint256) {
        bytes memory ret = proxy.executeAtVersion(
            TRUSTED, abi.encodeCall(IVault.deposit, (amount))
        );
        return abi.decode(ret, (uint256));
    }
}
```

## Things to know

- Status: **Review**. The interface may still change before it is finalized.
- Pinning only protects you if the pinned implementation cannot itself be changed and the admin cannot repoint that version. The interface has `removeVersion` and `registerVersion`; whether an existing version can be overwritten is left to the implementation, so check it.
- The spec does not say whether `executeAtVersion` uses `delegatecall` (shared proxy storage) or a plain call. If versions share storage, different storage layouts between versions can corrupt state; review this carefully.
- For splitting one proxy across many facets by function rather than by version, see [ERC-2535](/eip-2535/) (Diamonds).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7936
