Back to Home

GoldTokenLedger

Unclassified
Part of The Anthony Eufemio Collection
0x99146bab2bb3...e3e5789ae22e
FrontierContract #6,261Source VerifiedEdit this contract
Deployed January 10, 2016 (10 years ago)Block 824,235

Digix GoldTokenLedger, 10 January 2016. The earliest contract deployed carrying all six ERC-20 functions. Source recovered.

Frontier EraVerified Source

Historical Significance

The earliest contract deployed on Ethereum carrying all six functions of the ERC-20 interface: totalSupply, balanceOf, transfer, transferFrom, approve and allowance. It was deployed on 10 January 2016, four days before Digix reused the same design for DGX 1.0 at 0x55b9a11c2e8351b4Ffc7b11561148bfaC9977855, and well before EIP-20 was finalised.

Carrying the interface is not the same as behaving to it, and this contract does not. It declares all three Transfer parameters indexed, so a transfer emits four topics and an empty data field where the standard puts the value in data, and transferFrom names the spender rather than the owner as the sender. Its total supply was zero at deployment and has never changed, and it has never emitted a Transfer.

Context

Digix deployed its gold custody system on Ethereum through January 2016. Around this ledger sit the configuration contract at 0x64e56970dab471498f7624b15cbb397d7dcdc459, which every other component queries for addresses and settings, a Directory library, a shared base contract supplying those lookups, and the gold registry at 0x865376e86f20b23ce060a68fd7c5a3686da38261 that tracks individual bars and the fees owed on them. A ledger with the same code was deployed the same day at 0xb2dd0dc22c7d103928650abd260935ef9ef40cfc.

The system was compiled with solc v0.1.7. The Directory library carries the version stamp of commit c806b9bc, which was never released as a binary, and that stamp was long read as proof the system could not be verified. The stamp binds only the library that carries it. The contracts carry no stamp and reproduce exactly under the released v0.1.7+commit.b4e666cc once the optimizer is run at a low run count, which is what the computed constants in the deployed code reflect.

Token Information
Decimals
0
Key Facts
Deployer
Anthony Eufemio(0x4f5326...d05788)
Deployment Block
824,235
Deployment Date
Jan 10, 2016, 12:21 AM
Code Size
7.0 KB
Gas at Deploy
1,975,806

Description

Digix GoldTokenLedger, deployed 10 January 2016 in block 824235, taking the DigixConfiguration at 0x64e56970dab471498f7624b15cbb397d7dcdc459 as its only constructor argument. Runtime 6701 bytes, 44 external functions.

The ledger holds gold token balances and reads every operational parameter from the configuration contract rather than storing it: the accounting and transaction fee wallets, the storage rate, the transaction fee and its ceiling, the billing period, the required confirmations, and the addresses of the gold, vendor, custodian and auditor registries. Balances carry demurrage. actualBalanceOf returns the stored figure, balanceOf returns it net of storage fees accrued since the holder's last payment date, and deductFees settles that difference into the transaction fee wallet before a transfer completes. ledgerMint is restricted to the gold registry, recastCall to the recast contract, and payStorageFee reads the amount owed from the gold registry and pays it out of the caller's balance.

All 44 selectors on the ledger are named. The source published here reproduces the deployed runtime byte for byte under solc v0.1.7+commit.b4e666cc with the optimizer enabled at one run, apart from four bytes at offset 0x1525. Those four bytes are the selector 0x65afd0ed, a function on the Digix gold registry at 0x865376e86f20b23ce060a68fd7c5a3686da38261 taking an address and returning a boolean. Its name is in no public signature database and has not been recovered, so the interface declaration for it carries a placeholder.

Source Verified

Near-exact bytecode match
Compiler: v0.1.7+
Heuristic Analysis

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

Detected Type: Unclassified

Bytecode Overview

Opcodes7,219
Unique Opcodes243
Jump Instructions418
Storage Operations138

External Links

Related contracts