Contract 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3a9ed2c6cee5473eff5a3e5e48918b798214584bc1c5e14af70b99a29a1deb51Create Vault Tok...420285592022-07-04 22:23:232 days 18 hrs ago0x167d87a906da361a10061fe42bbe89451c2ee584 IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM0.013263090393
0xee1cd446388d52d8e9f852ec3b6565341238dcab6d0fa9af8eb69310c3231f76Create Vault Tok...337005712022-03-17 22:44:39111 days 18 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.04264845787
0x733381ba6817fc516d83afe77d8cca39256128ba4ded5f08b240516d176e0229Create Vault Tok...335924292022-03-16 16:49:32113 days 8 mins agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.324777629312
0xfddc5998cf8764f91913dcd70f03e2ad03585ab2b93b6dab0c5ac0cf54459ca7Create Vault Tok...335924222022-03-16 16:49:23113 days 8 mins agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.379513508545
0xaab95ed0c520e13aebf84fb9d068d0410ced92f7d2d312442c777c9ef2486bf5Create Vault Tok...335924202022-03-16 16:49:22113 days 8 mins agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.379513508545
0x937510fb0c49d7d41052567abc52e0073b9fc1985ba7f82eb516de8b5f5ebabdCreate Vault Tok...335924182022-03-16 16:49:20113 days 8 mins agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.379513508545
0xe1ead67c225ce1dcc6ac06c5f0b9950a6875198410977e30d1a42a23ce2a43ffCreate Vault Tok...335924122022-03-16 16:49:15113 days 8 mins agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.379513508545
0xaef652de34ec3e3009f804a9ea65ff5c3d4937547d9da05c5cb5985df116a6eeCreate Vault Tok...335924092022-03-16 16:49:12113 days 8 mins agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.320430233034
0x8710157b3117dfabcba7dd2d2f2cb4191042cd070bc3ff4494c2900b20e2b68eCreate Vault Tok...332718412022-03-13 0:45:03116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM1.915896656104
0x427c249d08a6c031a0d50aba87c244ad686b0808940ddd02dc7ddce5da024d15Create Vault Tok...332715512022-03-13 0:40:54116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.476132103659
0x6c6d07c3e996ed4e3d174e38211893d7c9875cee213746bedc867632303a3b0aCreate Vault Tok...332715512022-03-13 0:40:54116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.484982283521
0x3afe6d0b4b325f9e8b05730ffc7fc24df203308d61a7bd8e27a88600ea86a558Create Vault Tok...332715492022-03-13 0:40:52116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.484982283521
0x7644f8f8035440a101a34d7f0a420010aade4c1c502eb18e5cb749acbc50a1eeCreate Vault Tok...332715472022-03-13 0:40:50116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.484975971732
0xb0a53aa4560af84cf28f17049f41f108e5b81dccce0196aab0e99ae666aca6d7Create Vault Tok...332715472022-03-13 0:40:50116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.484982283521
0x18614dc710ec252d001d6b61690d56544a6ae5cf925ec1943721bd5769491d3bCreate Vault Tok...332715452022-03-13 0:40:49116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.484982283521
0x8f098d186eefd00334e9cb457852f4b91e30669bbfeadaffc426b781a2e0a35fCreate Vault Tok...332715402022-03-13 0:40:45116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.484982283521
0x09136ab92ceed98a56543a625ad7aa598b6f4aa04cf46366172a909a5836ca26Create Vault Tok...332715372022-03-13 0:40:42116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.485550464488
0xdb1d8979b8efcd8b93ce9088bb6faed8d13e53b65291ef58c552ac3417ef83f2Create Vault Tok...332715342022-03-13 0:40:40116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.483717518152
0xb384d5d77745c75fb09ddadb1e2ca84bbf35ed3153c7a06b40971037f8429b7fCreate Vault Tok...332715312022-03-13 0:40:37116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.485556777736
0xb603d54dbb320343acd9778a9be33715de233106d469e312d20e1f804196ed7dCreate Vault Tok...332715292022-03-13 0:40:35116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.485556777736
0xcba600510909d5ec37a97681e131799088bda9721facf168818cdd06c52d664dCreate Vault Tok...332715292022-03-13 0:40:35116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.476704551832
0x7cd5a7fa82ee97ffd4ea7fd4209bd823471e33dd14a028430415b655743ded5dCreate Vault Tok...332715272022-03-13 0:40:34116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.485556777736
0xeda5636200b686eaceebd280e1ed3102d5ff4d360b4cda3dea7fa40746aa94ebCreate Vault Tok...332715252022-03-13 0:40:32116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.481678941788
0x36772fd5bfba329dabacb3de32b36610e17da2216a9c7d7a6c96b96e12bcd2f9Create Vault Tok...332715232022-03-13 0:40:30116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.481678941788
0x9db5c92c11c4021fd5862b133dba474ad6007a624ec70e6f83da9c911e67c7e1Create Vault Tok...332715232022-03-13 0:40:30116 days 16 hrs agoTarot: Deployer IN  0x1f8e600303a7c85166467b0e5921ab394dc5cdb70 FTM2.481678941788
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x3a9ed2c6cee5473eff5a3e5e48918b798214584bc1c5e14af70b99a29a1deb51420285592022-07-04 22:23:232 days 18 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xee1cd446388d52d8e9f852ec3b6565341238dcab6d0fa9af8eb69310c3231f76337005712022-03-17 22:44:39111 days 18 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x733381ba6817fc516d83afe77d8cca39256128ba4ded5f08b240516d176e0229335924292022-03-16 16:49:32113 days 8 mins ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xfddc5998cf8764f91913dcd70f03e2ad03585ab2b93b6dab0c5ac0cf54459ca7335924222022-03-16 16:49:23113 days 8 mins ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xaab95ed0c520e13aebf84fb9d068d0410ced92f7d2d312442c777c9ef2486bf5335924202022-03-16 16:49:22113 days 8 mins ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x937510fb0c49d7d41052567abc52e0073b9fc1985ba7f82eb516de8b5f5ebabd335924182022-03-16 16:49:20113 days 8 mins ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xe1ead67c225ce1dcc6ac06c5f0b9950a6875198410977e30d1a42a23ce2a43ff335924122022-03-16 16:49:15113 days 8 mins ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xaef652de34ec3e3009f804a9ea65ff5c3d4937547d9da05c5cb5985df116a6ee335924092022-03-16 16:49:12113 days 8 mins ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x8710157b3117dfabcba7dd2d2f2cb4191042cd070bc3ff4494c2900b20e2b68e332718412022-03-13 0:45:03116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x427c249d08a6c031a0d50aba87c244ad686b0808940ddd02dc7ddce5da024d15332715512022-03-13 0:40:54116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x6c6d07c3e996ed4e3d174e38211893d7c9875cee213746bedc867632303a3b0a332715512022-03-13 0:40:54116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x3afe6d0b4b325f9e8b05730ffc7fc24df203308d61a7bd8e27a88600ea86a558332715492022-03-13 0:40:52116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x7644f8f8035440a101a34d7f0a420010aade4c1c502eb18e5cb749acbc50a1ee332715472022-03-13 0:40:50116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xb0a53aa4560af84cf28f17049f41f108e5b81dccce0196aab0e99ae666aca6d7332715472022-03-13 0:40:50116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x18614dc710ec252d001d6b61690d56544a6ae5cf925ec1943721bd5769491d3b332715452022-03-13 0:40:49116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x8f098d186eefd00334e9cb457852f4b91e30669bbfeadaffc426b781a2e0a35f332715402022-03-13 0:40:45116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x09136ab92ceed98a56543a625ad7aa598b6f4aa04cf46366172a909a5836ca26332715372022-03-13 0:40:42116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xdb1d8979b8efcd8b93ce9088bb6faed8d13e53b65291ef58c552ac3417ef83f2332715342022-03-13 0:40:40116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xb384d5d77745c75fb09ddadb1e2ca84bbf35ed3153c7a06b40971037f8429b7f332715312022-03-13 0:40:37116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xb603d54dbb320343acd9778a9be33715de233106d469e312d20e1f804196ed7d332715292022-03-13 0:40:35116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xcba600510909d5ec37a97681e131799088bda9721facf168818cdd06c52d664d332715292022-03-13 0:40:35116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x7cd5a7fa82ee97ffd4ea7fd4209bd823471e33dd14a028430415b655743ded5d332715272022-03-13 0:40:34116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0xeda5636200b686eaceebd280e1ed3102d5ff4d360b4cda3dea7fa40746aa94eb332715252022-03-13 0:40:32116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x36772fd5bfba329dabacb3de32b36610e17da2216a9c7d7a6c96b96e12bcd2f9332715232022-03-13 0:40:30116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
0x9db5c92c11c4021fd5862b133dba474ad6007a624ec70e6f83da9c911e67c7e1332715232022-03-13 0:40:30116 days 16 hrs ago 0x1f8e600303a7c85166467b0e5921ab394dc5cdb7  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OxVaultTokenFactory

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : OxVaultTokenFactory.sol
pragma solidity =0.5.16;

