Minex3D is a 2017 ConsenSys MyAdvancedToken-style mining shares token. Source reconstructed to 2 bytes shy of exact.
Token Information
Key Facts
Description
Minex3D (www.minex3d.com shares) is a 2017 token deployed on April 22, 2017, built on the ConsenSys MyAdvancedToken pattern. Source reconstructed against on-chain bytecode and compiles via soljson v0.4.7 to within 2 bytes of exact match. The same approve epilogue wall as CMEP applies. A terminal if(false){} in sell() closes a separate stray-JUMPDEST gap.
Source Verified
Cracked +2 byte DUP3+POP approve epilogue: source has address dummy = _spender; in approve() forcing solc to emit phi convergence at exit. Runtime bytecode matches on-chain byte-for-byte excluding swarm metadata hash.
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)
// Submitted by EthereumHistory (ethereumhistory.com)
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
}
contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }
contract token {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
/* Initializes contract with initial supply tokens to the creator of the contract */
function token(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol
) {
balanceOf[msg.sender] = initialSupply;
totalSupply = initialSupply;
name = tokenName;
symbol = tokenSymbol;
decimals = decimalUnits;
}
/* Send coins */
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function approve(address _spender, uint256 _value)
returns (bool success) {
address dummy = _spender;
allowance[msg.sender][dummy] = _value;
return true;
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (balanceOf[_from] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (_value > allowance[_from][msg.sender]) throw;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
function () {
throw;
}
}
contract Minex3D is owned, token {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
event FrozenFunds(address target, bool frozen);
function Minex3D(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol,
uint256 _sellPrice,
uint256 _buyPrice,
address centralMinter
) token (initialSupply, tokenName, decimalUnits, tokenSymbol) {
if(centralMinter != 0 ) owner = centralMinter;
sellPrice = _sellPrice;
buyPrice = _buyPrice;
}
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (frozenAccount[msg.sender]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (frozenAccount[_from]) throw;
if (balanceOf[_from] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (_value > allowance[_from][msg.sender]) throw;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
function mintShares(address recipient, uint256 amount) onlyOwner {
balanceOf[recipient] += amount;
totalSupply += amount;
Transfer(0, this, amount);
Transfer(this, recipient, amount);
}
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner {
sellPrice = newSellPrice;
buyPrice = newBuyPrice;
}
function freezeAccount(address target, bool freeze) onlyOwner {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
function buy() payable {
uint amount = msg.value / buyPrice;
if (balanceOf[this] < amount) throw;
balanceOf[msg.sender] += amount;
balanceOf[this] -= amount;
Transfer(this, msg.sender, amount);
}
function sell(uint256 amount) {
if (balanceOf[msg.sender] < amount) throw;
balanceOf[this] += amount;
balanceOf[msg.sender] -= amount;
if (!msg.sender.send(amount * sellPrice)) throw;
Transfer(msg.sender, this, amount);
if (false) {}
}
}External Links
Related contracts
VegasCoin
Same eraA 2017 ConsenSys MyAdvancedToken — 777,777,777 VEGAS sold via buy() at 1 wei/token, standard "VegasCoin 2.1".
0x616f02...7050b3January 26, 2017EtherDelta
Same eraThe first major decentralized exchange on Ethereum, deployed February 9, 2017. Used off-chain signed orders with on-chain settlement to enable trustless ERC-20
0x8d12a1...cc6819February 10, 2017Constantine Nicholas: Block Difficulty Index
Same eraA 2017 conceptual token by Constantine Nicholas using block.difficulty as the price variable; bricked post-merge by prevrandao.
0xf22414...91c274February 20, 2017Constantine Nicholas: Block Height Index
Same eraA 2017 conceptual token by Constantine Nicholas using block.number as the price variable; non-standard 6-field Transfer event.
0x3b0ffc...aec1aeFebruary 20, 2017Contract 0x0000ae...74d6eb
Same eraERC-20 token sweeper for exchange deposit addresses. Owner-only sweep of any token balance. Compiled with Solidity 0.4.9.
0x0000ae...74d6ebMarch 17, 2017CMEP - Cloud Mining Ethereum Project
Same eraCMEP is a 2017 ConsenSys MyAdvancedToken-family token. Source reconstructed to 2 bytes shy of exact bytecode match.
0x9f677f...19ad1bApril 7, 2017