Back to Home

swap

Utility
0x5bc45bba2fef...570aa9dab809
HomesteadContract #15KExact Bytecode MatchEdit this contract
Deployed May 7, 2016 (10 years ago)Block 1,471,437

A one-day offer to sell DigixDAO's DGD at 0.75 ether a token, with the price and the expiry compiled in and an owner who can close it.

Homestead EraVerified Source

Historical Significance

A fixed-price offer to sell one token, expiring on a timestamp compiled into the contract. In 2016 there was no automated market maker and no order book on chain, so selling a holding meant a centralised exchange or a purpose-built contract like this one quoting a price and waiting. The expiry is what makes it an offer rather than a standing market: the seller commits to a price and to how long they will honour it, and both commitments are enforced by the contract rather than by their word.

Context

Deployed a week after the DGD token itself, in the weeks when DigixDAO's crowdsale had just closed and holders were looking for somewhere to trade. Homestead was two months old, ERC-20 had settled the interface, and the infrastructure for exchanging tokens onchain did not yet exist.

Key Facts
Deployment Block
1,471,437
Deployment Date
May 7, 2016, 07:45 AM
Code Size
824.0 B
Gas at Deploy
403,961

Description

A single-asset swap offer. It holds the address of the token it trades, 0xe0b7927c4af23765cb51314a0e0521a9645f0e2a, which is DigixDAO's DGD, a price of 0.75 ether per token, and an expiry timestamp, all readable through tokenObj(), price_token() and expiryDate(). checkExpiry() closes the offer once that moment has passed.

Privileged calls are restricted to the owner recorded at construction. The contract also exposes the two scaling constants it does its arithmetic with, a billion and the number of wei in a finney, which is how a contract of this period kept unit conversions honest without a maths library.

Its expiry is 8 May 2016 at 03:45 UTC, less than a day after it was deployed. The offer was written to stand for hours rather than to sit on chain as a market.

Source Verified

Exact bytecode match(824 bytes)
Compiler: v0.1.5-

Historian Categories

Utility
Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Utility
Has ERC-20-like patterns

Bytecode Overview

Opcodes824
Unique Opcodes92
Jump Instructions35
Storage Operations21

External Links

Related contracts