import "@openzeppelin/contracts/ownership/Ownable.sol";
import "./interfaces/IBaseV1Pair.sol";
import "./OxVaultToken.sol";
import "./interfaces/IOxVaultTokenFactory.sol";

contract OxVaultTokenFactory is Ownable, IOxVaultTokenFactory {
    address public optiSwap;
    address public router;
    address public oxUserProxyInterface;
    address public rewardsToken;
    address public rewardsTokenB;
    uint256 public swapFeeFactor;

    mapping(address => address) public getVaultToken;
    address[] public allVaultTokens;

    constructor(
        address _optiSwap,
        address _router,
        address _oxUserProxyInterface,
        address _rewardsToken,
        address _rewardsTokenB,
        uint256 _swapFeeFactor
    ) public {
        require(
            _swapFeeFactor >= 9000 && _swapFeeFactor <= 10000,
            "VaultTokenFactory: INVALID_FEE_FACTOR"
        );
        optiSwap = _optiSwap;
        router = _router;
        oxUserProxyInterface = _oxUserProxyInterface;
        rewardsToken = _rewardsToken;
        rewardsTokenB = _rewardsTokenB;
        swapFeeFactor = _swapFeeFactor;
    }

    function allVaultTokensLength() external view returns (uint256) {
        return allVaultTokens.length;
    }

    function createVaultToken(address _underlying)
        external
        returns (address vaultToken)
    {
        require(
            getVaultToken[_underlying] == address(0),
            "VaultTokenFactory: POOL_EXISTS"
        );
        require(!IBaseV1Pair(_underlying).stable(), "VaultTokenFactory: IS_STABLE");
        bytes memory bytecode = type(OxVaultToken).creationCode;
        assembly {
            vaultToken := create2(0, add(bytecode, 32), mload(bytecode), _underlying)
        }
        OxVaultToken(vaultToken)._initialize(
            _underlying,
            optiSwap,
            router,
            oxUserProxyInterface,
            rewardsToken,
            rewardsTokenB,
            swapFeeFactor
        );
        getVaultToken[_underlying] = vaultToken;
        allVaultTokens.push(vaultToken);
        emit VaultTokenCreated(_underlying, vaultToken, allVaultTokens.length);
    }
}

File 2 of 20 : 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 20 : 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
    );
}

File 4 of 20 : OxVaultToken.sol
pragma solidity =0.5.16;

