ETH Price: $3,452.15 (+0.33%)
Gas: 5 Gwei

Contract

0x5BB8EF8efD18C6034EC9277DaCA9a5E29B1f1Cb1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Staking Re...96447192020-03-10 16:09:421596 days ago1583856582IN
0x5BB8EF8e...29B1f1Cb1
0 ETH0.000190585.4
Update Settings96447022020-03-10 16:05:301596 days ago1583856330IN
0x5BB8EF8e...29B1f1Cb1
0 ETH0.000159925
Update Settings96382642020-03-09 16:16:581597 days ago1583770618IN
0x5BB8EF8e...29B1f1Cb1
0 ETH0.0006423712
Transfer96354782020-03-09 5:46:561598 days ago1583732816IN
0x5BB8EF8e...29B1f1Cb1
0.0001 ETH0.0002314911
Transfer96354672020-03-09 5:44:241598 days ago1583732664IN
0x5BB8EF8e...29B1f1Cb1
0.00001 ETH0.00029414
Update Settings91504502019-12-23 11:23:481675 days ago1577100228IN
0x5BB8EF8e...29B1f1Cb1
0 ETH0.000283234
0x6080604091403912019-12-21 11:12:281677 days ago1576926748IN
 Create: ProtocolFeeVault
0 ETH0.008519098

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
96348812020-03-09 3:33:161598 days ago1583724796
0x5BB8EF8e...29B1f1Cb1
2.63275 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ProtocolFeeVault

Compiler Version
v0.5.13+commit.5b0b510c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-12-21
*/

// File: contracts/lib/AddressUtil.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title Utility Functions for addresses
/// @author Daniel Wang - <[email protected]>
/// @author Brecht Devos - <[email protected]>
library AddressUtil
{
    using AddressUtil for *;

    function isContract(
        address addr
        )
        internal
        view
        returns (bool)
    {
        uint32 size;
        assembly { size := extcodesize(addr) }
        return (size > 0);
    }

    function toPayable(
        address addr
        )
        internal
        pure
        returns (address payable)
    {
        return address(uint160(addr));
    }

    // Works like address.send but with a customizable gas limit
    // Make sure your code is safe for reentrancy when using this function!
    function sendETH(
        address to,
        uint    amount,
        uint    gasLimit
        )
        internal
        returns (bool success)
    {
        if (amount == 0) {
            return true;
        }
        address payable recipient = to.toPayable();
        /* solium-disable-next-line */
        (success, ) = recipient.call.value(amount).gas(gasLimit)("");
    }

    // Works like address.transfer but with a customizable gas limit
    // Make sure your code is safe for reentrancy when using this function!
    function sendETHAndVerify(
        address to,
        uint    amount,
        uint    gasLimit
        )
        internal
        returns (bool success)
    {
        success = to.sendETH(amount, gasLimit);
        require(success, "TRANSFER_FAILURE");
    }
}

// File: contracts/lib/ERC20.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title ERC20 Token Interface
/// @dev see https://github.com/ethereum/EIPs/issues/20
/// @author Daniel Wang - <[email protected]>
contract ERC20
{
    function totalSupply()
        public
        view
        returns (uint);

    function balanceOf(
        address who
        )
        public
        view
        returns (uint);

    function allowance(
        address owner,
        address spender
        )
        public
        view
        returns (uint);

    function transfer(
        address to,
        uint value
        )
        public
        returns (bool);

    function transferFrom(
        address from,
        address to,
        uint    value
        )
        public
        returns (bool);

    function approve(
        address spender,
        uint    value
        )
        public
        returns (bool);
}

// File: contracts/lib/BurnableERC20.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;



/// @title Burnable ERC20 Token Interface
/// @author Brecht Devos - <[email protected]>
contract BurnableERC20 is ERC20
{
    function burn(
        uint value
        )
        public
        returns (bool);

    function burnFrom(
        address from,
        uint value
        )
        public
        returns (bool);
}

