ETH Price: $2,061.01 (+2.92%)

Transaction Decoder

Block:
10006782 at May-05-2020 02:35:30 PM +UTC
Transaction Fee:
0.001122544 ETH $2.31
Gas Used:
70,159 Gas / 16 Gwei

Emitted Events:

125 EveryDayROI.Withdraw( investor=[Sender] 0x8ebeaf6e0c442b2e18325d2904449859b613c8e0, amount=6944444444444 )
126 EveryDayROI.Invest( investor=[Sender] 0x8ebeaf6e0c442b2e18325d2904449859b613c8e0, amount=10000000000000000 )

Account State Difference:

  Address   Before After State Difference Code
0x0ba10503...5cb10Ed86 0.009252931771782622 Eth0.018245987327338178 Eth0.008993055555555556
0x4a700611...99fD91649 0.297815142352027195 Eth0.298315142352027195 Eth0.0005
(Spark Pool)
8.926939904400264868 Eth8.928062448400264868 Eth0.001122544
0x630198F7...d83747EF7 0.293223755808743725 Eth0.293723755808743725 Eth0.0005
0x8eBEAf6E...9B613c8E0
0.039334215 Eth
Nonce: 1
0.028218615444444444 Eth
Nonce: 2
0.011115599555555556

Execution Trace

ETH 0.01 EveryDayROI.CALL( )
  • ETH 0.000006944444444444 0x8ebeaf6e0c442b2e18325d2904449859b613c8e0.CALL( )
  • ETH 0.0005 0x4a700611af75e3b275d439e50d27ce599fd91649.CALL( )
  • ETH 0.0005 0x630198f7a7ba302dcb3595a82f60930d83747ef7.CALL( )
    pragma solidity ^0.4.24;
    
    contract EveryDayROI{
        
        using SafeMath for uint256;
    
        mapping(address => uint256) investments;
        mapping(address => uint256) joined;
        mapping(address => uint256) withdrawals;
        mapping(address => uint256) referrer;
    
        uint256 public minimum = 10000000000000000;
        uint256 public step = 100;
        address public ownerWallet;
        address public owner;
        address public bountyManager;
        address promoter = 0x630198f7a7ba302dcb3595a82f60930d83747ef7;
    
        event Invest(address investor, uint256 amount);
        event Withdraw(address investor, uint256 amount);
        event Bounty(address hunter, uint256 amount);
        event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
        
        /**
         * @dev Сonstructor Sets the original roles of the contract 
         */ 
         
        constructor(address _bountyManager) public {
            owner = msg.sender;
            ownerWallet = msg.sender;
            bountyManager = _bountyManager;
        }
    
        /**
         * @dev Modifiers
         */
         
        modifier onlyOwner() {
            require(msg.sender == owner);
            _;
        }
    
        modifier onlyBountyManager() {
            require(msg.sender == bountyManager);
            _;
        }
    
        /**
         * @dev Allows current owner to transfer control of the contract to a newOwner.
         * @param newOwner The address to transfer ownership to.
         * @param newOwnerWallet The address to transfer ownership to.
         */
        function transferOwnership(address newOwner, address newOwnerWallet) public onlyOwner {
            require(newOwner != address(0));
            emit OwnershipTransferred(owner, newOwner);
            owner = newOwner;
            ownerWallet = newOwnerWallet;
        }
    
        /**
         * @dev Investments
         */
        function () external payable {
            require(msg.value >= minimum);
            if (investments[msg.sender] > 0){
                if (withdraw()){
                    withdrawals[msg.sender] = 0;
                }
            }
            investments[msg.sender] = investments[msg.sender].add(msg.value);
            joined[msg.sender] = block.timestamp;
            ownerWallet.transfer(msg.value.div(100).mul(5));
            promoter.transfer(msg.value.div(100).mul(5));
            emit Invest(msg.sender, msg.value);
        }
    
        /**
        * @dev Evaluate current balance
        * @param _address Address of investor
        */
        function getBalance(address _address) view public returns (uint256) {
            uint256 minutesCount = now.sub(joined[_address]).div(1 minutes);
            uint256 percent = investments[_address].mul(step).div(100);
            uint256 different = percent.mul(minutesCount).div(1440);
            uint256 balance = different.sub(withdrawals[_address]);
    
            return balance;
        }
    
        /**
        * @dev Withdraw dividends from contract
        */
        function withdraw() public returns (bool){
            require(joined[msg.sender] > 0);
            uint256 balance = getBalance(msg.sender);
            if (address(this).balance > balance){
                if (balance > 0){
                    withdrawals[msg.sender] = withdrawals[msg.sender].add(balance);
                    msg.sender.transfer(balance);
                    emit Withdraw(msg.sender, balance);
                }
                return true;
            } else {
                return false;
            }
        }
        
        /**
        * @dev Bounty reward
        */
        function bounty() public {
            uint256 refBalance = checkReferral(msg.sender);
            if(refBalance >= minimum) {
                if (address(this).balance > refBalance) {
                    referrer[msg.sender] = 0;
                    msg.sender.transfer(refBalance);
                    emit Bounty(msg.sender, refBalance);
                }
            }
        }
    
        /**
        * @dev Gets balance of the sender address.
        * @return An uint256 representing the amount owned by the msg.sender.
        */
        function checkBalance() public view returns (uint256) {
            return getBalance(msg.sender);
        }
    
        /**
        * @dev Gets withdrawals of the specified address.
        * @param _investor The address to query the the balance of.
        * @return An uint256 representing the amount owned by the passed address.
        */
        function checkWithdrawals(address _investor) public view returns (uint256) {
            return withdrawals[_investor];
        }
    
        /**
        * @dev Gets investments of the specified address.
        * @param _investor The address to query the the balance of.
        * @return An uint256 representing the amount owned by the passed address.
        */
        function checkInvestments(address _investor) public view returns (uint256) {
            return investments[_investor];
        }
    
        /**
        * @dev Gets referrer balance of the specified address.
        * @param _hunter The address of the referrer
        * @return An uint256 representing the referral earnings.
        */
        function checkReferral(address _hunter) public view returns (uint256) {
            return referrer[_hunter];
        }
        
        /**
        * @dev Updates referrer balance 
        * @param _hunter The address of the referrer
        * @param _amount An uint256 representing the referral earnings.
        */
        function updateReferral(address _hunter, uint256 _amount) onlyBountyManager public {
            referrer[_hunter] = referrer[_hunter].add(_amount);
        }
        
    }
    
    /**
     * @title SafeMath
     * @dev Math operations with safety checks that throw on error
     */
    library SafeMath {
        function mul(uint256 a, uint256 b) internal pure returns (uint256) {
            if (a == 0) {
                return 0;
            }
            uint256 c = a * b;
            assert(c / a == b);
            return c;
        }
    
        function div(uint256 a, uint256 b) internal pure returns (uint256) {
            // assert(b > 0); // Solidity automatically throws when dividing by 0
            uint256 c = a / b;
            // assert(a == b * c + a % b); // There is no case in which this doesn't hold
            return c;
        }
    
        function sub(uint256 a, uint256 b) internal pure returns (uint256) {
            assert(b <= a);
            return a - b;
        }
    
        function add(uint256 a, uint256 b) internal pure returns (uint256) {
            uint256 c = a + b;
            assert(c >= a);
            return c;
        }
    }