Contract 0x6FAfF8d064fE5303efBf2aB9f43A8a981aFd4522 7

 

Contract Overview

Balance:
0 ETH

EtherValue:
$0.00

Token:
Txn Hash Method
Block
From
To
Value
0x5fa7459e5dc12b5111a7c1a00a8d439a25a1bca41057572e7ffb3b21f57e85acReinvest1061456442023-06-27 18:21:05243 days 6 hrs ago0x3d6991085ab1ae3926cb96f25684c40a364b6856 IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0000170291270.000000066
0xc1e70d76b126f8892bf94fdc6259b409b2b47286f4559d55848ff718a5725213Reinvest1043966602023-06-04 6:23:12266 days 18 hrs ago0x458b40d2bfa35dec1b0da9b5749a62143f5df7ff IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0000778398660.001
0x7faf54a7a637c1e417291b2a83c3cdc895b9497cea78c3fd4f9702ba6e5f3b98Reinvest873074302023-04-07 13:30:42324 days 11 hrs ago0x9a31ec2df5d42aa0537ff845b01512112d94a7a4 IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0001171967850.001
0x8cb3b3aa02d0a1a5438ecd8afaa798aa113c458b4b78ad4b7ac57cb4cb4b3477Reinvest873067102023-04-07 13:27:27324 days 11 hrs ago0x9a31ec2df5d42aa0537ff845b01512112d94a7a4 IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.000118914230.001
0x2dff51172eeeb849e75fb6436f7c344e0d735b6a72d6312d98baa00828bb9432Reinvest813362672023-03-16 8:35:34346 days 16 hrs ago0x14c07a5f107a9d15a6c2d0c131dcb3933386503e IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0000622124230.001
0xfd3ab6f178f29b94dc6fb3c5c144e7427c60c34ea3984c2a21899535c4b1fc8bReinvest794387092023-03-09 5:56:47353 days 19 hrs ago0xddb1a03311ac0b706206d5ea950b2403bad9c467 IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0000971005060.00105
0xdd35bc053e2386abe7ea990d25ebfea7a45875cb93cecd51b6cccb1fa685487cReinvest789825412023-03-07 5:25:41355 days 19 hrs ago0x8c5dd93efe4dd6ccde3ff972c153010b69ef804b IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0000789379230.001
0xe7f843234219db97e093d185832dc1ddde577a4c0e82bb6d5438d061ca09fb23Reinvest761143662023-02-23 1:38:05367 days 23 hrs ago0x685bb42e39286e204f72428d5613bd83694bdc13 IN  0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH0.0001463130440.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x3fcc34aa22b92e595301b618d113e2651f90e2c835b9d85dcd02330c073c3ea11070868472023-07-19 13:14:31221 days 12 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0x3fcc34aa22b92e595301b618d113e2651f90e2c835b9d85dcd02330c073c3ea11070868472023-07-19 13:14:31221 days 12 hrs ago 0x5a8931f2b235caa2eabf3f07cd1154360c933e17 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x7a491321dbe0bbb94b49703bbd2d39ef000a6d408834b74d64e40342d2199a611070867932023-07-19 13:12:43221 days 12 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0x7a491321dbe0bbb94b49703bbd2d39ef000a6d408834b74d64e40342d2199a611070867932023-07-19 13:12:43221 days 12 hrs ago 0x5a8931f2b235caa2eabf3f07cd1154360c933e17 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x9c1874b804d9ff34927972be6bbf6ce6ad220a23 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x9c1874b804d9ff34927972be6bbf6ce6ad220a23 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x9c1874b804d9ff34927972be6bbf6ce6ad220a23 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x5a8931f2b235caa2eabf3f07cd1154360c933e17 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x89c1a33011fab92e497963a6fa069aee5c1f5d440 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x89c1a33011fab92e497963a6fa069aee5c1f5d440 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0xa516b9c7378799799e6dfadbdabf45d5b584405f 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0xa516b9c7378799799e6dfadbdabf45d5b584405f 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0xa516b9c7378799799e6dfadbdabf45d5b584405f 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0xa516b9c7378799799e6dfadbdabf45d5b584405f 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x3d5d9c964489f4a7d8e11e81c83b2bf41ccc2ad2cf65de2d21d551f3ba1803a51065637752023-07-07 10:38:47233 days 14 hrs ago 0x9c1874b804d9ff34927972be6bbf6ce6ad220a23 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0xa96b6de2f14bc92f518e4f94fde27b293b75ca97db7b217c5923e1243320d84c1063976032023-07-03 14:19:43237 days 10 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0xa96b6de2f14bc92f518e4f94fde27b293b75ca97db7b217c5923e1243320d84c1063976032023-07-03 14:19:43237 days 10 hrs ago 0x5a8931f2b235caa2eabf3f07cd1154360c933e17 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0xafe9132d6c18ed725d98c1d36fe0a099bdddc2dcc52b984d170cea76ad653bb31063953392023-07-03 13:04:15237 days 12 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x985612ff2c9409174fedcff23d4f4761af124f880 ETH
0xafe9132d6c18ed725d98c1d36fe0a099bdddc2dcc52b984d170cea76ad653bb31063953392023-07-03 13:04:15237 days 12 hrs ago 0x5a8931f2b235caa2eabf3f07cd1154360c933e17 0x6faff8d064fe5303efbf2ab9f43a8a981afd45220 ETH
0x5fa7459e5dc12b5111a7c1a00a8d439a25a1bca41057572e7ffb3b21f57e85ac1061456442023-06-27 18:21:05243 days 6 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x89c1a33011fab92e497963a6fa069aee5c1f5d440 ETH
0x5fa7459e5dc12b5111a7c1a00a8d439a25a1bca41057572e7ffb3b21f57e85ac1061456442023-06-27 18:21:05243 days 6 hrs ago 0x6faff8d064fe5303efbf2ab9f43a8a981afd4522 0x89c1a33011fab92e497963a6fa069aee5c1f5d440 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x50e9630C7DBAe822C402deF7190b8bf3CFDD18bb
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
VeloVaultToken

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : Context.sol
pragma solidity ^0.5.0;

/*
 * @dev 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 GSN 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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 2 of 18 : Ownable.sol
pragma solidity ^0.5.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 18 : IBaseV1Pair.sol
pragma solidity >=0.5.0;

interface IBaseV1Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function stable() external view returns (bool);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
	
    function token0() external view returns (address);
    function token1() external view returns (address);
    function tokens() external view returns (address, address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);

    function observationLength() external view returns (uint);
    function observations(uint) external view returns (
        uint timestamp,
        uint reserve0Cumulative,
        uint reserve1Cumulative
    );
    function currentCumulativePrices() external view returns (
        uint reserve0Cumulative,
        uint reserve1Cumulative,
        uint timestamp
    );

    function metadata() external view returns (uint, uint, uint, uint, bool, address, address);
}

File 4 of 18 : IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);
}

File 5 of 18 : IOptiSwap.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IOptiSwap {
    function weth() external view returns (address);

    function bridgeFromTokens(uint256 index) external view returns (address token);

    function bridgeFromTokensLength() external view returns (uint256);

    function getBridgeToken(address _token) external view returns (address bridgeToken);

    function addBridgeToken(address _token, address _bridgeToken) external;

    function getDexInfo(uint256 index) external view returns (address dex, address handler);

    function dexListLength() external view returns (uint256);

    function indexOfDex(address _dex) external view returns (uint256);

    function getDexEnabled(address _dex) external view returns (bool);

    function addDex(address _dex, address _handler) external;

    function removeDex(address _dex) external;

    function getBestAmountOut(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (address pair, uint256 amountOut);
}

File 6 of 18 : IPoolToken.sol
pragma solidity >=0.5.0;

interface IPoolToken {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /*** Pool Token ***/

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external view returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;
}

File 7 of 18 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);
}

File 8 of 18 : IVeloGauge.sol
pragma solidity >=0.5.0;

interface IVeloGauge {
    function notifyRewardAmount(address token, uint amount) external;
    function getReward(address account, address[] calldata tokens) external;
    function claimFees() external returns (uint claimed0, uint claimed1);
    function left(address token) external view returns (uint);
    function isForPair() external view returns (bool);
    function earned(address token, address account) external view returns (uint);
    function balanceOf(address account) external view returns (uint);
    function deposit(uint256 amount, uint256 tokenId) external;
    function withdraw(uint256 amount) external;
}