import "@openzeppelin/contracts/ownership/Ownable.sol";
import "./PoolToken.sol";
import "./interfaces/IOptiSwap.sol";
import "./interfaces/IOxUserProxyInterface.sol";
import "./interfaces/IOxLens.sol";
import "./interfaces/IOxMultiRewards.sol";
import "./interfaces/IBaseV1Router01.sol";
import "./interfaces/IBaseV1Pair.sol";
import "./interfaces/IOxVaultToken.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 OxVaultToken is IOxVaultToken, PoolToken {
    using SafeToken for address;

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

    address public optiSwap;
    address public router;
    address public oxUserProxyInterface;
    address public oxLens;
    address public oxUserProxy;
    address public oxStakingAddress;
    address public rewardsToken;
    address public rewardsTokenB;
    address public WETH;
    address public token0;
    address public token1;
    uint256 public swapFeeFactor;

    uint256 public constant MIN_REINVEST_BOUNTY = 0.001e18;
    uint256 public constant MAX_REINVEST_BOUNTY = 0.01e18;
    uint256 public REINVEST_BOUNTY = MAX_REINVEST_BOUNTY;

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

    function _initialize(
        address _underlying,
        address _optiSwap,
        address _router,
        address _oxUserProxyInterface,
        address _rewardsToken,
        address _rewardsTokenB,
        uint256 _swapFeeFactor
    ) external {
        require(factory == address(0), "VaultToken: FACTORY_ALREADY_SET"); // sufficient check
        factory = msg.sender;
        _setName("Tarot Vault Token", "vTAROT");
        underlying = _underlying;
        optiSwap = _optiSwap;
        router = _router;
        oxUserProxyInterface = _oxUserProxyInterface;
        oxLens = IOxUserProxyInterface(oxUserProxyInterface).oxLensAddress();
        oxStakingAddress = IOxLens(oxLens).stakingRewardsBySolidPool(underlying);
        IOxUserProxyInterface(oxUserProxyInterface).claimStakingRewards(oxStakingAddress);
        oxUserProxy = IOxLens(oxLens).userProxyByAccount(address(this));
        WETH = IBaseV1Router01(_router).wftm();
        swapFeeFactor = _swapFeeFactor;
        (token0, token1) = IBaseV1Pair(_underlying).tokens();
        rewardsToken = _rewardsToken;
        rewardsTokenB = _rewardsTokenB;
        rewardsToken.safeApprove(address(router), uint256(-1));
        WETH.safeApprove(address(router), uint256(-1));
        underlying.safeApprove(address(oxUserProxyInterface), uint256(-1));
    }

    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);
    }

    /*** PoolToken Overrides ***/

    function _update() internal {
        uint256 _totalBalance = IOxMultiRewards(oxStakingAddress).balanceOf(oxUserProxy);
        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 = IOxMultiRewards(oxStakingAddress).balanceOf(oxUserProxy);
        IOxUserProxyInterface(oxUserProxyInterface).depositLpAndStake(underlying, mintAmount);
        uint256 _totalBalanceAfter = IOxMultiRewards(oxStakingAddress).balanceOf(oxUserProxy);
        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);
        IOxUserProxyInterface(oxUserProxyInterface).unstakeLpAndWithdraw(underlying, redeemAmount);
        _safeTransfer(redeemer, redeemAmount);
        emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);
    }

    /*** Reinvest ***/

    function _optimalDepositA(
        uint256 _amountA,
        uint256 _reserveA,
        uint256 _swapFeeFactor
    ) internal pure returns (uint256) {
        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);
        IBaseV1Router01(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) = IBaseV1Router01(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) {
        IOxUserProxyInterface(oxUserProxyInterface).claimStakingRewards(oxStakingAddress);

        uint256 myBalance = rewardsTokenB.myBalance();
        if (myBalance > 0) {
            optiSwapExactTokensForTokens(rewardsTokenB, rewardsToken, myBalance);
        }

        return rewardsToken.myBalance();
    }

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

    function getOxRewardRates()
        external
        view
        returns (uint256 rewardRate, uint256 rewardRateB)
    {
        (, , , rewardRate, , ) = IOxMultiRewards(oxStakingAddress).rewardData(rewardsToken);
        (, , , rewardRateB, , ) = IOxMultiRewards(oxStakingAddress).rewardData(rewardsTokenB);
    }

    function getOxTotalSupply() external view returns (uint256) {
        return IOxMultiRewards(oxStakingAddress).totalSupply();
    }

    function reinvest() external nonReentrant update {
        require(msg.sender == tx.origin);
        // 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;
        rewardsToken.safeTransfer(msg.sender, bounty);
        // 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));
        }
        // 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, swapFeeFactor);
        swapExactTokensForTokens(tokenA, tokenB, swapAmount);
        uint256 liquidity = addLiquidity(tokenA, tokenB, totalAmountA.sub(swapAmount), tokenB.myBalance());
        // 5. Stake the LP Tokens.
        IOxUserProxyInterface(oxUserProxyInterface).depositLpAndStake(underlying, liquidity);
        emit Reinvest(msg.sender, reward, bounty);
    }

    function adminClaimStakingRewards() external onlyFactoryOwner nonReentrant {
        IOxUserProxyInterface(oxUserProxyInterface).claimStakingRewards();
    }

    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 != rewardsTokenB, "VaultToken: IS_REWARDS_TOKEN_B");
            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");
        _;
    }
}

File 5 of 20 : IOxVaultTokenFactory.sol
pragma solidity >=0.5.0;

interface IOxVaultTokenFactory {
    event VaultTokenCreated(
        address indexed pool,
        address vaultToken,
        uint256 vaultTokenIndex
    );

    function optiSwap() external view returns (address);

    function router() external view returns (address);

    function oxUserProxyInterface() external view returns (address);

    function rewardsToken() external view returns (address);

    function rewardsTokenB() external view returns (address);

    function swapFeeFactor() external view returns (uint256);

    function getVaultToken(address) external view returns (address);

    function allVaultTokens(uint256) external view returns (address);

    function allVaultTokensLength() external view returns (uint256);

    function createVaultToken(address _underlying)
        external
        returns (address vaultToken);
}

File 6 of 20 : 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 7 of 20 : 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 8 of 20 : 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 9 of 20 : IOxUserProxyInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IOxUserProxyInterface {
    
    function oxLensAddress() external view returns (address);

    function convertNftToOxSolid(uint256) external;

    function convertSolidToOxSolid(uint256) external;

    function depositLpAndStake(address, uint256) external;

    function depositLp(address, uint256) external;

    function stakingAddresses() external view returns (address[] memory);

    function initialize(address, address) external;

    function stakingPoolsLength() external view returns (uint256);

    function unstakeLpAndWithdraw(
        address,
        uint256,
        bool
    ) external;

    function unstakeLpAndWithdraw(address, uint256) external;

    function unstakeLpWithdrawAndClaim(address) external;

    function unstakeLpWithdrawAndClaim(address, uint256) external;

    function withdrawLp(address, uint256) external;

    function stakeOxLp(address, uint256) external;

    function unstakeOxLp(address, uint256) external;

    function ownerAddress() external view returns (address);

    function stakeOxSolid(uint256) external;

    function unstakeOxSolid(uint256) external;

    function unstakeOxSolid(address, uint256) external;

    function convertSolidToOxSolidAndStake(uint256) external;

    function convertNftToOxSolidAndStake(uint256) external;

    function claimOxSolidStakingRewards() external;

    function claimPartnerStakingRewards() external;

    function claimStakingRewards(address) external;

    function claimStakingRewards(address[] calldata) external;

    function claimStakingRewards() external;

    function claimVlOxdRewards() external;

    function depositOxd(uint256, uint256) external;

    function withdrawOxd(bool, uint256) external;

    function voteLockOxd(uint256, uint256) external;

    function withdrawVoteLockedOxd(uint256, bool) external;

    function relockVoteLockedOxd(uint256) external;

    function removeVote(address) external;

    function registerStake(address) external;

    function registerUnstake(address) external;

    function resetVotes() external;

    function setVoteDelegate(address) external;

    function clearVoteDelegate() external;

    function vote(address, int256) external;

    function migrateOxSolidToPartner() external;

    function stakeOxSolidInOxdV1(uint256) external;

    function unstakeOxSolidInOxdV1(uint256) external;

    function redeemOxdV1(uint256) external;

    function redeemAndStakeOxdV1(uint256) external;

    function implementationsAddresses()
        external
        view
        returns (address[] memory);
}

File 10 of 20 : IOxLens.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IOxLens {
    function stakingRewardsBySolidPool(address solidPoolAddress)
        external
        view
        returns (address);
        
    function userProxyByAccount(address accountAddress)
        external
        view
        returns (address);
}