// File: contracts/lib/Ownable.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title Ownable
/// @author Brecht Devos - <[email protected]>
/// @dev The Ownable contract has an owner address, and provides basic
///      authorization control functions, this simplifies the implementation of
///      "user permissions".
contract Ownable
{
    address public owner;

    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /// @dev The Ownable constructor sets the original `owner` of the contract
    ///      to the sender.
    constructor()
        public
    {
        owner = msg.sender;
    }

    /// @dev Throws if called by any account other than the owner.
    modifier onlyOwner()
    {
        require(msg.sender == owner, "UNAUTHORIZED");
        _;
    }

    /// @dev Allows the current owner to transfer control of the contract to a
    ///      new owner.
    /// @param newOwner The address to transfer ownership to.
    function transferOwnership(
        address newOwner
        )
        public
        onlyOwner
    {
        require(newOwner != address(0), "ZERO_ADDRESS");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    function renounceOwnership()
        public
        onlyOwner
    {
        emit OwnershipTransferred(owner, address(0));
        owner = address(0);
    }
}

// File: contracts/lib/Claimable.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;



/// @title Claimable
/// @author Brecht Devos - <[email protected]>
/// @dev Extension for the Ownable contract, where the ownership needs
///      to be claimed. This allows the new owner to accept the transfer.
contract Claimable is Ownable
{
    address public pendingOwner;

    /// @dev Modifier throws if called by any account other than the pendingOwner.
    modifier onlyPendingOwner() {
        require(msg.sender == pendingOwner, "UNAUTHORIZED");
        _;
    }

    /// @dev Allows the current owner to set the pendingOwner address.
    /// @param newOwner The address to transfer ownership to.
    function transferOwnership(
        address newOwner
        )
        public
        onlyOwner
    {
        require(newOwner != address(0) && newOwner != owner, "INVALID_ADDRESS");
        pendingOwner = newOwner;
    }

    /// @dev Allows the pendingOwner address to finalize the transfer.
    function claimOwnership()
        public
        onlyPendingOwner
    {
        emit OwnershipTransferred(owner, pendingOwner);
        owner = pendingOwner;
        pendingOwner = address(0);
    }
}

// File: contracts/lib/ERC20SafeTransfer.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title ERC20 safe transfer
/// @dev see https://github.com/sec-bit/badERC20Fix
/// @author Brecht Devos - <[email protected]>
library ERC20SafeTransfer
{
    function safeTransferAndVerify(
        address token,
        address to,
        uint    value
        )
        internal
    {
        safeTransferWithGasLimitAndVerify(
            token,
            to,
            value,
            gasleft()
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint    value
        )
        internal
        returns (bool)
    {
        return safeTransferWithGasLimit(
            token,
            to,
            value,
            gasleft()
        );
    }

    function safeTransferWithGasLimitAndVerify(
        address token,
        address to,
        uint    value,
        uint    gasLimit
        )
        internal
    {
        require(
            safeTransferWithGasLimit(token, to, value, gasLimit),
            "TRANSFER_FAILURE"
        );
    }

    function safeTransferWithGasLimit(
        address token,
        address to,
        uint    value,
        uint    gasLimit
        )
        internal
        returns (bool)
    {
        // A transfer is successful when 'call' is successful and depending on the token:
        // - No value is returned: we assume a revert when the transfer failed (i.e. 'call' returns false)
        // - A single boolean is returned: this boolean needs to be true (non-zero)

        // bytes4(keccak256("transfer(address,uint)")) = 0xa9059cbb
        bytes memory callData = abi.encodeWithSelector(
            bytes4(0xa9059cbb),
            to,
            value
        );
        (bool success, ) = token.call.gas(gasLimit)(callData);
        return checkReturnValue(success);
    }

    function safeTransferFromAndVerify(
        address token,
        address from,
        address to,
        uint    value
        )
        internal
    {
        safeTransferFromWithGasLimitAndVerify(
            token,
            from,
            to,
            value,
            gasleft()
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint    value
        )
        internal
        returns (bool)
    {
        return safeTransferFromWithGasLimit(
            token,
            from,
            to,
            value,
            gasleft()
        );
    }

    function safeTransferFromWithGasLimitAndVerify(
        address token,
        address from,
        address to,
        uint    value,
        uint    gasLimit
        )
        internal
    {
        bool result = safeTransferFromWithGasLimit(
            token,
            from,
            to,
            value,
            gasLimit
        );
        require(result, "TRANSFER_FAILURE");
    }

    function safeTransferFromWithGasLimit(
        address token,
        address from,
        address to,
        uint    value,
        uint    gasLimit
        )
        internal
        returns (bool)
    {
        // A transferFrom is successful when 'call' is successful and depending on the token:
        // - No value is returned: we assume a revert when the transfer failed (i.e. 'call' returns false)
        // - A single boolean is returned: this boolean needs to be true (non-zero)

        // bytes4(keccak256("transferFrom(address,address,uint)")) = 0x23b872dd
        bytes memory callData = abi.encodeWithSelector(
            bytes4(0x23b872dd),
            from,
            to,
            value
        );
        (bool success, ) = token.call.gas(gasLimit)(callData);
        return checkReturnValue(success);
    }

    function checkReturnValue(
        bool success
        )
        internal
        pure
        returns (bool)
    {
        // A transfer/transferFrom is successful when 'call' is successful and depending on the token:
        // - No value is returned: we assume a revert when the transfer failed (i.e. 'call' returns false)
        // - A single boolean is returned: this boolean needs to be true (non-zero)
        if (success) {
            assembly {
                switch returndatasize()
                // Non-standard ERC20: nothing is returned so if 'call' was successful we assume the transfer succeeded
                case 0 {
                    success := 1
                }
                // Standard ERC20: a single boolean value is returned which needs to be true
                case 32 {
                    returndatacopy(0, 0, 32)
                    success := mload(0)
                }
                // None of the above: not successful
                default {
                    success := 0
                }
            }
        }
        return success;
    }
}

// File: contracts/lib/MathUint.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title Utility Functions for uint
/// @author Daniel Wang - <[email protected]>
library MathUint
{
    function mul(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        c = a * b;
        require(a == 0 || c / a == b, "MUL_OVERFLOW");
    }

    function sub(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint)
    {
        require(b <= a, "SUB_UNDERFLOW");
        return a - b;
    }

    function add(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        c = a + b;
        require(c >= a, "ADD_OVERFLOW");
    }

    function decodeFloat(
        uint f
        )
        internal
        pure
        returns (uint value)
    {
        uint numBitsMantissa = 23;
        uint exponent = f >> numBitsMantissa;
        uint mantissa = f & ((1 << numBitsMantissa) - 1);
        value = mantissa * (10 ** exponent);
    }
}

// File: contracts/lib/ReentrancyGuard.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title ReentrancyGuard
/// @author Brecht Devos - <[email protected]>
/// @dev Exposes a modifier that guards a function against reentrancy
///      Changing the value of the same storage value multiple times in a transaction
///      is cheap (starting from Istanbul) so there is no need to minimize
///      the number of times the value is changed
contract ReentrancyGuard
{
    //The default value must be 0 in order to work behind a proxy.
    uint private _guardValue;

    // Use this modifier on a function to prevent reentrancy
    modifier nonReentrant()
    {
        // Check if the guard value has its original value
        require(_guardValue == 0, "REENTRANCY");

        // Set the value to something else
        _guardValue = 1;

        // Function body
        _;

        // Set the value back
        _guardValue = 0;
    }
}

// File: contracts/iface/IProtocolFeeVault.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;


/// @title IProtocolFeeVault
/// @dev This smart contract manages the distribution of protocol fees.
///     Tokens other than LRC will be sold by TokenSeller,
///     If no TokenSeller is set, the tokens or Ether will be sent to the owner
///     to sell them for LRC by other means such as using a centralized exchange.
///     For LRC token, 70% of them can be withdrawn to the UserStakingPool contract
///     to reward LRC stakers; 20% of them can be withdrawn to the Loopring DAO,
///     and the remaining 10% can be burned to reduce LRC's total supply.
contract IProtocolFeeVault
{
    uint public constant REWARD_PERCENTAGE      = 70;
    uint public constant DAO_PERDENTAGE         = 20;

    address public userStakingPoolAddress;
    address public lrcAddress;
    address public tokenSellerAddress;
    address public daoAddress;

    uint claimedReward;
    uint claimedDAOFund;
    uint claimedBurn;

    event LRCClaimed(uint amount);
    event DAOFunded(uint amountDAO, uint amountBurn);
    event TokenSold(address token, uint amount);
    event SettingsUpdated(uint time);

    /// @dev Sets depdending contract address. All these addresses can be zero.
    /// @param _userStakingPoolAddress The address of the user staking pool.
    /// @param _tokenSellerAddress The address of the token seller.
    /// @param _daoAddress The address of the DAO contract.
    function updateSettings(
        address _userStakingPoolAddress,
        address _tokenSellerAddress,
        address _daoAddress
        )
        external;

    /// @dev Claims LRC as staking reward to the IUserStakingPool contract.
    ///      Note that this function can only be called by
    ///      the IUserStakingPool contract.
    ///
    /// @param amount The amount of LRC to be claimed.
    function claimStakingReward(uint amount) external;

    /// @dev Withdraws LRC to DAO and in the meanwhile burn some LRC according to
    ///      the predefined percentages.
    function fundDAO() external;

    /// @dev Sells a non-LRC token or Ether to LRC. If no TokenSeller is set,
    ///      the tokens or Ether will be sent to the owner.
    /// @param token The token or ether (0x0) to sell.
    /// @param amount THe amout of token/ether to sell.
    function sellTokenForLRC(
        address token,
        uint    amount
        )
        external;

    /// @dev Returns some global stats regarding fees.
    /// @return accumulatedFees The accumulated amount of LRC protocol fees.
    /// @return accumulatedBurn The accumulated amount of LRC to burn.
    /// @return accumulatedDAOFund The accumulated amount of LRC as developer pool.
    /// @return accumulatedReward The accumulated amount of LRC as staking reward.
    /// @return remainingFees The remaining amount of LRC protocol fees.
    /// @return remainingBurn The remaining amount of LRC to burn.
    /// @return remainingDAOFund The remaining amount of LRC as developer pool.
    /// @return remainingReward The remaining amount of LRC as staking reward.
    function getProtocolFeeStats()
        public
        view
        returns (
            uint accumulatedFees,
            uint accumulatedBurn,
            uint accumulatedDAOFund,
            uint accumulatedReward,
            uint remainingFees,
            uint remainingBurn,
            uint remainingDAOFund,
            uint remainingReward
        );
}

// File: contracts/iface/ITokenSeller.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;

/// @title ITokenSeller
/// @dev Use this contract to sell tokenS for as many tokenB.
/// @author Daniel Wang  - <[email protected]>
contract ITokenSeller
{
    /// @dev Sells all tokenS for tokenB
    /// @param tokenS The token or Ether (0x0) to sell.
    /// @param tokenB The token to buy.
    /// @return success True if success, false otherwise.
    function sellToken(
        address tokenS,
        address tokenB
        )
        external
        payable
        returns (bool success);
}

// File: contracts/impl/ProtocolFeeVault.sol

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.5.11;










/// @title An Implementation of IProtocolFeeVault.
/// @author Daniel Wang - <[email protected]>
contract ProtocolFeeVault is Claimable, ReentrancyGuard, IProtocolFeeVault
{
    using AddressUtil       for address;
    using AddressUtil       for address payable;
    using ERC20SafeTransfer for address;
    using MathUint          for uint;

    constructor(address _lrcAddress)
        Claimable()
        public
    {
        require(_lrcAddress != address(0), "ZERO_ADDRESS");
        lrcAddress = _lrcAddress;
    }

    function updateSettings(
        address _userStakingPoolAddress,
        address _tokenSellerAddress,
        address _daoAddress
        )
        external
        nonReentrant
        onlyOwner
    {
        require(
            userStakingPoolAddress != _userStakingPoolAddress ||
            tokenSellerAddress != _tokenSellerAddress ||
            daoAddress != _daoAddress,
            "SAME_ADDRESSES"
        );
        userStakingPoolAddress = _userStakingPoolAddress;
        tokenSellerAddress = _tokenSellerAddress;
        daoAddress = _daoAddress;

        emit SettingsUpdated(now);
    }

    function claimStakingReward(
        uint amount
        )
        external
        nonReentrant
    {
        require(amount > 0, "ZERO_VALUE");
        require(msg.sender == userStakingPoolAddress, "UNAUTHORIZED");
        lrcAddress.safeTransferAndVerify(userStakingPoolAddress, amount);
        claimedReward = claimedReward.add(amount);
        emit LRCClaimed(amount);
    }

    function fundDAO()
        external
        nonReentrant
    {
        uint amountDAO;
        uint amountBurn;
        (, , , , , amountBurn, amountDAO, ) = getProtocolFeeStats();

        address recipient = daoAddress == address(0) ? owner : daoAddress;

        if (amountDAO > 0) {
            lrcAddress.safeTransferAndVerify(recipient, amountDAO);
        }

        if (amountBurn > 0) {
            require(BurnableERC20(lrcAddress).burn(amountBurn), "BURN_FAILURE");
        }

        claimedBurn = claimedBurn.add(amountBurn);
        claimedDAOFund = claimedDAOFund.add(amountDAO);

        emit DAOFunded(amountDAO, amountBurn);
    }

    function sellTokenForLRC(
        address token,
        uint    amount
        )
        external
        nonReentrant
    {
        require(amount > 0, "ZERO_AMOUNT");
        require(token != lrcAddress, "PROHIBITED");

        address recipient = tokenSellerAddress == address(0) ? owner : tokenSellerAddress;

        if (token == address(0)) {
            recipient.sendETHAndVerify(amount, gasleft());
        } else {
            token.safeTransferAndVerify(recipient, amount);
        }

        require(
            tokenSellerAddress == address(0) ||
            ITokenSeller(tokenSellerAddress).sellToken(token, lrcAddress),
            "SELL_FAILURE"
        );

        emit TokenSold(token, amount);
    }

    function getProtocolFeeStats()
        public
        view
        returns (
            uint accumulatedFees,
            uint accumulatedBurn,
            uint accumulatedDAOFund,
            uint accumulatedReward,
            uint remainingFees,
            uint remainingBurn,
            uint remainingDAOFund,
            uint remainingReward
        )
    {
        remainingFees = ERC20(lrcAddress).balanceOf(address(this));
        accumulatedFees = remainingFees.add(claimedReward).add(claimedDAOFund).add(claimedBurn);

        accumulatedReward = accumulatedFees.mul(REWARD_PERCENTAGE) / 100;
        accumulatedDAOFund = accumulatedFees.mul(DAO_PERDENTAGE) / 100;
        accumulatedBurn = accumulatedFees.sub(accumulatedReward).sub(accumulatedDAOFund);

        remainingReward = accumulatedReward.sub(claimedReward);
        remainingDAOFund = accumulatedDAOFund.sub(claimedDAOFund);
        remainingBurn = accumulatedBurn.sub(claimedBurn);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_lrcAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountDAO","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountBurn","type":"uint256"}],"name":"DAOFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LRCClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"SettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenSold","type":"event"},{"constant":true,"inputs":[],"name":"DAO_PERDENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REWARD_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimStakingReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"daoAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"fundDAO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getProtocolFeeStats","outputs":[{"internalType":"uint256","name":"accumulatedFees","type":"uint256"},{"internalType":"uint256","name":"accumulatedBurn","type":"uint256"},{"internalType":"uint256","name":"accumulatedDAOFund","type":"uint256"},{"internalType":"uint256","name":"accumulatedReward","type":"uint256"},{"internalType":"uint256","name":"remainingFees","type":"uint256"},{"internalType":"uint256","name":"remainingBurn","type":"uint256"},{"internalType":"uint256","name":"remainingDAOFund","type":"uint256"},{"internalType":"uint256","name":"remainingReward","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lrcAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sellTokenForLRC","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenSellerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_userStakingPoolAddress","type":"address"},{"internalType":"address","name":"_tokenSellerAddress","type":"address"},{"internalType":"address","name":"_daoAddress","type":"address"}],"name":"updateSettings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"userStakingPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516112663803806112668339818101604052602081101561003357600080fd5b5051600080546001600160a01b031916331790556001600160a01b0381166100bc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5a45524f5f414444524553530000000000000000000000000000000000000000604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b039290921691909117905561117b806100eb6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806368b79c3211610097578063e30c397811610066578063e30c39781461023f578063e3fe476414610247578063f2fde38b1461024f578063fc72b1ed1461027557610100565b806368b79c321461020d578063715018a6146102275780638da5cb5b1461022f578063a0cea6c01461023757610100565b80633d6cf722116100d35780633d6cf722146101bd5780634e71e0c8146101c557806357aabe91146101cd578063611633791461020557610100565b80632131c68c14610105578063239cd4a4146101295780632a7bf6bf14610148578063365a906c14610174575b600080fd5b61010d61027d565b604080516001600160a01b039092168252519081900360200190f35b6101466004803603602081101561013f57600080fd5b503561028c565b005b6101466004803603604081101561015e57600080fd5b506001600160a01b0381351690602001356103d4565b61017c610653565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b61010d6107d3565b6101466107e2565b610146600480360360608110156101e357600080fd5b506001600160a01b038135811691602081013582169160409091013516610894565b610146610a29565b610215610c0f565b60408051918252519081900360200190f35b610146610c14565b61010d610cac565b61010d610cbb565b61010d610cca565b61010d610cd9565b6101466004803603602081101561026557600080fd5b50356001600160a01b0316610ce8565b610215610dc1565b6006546001600160a01b031681565b600254156102ce576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b600160025580610312576040805162461bcd60e51b815260206004820152600a6024820152695a45524f5f56414c554560b01b604482015290519081900360640190fd5b6003546001600160a01b03163314610360576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600354600454610383916001600160a01b0391821691168363ffffffff610dc616565b600754610396908263ffffffff610dd716565b6007556040805182815290517faf9f8e373f3b94eb4c733ac25dd927271dc24febef9ae82f0868502653fdb65c9181900360200190a1506000600255565b60025415610416576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b60016002558061045b576040805162461bcd60e51b815260206004820152600b60248201526a16915493d7d05353d5539560aa1b604482015290519081900360640190fd5b6004546001600160a01b03838116911614156104ab576040805162461bcd60e51b815260206004820152600a602482015269141493d212509255115160b21b604482015290519081900360640190fd5b6005546000906001600160a01b0316156104d0576005546001600160a01b03166104dd565b6000546001600160a01b03165b90506001600160a01b03831661050f57610509825a6001600160a01b038416919063ffffffff610e2416565b50610529565b6105296001600160a01b038416828463ffffffff610dc616565b6005546001600160a01b031615806105c55750600554600480546040805163dc42f97160e01b81526001600160a01b0388811694820194909452918316602483015251919092169163dc42f9719160448083019260209291908290030181600087803b15801561059857600080fd5b505af11580156105ac573d6000803e3d6000fd5b505050506040513d60208110156105c257600080fd5b50515b610605576040805162461bcd60e51b815260206004820152600c60248201526b53454c4c5f4641494c55524560a01b604482015290519081900360640190fd5b604080516001600160a01b03851681526020810184905281517ffe2ff4cf36ff7d2c2b06eb960897ee0d76d9c3e58da12feb7b93e86b226dd344929181900390910190a15050600060025550565b600080600080600080600080600460009054906101000a90046001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156106ca57600080fd5b505afa1580156106de573d6000803e3d6000fd5b505050506040513d60208110156106f457600080fd5b50516009546008546007549296506107269261071a91908290899063ffffffff610dd716565b9063ffffffff610dd716565b9750606461073b89604663ffffffff610e8e16565b8161074257fe5b049450606461075889601463ffffffff610e8e16565b8161075f57fe5b049550610782866107768a8863ffffffff610ee616565b9063ffffffff610ee616565b965061079960075486610ee690919063ffffffff16565b90506107b060085487610ee690919063ffffffff16565b91506107c760095488610ee690919063ffffffff16565b92509091929394959697565b6004546001600160a01b031681565b6001546001600160a01b03163314610830576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600254156108d6576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b60016002556000546001600160a01b03163314610929576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b6003546001600160a01b03848116911614158061095457506005546001600160a01b03838116911614155b8061096d57506006546001600160a01b03828116911614155b6109af576040805162461bcd60e51b815260206004820152600e60248201526d53414d455f41444452455353455360901b604482015290519081900360640190fd5b600380546001600160a01b038086166001600160a01b0319928316179092556005805485841690831617905560068054928416929091169190911790556040805142815290517f4b804a0bfbdc2639203b93035be561d86f65f52b7e14984f95ec9d298cafccac9181900360200190a15050600060025550565b60025415610a6b576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b6001600255600080610a7b610653565b50600654909850909650600095506001600160a01b0316159350610aae92505050576006546001600160a01b0316610abb565b6000546001600160a01b03165b90508215610ae057600454610ae0906001600160a01b0316828563ffffffff610dc616565b8115610b9e576004805460408051630852cd8d60e31b8152928301859052516001600160a01b03909116916342966c689160248083019260209291908290030181600087803b158015610b3257600080fd5b505af1158015610b46573d6000803e3d6000fd5b505050506040513d6020811015610b5c57600080fd5b5051610b9e576040805162461bcd60e51b815260206004820152600c60248201526b4255524e5f4641494c55524560a01b604482015290519081900360640190fd5b600954610bb1908363ffffffff610dd716565b600955600854610bc7908463ffffffff610dd716565b600855604080518481526020810184905281517ff5deee3dde315bb684736ad09d95603ad754fe04704f5a2f0719216a09dac68d929181900390910190a15050600060025550565b601481565b6000546001600160a01b03163314610c62576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6003546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6000546001600160a01b03163314610d36576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b6001600160a01b03811615801590610d5c57506000546001600160a01b03828116911614155b610d9f576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b604681565b610dd28383835a610f33565b505050565b81810182811015610e1e576040805162461bcd60e51b815260206004820152600c60248201526b4144445f4f564552464c4f5760a01b604482015290519081900360640190fd5b92915050565b6000610e406001600160a01b038516848463ffffffff610f8916565b905080610e87576040805162461bcd60e51b815260206004820152601060248201526f5452414e534645525f4641494c55524560801b604482015290519081900360640190fd5b9392505050565b818102821580610ea6575081838281610ea357fe5b04145b610e1e576040805162461bcd60e51b815260206004820152600c60248201526b4d554c5f4f564552464c4f5760a01b604482015290519081900360640190fd5b600082821115610f2d576040805162461bcd60e51b815260206004820152600d60248201526c5355425f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b610f3f8484848461100c565b610f83576040805162461bcd60e51b815260206004820152601060248201526f5452414e534645525f4641494c55524560801b604482015290519081900360640190fd5b50505050565b600082610f9857506001610e87565b6000610fac856001600160a01b0316611108565b6040519091506001600160a01b03821690849086906000818181858888f193505050503d8060008114610ffb576040519150601f19603f3d011682016040523d82523d6000602084013e611000565b606091505b50909695505050505050565b604080516001600160a01b038086166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485938a16928792869282918083835b602083106110885780518252601f199092019160209182019101611069565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038160008787f1925050503d80600081146110eb576040519150601f19603f3d011682016040523d82523d6000602084013e6110f0565b606091505b505090506110fd8161110b565b979650505050505050565b90565b60008115611142573d801561112b57602081146111345760009250611140565b60019250611140565b60206000803e60005192505b505b509056fea265627a7a723158205c607ab35fa428fc6182ac1a30c6f45ee52101f87c36db41e0d9aff9e3359a2664736f6c634300050d0032000000000000000000000000bbbbca6a901c926f240b89eacb641d8aec7aeafd

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c806368b79c3211610097578063e30c397811610066578063e30c39781461023f578063e3fe476414610247578063f2fde38b1461024f578063fc72b1ed1461027557610100565b806368b79c321461020d578063715018a6146102275780638da5cb5b1461022f578063a0cea6c01461023757610100565b80633d6cf722116100d35780633d6cf722146101bd5780634e71e0c8146101c557806357aabe91146101cd578063611633791461020557610100565b80632131c68c14610105578063239cd4a4146101295780632a7bf6bf14610148578063365a906c14610174575b600080fd5b61010d61027d565b604080516001600160a01b039092168252519081900360200190f35b6101466004803603602081101561013f57600080fd5b503561028c565b005b6101466004803603604081101561015e57600080fd5b506001600160a01b0381351690602001356103d4565b61017c610653565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b61010d6107d3565b6101466107e2565b610146600480360360608110156101e357600080fd5b506001600160a01b038135811691602081013582169160409091013516610894565b610146610a29565b610215610c0f565b60408051918252519081900360200190f35b610146610c14565b61010d610cac565b61010d610cbb565b61010d610cca565b61010d610cd9565b6101466004803603602081101561026557600080fd5b50356001600160a01b0316610ce8565b610215610dc1565b6006546001600160a01b031681565b600254156102ce576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b600160025580610312576040805162461bcd60e51b815260206004820152600a6024820152695a45524f5f56414c554560b01b604482015290519081900360640190fd5b6003546001600160a01b03163314610360576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600354600454610383916001600160a01b0391821691168363ffffffff610dc616565b600754610396908263ffffffff610dd716565b6007556040805182815290517faf9f8e373f3b94eb4c733ac25dd927271dc24febef9ae82f0868502653fdb65c9181900360200190a1506000600255565b60025415610416576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b60016002558061045b576040805162461bcd60e51b815260206004820152600b60248201526a16915493d7d05353d5539560aa1b604482015290519081900360640190fd5b6004546001600160a01b03838116911614156104ab576040805162461bcd60e51b815260206004820152600a602482015269141493d212509255115160b21b604482015290519081900360640190fd5b6005546000906001600160a01b0316156104d0576005546001600160a01b03166104dd565b6000546001600160a01b03165b90506001600160a01b03831661050f57610509825a6001600160a01b038416919063ffffffff610e2416565b50610529565b6105296001600160a01b038416828463ffffffff610dc616565b6005546001600160a01b031615806105c55750600554600480546040805163dc42f97160e01b81526001600160a01b0388811694820194909452918316602483015251919092169163dc42f9719160448083019260209291908290030181600087803b15801561059857600080fd5b505af11580156105ac573d6000803e3d6000fd5b505050506040513d60208110156105c257600080fd5b50515b610605576040805162461bcd60e51b815260206004820152600c60248201526b53454c4c5f4641494c55524560a01b604482015290519081900360640190fd5b604080516001600160a01b03851681526020810184905281517ffe2ff4cf36ff7d2c2b06eb960897ee0d76d9c3e58da12feb7b93e86b226dd344929181900390910190a15050600060025550565b600080600080600080600080600460009054906101000a90046001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156106ca57600080fd5b505afa1580156106de573d6000803e3d6000fd5b505050506040513d60208110156106f457600080fd5b50516009546008546007549296506107269261071a91908290899063ffffffff610dd716565b9063ffffffff610dd716565b9750606461073b89604663ffffffff610e8e16565b8161074257fe5b049450606461075889601463ffffffff610e8e16565b8161075f57fe5b049550610782866107768a8863ffffffff610ee616565b9063ffffffff610ee616565b965061079960075486610ee690919063ffffffff16565b90506107b060085487610ee690919063ffffffff16565b91506107c760095488610ee690919063ffffffff16565b92509091929394959697565b6004546001600160a01b031681565b6001546001600160a01b03163314610830576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600254156108d6576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b60016002556000546001600160a01b03163314610929576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b6003546001600160a01b03848116911614158061095457506005546001600160a01b03838116911614155b8061096d57506006546001600160a01b03828116911614155b6109af576040805162461bcd60e51b815260206004820152600e60248201526d53414d455f41444452455353455360901b604482015290519081900360640190fd5b600380546001600160a01b038086166001600160a01b0319928316179092556005805485841690831617905560068054928416929091169190911790556040805142815290517f4b804a0bfbdc2639203b93035be561d86f65f52b7e14984f95ec9d298cafccac9181900360200190a15050600060025550565b60025415610a6b576040805162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015290519081900360640190fd5b6001600255600080610a7b610653565b50600654909850909650600095506001600160a01b0316159350610aae92505050576006546001600160a01b0316610abb565b6000546001600160a01b03165b90508215610ae057600454610ae0906001600160a01b0316828563ffffffff610dc616565b8115610b9e576004805460408051630852cd8d60e31b8152928301859052516001600160a01b03909116916342966c689160248083019260209291908290030181600087803b158015610b3257600080fd5b505af1158015610b46573d6000803e3d6000fd5b505050506040513d6020811015610b5c57600080fd5b5051610b9e576040805162461bcd60e51b815260206004820152600c60248201526b4255524e5f4641494c55524560a01b604482015290519081900360640190fd5b600954610bb1908363ffffffff610dd716565b600955600854610bc7908463ffffffff610dd716565b600855604080518481526020810184905281517ff5deee3dde315bb684736ad09d95603ad754fe04704f5a2f0719216a09dac68d929181900390910190a15050600060025550565b601481565b6000546001600160a01b03163314610c62576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6003546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6000546001600160a01b03163314610d36576040805162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b604482015290519081900360640190fd5b6001600160a01b03811615801590610d5c57506000546001600160a01b03828116911614155b610d9f576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b604681565b610dd28383835a610f33565b505050565b81810182811015610e1e576040805162461bcd60e51b815260206004820152600c60248201526b4144445f4f564552464c4f5760a01b604482015290519081900360640190fd5b92915050565b6000610e406001600160a01b038516848463ffffffff610f8916565b905080610e87576040805162461bcd60e51b815260206004820152601060248201526f5452414e534645525f4641494c55524560801b604482015290519081900360640190fd5b9392505050565b818102821580610ea6575081838281610ea357fe5b04145b610e1e576040805162461bcd60e51b815260206004820152600c60248201526b4d554c5f4f564552464c4f5760a01b604482015290519081900360640190fd5b600082821115610f2d576040805162461bcd60e51b815260206004820152600d60248201526c5355425f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b610f3f8484848461100c565b610f83576040805162461bcd60e51b815260206004820152601060248201526f5452414e534645525f4641494c55524560801b604482015290519081900360640190fd5b50505050565b600082610f9857506001610e87565b6000610fac856001600160a01b0316611108565b6040519091506001600160a01b03821690849086906000818181858888f193505050503d8060008114610ffb576040519150601f19603f3d011682016040523d82523d6000602084013e611000565b606091505b50909695505050505050565b604080516001600160a01b038086166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485938a16928792869282918083835b602083106110885780518252601f199092019160209182019101611069565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038160008787f1925050503d80600081146110eb576040519150601f19603f3d011682016040523d82523d6000602084013e6110f0565b606091505b505090506110fd8161110b565b979650505050505050565b90565b60008115611142573d801561112b57602081146111345760009250611140565b60019250611140565b60206000803e60005192505b505b509056fea265627a7a723158205c607ab35fa428fc6182ac1a30c6f45ee52101f87c36db41e0d9aff9e3359a2664736f6c634300050d0032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000bbbbca6a901c926f240b89eacb641d8aec7aeafd

-----Decoded View---------------
Arg [0] : _lrcAddress (address): 0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bbbbca6a901c926f240b89eacb641d8aec7aeafd


Deployed Bytecode Sourcemap

24045:3897:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24045:3897:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19371:25;;;:::i;:::-;;;;-1:-1:-1;;;;;19371:25:0;;;;;;;;;;;;;;25122:391;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25122:391:0;;:::i;:::-;;26199:745;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;26199:745:0;;;;;;;;:::i;26952:987::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19299:25;;;:::i;8617:205::-;;;:::i;24490:624::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;24490:624:0;;;;;;;;;;;;;;;;;;;:::i;25521:670::-;;;:::i;19198:48::-;;;:::i;:::-;;;;;;;;;;;;;;;;6815:161;;;:::i;5876:20::-;;;:::i;19255:37::-;;;:::i;7935:27::-;;;:::i;19331:33::-;;;:::i;8308:229::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8308:229:0;-1:-1:-1;;;;;8308:229:0;;:::i;19143:48::-;;;:::i;19371:25::-;;;-1:-1:-1;;;;;19371:25:0;;:::o;25122:391::-;17619:11;;:16;17611:39;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;;;;17721:1;17707:11;:15;25247:10;25239:33;;;;;-1:-1:-1;;;25239:33:0;;;;;;;;;;;;-1:-1:-1;;;25239:33:0;;;;;;;;;;;;;;;25305:22;;-1:-1:-1;;;;;25305:22:0;25291:10;:36;25283:61;;;;;-1:-1:-1;;;25283:61:0;;;;;;;;;;;;-1:-1:-1;;;25283:61:0;;;;;;;;;;;;;;;25388:22;;25355:10;;:64;;-1:-1:-1;;;;;25355:10:0;;;;25388:22;25412:6;25355:64;:32;:64;:::i;:::-;25446:13;;:25;;25464:6;25446:25;:17;:25;:::i;:::-;25430:13;:41;25487:18;;;;;;;;;;;;;;;;;-1:-1:-1;17820:1:0;17806:11;:15;25122:391::o;26199:745::-;17619:11;;:16;17611:39;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;;;;17721:1;17707:11;:15;26348:10;26340:34;;;;;-1:-1:-1;;;26340:34:0;;;;;;;;;;;;-1:-1:-1;;;26340:34:0;;;;;;;;;;;;;;;26402:10;;-1:-1:-1;;;;;26393:19:0;;;26402:10;;26393:19;;26385:42;;;;;-1:-1:-1;;;26385:42:0;;;;;;;;;;;;-1:-1:-1;;;26385:42:0;;;;;;;;;;;;;;;26460:18;;26440:17;;-1:-1:-1;;;;;26460:18:0;:32;:61;;26503:18;;-1:-1:-1;;;;;26503:18:0;26460:61;;;26495:5;;-1:-1:-1;;;;;26495:5:0;26460:61;26440:81;-1:-1:-1;;;;;;26538:19:0;;26534:176;;26574:45;26601:6;26609:9;-1:-1:-1;;;;;26574:26:0;;;:45;;:26;:45;:::i;:::-;;26534:176;;;26652:46;-1:-1:-1;;;;;26652:27:0;;26680:9;26691:6;26652:46;:27;:46;:::i;:::-;26744:18;;-1:-1:-1;;;;;26744:18:0;:32;;:110;;-1:-1:-1;26806:18:0;;26843:10;;;26793:61;;;-1:-1:-1;;;26793:61:0;;-1:-1:-1;;;;;26793:61:0;;;;;;;;;;26843:10;;;26793:61;;;;;26806:18;;;;;26793:42;;:61;;;;;;;;;;;;;;26806:18;;26793:61;;;5:2:-1;;;;30:1;27;20:12;5:2;26793:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26793:61:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26793:61:0;26744:110;26722:172;;;;;-1:-1:-1;;;26722:172:0;;;;;;;;;;;;-1:-1:-1;;;26722:172:0;;;;;;;;;;;;;;;26912:24;;;-1:-1:-1;;;;;26912:24:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17820:1:0;17806:11;:15;-1:-1:-1;26199:745:0:o;26952:987::-;27045:20;27080;27115:23;27153:22;27190:18;27223;27256:21;27292:20;27362:10;;;;;;;;;-1:-1:-1;;;;;27362:10:0;-1:-1:-1;;;;;27356:27:0;;27392:4;27356:42;;;;;;;;;;;;;-1:-1:-1;;;;;27356:42:0;-1:-1:-1;;;;;27356:42:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27356:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;27356:42:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;27356:42:0;27484:11;;27464:14;;27445:13;;27356:42;;-1:-1:-1;27427:69:0;;:52;;27464:14;27427:52;;27356:42;;27427:32;:17;:32;:::i;:::-;:36;:52;:36;:52;:::i;:69::-;27409:87;-1:-1:-1;27570:3:0;27529:38;27409:87;19189:2;27529:38;:19;:38;:::i;:::-;:44;;;;;;;-1:-1:-1;27643:3:0;27605:35;:15;19244:2;27605:35;:19;:35;:::i;:::-;:41;;;;;;;-1:-1:-1;27675:62:0;27605:41;27675:38;:15;27695:17;27675:38;:19;:38;:::i;:::-;:42;:62;:42;:62;:::i;:::-;27657:80;;27768:36;27790:13;;27768:17;:21;;:36;;;;:::i;:::-;27750:54;;27834:38;27857:14;;27834:18;:22;;:38;;;;:::i;:::-;27815:57;;27899:32;27919:11;;27899:15;:19;;:32;;;;:::i;:::-;27883:48;;26952:987;;;;;;;;:::o;19299:25::-;;;-1:-1:-1;;;;;19299:25:0;;:::o;8617:205::-;8116:12;;-1:-1:-1;;;;;8116:12:0;8102:10;:26;8094:51;;;;;-1:-1:-1;;;8094:51:0;;;;;;;;;;;;-1:-1:-1;;;8094:51:0;;;;;;;;;;;;;;;8734:12;;;8727:5;;8706:41;;-1:-1:-1;;;;;8734:12:0;;;;8727:5;;;;8706:41;;;8766:12;;;;8758:20;;-1:-1:-1;;;;;;8758:20:0;;;-1:-1:-1;;;;;8766:12:0;;8758:20;;;;8789:25;;;8617:205::o;24490:624::-;17619:11;;:16;17611:39;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;;;;17721:1;17707:11;:15;6338:5;;-1:-1:-1;;;;;6338:5:0;6324:10;:19;6316:44;;;;;-1:-1:-1;;;6316:44:0;;;;;;;;;;;;-1:-1:-1;;;6316:44:0;;;;;;;;;;;;;;;24732:22;;-1:-1:-1;;;;;24732:49:0;;;:22;;:49;;;:107;;-1:-1:-1;24798:18:0;;-1:-1:-1;;;;;24798:41:0;;;:18;;:41;;24732:107;:149;;;-1:-1:-1;24856:10:0;;-1:-1:-1;;;;;24856:25:0;;;:10;;:25;;24732:149;24710:213;;;;;-1:-1:-1;;;24710:213:0;;;;;;;;;;;;-1:-1:-1;;;24710:213:0;;;;;;;;;;;;;;;24934:22;:48;;-1:-1:-1;;;;;24934:48:0;;;-1:-1:-1;;;;;;24934:48:0;;;;;;;24993:18;:40;;;;;;;;;;;25044:10;:24;;;;;;;;;;;;;;;25086:20;;;25102:3;25086:20;;;;;;;;;;;;;-1:-1:-1;;17820:1:0;17806:11;:15;-1:-1:-1;24490:624:0:o;25521:670::-;17619:11;;:16;17611:39;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;-1:-1:-1;;;17611:39:0;;;;;;;;;;;;;;;17721:1;17707:11;:15;25596:14;;25685:21;:19;:21::i;:::-;-1:-1:-1;25739:10:0;;25647:59;;-1:-1:-1;25647:59:0;;-1:-1:-1;25719:17:0;;-1:-1:-1;;;;;;25739:10:0;:24;;-1:-1:-1;25739:45:0;;-1:-1:-1;;;25739:45:0;25774:10;;-1:-1:-1;;;;;25774:10:0;25739:45;;;25766:5;;-1:-1:-1;;;;;25766:5:0;25739:45;25719:65;-1:-1:-1;25801:13:0;;25797:100;;25831:10;;:54;;-1:-1:-1;;;;;25831:10:0;25864:9;25875;25831:54;:32;:54;:::i;:::-;25913:14;;25909:114;;25966:10;;;25952:42;;;-1:-1:-1;;;25952:42:0;;;;;;;;;-1:-1:-1;;;;;25966:10:0;;;;25952:30;;:42;;;;;;;;;;;;;;25966:10;;25952:42;;;5:2:-1;;;;30:1;27;20:12;5:2;25952:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25952:42:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25952:42:0;25944:67;;;;;-1:-1:-1;;;25944:67:0;;;;;;;;;;;;-1:-1:-1;;;25944:67:0;;;;;;;;;;;;;;;26049:11;;:27;;26065:10;26049:27;:15;:27;:::i;:::-;26035:11;:41;26104:14;;:29;;26123:9;26104:29;:18;:29;:::i;:::-;26087:14;:46;26151:32;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17820:1:0;17806:11;:15;-1:-1:-1;25521:670:0:o;19198:48::-;19244:2;19198:48;:::o;6815:161::-;6338:5;;-1:-1:-1;;;;;6338:5:0;6324:10;:19;6316:44;;;;;-1:-1:-1;;;6316:44:0;;;;;;;;;;;;-1:-1:-1;;;6316:44:0;;;;;;;;;;;;;;;6936:1;6921:5;;6900:39;;-1:-1:-1;;;;;6921:5:0;;;;6900:39;;6936:1;;6900:39;6966:1;6950:18;;-1:-1:-1;;;;;;6950:18:0;;;6815:161::o;5876:20::-;;;-1:-1:-1;;;;;5876:20:0;;:::o;19255:37::-;;;-1:-1:-1;;;;;19255:37:0;;:::o;7935:27::-;;;-1:-1:-1;;;;;7935:27:0;;:::o;19331:33::-;;;-1:-1:-1;;;;;19331:33:0;;:::o;8308:229::-;6338:5;;-1:-1:-1;;;;;6338:5:0;6324:10;:19;6316:44;;;;;-1:-1:-1;;;6316:44:0;;;;;;;;;;;;-1:-1:-1;;;6316:44:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;8432:22:0;;;;;;:43;;-1:-1:-1;8470:5:0;;-1:-1:-1;;;;;8458:17:0;;;8470:5;;8458:17;;8432:43;8424:71;;;;;-1:-1:-1;;;8424:71:0;;;;;;;;;;;;-1:-1:-1;;;8424:71:0;;;;;;;;;;;;;;;8506:12;:23;;-1:-1:-1;;;;;;8506:23:0;-1:-1:-1;;;;;8506:23:0;;;;;;;;;;8308:229::o;19143:48::-;19189:2;19143:48;:::o;9699:278::-;9844:125;9892:5;9912:2;9929:5;9949:9;9844:33;:125::i;:::-;9699:278;;;:::o;15735:191::-;15871:5;;;15895:6;;;;15887:31;;;;;-1:-1:-1;;;15887:31:0;;;;;;;;;;;;-1:-1:-1;;;15887:31:0;;;;;;;;;;;;;;;15735:191;;;;:::o;1999:269::-;2145:12;2185:28;-1:-1:-1;;;;;2185:10:0;;2196:6;2204:8;2185:28;:10;:28;:::i;:::-;2175:38;;2232:7;2224:36;;;;;-1:-1:-1;;;2224:36:0;;;;;;;;;;;;-1:-1:-1;;;2224:36:0;;;;;;;;;;;;;;;1999:269;;;;;:::o;15321:205::-;15457:5;;;15481:6;;;:20;;;15500:1;15495;15491;:5;;;;;;:10;15481:20;15473:45;;;;;-1:-1:-1;;;15473:45:0;;;;;;;;;;;;-1:-1:-1;;;15473:45:0;;;;;;;;;;;;;;15534:193;15642:4;15677:1;15672;:6;;15664:32;;;;;-1:-1:-1;;;15664:32:0;;;;;;;;;;;;-1:-1:-1;;;15664:32:0;;;;;;;;;;;;;;;-1:-1:-1;15714:5:0;;;15534:193::o;10284:310::-;10490:52;10515:5;10522:2;10526:5;10533:8;10490:24;:52::i;:::-;10468:118;;;;;-1:-1:-1;;;10468:118:0;;;;;;;;;;;;-1:-1:-1;;;10468:118:0;;;;;;;;;;;;;;;10284:310;;;;:::o;1451:393::-;1588:12;1622:11;1618:55;;-1:-1:-1;1657:4:0;1650:11;;1618:55;1683:25;1711:14;:2;-1:-1:-1;;;;;1711:12:0;;:14::i;:::-;1790:46;;1683:42;;-1:-1:-1;;;;;;1790:14:0;;;1823:8;;1811:6;;1790:46;;;;1811:6;1790:14;1823:8;1790:46;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;-1:-1;1776:60:0;;1451:393;-1:-1:-1;;;;;;1451:393:0:o;10602:796::-;11180:103;;;-1:-1:-1;;;;;11180:103:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;11180:103:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;11313:34:0;;;;10779:4;;;;11313:10;;;11328:8;;11180:103;;11313:34;;;;25:18:-1;36:153;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;11313:34:0;;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;11294:53:0;;;11365:25;11382:7;11365:16;:25::i;:::-;11358:32;10602:796;-1:-1:-1;;;;;;;10602:796:0:o;1127:173::-;1286:4;1127:173::o;13382:1127::-;13492:4;13815:7;13811:666;;;13874:16;14029:61;;;;14207:2;14202:115;;;;14431:1;14420:12;;13867:584;;14029:61;14070:1;14059:12;;14029:61;;14202:115;14254:2;14251:1;14248;14233:24;14296:1;14290:8;14279:19;;13867:584;;13848:618;-1:-1:-1;14494:7:0;13382:1127::o

Swarm Source

bzzr://5c607ab35fa428fc6182ac1a30c6f45ee52101f87c36db41e0d9aff9e3359a26

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.