File 9 of 18 : IVeloPairFactory.sol
pragma solidity >=0.5.0;

interface IVeloPairFactory {
    function allPairsLength() external view returns (uint);
    function isPair(address pair) external view returns (bool);
    function pairCodeHash() external pure returns (bytes32);
    function getPair(address tokenA, address token, bool stable) external view returns (address);
    function createPair(address tokenA, address tokenB, bool stable) external returns (address pair);
    function getFee(bool _stable) external view returns (uint);
}

File 10 of 18 : IVeloRouter.sol
pragma solidity >=0.5.0;

interface IVeloRouter {
  function weth() external pure returns (address);

  function addLiquidity(
    address tokenA,
    address tokenB,
    bool stable,
    uint256 amountADesired,
    uint256 amountBDesired,
    uint256 amountAMin,
    uint256 amountBMin,
    address to,
    uint256 deadline
  ) external returns (uint amountA, uint amountB, uint liquidity);

  function swapExactTokensForTokensSimple(
    uint256 amountIn,
    uint256 amountOutMin,
    address tokenFrom,
    address tokenTo,
    bool stable,
    address to,
    uint256 deadline
  ) external returns (uint[] memory amounts);
}

File 11 of 18 : IVeloVaultToken.sol
pragma solidity >=0.5.0;

interface IVeloVaultToken {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /*** Pool Token ***/

    event Mint(address indexed sender, address indexed minter, uint256 mintAmount, uint256 mintTokens);
    event Redeem(address indexed sender, address indexed redeemer, uint256 redeemAmount, uint256 redeemTokens);
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external view returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;

    /*** VaultToken ***/

    event Reinvest(address indexed caller, uint256 reward, uint256 bounty, uint256 fee);

    function isVaultToken() external pure returns (bool);

    function stable() external pure returns (bool);

    function optiSwap() external view returns (address);

    function router() external view returns (address);

    function voter() external view returns (address);

    function pairFactory() external view returns (address);

    function rewardsToken() external view returns (address);

    function WETH() external view returns (address);

    function reinvestFeeTo() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function REINVEST_BOUNTY() external view returns (uint256);

    function REINVEST_FEE() external view returns (uint256);

    function reinvestorListLength() external view returns (uint256);

    function reinvestorListItem(uint256 index) external view returns (address);

    function isReinvestorEnabled(address reinvestor) external view returns (bool);

    function addReinvestor(address reinvestor) external;

    function removeReinvestor(address reinvestor) external;

    function updateReinvestBounty(uint256 _newReinvestBounty) external;

    function updateReinvestFee(uint256 _newReinvestFee) external;

    function updateReinvestFeeTo(address _newReinvestFeeTo) external;

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function observationLength() external view returns (uint);

    function observations(uint index)
        external
        view
        returns (
            uint timestamp,
            uint reserve0Cumulative,
            uint reserve1Cumulative
        );

    function currentCumulativePrices()
        external
        view
        returns (
            uint reserve0Cumulative,
            uint reserve1Cumulative,
            uint timestamp
        );

    function _initialize(
        address _underlying,
        address _optiSwap,
        address _router,
        address _voter,
        address _pairFactory,
        address _rewardsToken,
        address _reinvestFeeTo
    ) external;

    function reinvest() external;

    function getReward() external returns (uint256);

    function getBlockTimestamp() external view returns (uint32);

    function adminClaimRewards(address[] calldata _tokens) external;

    function adminRescueTokens(address _to, address[] calldata _tokens) external;
}

File 12 of 18 : IVeloVoter.sol
pragma solidity >=0.5.0;

interface IVeloVoter {
    function _ve() external view returns (address);
    function governor() external view returns (address);
    function emergencyCouncil() external view returns (address);
    function attachTokenToGauge(uint _tokenId, address account) external;
    function detachTokenFromGauge(uint _tokenId, address account) external;
    function emitDeposit(uint _tokenId, address account, uint amount) external;
    function emitWithdraw(uint _tokenId, address account, uint amount) external;
    function isWhitelisted(address token) external view returns (bool);
    function notifyRewardAmount(uint amount) external;
    function distribute(address _gauge) external;
    function gauges(address token) external view returns (address);
}

File 13 of 18 : Math.sol
pragma solidity =0.5.16;

// a library for performing various math operations
// forked from: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/Math.sol

library Math {
    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 14 of 18 : SafeMath.sol
pragma solidity =0.5.16;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev 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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction underflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev 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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, errorMessage);

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts 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) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts 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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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 mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 15 of 18 : SafeToken.sol
pragma solidity 0.5.16;

interface ERC20Interface {
    function balanceOf(address user) external view returns (uint256);
}

library SafeToken {
    function myBalance(address token) internal view returns (uint256) {
        return ERC20Interface(token).balanceOf(address(this));
    }

    function balanceOf(address token, address user)
        internal
        view
        returns (uint256)
    {
        return ERC20Interface(token).balanceOf(user);
    }

    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(0x095ea7b3, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "!safeApprove"
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(0xa9059cbb, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "!safeTransfer"
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(0x23b872dd, from, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "!safeTransferFrom"
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call.value(value)(new bytes(0));
        require(success, "!safeTransferETH");
    }
}

File 16 of 18 : PoolToken.sol
pragma solidity =0.5.16;

import "./TarotERC20.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IPoolToken.sol";
import "./libraries/SafeMath.sol";

contract PoolToken is IPoolToken, TarotERC20 {
    uint256 internal constant initialExchangeRate = 1e18;
    address public underlying;
    address public factory;
    uint256 public totalBalance;
    uint256 public constant MINIMUM_LIQUIDITY = 1000;

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    /*** Initialize ***/

    // called once by the factory
    function _setFactory() external {
        require(factory == address(0), "Tarot: FACTORY_ALREADY_SET");
        factory = msg.sender;
    }

    /*** PoolToken ***/

    function _update() internal {
        totalBalance = IERC20(underlying).balanceOf(address(this));
        emit Sync(totalBalance);
    }

    function exchangeRate() public view returns (uint256) {
        uint256 _totalSupply = totalSupply; // gas savings
        uint256 _totalBalance = totalBalance; // gas savings
        if (_totalSupply == 0 || _totalBalance == 0) return initialExchangeRate;
        return _totalBalance.mul(1e18).div(_totalSupply);
    }

    // this low-level function should be called from another contract
    function mint(address minter)
        external
        nonReentrant
        update
        returns (uint256 mintTokens)
    {
        uint256 balance = IERC20(underlying).balanceOf(address(this));
        uint256 mintAmount = balance.sub(totalBalance);
        mintTokens = mintAmount.mul(1e18).div(exchangeRate());

        if (totalSupply == 0) {
            // permanently lock the first MINIMUM_LIQUIDITY tokens
            mintTokens = mintTokens.sub(MINIMUM_LIQUIDITY);
            _mint(address(0), MINIMUM_LIQUIDITY);
        }
        require(mintTokens > 0, "Tarot: MINT_AMOUNT_ZERO");
        _mint(minter, mintTokens);
        emit Mint(msg.sender, minter, mintAmount, mintTokens);
    }

    // this low-level function should be called from another contract
    function redeem(address redeemer)
        external
        nonReentrant
        update
        returns (uint256 redeemAmount)
    {
        uint256 redeemTokens = balanceOf[address(this)];
        redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

        require(redeemAmount > 0, "Tarot: REDEEM_AMOUNT_ZERO");
        require(redeemAmount <= totalBalance, "Tarot: INSUFFICIENT_CASH");
        _burn(address(this), redeemTokens);
        _safeTransfer(redeemer, redeemAmount);
        emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);
    }

    // force real balance to match totalBalance
    function skim(address to) external nonReentrant {
        _safeTransfer(
            to,
            IERC20(underlying).balanceOf(address(this)).sub(totalBalance)
        );
    }

    // force totalBalance to match real balance
    function sync() external nonReentrant update {}

    /*** Utilities ***/

    // same safe transfer function used by UniSwapV2 (with fixed underlying)
    bytes4 private constant SELECTOR =
        bytes4(keccak256(bytes("transfer(address,uint256)")));

    function _safeTransfer(address to, uint256 amount) internal {
        (bool success, bytes memory data) = underlying.call(
            abi.encodeWithSelector(SELECTOR, to, amount)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "Tarot: TRANSFER_FAILED"
        );
    }

    // prevents a contract from calling itself, directly or indirectly.
    bool internal _notEntered = true;
    modifier nonReentrant() {
        require(_notEntered, "Tarot: REENTERED");
        _notEntered = false;
        _;
        _notEntered = true;
    }

    // update totalBalance with current balance
    modifier update() {
        _;
        _update();
    }
}

File 17 of 18 : TarotERC20.sol
pragma solidity =0.5.16;

import "./libraries/SafeMath.sol";

// This contract is basically UniswapV2ERC20 with small modifications
// src: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol

contract TarotERC20 {
    using SafeMath for uint256;

    string public name;
    string public symbol;
    uint8 public decimals = 18;
    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    bytes32 public DOMAIN_SEPARATOR;
    mapping(address => uint256) public nonces;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    constructor() public {}

    function _setName(string memory _name, string memory _symbol) internal {
        name = _name;
        symbol = _symbol;
        uint256 chainId;
        assembly {
            chainId := chainid
        }
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256(
                    "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
                ),
                keccak256(bytes(_name)),
                keccak256(bytes("1")),
                chainId,
                address(this)
            )
        );
    }

    function _mint(address to, uint256 value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint256 value) internal {
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Transfer(from, address(0), value);
    }

    function _approve(
        address owner,
        address spender,
        uint256 value
    ) private {
        allowance[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    function _transfer(
        address from,
        address to,
        uint256 value
    ) internal {
        balanceOf[from] = balanceOf[from].sub(
            value,
            "Tarot: TRANSFER_TOO_HIGH"
        );
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(from, to, value);
    }

    function approve(address spender, uint256 value) external returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    function transfer(address to, uint256 value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool) {
        if (allowance[from][msg.sender] != uint256(-1)) {
            allowance[from][msg.sender] = allowance[from][msg.sender].sub(
                value,
                "Tarot: TRANSFER_NOT_ALLOWED"
            );
        }
        _transfer(from, to, value);
        return true;
    }

    function _checkSignature(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s,
        bytes32 typehash
    ) internal {
        require(deadline >= block.timestamp, "Tarot: EXPIRED");
        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                DOMAIN_SEPARATOR,
                keccak256(
                    abi.encode(
                        typehash,
                        owner,
                        spender,
                        value,
                        nonces[owner]++,
                        deadline
                    )
                )
            )
        );
        address recoveredAddress = ecrecover(digest, v, r, s);
        require(
            recoveredAddress != address(0) && recoveredAddress == owner,
            "Tarot: INVALID_SIGNATURE"
        );
    }

    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH =
        0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        _checkSignature(
            owner,
            spender,
            value,
            deadline,
            v,
            r,
            s,
            PERMIT_TYPEHASH
        );
        _approve(owner, spender, value);
    }
}

