A three party escrow whose seller and arbiter are written into the code, with the deploying account taken as the buyer.
Historical Significance
Escrow was among the first uses proposed for a contract that can hold money, and this is that idea at its smallest: two release paths, a third party who can take either, and no timeout. Writing the counterparties into the code rather than passing them in makes the contract single-use, which is the trade the design accepts in exchange for having nothing to configure.
Context
Deployed in mid 2016, when the common examples of what contracts were for were escrow, voting and crowdfunding, all of them variations on holding money under a rule that no participant can change.
Key Facts
Description
An escrow with three roles. The seller and the arbiter are hardcoded in the constructor as literal addresses, and the account that deploys the contract becomes the buyer. None of the three can be changed afterwards.
finalize() releases the whole balance to the seller and may be called by the buyer or the arbiter. refund() returns the whole balance to the buyer and may be called by the seller or the arbiter. Either side can therefore release the money to the other, and the arbiter can decide it alone, which is the entire dispute mechanism.
The seller is fixed as 0x1db3439a222c519ab44bb1144fc28167b4fa6ee6 and the arbiter as 0xd8da6bf26964af9d7eed9e03e53415d37aa96045, which is also the account that deployed it and so is both buyer and arbiter here. Neither call checks whether send succeeded, and there is no deadline: if nobody calls either function the balance stays where it is.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Homestead Era
The first planned hard fork. Removed the canary contract, adjusted gas costs.
Bytecode Overview
Verified Source Available
This contract has verified source code on Etherscan.
Show source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract Escrow {
address buyer;
address seller;
address arbiter;
function Escrow() {
seller = 0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6;
arbiter = 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045;
buyer = msg.sender;
}
function finalize() {
if (msg.sender == buyer || msg.sender == arbiter) seller.send(this.balance);
}
function refund() {
if (msg.sender == seller || msg.sender == arbiter) 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