ShapeShift chain-split receiver (Jul 26, 2016). Forwards ETH to target only if forked() oracle matches stored bool, routing deposits correctly on ETH vs. ETC.
Key Facts
Description
Deployed July 26, 2016 — 6 days after the DAO hard fork split Ethereum into ETH and ETC. One of two identical instances deployed in consecutive blocks by the ShapeShift ETH hot wallet. Queries the forked() oracle at 0x2bd2326c993dfaef84f696526064ff22eba5b362 to determine which chain it is running on, then forwards incoming ETH to the configured target only when the oracle result matches the stored forked boolean. This enabled ShapeShift to maintain separate deposit addresses for ETH and ETC with on-chain routing logic.
Source Verified
Exact runtime bytecode match (287 bytes). Key finding: bool public forked generates the forked() getter with selector 0x16c72721. Condition != forked (not == forked) produces 287B; the latter produces 289B. Matches solc v0.2.1 through v0.3.5 with optimizer.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
DAO Fork Era
The controversial fork to recover funds from The DAO hack.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
contract Forked {
function forked() returns (bool);
}
contract ShapeShiftReceiver {
address forkedContract;
address public target;
bool public forked;
function ShapeShiftReceiver(address _forkedContract, address _target, bool _forked) {
forkedContract = _forkedContract;
target = _target;
forked = _forked;
}
function() {
if (Forked(forkedContract).forked() != forked || msg.value == 0 || !target.send(msg.value)) throw;
}
}