File 18 of 18 : VeloVaultToken.sol
pragma solidity =0.5.16;

import "@openzeppelin/contracts/ownership/Ownable.sol";
import "./PoolToken.sol";
import "./interfaces/IOptiSwap.sol";
import "./interfaces/IVeloVoter.sol";
import "./interfaces/IVeloPairFactory.sol";
import "./interfaces/IVeloGauge.sol";
import "./interfaces/IVeloRouter.sol";
import "./interfaces/IBaseV1Pair.sol";
import "./interfaces/IVeloVaultToken.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IERC20.sol";
import "./libraries/SafeToken.sol";
import "./libraries/Math.sol";

interface OptiSwapPair {
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}

contract VeloVaultToken is IVeloVaultToken, PoolToken {
    using SafeToken for address;

    bool public constant isVaultToken = true;
    bool public constant stable = false;

    address public optiSwap;
    address public router;
    address public voter;
    address public gauge;
    address public pairFactory;
    address public rewardsToken;
    address public WETH;
    address public reinvestFeeTo;
    address public token0;
    address public token1;

    uint256 public constant MIN_REINVEST_BOUNTY = 0;
    uint256 public constant MAX_REINVEST_BOUNTY = 0.05e18;
    uint256 public REINVEST_BOUNTY = 0.02e18;
    uint256 public constant MIN_REINVEST_FEE = 0;
    uint256 public constant MAX_REINVEST_FEE = 0.05e18;
    uint256 public REINVEST_FEE = 0.02e18;

    address[] reinvestorList;
    mapping(address => bool) reinvestorEnabled;

    event Reinvest(address indexed caller, uint256 reward, uint256 bounty, uint256 fee);
    event UpdateReinvestBounty(uint256 _newReinvestBounty);
    event UpdateReinvestFee(uint256 _newReinvestFee);
    event UpdateReinvestFeeTo(address _newReinvestFeeTo);

    function _initialize(
        address _underlying,
        address _optiSwap,
        address _router,
        address _voter,
        address _pairFactory,
        address _rewardsToken,
        address _reinvestFeeTo
    ) external {
        require(factory == address(0), "VaultToken: FACTORY_ALREADY_SET"); // sufficient check
        factory = msg.sender;
        _setName("Tarot Vault Token", "vTAROT");
        underlying = _underlying;
        optiSwap = _optiSwap;
        voter = _voter;
        gauge = IVeloVoter(voter).gauges(underlying);
        require(gauge != address(0), "VaultToken: NO_GAUGE");
        router = _router;
        pairFactory = _pairFactory;
        WETH = IVeloRouter(_router).weth();
        (token0, token1) = IBaseV1Pair(_underlying).tokens();
        rewardsToken = _rewardsToken;
        reinvestFeeTo = _reinvestFeeTo;
        rewardsToken.safeApprove(address(router), uint256(-1));
        WETH.safeApprove(address(router), uint256(-1));
        underlying.safeApprove(address(gauge), uint256(-1));
    }

    function reinvestorListLength() external view returns (uint256) {
        return reinvestorList.length;
    }

    function reinvestorListItem(uint256 index) external view returns (address) {
        return reinvestorList[index];
    }

    function isReinvestorEnabled(address reinvestor) external view returns (bool) {
        return reinvestorEnabled[reinvestor];
    }

    function _addReinvestor(address reinvestor) private {
        require(!reinvestorEnabled[reinvestor], "VaultToken: REINVESTOR_ENABLED");

        reinvestorEnabled[reinvestor] = true;
        reinvestorList.push(reinvestor);
    }

    function addReinvestor(address reinvestor) external onlyFactoryOwner {
        _addReinvestor(reinvestor);
    }

    function _indexOfReinvestor(address reinvestor) private view returns (uint256 index) {
        uint256 count = reinvestorList.length;
        for (uint256 i = 0; i < count; i++) {
            if (reinvestorList[i] == reinvestor) {
                return i;
            }
        }
        require(false, "VaultToken: REINVESTOR_NOT_FOUND");
    }

    function removeReinvestor(address reinvestor) external onlyFactoryOwner {
        require(reinvestorEnabled[reinvestor], "VaultToken: REINVESTOR_ENABLED");

        uint256 index = _indexOfReinvestor(reinvestor);
        address last = reinvestorList[reinvestorList.length - 1];
        reinvestorList[index] = last;
        reinvestorList.pop();
        delete reinvestorEnabled[reinvestor];
    }

    function updateReinvestBounty(uint256 _newReinvestBounty) external onlyFactoryOwner {
        require(_newReinvestBounty >= MIN_REINVEST_BOUNTY && _newReinvestBounty <= MAX_REINVEST_BOUNTY, "VaultToken: INVLD_REINVEST_BOUNTY");
        REINVEST_BOUNTY = _newReinvestBounty;

        emit UpdateReinvestBounty(_newReinvestBounty);
    }

    function updateReinvestFee(uint256 _newReinvestFee) external onlyFactoryOwner {
        require(_newReinvestFee >= MIN_REINVEST_FEE && _newReinvestFee <= MAX_REINVEST_FEE, "VaultToken: INVLD_REINVEST_FEE");
        REINVEST_FEE = _newReinvestFee;

        emit UpdateReinvestFee(_newReinvestFee);
    }

    function updateReinvestFeeTo(address _newReinvestFeeTo) external onlyFactoryOwner {
        reinvestFeeTo = _newReinvestFeeTo;

        emit UpdateReinvestFeeTo(_newReinvestFeeTo);
    }

    /*** PoolToken Overrides ***/

    function _update() internal {
        uint256 _totalBalance = IVeloGauge(gauge).balanceOf(address(this));
        totalBalance = _totalBalance;
        emit Sync(_totalBalance);
    }

    // this low-level function should be called from another contract
    function mint(address minter) external nonReentrant update returns (uint256 mintTokens) {
        uint256 mintAmount = underlying.myBalance();
        // handle pools with deposit fees by checking balance before and after deposit
        uint256 _totalBalanceBefore = IVeloGauge(gauge).balanceOf(address(this));
        IVeloGauge(gauge).deposit(mintAmount, 0);
        uint256 _totalBalanceAfter = IVeloGauge(gauge).balanceOf(address(this));
        mintTokens = _totalBalanceAfter.sub(_totalBalanceBefore).mul(1e18).div(exchangeRate());

        if (totalSupply == 0) {
            // permanently lock the first MINIMUM_LIQUIDITY tokens
            mintTokens = mintTokens.sub(MINIMUM_LIQUIDITY);
            _mint(address(0), MINIMUM_LIQUIDITY);
        }
        require(mintTokens > 0, "VaultToken: MINT_AMOUNT_ZERO");
        _mint(minter, mintTokens);
        emit Mint(msg.sender, minter, mintAmount, mintTokens);
    }

    // this low-level function should be called from another contract
    function redeem(address redeemer) external nonReentrant update returns (uint256 redeemAmount) {
        uint256 redeemTokens = balanceOf[address(this)];
        redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

        require(redeemAmount > 0, "VaultToken: REDEEM_AMOUNT_ZERO");
        require(redeemAmount <= totalBalance, "VaultToken: INSUFFICIENT_CASH");
        _burn(address(this), redeemTokens);
        IVeloGauge(gauge).withdraw(redeemAmount);
        _safeTransfer(redeemer, redeemAmount);
        emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);
    }

    /*** Reinvest ***/

    function _optimalDepositA(
        uint256 _amountA,
        uint256 _reserveA
    ) internal view returns (uint256) {
        uint256 swapFee = IVeloPairFactory(pairFactory).getFee(false);
        uint256 swapFeeFactor = uint256(10000).sub(swapFee);
        uint256 a = uint256(10000).add(swapFeeFactor).mul(_reserveA);
        uint256 b = _amountA.mul(10000).mul(_reserveA).mul(4).mul(swapFeeFactor);
        uint256 c = Math.sqrt(a.mul(a).add(b));
        uint256 d = uint256(2).mul(swapFeeFactor);
        return c.sub(a).div(d);
    }

    function approveRouter(address token, uint256 amount) internal {
        if (IERC20(token).allowance(address(this), router) >= amount) return;
        token.safeApprove(address(router), uint256(-1));
    }

    function swapExactTokensForTokens(
        address tokenIn,
        address tokenOut,
        uint256 amount
    ) internal {
        approveRouter(tokenIn, amount);
        IVeloRouter(router).swapExactTokensForTokensSimple(amount, 0, tokenIn, tokenOut, false, address(this), block.timestamp);
    }

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountA,
        uint256 amountB
    ) internal returns (uint256 liquidity) {
        approveRouter(tokenA, amountA);
        approveRouter(tokenB, amountB);
        (, , liquidity) = IVeloRouter(router).addLiquidity(tokenA, tokenB, false, amountA, amountB, 0, 0, address(this), block.timestamp);
    }

    function swapTokensForBestAmountOut(
        IOptiSwap _optiSwap,
        address tokenIn,
        address tokenOut,
        uint256 amountIn
    ) internal returns (uint256 amountOut) {
        if (tokenIn == tokenOut) {
            return amountIn;
        }
        address pair;
        (pair, amountOut) = _optiSwap.getBestAmountOut(amountIn, tokenIn, tokenOut);
        require(pair != address(0), "NO_PAIR");
        tokenIn.safeTransfer(pair, amountIn);
        if (tokenIn < tokenOut) {
            OptiSwapPair(pair).swap(0, amountOut, address(this), new bytes(0));
        } else {
            OptiSwapPair(pair).swap(amountOut, 0, address(this), new bytes(0));
        }
    }

    function optiSwapExactTokensForTokens(
        address tokenIn,
        address tokenOut,
        uint256 amountIn
    ) internal returns (uint256 amountOut) {
        if (tokenIn == tokenOut) {
            return amountIn;
        }
        IOptiSwap _optiSwap = IOptiSwap(optiSwap);
        address nextHop = _optiSwap.getBridgeToken(tokenIn);
        if (nextHop == tokenOut) {
            return swapTokensForBestAmountOut(_optiSwap, tokenIn, tokenOut, amountIn);
        }
        address waypoint = _optiSwap.getBridgeToken(tokenOut);
        if (tokenIn == waypoint) {
            return swapTokensForBestAmountOut(_optiSwap, tokenIn, tokenOut, amountIn);
        }
        uint256 hopAmountOut;
        if (nextHop != tokenIn) {
            hopAmountOut = swapTokensForBestAmountOut(_optiSwap, tokenIn, nextHop, amountIn);
        } else {
            hopAmountOut = amountIn;
        }
        if (nextHop == waypoint) {
            return swapTokensForBestAmountOut(_optiSwap, nextHop, tokenOut, hopAmountOut);
        } else if (waypoint == tokenOut) {
            return optiSwapExactTokensForTokens(nextHop, tokenOut, hopAmountOut);
        } else {
            uint256 waypointAmountOut = optiSwapExactTokensForTokens(nextHop, waypoint, hopAmountOut);
            return swapTokensForBestAmountOut(_optiSwap, waypoint, tokenOut, waypointAmountOut);
        }
    }

    function _getReward() internal returns (uint256 amount) {
        address[] memory tokens = new address[](1);
        tokens[0] = rewardsToken;
        IVeloGauge(gauge).getReward(address(this), tokens);

        return rewardsToken.myBalance();
    }

    function getReward() external nonReentrant returns (uint256) {
        require(msg.sender == tx.origin || reinvestorEnabled[msg.sender]);
        return _getReward();
    }

    function reinvest() external nonReentrant update {
        require(msg.sender == tx.origin || reinvestorEnabled[msg.sender]);
        // 1. Withdraw all the rewards.
        uint256 reward = _getReward();
        if (reward == 0) return;
        // 2. Send the reward bounty to the caller.
        uint256 bounty = reward.mul(REINVEST_BOUNTY) / 1e18;
        if (bounty > 0) {
            rewardsToken.safeTransfer(msg.sender, bounty);
        }
        uint256 fee = reward.mul(REINVEST_FEE) / 1e18;
        if (fee > 0) {
            rewardsToken.safeTransfer(reinvestFeeTo, fee);
        }
        // 3. Convert all the remaining rewards to token0 or token1.
        address tokenA;
        address tokenB;
        if (token0 == rewardsToken || token1 == rewardsToken) {
            (tokenA, tokenB) = token0 == rewardsToken ? (token0, token1) : (token1, token0);
        } else {
            if (token1 == WETH) {
                (tokenA, tokenB) = (token1, token0);
            } else {
                (tokenA, tokenB) = (token0, token1);
            }
            optiSwapExactTokensForTokens(rewardsToken, tokenA, reward.sub(bounty.add(fee)));
        }
        // 4. Convert tokenA to LP Token underlyings.
        uint256 totalAmountA = tokenA.myBalance();
        assert(totalAmountA > 0);
        (uint256 r0, uint256 r1, ) = IUniswapV2Pair(underlying).getReserves();
        uint256 reserveA = tokenA == token0 ? r0 : r1;
        uint256 swapAmount = _optimalDepositA(totalAmountA, reserveA);
        swapExactTokensForTokens(tokenA, tokenB, swapAmount);
        uint256 liquidity = addLiquidity(tokenA, tokenB, totalAmountA.sub(swapAmount), tokenB.myBalance());
        // 5. Stake the LP Tokens.
        IVeloGauge(gauge).deposit(liquidity, 0);
        emit Reinvest(msg.sender, reward, bounty, fee);
    }

    function adminClaimRewards(address[] calldata _tokens) external onlyFactoryOwner nonReentrant {
        IVeloGauge(gauge).getReward(address(this), _tokens);
    }

    function adminRescueTokens(address _to, address[] calldata _tokens) external onlyFactoryOwner nonReentrant {
        require(_to != address(0), "VaultToken: INVLD_TO");

        for (uint256 i = 0; i < _tokens.length; i++) {
            address token = _tokens[i];
            require(token != underlying, "VaultToken: IS_UNDERLYING");
            require(token != rewardsToken, "VaultToken: IS_REWARDS_TOKEN");
            require(token != token0, "VaultToken: IS_TOKEN_0");
            require(token != token1, "VaultToken: IS_TOKEN_1");

            uint256 tokenBalance = token.myBalance();
            if (tokenBalance > 0) {
                token.safeTransfer(_to, tokenBalance);
            }
        }
    }

    /*** Mirrored From uniswapV2Pair ***/

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        )
    {
        (uint _reserve0, uint _reserve1, uint _blockTimestampLast) = IUniswapV2Pair(underlying).getReserves();
        reserve0 = safe112(_reserve0);
        reserve1 = safe112(_reserve1);
        blockTimestampLast = uint32(_blockTimestampLast % 2**32);
        // if no token has been minted yet mirror uniswap getReserves
        if (totalSupply == 0) return (reserve0, reserve1, blockTimestampLast);
        // else, return the underlying reserves of this contract
        uint256 _totalBalance = totalBalance;
        uint256 _totalSupply = IUniswapV2Pair(underlying).totalSupply();
        reserve0 = safe112(_totalBalance.mul(reserve0).div(_totalSupply));
        reserve1 = safe112(_totalBalance.mul(reserve1).div(_totalSupply));
        require(reserve0 > 100 && reserve1 > 100, "VaultToken: INSUFFICIENT_RESERVES");
    }

    /*** Mirrored from BaseV1Pair ***/

    function observationLength() external view returns (uint) {
        return IBaseV1Pair(underlying).observationLength();
    }

    function observations(uint index)
        external
        view
        returns (
            uint timestamp,
            uint reserve0Cumulative,
            uint reserve1Cumulative
        )
    {
        return IBaseV1Pair(underlying).observations(index);
    }

    function currentCumulativePrices()
        external
        view
        returns (
            uint reserve0Cumulative,
            uint reserve1Cumulative,
            uint timestamp
        )
    {
        return IBaseV1Pair(underlying).currentCumulativePrices();
    }

    /*** Utilities ***/

    function safe112(uint256 n) internal pure returns (uint112) {
        require(n < 2**112, "VaultToken: SAFE112");
        return uint112(n);
    }

    function getBlockTimestamp() public view returns (uint32) {
        return uint32(block.timestamp % 2**32);
    }

    /*** Modifiers ***/

    modifier onlyFactoryOwner() {
        require(Ownable(factory).owner() == msg.sender, "NOT_AUTHORIZED");
        _;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokens","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bounty","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Reinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalBalance","type":"uint256"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newReinvestBounty","type":"uint256"}],"name":"UpdateReinvestBounty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newReinvestFee","type":"uint256"}],"name":"UpdateReinvestFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newReinvestFeeTo","type":"address"}],"name":"UpdateReinvestFeeTo","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_REINVEST_BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_REINVEST_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_REINVEST_BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_REINVEST_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REINVEST_BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REINVEST_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"address","name":"_optiSwap","type":"address"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_voter","type":"address"},{"internalType":"address","name":"_pairFactory","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_reinvestFeeTo","type":"address"}],"name":"_initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"_setFactory","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reinvestor","type":"address"}],"name":"addReinvestor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"adminClaimRewards","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"adminRescueTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentCumulativePrices","outputs":[{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gauge","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBlockTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"reserve0","type":"uint112"},{"internalType":"uint112","name":"reserve1","type":"uint112"},{"internalType":"uint32","name":"blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"reinvestor","type":"address"}],"name":"isReinvestorEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isVaultToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"mintTokens","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"observationLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"optiSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pairFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"redeemer","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"reinvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reinvestFeeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"reinvestorListItem","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reinvestorListLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reinvestor","type":"address"}],"name":"removeReinvestor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_newReinvestBounty","type":"uint256"}],"name":"updateReinvestBounty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_newReinvestFee","type":"uint256"}],"name":"updateReinvestFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newReinvestFeeTo","type":"address"}],"name":"updateReinvestFeeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"voter","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103995760003560e01c8063796b89b9116101e9578063ca932df01161010f578063e4a1337e116100ad578063ef3469e51161007c578063ef3469e514610989578063f887ea40146109f7578063fdb5a03e146109ff578063fff6cae914610a0757610399565b8063e4a1337e14610971578063e6df664914610979578063e6e87e7e146107e6578063ebeb31db1461098157610399565b8063d505accf116100e9578063d505accf146108c4578063dd62ed3e14610915578063e14f870d14610943578063e15fadfb1461094b57610399565b8063ca932df01461088e578063d1af0c7d146108b4578063d21220a7146108bc57610399565b8063a9059cbb11610187578063bc25cf7711610156578063bc25cf771461083a578063c45a015514610860578063c4990f0414610868578063c8c4ff8c1461063657610399565b8063a9059cbb146107f6578063ad5c464814610822578063ad7a672f1461082a578063ba9a7a561461083257610399565b806395a2251f116101c357806395a2251f146107b857806395d89b41146107de57806396fa4c11146107e6578063a6f19c84146107ee57610399565b8063796b89b9146107695780637daeecf01461078a5780637ecebe001461079257610399565b80633ba0b9a9116102ce57806346fb738b1161026c5780636c2a3bc51161023b5780636c2a3bc51461072b5780636ee27227146107335780636f307dc31461073b57806370a082311461074357610399565b806346fb738b146106d85780634a5d316c146106f557806360c2affa146106fd5780636a6278421461070557610399565b8063439e2740116102a8578063439e27401461063e57806345aca17d1461069657806346853382146106b357806346c96aac146106d057610399565b80633ba0b9a9146106265780633d18b9121461062e57806340aa9b711461063657610399565b806323b872dd1161033b57806330adf81f1161031557806330adf81f146105d2578063313ce567146105da5780633644e515146105f8578063378ab9d31461060057610399565b806323b872dd146104ff578063252c09d71461053557806329a105221461055257610399565b80630dfe1681116103775780630dfe16811461049357806318160ddd146104b75780631df8c717146104d157806322be3de1146104f757610399565b806306fdde031461039e5780630902f1ac1461041b578063095ea7b314610453575b600080fd5b6103a6610a0f565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103e05781810151838201526020016103c8565b50505050905090810190601f16801561040d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610423610a9d565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b61047f6004803603604081101561046957600080fd5b506001600160a01b038135169060200135610cab565b604080519115158252519081900360200190f35b61049b610cc2565b604080516001600160a01b039092168252519081900360200190f35b6104bf610cd1565b60408051918252519081900360200190f35b6104d9610cd7565b60408051938452602084019290925282820152519081900360600190f35b61047f610d6d565b61047f6004803603606081101561051557600080fd5b506001600160a01b03813581169160208101359091169060400135610d72565b6104d96004803603602081101561054b57600080fd5b5035610e42565b6105d06004803603604081101561056857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561059257600080fd5b8201836020820111156105a457600080fd5b803590602001918460208302840111600160201b831117156105c557600080fd5b509092509050610ed9565b005b6104bf611235565b6105e2611259565b6040805160ff9092168252519081900360200190f35b6104bf611262565b61047f6004803603602081101561061657600080fd5b50356001600160a01b0316611268565b6104bf61128a565b6104bf6112da565b6104bf611371565b6105d0600480360360e081101561065457600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a081013582169160c0909101351661137c565b6105d0600480360360208110156106ac57600080fd5b503561171e565b61049b600480360360208110156106c957600080fd5b5035611871565b61049b61189b565b6105d0600480360360208110156106ee57600080fd5b50356118aa565b6105d06119e7565b61049b611a59565b6104bf6004803603602081101561071b57600080fd5b50356001600160a01b0316611a6d565b6104bf611d66565b61047f611d6c565b61049b611d71565b6104bf6004803603602081101561075957600080fd5b50356001600160a01b0316611d80565b610771611d92565b6040805163ffffffff9092168252519081900360200190f35b61049b611d9c565b6104bf600480360360208110156107a857600080fd5b50356001600160a01b0316611dab565b6104bf600480360360208110156107ce57600080fd5b50356001600160a01b0316611dbd565b6103a6611fc0565b6104bf610d6d565b61049b61201a565b61047f6004803603604081101561080c57600080fd5b506001600160a01b038135169060200135612029565b61049b612036565b6104bf612045565b6104bf61204b565b6105d06004803603602081101561085057600080fd5b50356001600160a01b0316612051565b61049b61214b565b6105d06004803603602081101561087e57600080fd5b50356001600160a01b031661215a565b6105d0600480360360208110156108a457600080fd5b50356001600160a01b031661226a565b61049b612332565b61049b612341565b6105d0600480360360e08110156108da57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612350565b6104bf6004803603604081101561092b57600080fd5b506001600160a01b038135811691602001351661238b565b61049b6123a8565b6105d06004803603602081101561096157600080fd5b50356001600160a01b03166123b7565b6104bf6125ae565b6104bf6125b4565b6104bf6125ba565b6105d06004803603602081101561099f57600080fd5b810190602081018135600160201b8111156109b957600080fd5b8201836020820111156109cb57600080fd5b803590602001918460208302840111600160201b831117156109ec57600080fd5b509092509050612630565b61049b6127ec565b6105d06127fb565b6105d0612c25565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610a955780601f10610a6a57610100808354040283529160200191610a95565b820191906000526020600020905b815481529060010190602001808311610a7857829003601f168201915b505050505081565b600080600080600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610af457600080fd5b505afa158015610b08573d6000803e3d6000fd5b505050506040513d6060811015610b1e57600080fd5b50805160208201516040909201516001600160701b0391821695509116925063ffffffff169050610b4e83612c81565b9550610b5982612c81565b9450600160201b8106935060035460001415610b785750610ca6915050565b600a54600854604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610bc057600080fd5b505afa158015610bd4573d6000803e3d6000fd5b505050506040513d6020811015610bea57600080fd5b50519050610c1f610c1a82610c0e856001600160701b038d1663ffffffff612cd516565b9063ffffffff612d2e16565b612c81565b9750610c41610c1a82610c0e856001600160701b038c1663ffffffff612cd516565b96506064886001600160701b0316118015610c6557506064876001600160701b0316115b610ca05760405162461bcd60e51b81526004018080602001828103825260218152602001806146d76021913960400191505060405180910390fd5b50505050505b909192565b6000610cb8338484612d70565b5060015b92915050565b6013546001600160a01b031681565b60035481565b6000806000600860009054906101000a90046001600160a01b03166001600160a01b0316631df8c7176040518163ffffffff1660e01b815260040160606040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d6060811015610d5457600080fd5b5080516020820151604090920151909591945092509050565b600081565b6001600160a01b038316600090815260056020908152604080832033845290915281205460001914610e2c57604080518082018252601b81527f5461726f743a205452414e534645525f4e4f545f414c4c4f57454400000000006020808301919091526001600160a01b0387166000908152600582528381203382529091529190912054610e0791849063ffffffff612dd216565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b610e37848484612e69565b5060015b9392505050565b6008546040805163252c09d760e01b8152600481018490529051600092839283926001600160a01b039092169163252c09d791602480820192606092909190829003018186803b158015610e9557600080fd5b505afa158015610ea9573d6000803e3d6000fd5b505050506040513d6060811015610ebf57600080fd5b508051602082015160409092015190969195509350915050565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610f1d57600080fd5b505afa158015610f31573d6000803e3d6000fd5b505050506040513d6020811015610f4757600080fd5b50516001600160a01b031614610f95576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b600b5460ff16610fdf576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff191690556001600160a01b03831661103b576040805162461bcd60e51b81526020600482015260146024820152735661756c74546f6b656e3a20494e564c445f544f60601b604482015290519081900360640190fd5b60005b8181101561122257600083838381811061105457fe5b6008546001600160a01b0360209092029390930135811693509190911682141590506110c7576040805162461bcd60e51b815260206004820152601960248201527f5661756c74546f6b656e3a2049535f554e4445524c59494e4700000000000000604482015290519081900360640190fd5b6010546001600160a01b038281169116141561112a576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e3a2049535f524557415244535f544f4b454e00000000604482015290519081900360640190fd5b6013546001600160a01b0382811691161415611186576040805162461bcd60e51b815260206004820152601660248201527505661756c74546f6b656e3a2049535f544f4b454e5f360541b604482015290519081900360640190fd5b6014546001600160a01b03828116911614156111e2576040805162461bcd60e51b81526020600482015260166024820152755661756c74546f6b656e3a2049535f544f4b454e5f3160501b604482015290519081900360640190fd5b60006111f6826001600160a01b0316612f5b565b90508015611218576112186001600160a01b038316878363ffffffff612fd716565b505060010161103e565b5050600b805460ff191660011790555050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b6001600160a01b03811660009081526018602052604090205460ff165b919050565b600354600a546000919081158061129f575080155b156112b657670de0b6b3a7640000925050506112d7565b6112d282610c0e83670de0b6b3a764000063ffffffff612cd516565b925050505b90565b600b5460009060ff16611327576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff191690553332148061134e57503360009081526018602052604090205460ff165b61135757600080fd5b61135f613131565b9050600b805460ff1916600117905590565b66b1a2bc2ec5000081565b6009546001600160a01b0316156113da576040805162461bcd60e51b815260206004820152601f60248201527f5661756c74546f6b656e3a20464143544f52595f414c52454144595f53455400604482015290519081900360640190fd5b600980546001600160a01b0319163317905560408051808201825260118152702a30b937ba102b30bab63a102a37b5b2b760791b602080830191909152825180840190935260068352651d95105493d560d21b9083015261143a9161324a565b600880546001600160a01b03199081166001600160a01b038a81169190911792839055600b8054610100600160a81b0319166101008b841602179055600d805490921687821617918290556040805163b9a09fd560e01b815293821660048501525191169163b9a09fd5916024808301926020929190829003018186803b1580156114c457600080fd5b505afa1580156114d8573d6000803e3d6000fd5b505050506040513d60208110156114ee57600080fd5b5051600e80546001600160a01b0319166001600160a01b03928316179081905516611557576040805162461bcd60e51b81526020600482015260146024820152735661756c74546f6b656e3a204e4f5f474155474560601b604482015290519081900360640190fd5b600c80546001600160a01b038088166001600160a01b03199283168117909355600f80549187169190921617905560408051633fc8cef360e01b81529051633fc8cef391600480820192602092909190829003018186803b1580156115bb57600080fd5b505afa1580156115cf573d6000803e3d6000fd5b505050506040513d60208110156115e557600080fd5b5051601180546001600160a01b0319166001600160a01b0392831617905560408051634eb1c24560e11b81528151928a1692639d63848a92600480840193919291829003018186803b15801561163a57600080fd5b505afa15801561164e573d6000803e3d6000fd5b505050506040513d604081101561166457600080fd5b508051602090910151601480546001600160a01b03199081166001600160a01b03938416179091556013805482169383169390931790925560108054831685831617908190556012805490931684831617909255600c546116cb9282169116600019613312565b600c546011546116f0916001600160a01b03918216911660001963ffffffff61331216565b600e54600854611715916001600160a01b03918216911660001963ffffffff61331216565b50505050505050565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561176257600080fd5b505afa158015611776573d6000803e3d6000fd5b505050506040513d602081101561178c57600080fd5b50516001600160a01b0316146117da576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b66b1a2bc2ec50000811115611836576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a20494e564c445f5245494e564553545f4645450000604482015290519081900360640190fd5b60168190556040805182815290517f06df23e01946274f699a86923d1f32785f705fa03f19b8f7203367561b6e0b3d9181900360200190a150565b60006017828154811061188057fe5b6000918252602090912001546001600160a01b031692915050565b600d546001600160a01b031681565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156118ee57600080fd5b505afa158015611902573d6000803e3d6000fd5b505050506040513d602081101561191857600080fd5b50516001600160a01b031614611966576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b66b1a2bc2ec500008111156119ac5760405162461bcd60e51b81526004018080602001828103825260218152602001806146b66021913960400191505060405180910390fd5b60158190556040805182815290517ffa1e13889c5c5294758f01f045a83de15feca61a17e6281f4d11a5110085d9329181900360200190a150565b6009546001600160a01b031615611a45576040805162461bcd60e51b815260206004820152601a60248201527f5461726f743a20464143544f52595f414c52454144595f534554000000000000604482015290519081900360640190fd5b600980546001600160a01b03191633179055565b600b5461010090046001600160a01b031681565b600b5460009060ff16611aba576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600854600090611adc906001600160a01b0316612f5b565b600e54604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611b2d57600080fd5b505afa158015611b41573d6000803e3d6000fd5b505050506040513d6020811015611b5757600080fd5b5051600e5460408051631c57762b60e31b81526004810186905260006024820181905291519394506001600160a01b039092169263e2bbb15892604480820193929182900301818387803b158015611bae57600080fd5b505af1158015611bc2573d6000803e3d6000fd5b5050600e54604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b158015611c1357600080fd5b505afa158015611c27573d6000803e3d6000fd5b505050506040513d6020811015611c3d57600080fd5b50519050611c74611c4c61128a565b610c0e670de0b6b3a7640000611c68858763ffffffff61346416565b9063ffffffff612cd516565b935060035460001415611ca257611c93846103e863ffffffff61346416565b9350611ca260006103e86134a6565b60008411611cf7576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e3a204d494e545f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b611d0185856134a6565b604080518481526020810186905281516001600160a01b0388169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a3505050611d5461353d565b600b805460ff19166001179055919050565b60155481565b600181565b6008546001600160a01b031681565b60046020526000908152604090205481565b63ffffffff421690565b6012546001600160a01b031681565b60076020526000908152604090205481565b600b5460009060ff16611e0a576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905530600090815260046020526040902054611e48670de0b6b3a7640000610c0e611e3b61128a565b849063ffffffff612cd516565b915060008211611e9f576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a2052454445454d5f414d4f554e545f5a45524f0000604482015290519081900360640190fd5b600a54821115611ef6576040805162461bcd60e51b815260206004820152601d60248201527f5661756c74546f6b656e3a20494e53554646494349454e545f43415348000000604482015290519081900360640190fd5b611f0030826135f3565b600e5460408051632e1a7d4d60e01b81526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015611f4d57600080fd5b505af1158015611f61573d6000803e3d6000fd5b50505050611f6f8383613690565b604080518381526020810183905281516001600160a01b0386169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a350611d5461353d565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610a955780601f10610a6a57610100808354040283529160200191610a95565b600e546001600160a01b031681565b6000610cb8338484612e69565b6011546001600160a01b031681565b600a5481565b6103e881565b600b5460ff1661209b576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600a54600854604080516370a0823160e01b8152306004820152905161213b9385936121369391926001600160a01b03909116916370a08231916024808301926020929190829003018186803b1580156120fe57600080fd5b505afa158015612112573d6000803e3d6000fd5b505050506040513d602081101561212857600080fd5b50519063ffffffff61346416565b613690565b50600b805460ff19166001179055565b6009546001600160a01b031681565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561219e57600080fd5b505afa1580156121b2573d6000803e3d6000fd5b505050506040513d60208110156121c857600080fd5b50516001600160a01b031614612216576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b601280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f7f0cbd49972f62913af26d643526e8da09b67d71da761e4782ce72d4bdc78b739181900360200190a150565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156122ae57600080fd5b505afa1580156122c2573d6000803e3d6000fd5b505050506040513d60208110156122d857600080fd5b50516001600160a01b031614612326576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b61232f81613822565b50565b6010546001600160a01b031681565b6014546001600160a01b031681565b612380878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96138f6565b611715878787612d70565b600560209081526000928352604080842090915290825290205481565b600f546001600160a01b031681565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156123fb57600080fd5b505afa15801561240f573d6000803e3d6000fd5b505050506040513d602081101561242557600080fd5b50516001600160a01b031614612473576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b6001600160a01b03811660009081526018602052604090205460ff166124e0576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a205245494e564553544f525f454e41424c45440000604482015290519081900360640190fd5b60006124eb82613acb565b60178054919250600091600019810190811061250357fe5b600091825260209091200154601780546001600160a01b03909216925082918490811061252c57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601780548061256557fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b039490941681526018909352505060409020805460ff19169055565b60175490565b60165481565b6008546040805163ebeb31db60e01b815290516000926001600160a01b03169163ebeb31db916004808301926020929190829003018186803b1580156125ff57600080fd5b505afa158015612613573d6000803e3d6000fd5b505050506040513d602081101561262957600080fd5b5051905090565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561267457600080fd5b505afa158015612688573d6000803e3d6000fd5b505050506040513d602081101561269e57600080fd5b50516001600160a01b0316146126ec576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b600b5460ff16612736576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600e54604080516331279d3d60e01b8152306004820181815260248301938452604483018690526001600160a01b03909416936331279d3d9391928792879291606401846020850280828437600081840152601f19601f820116905080830192505050945050505050600060405180830381600087803b1580156127c357600080fd5b505af11580156127d7573d6000803e3d6000fd5b5050600b805460ff1916600117905550505050565b600c546001600160a01b031681565b600b5460ff16612845576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff191690553332148061286c57503360009081526018602052604090205460ff165b61287557600080fd5b600061287f613131565b90508061288c5750612c0e565b6000670de0b6b3a76400006128ac60155484612cd590919063ffffffff16565b816128b357fe5b04905080156128d9576010546128d9906001600160a01b0316338363ffffffff612fd716565b6000670de0b6b3a76400006128f960165485612cd590919063ffffffff16565b8161290057fe5b049050801561292c5760125460105461292c916001600160a01b0391821691168363ffffffff612fd716565b60105460135460009182916001600160a01b039081169116148061296057506010546014546001600160a01b039081169116145b156129b3576010546013546001600160a01b03908116911614612995576014546013546001600160a01b0391821691166129a9565b6013546014546001600160a01b0391821691165b9092509050612a34565b6011546014546001600160a01b03908116911614156129e65750506014546013546001600160a01b0391821691166129fc565b50506013546014546001600160a01b0391821691165b601054612a32906001600160a01b031683612a2d612a20888863ffffffff613b6c16565b899063ffffffff61346416565b613bc6565b505b6000612a48836001600160a01b0316612f5b565b905060008111612a5457fe5b600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015612aa557600080fd5b505afa158015612ab9573d6000803e3d6000fd5b505050506040513d6060811015612acf57600080fd5b5080516020909101516013546001600160701b039283169450911691506000906001600160a01b03878116911614612b075781612b09565b825b90506000612b178583613df6565b9050612b24878783613f26565b6000612b528888612b3b898663ffffffff61346416565b612b4d8b6001600160a01b0316612f5b565b614071565b600e5460408051631c57762b60e31b81526004810184905260006024820181905291519394506001600160a01b039092169263e2bbb15892604480820193929182900301818387803b158015612ba757600080fd5b505af1158015612bbb573d6000803e3d6000fd5b5050604080518e8152602081018e90528082018d905290513393507f5a1f3c64a894cbcee558ea14f59dd807692703df44b42f0c036588f149c8f7ba92509081900360600190a250505050505050505050505b612c1661353d565b600b805460ff19166001179055565b600b5460ff16612c6f576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055612c1661353d565b6000600160701b8210612cd1576040805162461bcd60e51b81526020600482015260136024820152722b30bab63a2a37b5b2b71d1029a0a32298989960691b604482015290519081900360640190fd5b5090565b600082612ce457506000610cbc565b82820282848281612cf157fe5b0414610e3b5760405162461bcd60e51b81526004018080602001828103825260218152602001806146956021913960400191505060405180910390fd5b6000610e3b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614149565b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60008184841115612e615760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612e26578181015183820152602001612e0e565b50505050905090810190601f168015612e535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080518082018252601881527f5461726f743a205452414e534645525f544f4f5f4849474800000000000000006020808301919091526001600160a01b038616600090815260049091529190912054612eca91839063ffffffff612dd216565b6001600160a01b038085166000908152600460205260408082209390935590841681522054612eff908263ffffffff613b6c16565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b158015612fa557600080fd5b505afa158015612fb9573d6000803e3d6000fd5b505050506040513d6020811015612fcf57600080fd5b505192915050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106130545780518252601f199092019160209182019101613035565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146130b6576040519150601f19603f3d011682016040523d82523d6000602084013e6130bb565b606091505b50915091508180156130e95750805115806130e957508080602001905160208110156130e657600080fd5b50515b61312a576040805162461bcd60e51b815260206004820152600d60248201526c10b9b0b332aa3930b739b332b960991b604482015290519081900360640190fd5b5050505050565b6040805160018082528183019092526000916060919060208083019080388339505060105482519293506001600160a01b03169183915060009061317157fe5b6001600160a01b03928316602091820292909201810191909152600e54604080516331279d3d60e01b815230600482018181526024830193845287516044840152875194909616956331279d3d959194889491939192606490920191858101910280838360005b838110156131f05781810151838201526020016131d8565b505050509050019350505050600060405180830381600087803b15801561321657600080fd5b505af115801561322a573d6000803e3d6000fd5b505060105461324492506001600160a01b03169050612f5b565b91505090565b815161325d9060009060208501906145b4565b5080516132719060019060208401906145b4565b5060405146908060526146438239604080519182900360520182208651602097880120838301835260018452603160f81b93880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061338f5780518252601f199092019160209182019101613370565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146133f1576040519150601f19603f3d011682016040523d82523d6000602084013e6133f6565b606091505b5091509150818015613424575080511580613424575080806020019051602081101561342157600080fd5b50515b61312a576040805162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b604482015290519081900360640190fd5b6000610e3b83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250612dd2565b6003546134b9908263ffffffff613b6c16565b6003556001600160a01b0382166000908152600460205260409020546134e5908263ffffffff613b6c16565b6001600160a01b03831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600e54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561358857600080fd5b505afa15801561359c573d6000803e3d6000fd5b505050506040513d60208110156135b257600080fd5b5051600a8190556040805182815290519192507f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf4919081900360200190a150565b6001600160a01b03821660009081526004602052604090205461361c908263ffffffff61346416565b6001600160a01b038316600090815260046020526040902055600354613648908263ffffffff61346416565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0386811660248301526044808301879052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009560609594169382918083835b6020831061373d5780518252601f19909201916020918201910161371e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461379f576040519150601f19603f3d011682016040523d82523d6000602084013e6137a4565b606091505b50915091508180156137d25750805115806137d257508080602001905160208110156137cf57600080fd5b50515b61381c576040805162461bcd60e51b815260206004820152601660248201527515185c9bdd0e881514905394d1915497d1905253115160521b604482015290519081900360640190fd5b50505050565b6001600160a01b03811660009081526018602052604090205460ff1615613890576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a205245494e564553544f525f454e41424c45440000604482015290519081900360640190fd5b6001600160a01b03166000818152601860205260408120805460ff191660019081179091556017805491820181559091527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c150180546001600160a01b0319169091179055565b4285101561393c576040805162461bcd60e51b815260206004820152600e60248201526d15185c9bdd0e881156141254915160921b604482015290519081900360640190fd5b6006546001600160a01b03808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e280820193601f1981019281900390910190855afa158015613a38573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590613a6e5750896001600160a01b0316816001600160a01b0316145b613abf576040805162461bcd60e51b815260206004820152601860248201527f5461726f743a20494e56414c49445f5349474e41545552450000000000000000604482015290519081900360640190fd5b50505050505050505050565b601754600090815b81811015613b1e57836001600160a01b031660178281548110613af257fe5b6000918252602090912001546001600160a01b03161415613b165791506112859050565b600101613ad3565b506040805162461bcd60e51b815260206004820181905260248201527f5661756c74546f6b656e3a205245494e564553544f525f4e4f545f464f554e44604482015290519081900360640190fd5b600082820183811015610e3b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826001600160a01b0316846001600160a01b03161415613be9575080610e3b565b600b546040805163711f958560e11b81526001600160a01b038781166004830152915161010090930490911691600091839163e23f2b0a91602480820192602092909190829003018186803b158015613c4157600080fd5b505afa158015613c55573d6000803e3d6000fd5b505050506040513d6020811015613c6b57600080fd5b505190506001600160a01b038082169086161415613c9857613c8f828787876141ae565b92505050610e3b565b6000826001600160a01b031663e23f2b0a876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015613cf057600080fd5b505afa158015613d04573d6000803e3d6000fd5b505050506040513d6020811015613d1a57600080fd5b505190506001600160a01b038781169082161415613d4857613d3e838888886141ae565b9350505050610e3b565b6000876001600160a01b0316836001600160a01b031614613d7657613d6f848985896141ae565b9050613d79565b50845b816001600160a01b0316836001600160a01b03161415613daa57613d9f848489846141ae565b945050505050610e3b565b866001600160a01b0316826001600160a01b03161415613dcf57613d9f838883613bc6565b6000613ddc848484613bc6565b9050613dea85848a846141ae565b95505050505050610e3b565b600f5460408051632895a2f560e11b81526000600482018190529151919283926001600160a01b039091169163512b45ea916024808301926020929190829003018186803b158015613e4757600080fd5b505afa158015613e5b573d6000803e3d6000fd5b505050506040513d6020811015613e7157600080fd5b505190506000613e896127108363ffffffff61346416565b90506000613ea385611c686127108563ffffffff613b6c16565b90506000613ec283611c686004818a818d61271063ffffffff612cd516565b90506000613eee613ee983613edd868063ffffffff612cd516565b9063ffffffff613b6c16565b6144b4565b90506000613f0360028663ffffffff612cd516565b9050613f1981610c0e848763ffffffff61346416565b9998505050505050505050565b613f308382614505565b600c54604080516313dcfc5960e01b8152600481018490526000602482018190526001600160a01b0387811660448401528681166064840152608483018290523060a48401524260c4840152925192909316926313dcfc599260e48084019382900301818387803b158015613fa457600080fd5b505af1158015613fb8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613fe157600080fd5b8101908080516040519392919084600160201b82111561400057600080fd5b90830190602082018581111561401557600080fd5b82518660208202830111600160201b8211171561403157600080fd5b82525081516020918201928201910280838360005b8381101561405e578181015183820152602001614046565b5050505090500160405250505050505050565b600061407d8584614505565b6140878483614505565b600c5460408051635a47ddc360e01b81526001600160a01b0388811660048301528781166024830152600060448301819052606483018890526084830187905260a4830181905260c483018190523060e4840152426101048401529251931692635a47ddc39261012480840193606093929083900390910190829087803b15801561411157600080fd5b505af1158015614125573d6000803e3d6000fd5b505050506040513d606081101561413b57600080fd5b506040015195945050505050565b600081836141985760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e26578181015183820152602001612e0e565b5060008385816141a457fe5b0495945050505050565b6000826001600160a01b0316846001600160a01b031614156141d15750806144ac565b60408051630820681160e11b8152600481018490526001600160a01b0386811660248301528581166044830152825160009391891692631040d022926064808301939192829003018186803b15801561422957600080fd5b505afa15801561423d573d6000803e3d6000fd5b505050506040513d604081101561425357600080fd5b508051602090910151925090506001600160a01b0381166142a5576040805162461bcd60e51b81526020600482015260076024820152662727afa820a4a960c91b604482015290519081900360640190fd5b6142bf6001600160a01b038616828563ffffffff612fd716565b836001600160a01b0316856001600160a01b031610156143c357604080516000808252602082019283905263022c0d9f60e01b835260248201818152604483018690523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a9590939092909160c48501918083838b5b8381101561435757818101518382015260200161433f565b50505050905090810190601f1680156143845780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156143a657600080fd5b505af11580156143ba573d6000803e3d6000fd5b505050506144aa565b604080516000808252602082019283905263022c0d9f60e01b835260248201858152604483018290523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a969590939092909160c48501918083838a5b8381101561444257818101518382015260200161442a565b50505050905090810190601f16801561446f5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561449157600080fd5b505af11580156144a5573d6000803e3d6000fd5b505050505b505b949350505050565b600060038211156144f7575080600160028204015b818110156144f1578091506002818285816144e057fe5b0401816144e957fe5b0490506144c9565b50611285565b811561128557506001919050565b600c5460408051636eb1769f60e11b81523060048201526001600160a01b0392831660248201529051839285169163dd62ed3e916044808301926020929190829003018186803b15801561455857600080fd5b505afa15801561456c573d6000803e3d6000fd5b505050506040513d602081101561458257600080fd5b50511061458e576145b0565b600c546145b0906001600160a01b03848116911660001963ffffffff61331216565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106145f557805160ff1916838001178555614622565b82800160010185558215614622579182015b82811115614622578251825591602001919060010190614607565b50612cd1926112d79250905b80821115612cd1576000815560010161462e56fe454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775661756c74546f6b656e3a20494e564c445f5245494e564553545f424f554e54595661756c74546f6b656e3a20494e53554646494349454e545f5245534552564553a265627a7a723158202d974f5ef8878c75e4e2e6ecb5a1589d2dc408fd6ab72c80700f1fc73a4454eb64736f6c63430005100032

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.