An 86 byte delegatecall proxy forwarding every call to one hardcoded implementation, deployed with its own implementation address.
Historical Significance
The gas fraction rather than a subtraction, msize rather than the free memory pointer, and a switch statement whose retained copy of the result doubles as a stack slot are all choices that trade readability for bytes. Seeing the same 86 bytes deployed under four different implementations shows a template that was tuned once and then reused.
Key Facts
Description
One payable fallback written entirely in inline assembly. It allocates scratch space with msize, copies the calldata there, delegatecalls the hardcoded implementation with 63/64ths of the remaining gas, copies the return data out and either returns or reverts with it.
This family shares its code with three others and differs only in the twenty bytes of the implementation address. As deployed the runtime carries no metadata trailer, so the on chain code is 86 bytes rather than the 129 solc would emit; the Solidity that produces those bytes exactly is published here, and the registry record uses a Yul verbatim equivalent because the stripped trailer defeats automated length matching.
Source Verified
Byzantium Era
First Metropolis hard fork. Added zk-SNARK precompiles, REVERT opcode, and staticcall.
Bytecode Overview
Verified Source Available
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.12;
contract Proxy {
function () payable {
assembly {
let ptr := msize()
mstore(0x40, add(ptr, calldatasize))
calldatacopy(ptr, 0, calldatasize)
let result := delegatecall(div(mul(gas, 0x3f), 0x40), 0x837e85498f90f9320273d2A328b5ab402B24eEd6, ptr, calldatasize, 0, 0)
let rptr := msize()
mstore(0x40, add(rptr, returndatasize))
returndatacopy(rptr, 0, returndatasize)
switch result
case 0 { revert(rptr, returndatasize) }
default { return(rptr, returndatasize) }
}
}
}