Back to Home

TokenSale

Utility
0x746b67576ae8...bd07a5c86528
HomesteadContract #15KSource VerifiedEdit this contract
Deployed May 1, 2016 (10 years ago)Block 1,436,295

A vending machine for DigixDAO's DGD: send ether to it and it sends back tokens at 1.03 ether each, until its stock runs out.

Homestead EraVerified Source

Historical Significance

A token sale reduced to a contract holding stock at a fixed price, with no deadline, no goal and no refund logic: the seller commits the inventory and the price, and the buyer either gets tokens or gets thrown. In 2016 there was no automated market maker and no onchain order book, so a contract like this was the whole of what selling a holding without an exchange looked like. The cap and refund on a partial fill is the detail that makes it safe to send more than the remaining stock is worth.

Context

Deployed in May 2016, weeks after DigixDAO's crowdsale closed and while DGD was one of the few tokens with real demand behind it. Homestead was two months old, and the infrastructure for exchanging tokens onchain amounted to contracts people wrote for themselves.

Key Facts
Deployment Block
1,436,295
Deployment Date
May 1, 2016, 11:33 AM
Code Size
1.4 KB
Gas at Deploy
478,967
Transactions by Year
20162

Description

A one-sided sale contract for a single asset. The token address, 0xE0B7927c4aF23765Cb51314A0E0521A9645F0E2A, which is DigixDAO's DGD, and the price of 1.03 ether per token are both written into the constructor and cannot be changed afterwards.

Sending ether to the contract is the purchase: it divides the payment by the price, throws if that comes to nothing or if it holds no tokens, caps the order at what it actually has and refunds the difference, then transfers the tokens out. The owner can withdraw ether and move tokens out through two restricted functions, and can hand ownership on.

There is no buy side and no way for the contract to acquire more stock on its own. When the balance is gone every further payment is rejected.

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

Opcodes1,477
Unique Opcodes97
Jump Instructions52
Storage Operations14

External Links

Related contracts