File 11 of 20 : IOxMultiRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IOxMultiRewards {
    function rewardData(address)
        external
        view
        returns (
            address rewardsDistributor,
            uint256 rewardsDuration,
            uint256 periodFinish,
            uint256 rewardRate,
            uint256 lastUpdateTime,
            uint256 rewardPerTokenStored
        );

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

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

File 12 of 20 : IBaseV1Router01.sol
pragma solidity >=0.5.0;

interface IBaseV1Router01 {
  function wftm() 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 13 of 20 : IOxVaultToken.sol
pragma solidity >=0.5.0;

interface IOxVaultToken {
    /*** 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);

    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 oxUserProxyInterface() external view returns (address);

    function oxLens() external view returns (address);

    function oxUserProxy() external view returns (address);

    function oxStakingAddress() external view returns (address);

    function rewardsToken() external view returns (address);

    function rewardsTokenB() external view returns (address);

    function WETH() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function swapFeeFactor() external view returns (uint256);

    function REINVEST_BOUNTY() external view returns (uint256);

    function updateReinvestBounty(uint256 _newReinvestBounty) 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 _oxUserProxyInterface,
        address _rewardsToken,
        address _rewardsTokenB,
        uint256 _swapFeeFactor
    ) external;

    function reinvest() external;

    function getReward() external returns (uint256);

    function getOxRewardRates() external view returns (uint256, uint256);

    function getOxTotalSupply() external view returns (uint256);

    function getBlockTimestamp() external view returns (uint32);

    function adminClaimStakingRewards() external;

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

File 14 of 20 : 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 15 of 20 : 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 16 of 20 : 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 17 of 20 : 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 18 of 20 : 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 19 of 20 : 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 20 of 20 : 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_optiSwap","type":"address"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_oxUserProxyInterface","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_rewardsTokenB","type":"address"},{"internalType":"uint256","name":"_swapFeeFactor","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"vaultToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"vaultTokenIndex","type":"uint256"}],"name":"VaultTokenCreated","type":"event"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allVaultTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allVaultTokensLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_underlying","type":"address"}],"name":"createVaultToken","outputs":[{"internalType":"address","name":"vaultToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getVaultToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oxUserProxyInterface","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsTokenB","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":true,"inputs":[],"name":"swapFeeFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051614990380380614990833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091600061006b6001600160e01b0361016a16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061232881101580156100c957506127108111155b6101045760405162461bcd60e51b815260040180806020018281038252602581526020018061496b6025913960400191505060405180910390fd5b600180546001600160a01b03199081166001600160a01b039889161790915560028054821696881696909617909555600380548616948716949094179093556004805485169286169290921790915560058054909316931692909217905560065561016e565b3390565b6147ee8061017d6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638f32d59b1161008c578063d1af0c7d11610066578063d1af0c7d146101d4578063e757fc56146101dc578063f2fde38b146101e4578063f887ea401461020a576100ea565b80638f32d59b146101755780639dc6108f14610191578063a9a1e138146101b7576100ea565b8063715018a6116100c8578063715018a61461013557806388c4c6661461013f5780638a9a19c2146101475780638da5cb5b1461016d576100ea565b806329e15d0b146100ef57806360c2affa1461010957806368f91a441461012d575b600080fd5b6100f7610212565b60408051918252519081900360200190f35b610111610218565b604080516001600160a01b039092168252519081900360200190f35b6100f7610227565b61013d61022d565b005b6101116102d0565b6101116004803603602081101561015d57600080fd5b50356001600160a01b03166102df565b61011161058b565b61017d61059a565b604080519115158252519081900360200190f35b610111600480360360208110156101a757600080fd5b50356001600160a01b03166105be565b610111600480360360208110156101cd57600080fd5b50356105d9565b610111610600565b61011161060f565b61013d600480360360208110156101fa57600080fd5b50356001600160a01b031661061e565b610111610683565b60085490565b6001546001600160a01b031681565b60065481565b61023561059a565b610286576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6005546001600160a01b031681565b6001600160a01b038181166000908152600760205260408120549091161561034e576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e466163746f72793a20504f4f4c5f4558495354530000604482015290519081900360640190fd5b816001600160a01b03166322be3de16040518163ffffffff1660e01b815260040160206040518083038186803b15801561038757600080fd5b505afa15801561039b573d6000803e3d6000fd5b505050506040513d60208110156103b157600080fd5b505115610405576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e466163746f72793a2049535f535441424c4500000000604482015290519081900360640190fd5b60606040518060200161041790610736565b6020820181038252601f19601f820116604052509050828151602083016000f560015460025460035460048054600554600654604080516310ee5fc560e01b81526001600160a01b038d8116968201969096529785166024890152958416604488015293831660648701529082166084860152811660a485015260c484019190915290519294508416916310ee5fc59160e48082019260009290919082900301818387803b1580156104c857600080fd5b505af11580156104dc573d6000803e3d6000fd5b5050506001600160a01b03808516600081815260076020908152604080832080549589166001600160a01b0319968716811790915560088054600181018255948190527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390940180549096168117909555915482519485529084015280519193507f68750cb824b88919ca0bc2d5e95520467a0a0007128b0b04772b5f06e8dda660928290030190a250919050565b6000546001600160a01b031690565b600080546001600160a01b03166105af610692565b6001600160a01b031614905090565b6007602052600090815260409020546001600160a01b031681565b600881815481106105e657fe5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b031681565b6003546001600160a01b031681565b61062661059a565b610677576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61068081610696565b50565b6002546001600160a01b031681565b3390565b6001600160a01b0381166106db5760405162461bcd60e51b81526004018080602001828103825260268152602001806147946026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b614050806107448339019056fe60806040526002805460ff19908116601217909155600b80549091166001179055662386f26fc100006017556140168061003a6000396000f3fe608060405234801561001057600080fd5b50600436106103275760003560e01c80636ee27227116101b8578063bc25cf7711610104578063dd62ed3e116100a2578063f887ea401161007c578063f887ea401461086e578063fa50446914610876578063fdb5a03e1461087e578063fff6cae91461088657610327565b8063dd62ed3e14610830578063e757fc561461085e578063ebeb31db1461086657610327565b8063d1af0c7d116100de578063d1af0c7d146107c7578063d21220a7146107cf578063d505accf146107d7578063d66f42841461082857610327565b8063bc25cf7714610791578063c45a0155146107b7578063c8c4ff8c146107bf57610327565b806395a2251f11610171578063a9059cbb1161014b578063a9059cbb1461074d578063ad5c464814610779578063ad7a672f14610781578063ba9a7a561461078957610327565b806395a2251f1461071757806395d89b411461073d57806396fa4c111461074557610327565b80636ee27227146106925780636f307dc31461069a57806370a08231146106a2578063796b89b9146106c85780637ecebe00146106e957806388c4c6661461070f57610327565b80632f03e2691161027757806346fb738b1161023057806360c2affa1161020a57806360c2affa1461065457806368f91a441461065c5780636a627842146106645780636c2a3bc51461068a57610327565b806346fb738b146106275780634a5d316c146106445780635b3cd4271461064c57610327565b80632f03e269146105c857806330adf81f146105e9578063313ce567146105f15780633644e5151461060f5780633ba0b9a9146106175780633d18b9121461061f57610327565b806318160ddd116102e457806322be3de1116102be57806322be3de1146104ed57806323b872dd146104f5578063252c09d71461052b57806329a105221461054857610327565b806318160ddd146104a55780631df8c717146104bf57806322b4dcdc146104e557610327565b806306fdde031461032c5780630902f1ac146103a9578063095ea7b3146103e15780630dfe16811461042157806310ee5fc514610445578063135fae9b1461049d575b600080fd5b61033461088e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103b161091c565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b61040d600480360360408110156103f757600080fd5b506001600160a01b038135169060200135610b2b565b604080519115158252519081900360200190f35b610429610b42565b604080516001600160a01b039092168252519081900360200190f35b61049b600480360360e081101561045b57600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a08101359091169060c00135610b51565b005b610429611008565b6104ad611017565b60408051918252519081900360200190f35b6104c761101d565b60408051938452602084019290925282820152519081900360600190f35b6104ad6110b3565b61040d61112a565b61040d6004803603606081101561050b57600080fd5b506001600160a01b0381358116916020810135909116906040013561112f565b6104c76004803603602081101561054157600080fd5b50356111ff565b61049b6004803603604081101561055e57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561058957600080fd5b82018360208201111561059b57600080fd5b803590602001918460208302840111640100000000831117156105bd57600080fd5b509092509050611296565b6105d0611655565b6040805192835260208301919091528051918290030190f35b6104ad61175d565b6105f9611781565b6040805160ff9092168252519081900360200190f35b6104ad61178a565b6104ad611790565b6104ad6117df565b61049b6004803603602081101561063d57600080fd5b503561185c565b61049b6119ac565b61049b611a1e565b610429611b88565b6104ad611b9c565b6104ad6004803603602081101561067a57600080fd5b50356001600160a01b0316611ba2565b6104ad611eac565b61040d611eb2565b610429611eb7565b6104ad600480360360208110156106b857600080fd5b50356001600160a01b0316611ec6565b6106d0611ed8565b6040805163ffffffff9092168252519081900360200190f35b6104ad600480360360208110156106ff57600080fd5b50356001600160a01b0316611ee2565b610429611ef4565b6104ad6004803603602081101561072d57600080fd5b50356001600160a01b0316611f03565b610334612111565b6104ad61216b565b61040d6004803603604081101561076357600080fd5b506001600160a01b038135169060200135612176565b610429612183565b6104ad612192565b6104ad612198565b61049b600480360360208110156107a757600080fd5b50356001600160a01b031661219e565b610429612298565b6104ad6122a7565b6104296122b2565b6104296122c1565b61049b600480360360e08110156107ed57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356122d0565b61042961230b565b6104ad6004803603604081101561084657600080fd5b506001600160a01b038135811691602001351661231a565b610429612337565b6104ad612346565b61042961238b565b61042961239a565b61049b6123a9565b61049b612753565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109145780601f106108e957610100808354040283529160200191610914565b820191906000526020600020905b8154815290600101906020018083116108f757829003601f168201915b505050505081565b600080600080600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561097357600080fd5b505afa158015610987573d6000803e3d6000fd5b505050506040513d606081101561099d57600080fd5b50805160208201516040909201516001600160701b0391821695509116925063ffffffff1690506109cd836127af565b95506109d8826127af565b945064010000000081069350600354600014156109f85750610b26915050565b600a54600854604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610a4057600080fd5b505afa158015610a54573d6000803e3d6000fd5b505050506040513d6020811015610a6a57600080fd5b50519050610a9f610a9a82610a8e856001600160701b038d1663ffffffff61280716565b9063ffffffff61286016565b6127af565b9750610ac1610a9a82610a8e856001600160701b038c1663ffffffff61280716565b96506064886001600160701b0316118015610ae557506064876001600160701b0316115b610b205760405162461bcd60e51b8152600401808060200182810382526021815260200180613fc16021913960400191505060405180910390fd5b50505050505b909192565b6000610b383384846128a2565b5060015b92915050565b6014546001600160a01b031681565b6009546001600160a01b031615610baf576040805162461bcd60e51b815260206004820152601f60248201527f5661756c74546f6b656e3a20464143544f52595f414c52454144595f53455400604482015290519081900360640190fd5b600980546001600160a01b0319163317905560408051808201825260118152702a30b937ba102b30bab63a102a37b5b2b760791b602080830191909152825180840190935260068352651d95105493d560d21b90830152610c0f91612904565b600880546001600160a01b03199081166001600160a01b038a811691909117909255600b8054610100600160a81b0319166101008a851602179055600c80548216888416179055600d805490911686831617908190556040805163045f1d5b60e11b8152905191909216916308be3ab6916004808301926020929190829003018186803b158015610c9f57600080fd5b505afa158015610cb3573d6000803e3d6000fd5b505050506040513d6020811015610cc957600080fd5b5051600e80546001600160a01b0319166001600160a01b039283161790819055600854604080516310a5af5760e31b8152918416600483015251919092169163852d7ab8916024808301926020929190829003018186803b158015610d2d57600080fd5b505afa158015610d41573d6000803e3d6000fd5b505050506040513d6020811015610d5757600080fd5b5051601080546001600160a01b0319166001600160a01b039283161790819055600d54604080516396bb1fef60e01b81529284166004840152519216916396bb1fef9160248082019260009290919082900301818387803b158015610dbb57600080fd5b505af1158015610dcf573d6000803e3d6000fd5b5050600e5460408051636f4ba70b60e11b815230600482015290516001600160a01b03909216935063de974e169250602480820192602092909190829003018186803b158015610e1e57600080fd5b505afa158015610e32573d6000803e3d6000fd5b505050506040513d6020811015610e4857600080fd5b5051600f80546001600160a01b0319166001600160a01b0392831617905560408051637a7a2da360e11b815290519187169163f4f45b4691600480820192602092909190829003018186803b158015610ea057600080fd5b505afa158015610eb4573d6000803e3d6000fd5b505050506040513d6020811015610eca57600080fd5b5051601380546001600160a01b0319166001600160a01b03928316179055601682905560408051634eb1c24560e11b81528151928a1692639d63848a92600480840193919291829003018186803b158015610f2457600080fd5b505afa158015610f38573d6000803e3d6000fd5b505050506040513d6040811015610f4e57600080fd5b508051602090910151601580546001600160a01b03199081166001600160a01b03938416179091556014805482169383169390931790925560118054831686831617908190556012805490931685831617909255600c54610fb592821691166000196129cc565b600c54601354610fda916001600160a01b03918216911660001963ffffffff6129cc16565b600d54600854610fff916001600160a01b03918216911660001963ffffffff6129cc16565b50505050505050565b6010546001600160a01b031681565b60035481565b6000806000600860009054906101000a90046001600160a01b03166001600160a01b0316631df8c7176040518163ffffffff1660e01b815260040160606040518083038186803b15801561107057600080fd5b505afa158015611084573d6000803e3d6000fd5b505050506040513d606081101561109a57600080fd5b5080516020820151604090920151909591945092509050565b601054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156110f857600080fd5b505afa15801561110c573d6000803e3d6000fd5b505050506040513d602081101561112257600080fd5b505190505b90565b600081565b6001600160a01b0383166000908152600560209081526040808320338452909152812054600019146111e957604080518082018252601b81527f5461726f743a205452414e534645525f4e4f545f414c4c4f57454400000000006020808301919091526001600160a01b03871660009081526005825283812033825290915291909120546111c491849063ffffffff612b2516565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b6111f4848484612bbc565b5060015b9392505050565b6008546040805163252c09d760e01b8152600481018490529051600092839283926001600160a01b039092169163252c09d791602480820192606092909190829003018186803b15801561125257600080fd5b505afa158015611266573d6000803e3d6000fd5b505050506040513d606081101561127c57600080fd5b508051602082015160409092015190969195509350915050565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156112da57600080fd5b505afa1580156112ee573d6000803e3d6000fd5b505050506040513d602081101561130457600080fd5b50516001600160a01b031614611352576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b600b5460ff1661139c576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff191690556001600160a01b0383166113f8576040805162461bcd60e51b81526020600482015260146024820152735661756c74546f6b656e3a20494e564c445f544f60601b604482015290519081900360640190fd5b60005b8181101561164257600083838381811061141157fe5b6008546001600160a01b036020909202939093013581169350919091168214159050611484576040805162461bcd60e51b815260206004820152601960248201527f5661756c74546f6b656e3a2049535f554e4445524c59494e4700000000000000604482015290519081900360640190fd5b6011546001600160a01b03828116911614156114e7576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e3a2049535f524557415244535f544f4b454e00000000604482015290519081900360640190fd5b6012546001600160a01b038281169116141561154a576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a2049535f524557415244535f544f4b454e5f420000604482015290519081900360640190fd5b6014546001600160a01b03828116911614156115a6576040805162461bcd60e51b815260206004820152601660248201527505661756c74546f6b656e3a2049535f544f4b454e5f360541b604482015290519081900360640190fd5b6015546001600160a01b0382811691161415611602576040805162461bcd60e51b81526020600482015260166024820152755661756c74546f6b656e3a2049535f544f4b454e5f3160501b604482015290519081900360640190fd5b6000611616826001600160a01b0316612cae565b90508015611638576116386001600160a01b038316878363ffffffff612d2a16565b50506001016113fb565b5050600b805460ff191660011790555050565b6010546011546040805163091cbb3f60e31b81526001600160a01b0392831660048201529051600093849316916348e5d9f89160248083019260c0929190829003018186803b1580156116a757600080fd5b505afa1580156116bb573d6000803e3d6000fd5b505050506040513d60c08110156116d157600080fd5b50606001516010546012546040805163091cbb3f60e31b81526001600160a01b03928316600482015290519395509116916348e5d9f89160248082019260c092909190829003018186803b15801561172857600080fd5b505afa15801561173c573d6000803e3d6000fd5b505050506040513d60c081101561175257600080fd5b506060015191929050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b600354600a54600091908115806117a5575080155b156117bc57670de0b6b3a764000092505050611127565b6117d882610a8e83670de0b6b3a764000063ffffffff61280716565b9250505090565b600b5460009060ff1661182c576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905533321461184257600080fd5b61184a612e7d565b9050600b805460ff1916600117905590565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156118a057600080fd5b505afa1580156118b4573d6000803e3d6000fd5b505050506040513d60208110156118ca57600080fd5b50516001600160a01b031614611918576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b66038d7ea4c6800081101580156119365750662386f26fc100008111155b6119715760405162461bcd60e51b8152600401808060200182810382526021815260200180613fa06021913960400191505060405180910390fd5b60178190556040805182815290517ffa1e13889c5c5294758f01f045a83de15feca61a17e6281f4d11a5110085d9329181900360200190a150565b6009546001600160a01b031615611a0a576040805162461bcd60e51b815260206004820152601a60248201527f5461726f743a20464143544f52595f414c52454144595f534554000000000000604482015290519081900360640190fd5b600980546001600160a01b03191633179055565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015611a6257600080fd5b505afa158015611a76573d6000803e3d6000fd5b505050506040513d6020811015611a8c57600080fd5b50516001600160a01b031614611ada576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b600b5460ff16611b24576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600d5460408051636b69e05b60e01b815290516001600160a01b0390921691636b69e05b9160048082019260009290919082900301818387803b158015611b7457600080fd5b505af1158015611642573d6000803e3d6000fd5b600b5461010090046001600160a01b031681565b60165481565b600b5460009060ff16611bef576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600854600090611c11906001600160a01b0316612cae565b601054600f54604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015611c6757600080fd5b505afa158015611c7b573d6000803e3d6000fd5b505050506040513d6020811015611c9157600080fd5b5051600d54600854604080516351b3839960e11b81526001600160a01b03928316600482015260248101879052905193945091169163a36707329160448082019260009290919082900301818387803b158015611ced57600080fd5b505af1158015611d01573d6000803e3d6000fd5b5050601054600f54604080516370a0823160e01b81526001600160a01b0392831660048201529051600095509190921692506370a0823191602480820192602092909190829003018186803b158015611d5957600080fd5b505afa158015611d6d573d6000803e3d6000fd5b505050506040513d6020811015611d8357600080fd5b50519050611dba611d92611790565b610a8e670de0b6b3a7640000611dae858763ffffffff612f4316565b9063ffffffff61280716565b935060035460001415611de857611dd9846103e863ffffffff612f4316565b9350611de860006103e8612f85565b60008411611e3d576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e3a204d494e545f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b611e478585612f85565b604080518481526020810186905281516001600160a01b0388169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a3505050611e9a61301c565b600b805460ff19166001179055919050565b60175481565b600181565b6008546001600160a01b031681565b60046020526000908152604090205481565b63ffffffff421690565b60076020526000908152604090205481565b6012546001600160a01b031681565b600b5460009060ff16611f50576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905530600090815260046020526040902054611f8e670de0b6b3a7640000610a8e611f81611790565b849063ffffffff61280716565b915060008211611fe5576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a2052454445454d5f414d4f554e545f5a45524f0000604482015290519081900360640190fd5b600a5482111561203c576040805162461bcd60e51b815260206004820152601d60248201527f5661756c74546f6b656e3a20494e53554646494349454e545f43415348000000604482015290519081900360640190fd5b61204630826130db565b600d546008546040805163fce07e8960e01b81526001600160a01b039283166004820152602481018690529051919092169163fce07e8991604480830192600092919082900301818387803b15801561209e57600080fd5b505af11580156120b2573d6000803e3d6000fd5b505050506120c08383613178565b604080518381526020810183905281516001600160a01b0386169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a350611e9a61301c565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109145780601f106108e957610100808354040283529160200191610914565b66038d7ea4c6800081565b6000610b38338484612bbc565b6013546001600160a01b031681565b600a5481565b6103e881565b600b5460ff166121e8576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600a54600854604080516370a0823160e01b815230600482015290516122889385936122839391926001600160a01b03909116916370a08231916024808301926020929190829003018186803b15801561224b57600080fd5b505afa15801561225f573d6000803e3d6000fd5b505050506040513d602081101561227557600080fd5b50519063ffffffff612f4316565b613178565b50600b805460ff19166001179055565b6009546001600160a01b031681565b662386f26fc1000081565b6011546001600160a01b031681565b6015546001600160a01b031681565b612300878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c961330a565b610fff8787876128a2565b600f546001600160a01b031681565b600560209081526000928352604080842090915290825290205481565b600d546001600160a01b031681565b6008546040805163ebeb31db60e01b815290516000926001600160a01b03169163ebeb31db916004808301926020929190829003018186803b1580156110f857600080fd5b600c546001600160a01b031681565b600e546001600160a01b031681565b600b5460ff166123f3576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905533321461240957600080fd5b6000612413612e7d565b905080612420575061273c565b6000670de0b6b3a76400006124406017548461280790919063ffffffff16565b8161244757fe5b6011549190049150612469906001600160a01b0316338363ffffffff612d2a16565b60115460145460009182916001600160a01b039081169116148061249d57506011546015546001600160a01b039081169116145b156124f0576011546014546001600160a01b039081169116146124d2576015546014546001600160a01b0391821691166124e6565b6014546015546001600160a01b0391821691165b9092509050612561565b6013546015546001600160a01b03908116911614156125235750506015546014546001600160a01b039182169116612539565b50506014546015546001600160a01b0391821691165b60115461255f906001600160a01b03168361255a878763ffffffff612f4316565b6134df565b505b6000612575836001600160a01b0316612cae565b90506000811161258157fe5b600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156125d257600080fd5b505afa1580156125e6573d6000803e3d6000fd5b505050506040513d60608110156125fc57600080fd5b5080516020909101516014546001600160701b039283169450911691506000906001600160a01b038781169116146126345781612636565b825b90506000612647858360165461370f565b90506126548787836137aa565b6000612682888861266b898663ffffffff612f4316565b61267d8b6001600160a01b0316612cae565b6138f7565b600d54600854604080516351b3839960e11b81526001600160a01b03928316600482015260248101859052905193945091169163a36707329160448082019260009290919082900301818387803b1580156126dc57600080fd5b505af11580156126f0573d6000803e3d6000fd5b5050604080518d8152602081018d905281513394507fc003f45bc224d116b6d079100d4ab57a5b9633244c47a5a92a176c5b79a85f2893509081900390910190a2505050505050505050505b61274461301c565b600b805460ff19166001179055565b600b5460ff1661279d576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905561274461301c565b6000600160701b82106127ff576040805162461bcd60e51b81526020600482015260136024820152722b30bab63a2a37b5b2b71d1029a0a32298989960691b604482015290519081900360640190fd5b50805b919050565b60008261281657506000610b3c565b8282028284828161282357fe5b04146111f85760405162461bcd60e51b8152600401808060200182810382526021815260200180613f7f6021913960400191505060405180910390fd5b60006111f883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506139cf565b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8151612917906000906020850190613e94565b50805161292b906001906020840190613e94565b506040514690806052613f2d8239604080519182900360520182208651602097880120838301835260018452603160f81b93880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b60208310612a495780518252601f199092019160209182019101612a2a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612aab576040519150601f19603f3d011682016040523d82523d6000602084013e612ab0565b606091505b5091509150818015612ade575080511580612ade5750808060200190516020811015612adb57600080fd5b50515b612b1e576040805162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b604482015290519081900360640190fd5b5050505050565b60008184841115612bb45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b79578181015183820152602001612b61565b50505050905090810190601f168015612ba65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080518082018252601881527f5461726f743a205452414e534645525f544f4f5f4849474800000000000000006020808301919091526001600160a01b038616600090815260049091529190912054612c1d91839063ffffffff612b2516565b6001600160a01b038085166000908152600460205260408082209390935590841681522054612c52908263ffffffff613a3416565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b158015612cf857600080fd5b505afa158015612d0c573d6000803e3d6000fd5b505050506040513d6020811015612d2257600080fd5b505192915050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310612da75780518252601f199092019160209182019101612d88565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612e09576040519150601f19603f3d011682016040523d82523d6000602084013e612e0e565b606091505b5091509150818015612e3c575080511580612e3c5750808060200190516020811015612e3957600080fd5b50515b612b1e576040805162461bcd60e51b815260206004820152600d60248201526c10b9b0b332aa3930b739b332b960991b604482015290519081900360640190fd5b600d54601054604080516396bb1fef60e01b81526001600160a01b039283166004820152905160009392909216916396bb1fef91602480820192869290919082900301818387803b158015612ed157600080fd5b505af1158015612ee5573d6000803e3d6000fd5b505060125460009250612f0191506001600160a01b0316612cae565b90508015612f2857601254601154612f26916001600160a01b039081169116836134df565b505b601154612f3d906001600160a01b0316612cae565b91505090565b60006111f883836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250612b25565b600354612f98908263ffffffff613a3416565b6003556001600160a01b038216600090815260046020526040902054612fc4908263ffffffff613a3416565b6001600160a01b03831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b601054600f54604080516370a0823160e01b81526001600160a01b039283166004820152905160009392909216916370a0823191602480820192602092909190829003018186803b15801561307057600080fd5b505afa158015613084573d6000803e3d6000fd5b505050506040513d602081101561309a57600080fd5b5051600a8190556040805182815290519192507f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf4919081900360200190a150565b6001600160a01b038216600090815260046020526040902054613104908263ffffffff612f4316565b6001600160a01b038316600090815260046020526040902055600354613130908263ffffffff612f4316565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0386811660248301526044808301879052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009560609594169382918083835b602083106132255780518252601f199092019160209182019101613206565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613287576040519150601f19603f3d011682016040523d82523d6000602084013e61328c565b606091505b50915091508180156132ba5750805115806132ba57508080602001905160208110156132b757600080fd5b50515b613304576040805162461bcd60e51b815260206004820152601660248201527515185c9bdd0e881514905394d1915497d1905253115160521b604482015290519081900360640190fd5b50505050565b42851015613350576040805162461bcd60e51b815260206004820152600e60248201526d15185c9bdd0e881156141254915160921b604482015290519081900360640190fd5b6006546001600160a01b03808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e280820193601f1981019281900390910190855afa15801561344c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906134825750896001600160a01b0316816001600160a01b0316145b6134d3576040805162461bcd60e51b815260206004820152601860248201527f5461726f743a20494e56414c49445f5349474e41545552450000000000000000604482015290519081900360640190fd5b50505050505050505050565b6000826001600160a01b0316846001600160a01b031614156135025750806111f8565b600b546040805163711f958560e11b81526001600160a01b038781166004830152915161010090930490911691600091839163e23f2b0a91602480820192602092909190829003018186803b15801561355a57600080fd5b505afa15801561356e573d6000803e3d6000fd5b505050506040513d602081101561358457600080fd5b505190506001600160a01b0380821690861614156135b1576135a882878787613a8e565b925050506111f8565b6000826001600160a01b031663e23f2b0a876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561360957600080fd5b505afa15801561361d573d6000803e3d6000fd5b505050506040513d602081101561363357600080fd5b505190506001600160a01b0387811690821614156136615761365783888888613a8e565b93505050506111f8565b6000876001600160a01b0316836001600160a01b03161461368f5761368884898589613a8e565b9050613692565b50845b816001600160a01b0316836001600160a01b031614156136c3576136b884848984613a8e565b9450505050506111f8565b866001600160a01b0316826001600160a01b031614156136e8576136b88388836134df565b60006136f58484846134df565b905061370385848a84613a8e565b955050505050506111f8565b60008061372884611dae6127108663ffffffff613a3416565b9050600061374784611dae60048189818c61271063ffffffff61280716565b9050600061377361376e83613762868063ffffffff61280716565b9063ffffffff613a3416565b613d94565b9050600061378860028763ffffffff61280716565b905061379e81610a8e848763ffffffff612f4316565b98975050505050505050565b6137b48382613de5565b600c54604080516313dcfc5960e01b8152600481018490526000602482018190526001600160a01b0387811660448401528681166064840152608483018290523060a48401524260c4840152925192909316926313dcfc599260e48084019382900301818387803b15801561382857600080fd5b505af115801561383c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561386557600080fd5b810190808051604051939291908464010000000082111561388557600080fd5b90830190602082018581111561389a57600080fd5b82518660208202830111640100000000821117156138b757600080fd5b82525081516020918201928201910280838360005b838110156138e45781810151838201526020016138cc565b5050505090500160405250505050505050565b60006139038584613de5565b61390d8483613de5565b600c5460408051635a47ddc360e01b81526001600160a01b0388811660048301528781166024830152600060448301819052606483018890526084830187905260a4830181905260c483018190523060e4840152426101048401529251931692635a47ddc39261012480840193606093929083900390910190829087803b15801561399757600080fd5b505af11580156139ab573d6000803e3d6000fd5b505050506040513d60608110156139c157600080fd5b506040015195945050505050565b60008183613a1e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612b79578181015183820152602001612b61565b506000838581613a2a57fe5b0495945050505050565b6000828201838110156111f8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826001600160a01b0316846001600160a01b03161415613ab1575080613d8c565b60408051630820681160e11b8152600481018490526001600160a01b0386811660248301528581166044830152825160009391891692631040d022926064808301939192829003018186803b158015613b0957600080fd5b505afa158015613b1d573d6000803e3d6000fd5b505050506040513d6040811015613b3357600080fd5b508051602090910151925090506001600160a01b038116613b85576040805162461bcd60e51b81526020600482015260076024820152662727afa820a4a960c91b604482015290519081900360640190fd5b613b9f6001600160a01b038616828563ffffffff612d2a16565b836001600160a01b0316856001600160a01b03161015613ca357604080516000808252602082019283905263022c0d9f60e01b835260248201818152604483018690523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a9590939092909160c48501918083838b5b83811015613c37578181015183820152602001613c1f565b50505050905090810190601f168015613c645780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613c8657600080fd5b505af1158015613c9a573d6000803e3d6000fd5b50505050613d8a565b604080516000808252602082019283905263022c0d9f60e01b835260248201858152604483018290523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a969590939092909160c48501918083838a5b83811015613d22578181015183820152602001613d0a565b50505050905090810190601f168015613d4f5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613d7157600080fd5b505af1158015613d85573d6000803e3d6000fd5b505050505b505b949350505050565b60006003821115613dd7575080600160028204015b81811015613dd157809150600281828581613dc057fe5b040181613dc957fe5b049050613da9565b50612802565b811561280257506001919050565b600c5460408051636eb1769f60e11b81523060048201526001600160a01b0392831660248201529051839285169163dd62ed3e916044808301926020929190829003018186803b158015613e3857600080fd5b505afa158015613e4c573d6000803e3d6000fd5b505050506040513d6020811015613e6257600080fd5b505110613e6e57613e90565b600c54613e90906001600160a01b03848116911660001963ffffffff6129cc16565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613ed557805160ff1916838001178555613f02565b82800160010185558215613f02579182015b82811115613f02578251825591602001919060010190613ee7565b50613f0e929150613f12565b5090565b61112791905b80821115613f0e5760008155600101613f1856fe454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775661756c74546f6b656e3a20494e564c445f5245494e564553545f424f554e54595661756c74546f6b656e3a20494e53554646494349454e545f5245534552564553a265627a7a723158208365f38dc9319f4e7a4fe49fdfa787f41dd79add47739cc987d7182d6fc216a964736f6c634300051000324f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a723158209a6b23f6cba81d2e58e09217c557ef6fe1e085f08c10d795e68abd8283127f8264736f6c634300051000325661756c74546f6b656e466163746f72793a20494e56414c49445f4645455f464143544f52000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18000000000000000000000000a38cd27185a464914d3046f0ab9d43356b34829d000000000000000000000000da00bff59141ca6375c4ae488da7b387960b4f10000000000000000000000000888ef71766ca594ded1f0fa3ae64ed2941740a20000000000000000000000000c5a9848b9d145965d821aaec8fa32aaee026492d000000000000000000000000000000000000000000000000000000000000270f

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

000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18000000000000000000000000a38cd27185a464914d3046f0ab9d43356b34829d000000000000000000000000da00bff59141ca6375c4ae488da7b387960b4f10000000000000000000000000888ef71766ca594ded1f0fa3ae64ed2941740a20000000000000000000000000c5a9848b9d145965d821aaec8fa32aaee026492d000000000000000000000000000000000000000000000000000000000000270f

-----Decoded View---------------
Arg [0] : _optiSwap (address): 0xd04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18
Arg [1] : _router (address): 0xa38cd27185a464914d3046f0ab9d43356b34829d
Arg [2] : _oxUserProxyInterface (address): 0xda00bff59141ca6375c4ae488da7b387960b4f10
Arg [3] : _rewardsToken (address): 0x888ef71766ca594ded1f0fa3ae64ed2941740a20
Arg [4] : _rewardsTokenB (address): 0xc5a9848b9d145965d821aaec8fa32aaee026492d
Arg [5] : _swapFeeFactor (uint256): 9999

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18
Arg [1] : 000000000000000000000000a38cd27185a464914d3046f0ab9d43356b34829d
Arg [2] : 000000000000000000000000da00bff59141ca6375c4ae488da7b387960b4f10
Arg [3] : 000000000000000000000000888ef71766ca594ded1f0fa3ae64ed2941740a20
Arg [4] : 000000000000000000000000c5a9848b9d145965d821aaec8fa32aaee026492d
Arg [5] : 000000000000000000000000000000000000000000000000000000000000270f


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
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.