Address Contract Partially Verified
Address
0x4D4A8a496e9648466AAA6283bBaa20d524B51FE8
Balance
0.019196 ETH
Nonce
1
Code Size
2633 bytes
Creator
0x436b5742...171b at tx 0x97be0091...95a45f
Indexed Transactions
0
Contract Bytecode
2633 bytes
0x6080604052600436106100e85760003560e01c806368ea23221161008a578063f2fde38b11610059578063f2fde38b14610238578063f509e07614610258578063f747680d14610278578063fd3d75511461029857600080fd5b806368ea2322146101c6578063715018a6146101e65780638da5cb5b146101fb578063dd3951551461022357600080fd5b80633c5f07cb116100c65780633c5f07cb146101535780634b634b061461015d57806351783fc21461019357806357493d46146101b357600080fd5b806311e17993146100ed57806312065fe014610120578063141ad8ea14610133575b600080fd5b3480156100f957600080fd5b5061010d6101083660046108f4565b6102b8565b6040519081526020015b60405180910390f35b34801561012c57600080fd5b504761010d565b34801561013f57600080fd5b5061010d61014e36600461091d565b610323565b61015b610332565b005b34801561016957600080fd5b5061010d6101783660046108f4565b6001600160a01b031660009081526006602052604090205490565b34801561019f57600080fd5b5061010d6101ae3660046108f4565b61038a565b61015b6101c13660046108f4565b6103ab565b3480156101d257600080fd5b5061010d6101e136600461093f565b610464565b3480156101f257600080fd5b5061015b610476565b34801561020757600080fd5b506000546040516001600160a01b039091168152602001610117565b34801561022f57600080fd5b5061015b6104ea565b34801561024457600080fd5b5061015b6102533660046108f4565b6105cb565b34801561026457600080fd5b5061010d61027336600461093f565b610601565b34801561028457600080fd5b5061015b6102933660046108f4565b610610565b3480156102a457600080fd5b5061010d6102b33660046108f4565b610770565b6000806102f56001546102f04260086000886001600160a01b03166001600160a01b0316815260200190815260200160002054610796565b6107a2565b6001600160a01b03841660009081526006602052604090205490915061031c9082906107b8565b9392505050565b600061031c8383600a546107c4565b6000546001600160a01b031633146103655760405162461bcd60e51b815260040161035c90610958565b60405180910390fd5b600a541561037257600080fd5b6005805460ff191660011790556419254d3800600a55565b60008061039683610770565b905060006103a382610601565b949350505050565b60055460ff166103ba57600080fd5b60006103ca3461014e4734610796565b90506103de816103d983610804565b610796565b905060006103eb34610804565b60055460405191925061010090046001600160a01b0316906108fc8315029083906000818181858888f1935050505015801561042b573d6000803e3d6000fd5b5033600090815260076020526040902054610446908361081c565b3360009081526007602052604090205561045f83610610565b505050565b60006104708247610323565b92915050565b6000546001600160a01b031633146104a05760405162461bcd60e51b815260040161035c90610958565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055460ff166104f957600080fd5b600061050433610770565b9050600061051182610601565b9050600061051e82610804565b33600090815260076020908152604080832083905560089091529020429055600a5490915061054d908461081c565b600a556005546040516101009091046001600160a01b0316906108fc8315029083906000818181858888f1935050505015801561058e573d6000803e3d6000fd5b50336108fc61059d8484610796565b6040518115909202916000818181858888f193505050501580156105c5573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146105f55760405162461bcd60e51b815260040161035c90610958565b6105fe81610828565b50565b600061047082600a54476107c4565b60055460ff1661061f57600080fd5b6001600160a01b038116331415610634575060005b336000908152600960205260409020546001600160a01b03161580156106715750336000818152600960205260409020546001600160a01b031614155b1561069f5733600090815260096020526040902080546001600160a01b0319166001600160a01b0383161790555b60006106aa33610770565b905060006106ba826001546108e8565b336000908152600660205260409020549091506106d7908261081c565b336000908152600660209081526040808320939093556007808252838320839055600880835284842042905560098352848420546001600160a01b031684529152919020546107309161072b9085906108e8565b61081c565b336000908152600960209081526040808320546001600160a01b031683526007909152902055600a546107689061072b8460056108e8565b600a55505050565b6001600160a01b0381166000908152600760205260408120546104709061072b846102b8565b600061031c82846109a3565b60008183106107b1578161031c565b5090919050565b600061031c82846109ba565b60006103a36107d5600254846107b8565b6107ff60035461072b6107f96107ed6002548a6107b8565b61072b6003548c6107b8565b896108e8565b6108e8565b6000610470610815836004546107b8565b60646108e8565b600061031c82846109d9565b6001600160a01b03811661088d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161035c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600061031c82846109f1565b60006020828403121561090657600080fd5b81356001600160a01b038116811461031c57600080fd5b6000806040838503121561093057600080fd5b50508035926020909101359150565b60006020828403121561095157600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156109b5576109b561098d565b500390565b60008160001904831182151516156109d4576109d461098d565b500290565b600082198211156109ec576109ec61098d565b500190565b600082610a0e57634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212207a1af85f9a949f5ba88e202eb5c8f1a5b6b978a30ef9977f51b354db775435cb64736f6c63430008090033
Verified Source Code Partial Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: Yes (200 runs)
ObsidiumETHMiner.sol 405 lines
/*
* Contract written by Obsidium Team
* Name - Obsidium ETH Miner
* Daily Return - 8%
* APR - 2,920%
* Obsidium Fee - 5%
*/
// SPDX-License-Identifier: MIT
library SafeMath {
/**
* Obsidium Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* Obsidium Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* Obsidium Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* Obsidium Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* Obsidium Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* Obsidium Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* Obsidium Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* Obsidium Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* Obsidium Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* Obsidium Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* Obsidium Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* Obsidium Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* Obsidium Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
pragma solidity 0.8.9;
/**
* Obsidium Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* Obsidium Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* Obsidium Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
contract ObsidiumETHMiner is Context, Ownable {
using SafeMath for uint256;
uint256 private CRYSTALS_TO_HATCH_1MINERS = 1080000; //for final version should be seconds in a day
uint256 private PSN = 10000;
uint256 private PSNH = 5000;
uint256 private obsFeeVal = 5;
bool private initialized = false;
address payable private recAdd;
mapping (address => uint256) private hatcheryMiners;
mapping (address => uint256) private claimedCrystals;
mapping (address => uint256) private lastHatch;
mapping (address => address) private referrals;
uint256 private marketCrystals;
constructor() {
recAdd = payable(msg.sender);
}
function hatchCrystals(address ref) public {
require(initialized);
if(ref == msg.sender) {
ref = address(0);
}
if(referrals[msg.sender] == address(0) && referrals[msg.sender] != msg.sender) {
referrals[msg.sender] = ref;
}
uint256 crystalsUsed = getMyCrystals(msg.sender);
uint256 newMiners = SafeMath.div(crystalsUsed,CRYSTALS_TO_HATCH_1MINERS);
hatcheryMiners[msg.sender] = SafeMath.add(hatcheryMiners[msg.sender],newMiners);
claimedCrystals[msg.sender] = 0;
lastHatch[msg.sender] = block.timestamp;
//send referral crystals
claimedCrystals[referrals[msg.sender]] = SafeMath.add(claimedCrystals[referrals[msg.sender]],SafeMath.div(crystalsUsed,8));
//boost market to nerf miners hoarding
marketCrystals=SafeMath.add(marketCrystals,SafeMath.div(crystalsUsed,5));
}
function sellCrystals() public {
require(initialized);
uint256 hasCrystals = getMyCrystals(msg.sender);
uint256 crystalValue = calculateCrystalSell(hasCrystals);
uint256 fee = obsFee(crystalValue);
claimedCrystals[msg.sender] = 0;
lastHatch[msg.sender] = block.timestamp;
marketCrystals = SafeMath.add(marketCrystals,hasCrystals);
recAdd.transfer(fee);
payable (msg.sender).transfer(SafeMath.sub(crystalValue,fee));
}
function obsidiumRewards(address adr) public view returns(uint256) {
uint256 hasCrystals = getMyCrystals(adr);
uint256 crystalValue = calculateCrystalSell(hasCrystals);
return crystalValue;
}
function buyCrystals(address ref) public payable {
require(initialized);
uint256 crystalsBought = calculateCrystalBuy(msg.value,SafeMath.sub(address(this).balance,msg.value));
crystalsBought = SafeMath.sub(crystalsBought,obsFee(crystalsBought));
uint256 fee = obsFee(msg.value);
recAdd.transfer(fee);
claimedCrystals[msg.sender] = SafeMath.add(claimedCrystals[msg.sender],crystalsBought);
hatchCrystals(ref);
}
function calculateTrade(uint256 rt,uint256 rs, uint256 bs) private view returns(uint256) {
return SafeMath.div(SafeMath.mul(PSN,bs),SafeMath.add(PSNH,SafeMath.div(SafeMath.add(SafeMath.mul(PSN,rs),SafeMath.mul(PSNH,rt)),rt)));
}
function calculateCrystalSell(uint256 crystals) public view returns(uint256) {
return calculateTrade(crystals,marketCrystals,address(this).balance);
}
function calculateCrystalBuy(uint256 eth,uint256 contractBalance) public view returns(uint256) {
return calculateTrade(eth,contractBalance,marketCrystals);
}
function calculateCrystalBuySimple(uint256 eth) public view returns(uint256) {
return calculateCrystalBuy(eth,address(this).balance);
}
function obsFee(uint256 amount) private view returns(uint256) {
return SafeMath.div(SafeMath.mul(amount,obsFeeVal),100);
}
function seedMarket() public payable onlyOwner {
require(marketCrystals == 0);
initialized = true;
marketCrystals = 108000000000;
}
function getBalance() public view returns(uint256) {
return address(this).balance;
}
function getMyMiners(address adr) public view returns(uint256) {
return hatcheryMiners[adr];
}
function getMyCrystals(address adr) public view returns(uint256) {
return SafeMath.add(claimedCrystals[adr],getCrystalsSinceLastHatch(adr));
}
function getCrystalsSinceLastHatch(address adr) public view returns(uint256) {
uint256 secondsPassed=min(CRYSTALS_TO_HATCH_1MINERS,SafeMath.sub(block.timestamp,lastHatch[adr]));
return SafeMath.mul(secondsPassed,hatcheryMiners[adr]);
}
function min(uint256 a, uint256 b) private pure returns (uint256) {
return a < b ? a : b;
}
}
Read Contract
calculateCrystalBuy 0x141ad8ea → uint256
calculateCrystalBuySimple 0x68ea2322 → uint256
calculateCrystalSell 0xf509e076 → uint256
getBalance 0x12065fe0 → uint256
getCrystalsSinceLastHatch 0x11e17993 → uint256
getMyCrystals 0xfd3d7551 → uint256
getMyMiners 0x4b634b06 → uint256
obsidiumRewards 0x51783fc2 → uint256
owner 0x8da5cb5b → address
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
buyCrystals 0x57493d46
address ref
hatchCrystals 0xf747680d
address ref
renounceOwnership 0x715018a6
No parameters
seedMarket 0x3c5f07cb
No parameters
sellCrystals 0xdd395155
No parameters
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address