I've been working on verifying source code for the oldest contracts on Ethereum, and this one took days to crack.
The contract: 0xa2e3680acaf5d2298697bdc016cf75a929385463
Deployed by Vitalik on November 12, 2015 (block 530,996). It's a token contract implementing the standardized currency API from the early ethereum/dapp-bin repo. 1,000,000 initial supply, approve/transfer mechanics - basically a proto-ERC-20.
The problem: We tried compiling currency.sol with every Solidity compiler version from that era. Every archived soljson release from v0.1.1 through v0.3.6, nightlies from Sep-Dec 2015, native C++ solc builds from the webthree-umbrella repo, optimizer on and off. Nothing matched.
The breakthrough: Three clues pointed us away from Solidity entirely:
The on-chain constructor starts with
6000603f53(MSTORE8-based memory init). Every Solidity version produces60606040525b(the free memory pointer pattern). This is a fundamentally different code generation approach.The runtime code uses
MSIZE, SWAP1, MSIZE, ADDfor memory allocation. This is the Serpent compiler'salloc()pattern - not found in any version of solc.Two function selectors didn't match the Solidity source:
disapprove()instead ofunapprove(), andisApprovedOnceFor()instead ofisApprovedOnce().
The answer: The contract was compiled from currency.se (the Serpent version), not currency.sol. The ethereum/dapp-bin repo had both implementations side by side. Vitalik deployed his own language's version.
Compiled with the Serpent compiler at commit f0b4128 (Oct 15, 2015) - byte-for-byte identical, all 1,661 bytes.
Full methodology, source, and proof: github.com/cartoonitunes/vitalik-currency-verification
We've submitted a manual verification request to Etherscan since they don't support Serpent as a verification language. Hopefully they can add it as a verified contract with source.
This is part of a broader effort to verify and preserve the earliest contracts on Ethereum. A lot of historically important contracts from 2015-2016 are still unverified because the compiler versions are too old for Etherscan's automated tools.
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments