A three party escrow where either the buyer or the arbiter can release the money
Historical Significance
Twenty lines that do what an escrow needs to do, with the guard written correctly. A later deployment by the same account rewrote that guard and got it wrong.
Context
Deployed in the Homestead era, when an escrow was something you wrote yourself in twenty lines rather than something you called.
Key Facts
Description
Escrow holds ether for a buyer, a seller and an arbiter. finalize sends the whole balance to the seller and refund sends it back to the buyer, and each is open to two of the three parties: the buyer or the arbiter can finalize, the seller or the arbiter can refund. The seller and the arbiter are written into the constructor and the buyer is whoever deployed it. Deployed on 31 March 2017 by 0x1db3439a222c519ab44bb1144fc28167b4fa6ee6, the account of Vitalik Buterin, with 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 as the arbiter.
Source Verified
Executable runtime reproduces byte-for-byte from the reconstructed source with solc 0.4.10, optimizer off; only the swarm metadata hash differs. runtime sha256 4fa8ca20d18ccb13e594b6329f047d32c52e33065e36db8ba4d8d37e4f2256df.
Historian Categories
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Spurious Dragon Era
Continued DoS protection. State trie clearing.
Bytecode Overview
Verified Source Available
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// Verified by EthereumHistory (ethereumhistory.com)
contract Escrow {
address buyer;
address seller;
address arbitrator;
function Escrow(address _seller, address _arbitrator) {
seller = _seller;
arbitrator = _arbitrator;
buyer = msg.sender;
}
function finalize() {
if (msg.sender == buyer || msg.sender == arbitrator)
seller.send(this.balance);
}
function refund() {
if (msg.sender == seller || msg.sender == arbitrator)
buyer.send(this.balance);
}
}External Links
Related contracts
SerpentGamble
Same deployerProvably-fair betting game where players choose their own odds. The owner settles bets with a commit-reveal random seed. Includes a 2-day emergency refund.
0x034df8...200e2fSeptember 20, 2015SerpentGamble
Same deployerSibling of 0x034dF870 (SerpentGamble). Provably-fair Serpent betting game; players choose their own odds, owner settles via commit-reveal seed, 2-day refund.
0x9ca7e9...fa8bb4September 21, 2015SerpentGamble
Same deployerSibling of 0x034dF870 (SerpentGamble). Provably-fair Serpent betting game; players choose their own odds, owner settles via commit-reveal seed, 2-day refund.
0x75649a...176028September 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xe1a99f...0d2457September 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xdc00a9...15861fSeptember 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xd0ed09...300b48September 21, 2015