Contract 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9a0b3c839509b304ca4682794b669bddd07da6aca568a810778c136ab9c739e8Create Vault Tok...337005892022-03-17 22:45:00111 days 17 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.7442690721
0x62c1aae7b91d18828a10e14ea37a9062787d8afa9a39daf1bbb807cdd9fb3266Create Vault Tok...335925222022-03-16 16:50:53112 days 23 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.99054361417
0x4326ed33cc8717b4253d8629f4804e5eeb5fc001c29c52809406da2d27c7a9deCreate Vault Tok...335925222022-03-16 16:50:53112 days 23 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.99054361417
0xa78acdd5a2eb0609068660bb2d34d8d6cf9a852748054997912ddfc46b1cbbe7Create Vault Tok...335925202022-03-16 16:50:51112 days 23 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.99054361417
0xe84a77e47134b8cb96d82675e268a8217698cf35af5bc13f1a2619da3f6cf0baCreate Vault Tok...335925202022-03-16 16:50:51112 days 23 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.99054361417
0x0799894fd8f9a53a8c37c0a0a0d26d9b420128de15353615ec72530f7092c0a0Create Vault Tok...335925142022-03-16 16:50:46112 days 23 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.99054361417
0x4b9f7b993caf18fa2f1b1759063b7f09e99e6ad5605308cdf2a1954dbc1988a1Create Vault Tok...335925122022-03-16 16:50:44112 days 23 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.99054361417
0x6876f59321ce2674c287dba4862ce18b7b6f7553b01c217c37444dc33f5249d1Create Vault Tok...334120852022-03-14 15:45:46115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0x8c9bc792d58bacb952747238af8ce2e5f9e2b10e3cafc5668699238952e10a41Create Vault Tok...334120852022-03-14 15:45:46115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0x0d8f7e747435a59f1b5512e86b593838b2b08f8afa6d6ede1cdd4009ea626af3Create Vault Tok...334120832022-03-14 15:45:45115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0xbddf05a7b37fc26f646f5f992c5b7c3493ce54a8d84513a42dee5004c3daafd0Create Vault Tok...334120832022-03-14 15:45:45115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747193518818
0xd34387b50e40cf6084f5780df3239bbe1391e2f991823197c52e03002c27de51Create Vault Tok...334120812022-03-14 15:45:43115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0x42e20106219b5db0cb74ec4a119411761a290d07d8b232e891a83ce84b21bc3dCreate Vault Tok...334120812022-03-14 15:45:43115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0xc58f1afde0a168b7cf55b4d9ba32e61237dc658b83cf68b9140c202bc449afc4Create Vault Tok...334120772022-03-14 15:45:40115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0x7066d4ec88aa5e1dd5c9c13e714763b82f8b4b78259f6fa8de54e87ef3355d58Create Vault Tok...334120742022-03-14 15:45:37115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747193518818
0xabc04035fc8985bec0a2d42e8449ce167d0a315b422662c032de0f8164797cc7Create Vault Tok...334120662022-03-14 15:45:31115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0xc045513f22f2eaf93ae3f6a1ff5f53962b0d250e41301c74098862357bad8aafCreate Vault Tok...334120642022-03-14 15:45:29115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0x5304ca19ca011f25b8dd674309849c470069445012f1837680df1cdeb50ce3a3Create Vault Tok...334120642022-03-14 15:45:29115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0x75d309437e4459b359363bd91368caf6451ead52f7117ba77f2ca9a4715f2ba0Create Vault Tok...334120612022-03-14 15:45:24115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747196207681
0xfb0cc69d531156b643e0d91656071d5880538d80b631192aefe37b763c1c624dCreate Vault Tok...334120612022-03-14 15:45:24115 days 48 mins agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.747234222429
0x444392ae70649042df079e8aa340902b6f2e9cc1790c9e111624a27f0e87aa6fCreate Vault Tok...329428572022-03-09 6:58:41120 days 9 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.783949811476
0x90c6105445ccaf0ee94f0bac4a51f812a04b10fbcb5e1d88e1dfdbf63a2b1a77Create Vault Tok...329428542022-03-09 6:58:38120 days 9 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.783949811476
0x27f1ed9f8f024e9b7ceb0c0d79b015fae0f5fd945938bd5bd94c12784ae994d7Create Vault Tok...329428542022-03-09 6:58:38120 days 9 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.783949811476
0xa8715d2e8c3b3e6706a39d52eaf8fc74242c15c0f395a3162118c4b99e9a9dfeCreate Vault Tok...329428122022-03-09 6:57:40120 days 9 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.783949811476
0x10750e2e60218a86c44e42e8b2075a7aeeede491ccee32a349788141b0b3c853Create Vault Tok...329428122022-03-09 6:57:40120 days 9 hrs agoTarot: Deployer IN  0x17235bb61f7a8c3e93a8ad2b1b12802e00121c350 FTM0.783949811476
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x9a0b3c839509b304ca4682794b669bddd07da6aca568a810778c136ab9c739e8337005892022-03-17 22:45:00111 days 17 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x62c1aae7b91d18828a10e14ea37a9062787d8afa9a39daf1bbb807cdd9fb3266335925222022-03-16 16:50:53112 days 23 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x4326ed33cc8717b4253d8629f4804e5eeb5fc001c29c52809406da2d27c7a9de335925222022-03-16 16:50:53112 days 23 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xa78acdd5a2eb0609068660bb2d34d8d6cf9a852748054997912ddfc46b1cbbe7335925202022-03-16 16:50:51112 days 23 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xe84a77e47134b8cb96d82675e268a8217698cf35af5bc13f1a2619da3f6cf0ba335925202022-03-16 16:50:51112 days 23 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x0799894fd8f9a53a8c37c0a0a0d26d9b420128de15353615ec72530f7092c0a0335925142022-03-16 16:50:46112 days 23 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x4b9f7b993caf18fa2f1b1759063b7f09e99e6ad5605308cdf2a1954dbc1988a1335925122022-03-16 16:50:44112 days 23 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x6876f59321ce2674c287dba4862ce18b7b6f7553b01c217c37444dc33f5249d1334120852022-03-14 15:45:46115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x8c9bc792d58bacb952747238af8ce2e5f9e2b10e3cafc5668699238952e10a41334120852022-03-14 15:45:46115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x0d8f7e747435a59f1b5512e86b593838b2b08f8afa6d6ede1cdd4009ea626af3334120832022-03-14 15:45:45115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xbddf05a7b37fc26f646f5f992c5b7c3493ce54a8d84513a42dee5004c3daafd0334120832022-03-14 15:45:45115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xd34387b50e40cf6084f5780df3239bbe1391e2f991823197c52e03002c27de51334120812022-03-14 15:45:43115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x42e20106219b5db0cb74ec4a119411761a290d07d8b232e891a83ce84b21bc3d334120812022-03-14 15:45:43115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xc58f1afde0a168b7cf55b4d9ba32e61237dc658b83cf68b9140c202bc449afc4334120772022-03-14 15:45:40115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x7066d4ec88aa5e1dd5c9c13e714763b82f8b4b78259f6fa8de54e87ef3355d58334120742022-03-14 15:45:37115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xabc04035fc8985bec0a2d42e8449ce167d0a315b422662c032de0f8164797cc7334120662022-03-14 15:45:31115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xc045513f22f2eaf93ae3f6a1ff5f53962b0d250e41301c74098862357bad8aaf334120642022-03-14 15:45:29115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x5304ca19ca011f25b8dd674309849c470069445012f1837680df1cdeb50ce3a3334120642022-03-14 15:45:29115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x75d309437e4459b359363bd91368caf6451ead52f7117ba77f2ca9a4715f2ba0334120612022-03-14 15:45:24115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xfb0cc69d531156b643e0d91656071d5880538d80b631192aefe37b763c1c624d334120612022-03-14 15:45:24115 days 48 mins ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x444392ae70649042df079e8aa340902b6f2e9cc1790c9e111624a27f0e87aa6f329428572022-03-09 6:58:41120 days 9 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x90c6105445ccaf0ee94f0bac4a51f812a04b10fbcb5e1d88e1dfdbf63a2b1a77329428542022-03-09 6:58:38120 days 9 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x27f1ed9f8f024e9b7ceb0c0d79b015fae0f5fd945938bd5bd94c12784ae994d7329428542022-03-09 6:58:38120 days 9 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0xa8715d2e8c3b3e6706a39d52eaf8fc74242c15c0f395a3162118c4b99e9a9dfe329428122022-03-09 6:57:40120 days 9 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
0x10750e2e60218a86c44e42e8b2075a7aeeede491ccee32a349788141b0b3c853329428122022-03-09 6:57:40120 days 9 hrs ago 0x17235bb61f7a8c3e93a8ad2b1b12802e00121c35  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SolidexVaultTokenFactory

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 18 : SolidexVaultTokenFactory.sol
pragma solidity =0.5.16;

import "@openzeppelin/contracts/ownership/Ownable.sol";
import "./interfaces/IBaseV1Pair.sol";
import "./SolidexVaultToken.sol";
import "./interfaces/ISolidexVaultTokenFactory.sol";

contract SolidexVaultTokenFactory is Ownable, ISolidexVaultTokenFactory {
    address public optiSwap;
    address public router;
    address public lpDepositor;
    address public rewardsToken;
    address public rewardsTokenB;
    uint256 public swapFeeFactor;

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

    constructor(
        address _optiSwap,
        address _router,
        address _lpDepositor,
        address _rewardsToken,
        address _rewardsTokenB,
        uint256 _swapFeeFactor
    ) public {
        require(
            _swapFeeFactor >= 9000 && _swapFeeFactor <= 10000,
            "VaultTokenFactory: INVALID_FEE_FACTOR"
        );
        optiSwap = _optiSwap;
        router = _router;
        lpDepositor = _lpDepositor;
        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(SolidexVaultToken).creationCode;
        assembly {
            vaultToken := create2(0, add(bytecode, 32), mload(bytecode), _underlying)
        }
        SolidexVaultToken(vaultToken)._initialize(
            _underlying,
            optiSwap,
            router,
            lpDepositor,
            rewardsToken,
            rewardsTokenB,
            swapFeeFactor
        );
        getVaultToken[_underlying] = vaultToken;
        allVaultTokens.push(vaultToken);
        emit VaultTokenCreated(_underlying, vaultToken, allVaultTokens.length);
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 18 : SolidexVaultToken.sol
pragma solidity =0.5.16;

import "@openzeppelin/contracts/ownership/Ownable.sol";
import "./PoolToken.sol";
import "./interfaces/IOptiSwap.sol";
import "./interfaces/ILpDepositor.sol";
import "./interfaces/IBaseV1Router01.sol";
import "./interfaces/IBaseV1Pair.sol";
import "./interfaces/ISolidexVaultToken.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 SolidexVaultToken is ISolidexVaultToken, PoolToken {
    using SafeToken for address;

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

    address public optiSwap;
    address public router;
    address public lpDepositor;
    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 _lpDepositor,
        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");
        optiSwap = _optiSwap;
        router = _router;
        lpDepositor = _lpDepositor;
        WETH = IBaseV1Router01(_router).wftm();
        swapFeeFactor = _swapFeeFactor;
        underlying = _underlying;
        (token0, token1) = IBaseV1Pair(_underlying).tokens();
        rewardsToken = _rewardsToken;
        rewardsTokenB = _rewardsTokenB;
        rewardsToken.safeApprove(address(router), uint256(-1));
        WETH.safeApprove(address(router), uint256(-1));
        underlying.safeApprove(address(lpDepositor), 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 = ILpDepositor(lpDepositor).userBalances(address(this), underlying);
        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 = ILpDepositor(lpDepositor).userBalances(address(this), underlying);
        ILpDepositor(lpDepositor).deposit(underlying, mintAmount);
        uint256 _totalBalanceAfter = ILpDepositor(lpDepositor).userBalances(address(this), underlying);
        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);
        ILpDepositor(lpDepositor).withdraw(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) {
        address[] memory pools = new address[](1);
        pools[0] = address(underlying);
        ILpDepositor(lpDepositor).getReward(pools);

        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 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.
        ILpDepositor(lpDepositor).deposit(underlying, liquidity);
        emit Reinvest(msg.sender, reward, bounty);
    }

    /*** 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 18 : ISolidexVaultTokenFactory.sol
pragma solidity >=0.5.0;

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

    function optiSwap() external view returns (address);

    function router() external view returns (address);

    function lpDepositor() 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 18 : Context.sol
pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

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

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

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

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

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

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

    /*** Initialize ***/

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

    /*** PoolToken ***/

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

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

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

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

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

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

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

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

    /*** Utilities ***/

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

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

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

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

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

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

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

    function bridgeFromTokensLength() external view returns (uint256);

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

    function addBridgeToken(address _token, address _bridgeToken) external;

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

    function dexListLength() external view returns (uint256);

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

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

    function addDex(address _dex, address _handler) external;

    function removeDex(address _dex) external;

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

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

interface ILpDepositor {
  function SOLID() external view returns (address);
  function SEX() external view returns (address);
  function userBalances(address account, address pool) external view returns (uint256 amount);
  function deposit(address pool, uint256 amount) external;
  function withdraw(address pool, uint256 amount) external;
  function getReward(address[] calldata pools) external;
}

File 10 of 18 : 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 11 of 18 : ISolidexVaultToken.sol
pragma solidity >=0.5.0;

interface ISolidexVaultToken {
    /*** 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 lpDepositor() 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 _lpDepositor,
        address _rewardsToken,
        address _rewardsTokenB,
        uint256 _swapFeeFactor
    ) external;

    function reinvest() external;

    function getReward() external returns (uint256);

    function getBlockTimestamp() external view returns (uint32);
}

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

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

    function totalSupply() external view returns (uint256);

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

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

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

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

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

    function token0() external view returns (address);

    function token1() external view returns (address);

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

    function price0CumulativeLast() external view returns (uint256);

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

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

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

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

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

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

import "./libraries/SafeMath.sol";

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

contract TarotERC20 {
    using SafeMath for uint256;

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

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

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

    constructor() public {}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

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

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

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

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

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

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

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

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

    /*** Pool Token ***/

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

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external view returns (uint256);

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

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

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;
}

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

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

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

        return c;
    }

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

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts with custom message on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

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":"_lpDepositor","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":"lpDepositor","outputs":[{"internalType":"address","name":"","type":"address"}],"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":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"}]

608060405234801561001057600080fd5b50604051614018380380614018833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091600061006b6001600160e01b0361016a16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061232881101580156100c957506127108111155b6101045760405162461bcd60e51b8152600401808060200182810382526025815260200180613ff36025913960400191505060405180910390fd5b600180546001600160a01b03199081166001600160a01b039889161790915560028054821696881696909617909555600380548616948716949094179093556004805485169286169290921790915560058054909316931692909217905560065561016e565b3390565b613e768061017d6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063a9a1e13811610066578063a9a1e138146101bf578063d1af0c7d146101dc578063f2fde38b146101e4578063f887ea401461020a576100ea565b80638da5cb5b146101755780638f32d59b1461017d5780639dc6108f14610199576100ea565b806368f91a44116100c857806368f91a4414610135578063715018a61461013d57806388c4c666146101475780638a9a19c21461014f576100ea565b806302f283be146100ef57806329e15d0b1461011357806360c2affa1461012d575b600080fd5b6100f7610212565b604080516001600160a01b039092168252519081900360200190f35b61011b610221565b60408051918252519081900360200190f35b6100f7610227565b61011b610236565b61014561023c565b005b6100f76102df565b6100f76004803603602081101561016557600080fd5b50356001600160a01b03166102ee565b6100f761059a565b6101856105a9565b604080519115158252519081900360200190f35b6100f7600480360360208110156101af57600080fd5b50356001600160a01b03166105cd565b6100f7600480360360208110156101d557600080fd5b50356105e8565b6100f761060f565b610145600480360360208110156101fa57600080fd5b50356001600160a01b031661061e565b6100f7610683565b6003546001600160a01b031681565b60085490565b6001546001600160a01b031681565b60065481565b6102446105a9565b610295576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6005546001600160a01b031681565b6001600160a01b038181166000908152600760205260408120549091161561035d576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e466163746f72793a20504f4f4c5f4558495354530000604482015290519081900360640190fd5b816001600160a01b03166322be3de16040518163ffffffff1660e01b815260040160206040518083038186803b15801561039657600080fd5b505afa1580156103aa573d6000803e3d6000fd5b505050506040513d60208110156103c057600080fd5b505115610414576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e466163746f72793a2049535f535441424c4500000000604482015290519081900360640190fd5b60606040518060200161042690610736565b6020820181038252601f19601f820116604052509050828151602083016000f560015460025460035460048054600554600654604080516310ee5fc560e01b81526001600160a01b038d8116968201969096529785166024890152958416604488015293831660648701529082166084860152811660a485015260c484019190915290519294508416916310ee5fc59160e48082019260009290919082900301818387803b1580156104d757600080fd5b505af11580156104eb573d6000803e3d6000fd5b5050506001600160a01b03808516600081815260076020908152604080832080549589166001600160a01b0319968716811790915560088054600181018255948190527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390940180549096168117909555915482519485529084015280519193507f68750cb824b88919ca0bc2d5e95520467a0a0007128b0b04772b5f06e8dda660928290030190a250919050565b6000546001600160a01b031690565b600080546001600160a01b03166105be610692565b6001600160a01b031614905090565b6007602052600090815260409020546001600160a01b031681565b600881815481106105f557fe5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b031681565b6106266105a9565b610677576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61068081610696565b50565b6002546001600160a01b031681565b3390565b6001600160a01b0381166106db5760405162461bcd60e51b8152600401808060200182810382526026815260200180613e1c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6136d8806107448339019056fe60806040526002805460ff19908116601217909155600b80549091166001179055662386f26fc1000060145561369e8061003a6000396000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c80636f307dc31161015c578063ba9a7a56116100ce578063d505accf11610087578063d505accf14610689578063dd62ed3e146106da578063ebeb31db14610708578063f887ea4014610710578063fdb5a03e14610718578063fff6cae9146107205761028a565b8063ba9a7a561461063b578063bc25cf7714610643578063c45a015514610669578063c8c4ff8c14610671578063d1af0c7d14610679578063d21220a7146106815761028a565b806395a2251f1161012057806395a2251f146105c957806395d89b41146105ef57806396fa4c11146105f7578063a9059cbb146105ff578063ad5c46481461062b578063ad7a672f146106335761028a565b80636f307dc31461054c57806370a0823114610554578063796b89b91461057a5780637ecebe001461059b57806388c4c666146105c15761028a565b806330adf81f116102005780634a5d316c116101b95780634a5d316c146104fe57806360c2affa1461050657806368f91a441461050e5780636a627842146105165780636c2a3bc51461053c5780636ee27227146105445761028a565b806330adf81f146104a3578063313ce567146104ab5780633644e515146104c95780633ba0b9a9146104d15780633d18b912146104d957806346fb738b146104e15761028a565b806310ee5fc51161025257806310ee5fc5146103b057806318160ddd146104085780631df8c7171461042257806322be3de11461044857806323b872dd14610450578063252c09d7146104865761028a565b806302f283be1461028f57806306fdde03146102b35780630902f1ac14610330578063095ea7b3146103685780630dfe1681146103a8575b600080fd5b610297610728565b604080516001600160a01b039092168252519081900360200190f35b6102bb610737565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102f55781810151838201526020016102dd565b50505050905090810190601f1680156103225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103386107c5565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b6103946004803603604081101561037e57600080fd5b506001600160a01b0381351690602001356109d4565b604080519115158252519081900360200190f35b6102976109eb565b610406600480360360e08110156103c657600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a08101359091169060c001356109fa565b005b610410610cb5565b60408051918252519081900360200190f35b61042a610cbb565b60408051938452602084019290925282820152519081900360600190f35b610394610d51565b6103946004803603606081101561046657600080fd5b506001600160a01b03813581169160208101359091169060400135610d56565b61042a6004803603602081101561049c57600080fd5b5035610e26565b610410610ebd565b6104b3610ee1565b6040805160ff9092168252519081900360200190f35b610410610eea565b610410610ef0565b610410610f40565b610406600480360360208110156104f757600080fd5b5035610fbd565b61040661110d565b61029761117f565b610410611193565b6104106004803603602081101561052c57600080fd5b50356001600160a01b0316611199565b6104106114af565b6103946114b5565b6102976114ba565b6104106004803603602081101561056a57600080fd5b50356001600160a01b03166114c9565b6105826114db565b6040805163ffffffff9092168252519081900360200190f35b610410600480360360208110156105b157600080fd5b50356001600160a01b03166114e5565b6102976114f7565b610410600480360360208110156105df57600080fd5b50356001600160a01b0316611506565b6102bb611714565b61041061176e565b6103946004803603604081101561061557600080fd5b506001600160a01b038135169060200135611779565b610297611786565b610410611795565b61041061179b565b6104066004803603602081101561065957600080fd5b50356001600160a01b03166117a1565b61029761189b565b6104106118aa565b6102976118b5565b6102976118c4565b610406600480360360e081101561069f57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356118d3565b610410600480360360408110156106f057600080fd5b506001600160a01b038135811691602001351661190e565b61041061192b565b6102976119a1565b6104066119b0565b610406611d5a565b600d546001600160a01b031681565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107bd5780601f10610792576101008083540402835291602001916107bd565b820191906000526020600020905b8154815290600101906020018083116107a057829003601f168201915b505050505081565b600080600080600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561081c57600080fd5b505afa158015610830573d6000803e3d6000fd5b505050506040513d606081101561084657600080fd5b50805160208201516040909201516001600160701b0391821695509116925063ffffffff16905061087683611db6565b955061088182611db6565b945064010000000081069350600354600014156108a157506109cf915050565b600a54600854604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156108e957600080fd5b505afa1580156108fd573d6000803e3d6000fd5b505050506040513d602081101561091357600080fd5b5051905061094861094382610937856001600160701b038d1663ffffffff611e0e16565b9063ffffffff611e6716565b611db6565b975061096a61094382610937856001600160701b038c1663ffffffff611e0e16565b96506064886001600160701b031611801561098e57506064876001600160701b0316115b6109c95760405162461bcd60e51b81526004018080602001828103825260218152602001806136496021913960400191505060405180910390fd5b50505050505b909192565b60006109e1338484611ea9565b5060015b92915050565b6011546001600160a01b031681565b6009546001600160a01b031615610a58576040805162461bcd60e51b815260206004820152601f60248201527f5661756c74546f6b656e3a20464143544f52595f414c52454144595f53455400604482015290519081900360640190fd5b600980546001600160a01b0319163317905560408051808201825260118152702a30b937ba102b30bab63a102a37b5b2b760791b602080830191909152825180840190935260068352651d95105493d560d21b90830152610ab891611f0b565b600b80546001600160a01b0380891661010002610100600160a81b031990921691909117909155600c80548783166001600160a01b03199182168117909255600d8054938816939091169290921790915560408051637a7a2da360e11b8152905163f4f45b4691600480820192602092909190829003018186803b158015610b3f57600080fd5b505afa158015610b53573d6000803e3d6000fd5b505050506040513d6020811015610b6957600080fd5b5051601080546001600160a01b039283166001600160a01b031991821617909155601383905560088054928a16929091168217905560408051634eb1c24560e11b81528151639d63848a92600480840193919291829003018186803b158015610bd157600080fd5b505afa158015610be5573d6000803e3d6000fd5b505050506040513d6040811015610bfb57600080fd5b508051602090910151601280546001600160a01b03199081166001600160a01b039384161790915560118054821693831693909317909255600e805483168683161790819055600f805490931685831617909255600c54610c629282169116600019611fd3565b600c54601054610c87916001600160a01b03918216911660001963ffffffff611fd316565b600d54600854610cac916001600160a01b03918216911660001963ffffffff611fd316565b50505050505050565b60035481565b6000806000600860009054906101000a90046001600160a01b03166001600160a01b0316631df8c7176040518163ffffffff1660e01b815260040160606040518083038186803b158015610d0e57600080fd5b505afa158015610d22573d6000803e3d6000fd5b505050506040513d6060811015610d3857600080fd5b5080516020820151604090920151909591945092509050565b600081565b6001600160a01b038316600090815260056020908152604080832033845290915281205460001914610e1057604080518082018252601b81527f5461726f743a205452414e534645525f4e4f545f414c4c4f57454400000000006020808301919091526001600160a01b0387166000908152600582528381203382529091529190912054610deb91849063ffffffff61212c16565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b610e1b8484846121c3565b5060015b9392505050565b6008546040805163252c09d760e01b8152600481018490529051600092839283926001600160a01b039092169163252c09d791602480820192606092909190829003018186803b158015610e7957600080fd5b505afa158015610e8d573d6000803e3d6000fd5b505050506040513d6060811015610ea357600080fd5b508051602082015160409092015190969195509350915050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b600354600a5460009190811580610f05575080155b15610f1c57670de0b6b3a764000092505050610f3d565b610f388261093783670de0b6b3a764000063ffffffff611e0e16565b925050505b90565b600b5460009060ff16610f8d576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055333214610fa357600080fd5b610fab6122b5565b9050600b805460ff1916600117905590565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561100157600080fd5b505afa158015611015573d6000803e3d6000fd5b505050506040513d602081101561102b57600080fd5b50516001600160a01b031614611079576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b66038d7ea4c6800081101580156110975750662386f26fc100008111155b6110d25760405162461bcd60e51b81526004018080602001828103825260218152602001806136286021913960400191505060405180910390fd5b60148190556040805182815290517ffa1e13889c5c5294758f01f045a83de15feca61a17e6281f4d11a5110085d9329181900360200190a150565b6009546001600160a01b03161561116b576040805162461bcd60e51b815260206004820152601a60248201527f5461726f743a20464143544f52595f414c52454144595f534554000000000000604482015290519081900360640190fd5b600980546001600160a01b03191633179055565b600b5461010090046001600160a01b031681565b60135481565b600b5460009060ff166111e6576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600854600090611208906001600160a01b03166123f6565b600d546008546040805163015b6a3360e71b81523060048201526001600160a01b0392831660248201529051939450600093919092169163adb51980916044808301926020929190829003018186803b15801561126457600080fd5b505afa158015611278573d6000803e3d6000fd5b505050506040513d602081101561128e57600080fd5b5051600d54600854604080516311f9fbc960e21b81526001600160a01b0392831660048201526024810187905290519394509116916347e7ef249160448082019260009290919082900301818387803b1580156112ea57600080fd5b505af11580156112fe573d6000803e3d6000fd5b5050600d546008546040805163015b6a3360e71b81523060048201526001600160a01b03928316602482015290516000955091909216925063adb5198091604480820192602092909190829003018186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d602081101561138657600080fd5b505190506113bd611395610ef0565b610937670de0b6b3a76400006113b1858763ffffffff61247216565b9063ffffffff611e0e16565b9350600354600014156113eb576113dc846103e863ffffffff61247216565b93506113eb60006103e86124b4565b60008411611440576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e3a204d494e545f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b61144a85856124b4565b604080518481526020810186905281516001600160a01b0388169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a350505061149d61254b565b600b805460ff19166001179055919050565b60145481565b600181565b6008546001600160a01b031681565b60046020526000908152604090205481565b63ffffffff421690565b60076020526000908152604090205481565b600f546001600160a01b031681565b600b5460009060ff16611553576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905530600090815260046020526040902054611591670de0b6b3a7640000610937611584610ef0565b849063ffffffff611e0e16565b9150600082116115e8576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a2052454445454d5f414d4f554e545f5a45524f0000604482015290519081900360640190fd5b600a5482111561163f576040805162461bcd60e51b815260206004820152601d60248201527f5661756c74546f6b656e3a20494e53554646494349454e545f43415348000000604482015290519081900360640190fd5b6116493082612610565b600d546008546040805163f3fef3a360e01b81526001600160a01b039283166004820152602481018690529051919092169163f3fef3a391604480830192600092919082900301818387803b1580156116a157600080fd5b505af11580156116b5573d6000803e3d6000fd5b505050506116c383836126ad565b604080518381526020810183905281516001600160a01b0386169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a35061149d61254b565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107bd5780601f10610792576101008083540402835291602001916107bd565b66038d7ea4c6800081565b60006109e13384846121c3565b6010546001600160a01b031681565b600a5481565b6103e881565b600b5460ff166117eb576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600a54600854604080516370a0823160e01b8152306004820152905161188b9385936118869391926001600160a01b03909116916370a08231916024808301926020929190829003018186803b15801561184e57600080fd5b505afa158015611862573d6000803e3d6000fd5b505050506040513d602081101561187857600080fd5b50519063ffffffff61247216565b6126ad565b50600b805460ff19166001179055565b6009546001600160a01b031681565b662386f26fc1000081565b600e546001600160a01b031681565b6012546001600160a01b031681565b611903878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c961283f565b610cac878787611ea9565b600560209081526000928352604080842090915290825290205481565b6008546040805163ebeb31db60e01b815290516000926001600160a01b03169163ebeb31db916004808301926020929190829003018186803b15801561197057600080fd5b505afa158015611984573d6000803e3d6000fd5b505050506040513d602081101561199a57600080fd5b5051905090565b600c546001600160a01b031681565b600b5460ff166119fa576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055333214611a1057600080fd5b6000611a1a6122b5565b905080611a275750611d43565b6000670de0b6b3a7640000611a4760145484611e0e90919063ffffffff16565b81611a4e57fe5b600e549190049150611a70906001600160a01b0316338363ffffffff612a1416565b600e5460115460009182916001600160a01b0390811691161480611aa45750600e546012546001600160a01b039081169116145b15611af757600e546011546001600160a01b03908116911614611ad9576012546011546001600160a01b039182169116611aed565b6011546012546001600160a01b0391821691165b9092509050611b68565b6010546012546001600160a01b0390811691161415611b2a5750506012546011546001600160a01b039182169116611b40565b50506011546012546001600160a01b0391821691165b600e54611b66906001600160a01b031683611b61878763ffffffff61247216565b612b67565b505b6000611b7c836001600160a01b03166123f6565b905060008111611b8857fe5b600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611bd957600080fd5b505afa158015611bed573d6000803e3d6000fd5b505050506040513d6060811015611c0357600080fd5b5080516020909101516011546001600160701b039283169450911691506000906001600160a01b03878116911614611c3b5781611c3d565b825b90506000611c4e8583601354612d97565b9050611c5b878783612e32565b6000611c898888611c72898663ffffffff61247216565b611c848b6001600160a01b03166123f6565b612f7f565b600d54600854604080516311f9fbc960e21b81526001600160a01b0392831660048201526024810185905290519394509116916347e7ef249160448082019260009290919082900301818387803b158015611ce357600080fd5b505af1158015611cf7573d6000803e3d6000fd5b5050604080518d8152602081018d905281513394507fc003f45bc224d116b6d079100d4ab57a5b9633244c47a5a92a176c5b79a85f2893509081900390910190a2505050505050505050505b611d4b61254b565b600b805460ff19166001179055565b600b5460ff16611da4576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055611d4b61254b565b6000600160701b8210611e06576040805162461bcd60e51b81526020600482015260136024820152722b30bab63a2a37b5b2b71d1029a0a32298989960691b604482015290519081900360640190fd5b50805b919050565b600082611e1d575060006109e5565b82820282848281611e2a57fe5b0414610e1f5760405162461bcd60e51b81526004018080602001828103825260218152602001806136076021913960400191505060405180910390fd5b6000610e1f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613057565b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8151611f1e90600090602085019061351c565b508051611f3290600190602084019061351c565b5060405146908060526135b58239604080519182900360520182208651602097880120838301835260018452603160f81b93880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b602083106120505780518252601f199092019160209182019101612031565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146120b2576040519150601f19603f3d011682016040523d82523d6000602084013e6120b7565b606091505b50915091508180156120e55750805115806120e557508080602001905160208110156120e257600080fd5b50515b612125576040805162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b604482015290519081900360640190fd5b5050505050565b600081848411156121bb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612180578181015183820152602001612168565b50505050905090810190601f1680156121ad5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080518082018252601881527f5461726f743a205452414e534645525f544f4f5f4849474800000000000000006020808301919091526001600160a01b03861660009081526004909152919091205461222491839063ffffffff61212c16565b6001600160a01b038085166000908152600460205260408082209390935590841681522054612259908263ffffffff6130bc16565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805160018082528183019092526000916060919060208083019080388339505060085482519293506001600160a01b0316918391506000906122f557fe5b6001600160a01b03928316602091820292909201810191909152600d54604051633febe83160e11b8152600481018381528551602483015285519290941693637fd7d06293869391928392604490910191858101910280838360005b83811015612369578181015183820152602001612351565b5050505090500192505050600060405180830381600087803b15801561238e57600080fd5b505af11580156123a2573d6000803e3d6000fd5b5050600f54600092506123be91506001600160a01b03166123f6565b905080156123e557600f54600e546123e3916001600160a01b03908116911683612b67565b505b600e54610f38906001600160a01b03165b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561244057600080fd5b505afa158015612454573d6000803e3d6000fd5b505050506040513d602081101561246a57600080fd5b505192915050565b6000610e1f83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f770081525061212c565b6003546124c7908263ffffffff6130bc16565b6003556001600160a01b0382166000908152600460205260409020546124f3908263ffffffff6130bc16565b6001600160a01b03831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600d546008546040805163015b6a3360e71b81523060048201526001600160a01b0392831660248201529051600093929092169163adb5198091604480820192602092909190829003018186803b1580156125a557600080fd5b505afa1580156125b9573d6000803e3d6000fd5b505050506040513d60208110156125cf57600080fd5b5051600a8190556040805182815290519192507f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf4919081900360200190a150565b6001600160a01b038216600090815260046020526040902054612639908263ffffffff61247216565b6001600160a01b038316600090815260046020526040902055600354612665908263ffffffff61247216565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0386811660248301526044808301879052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009560609594169382918083835b6020831061275a5780518252601f19909201916020918201910161273b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146127bc576040519150601f19603f3d011682016040523d82523d6000602084013e6127c1565b606091505b50915091508180156127ef5750805115806127ef57508080602001905160208110156127ec57600080fd5b50515b612839576040805162461bcd60e51b815260206004820152601660248201527515185c9bdd0e881514905394d1915497d1905253115160521b604482015290519081900360640190fd5b50505050565b42851015612885576040805162461bcd60e51b815260206004820152600e60248201526d15185c9bdd0e881156141254915160921b604482015290519081900360640190fd5b6006546001600160a01b03808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e280820193601f1981019281900390910190855afa158015612981573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906129b75750896001600160a01b0316816001600160a01b0316145b612a08576040805162461bcd60e51b815260206004820152601860248201527f5461726f743a20494e56414c49445f5349474e41545552450000000000000000604482015290519081900360640190fd5b50505050505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310612a915780518252601f199092019160209182019101612a72565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612af3576040519150601f19603f3d011682016040523d82523d6000602084013e612af8565b606091505b5091509150818015612b26575080511580612b265750808060200190516020811015612b2357600080fd5b50515b612125576040805162461bcd60e51b815260206004820152600d60248201526c10b9b0b332aa3930b739b332b960991b604482015290519081900360640190fd5b6000826001600160a01b0316846001600160a01b03161415612b8a575080610e1f565b600b546040805163711f958560e11b81526001600160a01b038781166004830152915161010090930490911691600091839163e23f2b0a91602480820192602092909190829003018186803b158015612be257600080fd5b505afa158015612bf6573d6000803e3d6000fd5b505050506040513d6020811015612c0c57600080fd5b505190506001600160a01b038082169086161415612c3957612c3082878787613116565b92505050610e1f565b6000826001600160a01b031663e23f2b0a876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015612c9157600080fd5b505afa158015612ca5573d6000803e3d6000fd5b505050506040513d6020811015612cbb57600080fd5b505190506001600160a01b038781169082161415612ce957612cdf83888888613116565b9350505050610e1f565b6000876001600160a01b0316836001600160a01b031614612d1757612d1084898589613116565b9050612d1a565b50845b816001600160a01b0316836001600160a01b03161415612d4b57612d4084848984613116565b945050505050610e1f565b866001600160a01b0316826001600160a01b03161415612d7057612d40838883612b67565b6000612d7d848484612b67565b9050612d8b85848a84613116565b95505050505050610e1f565b600080612db0846113b16127108663ffffffff6130bc16565b90506000612dcf846113b160048189818c61271063ffffffff611e0e16565b90506000612dfb612df683612dea868063ffffffff611e0e16565b9063ffffffff6130bc16565b61341c565b90506000612e1060028763ffffffff611e0e16565b9050612e2681610937848763ffffffff61247216565b98975050505050505050565b612e3c838261346d565b600c54604080516313dcfc5960e01b8152600481018490526000602482018190526001600160a01b0387811660448401528681166064840152608483018290523060a48401524260c4840152925192909316926313dcfc599260e48084019382900301818387803b158015612eb057600080fd5b505af1158015612ec4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612eed57600080fd5b8101908080516040519392919084640100000000821115612f0d57600080fd5b908301906020820185811115612f2257600080fd5b8251866020820283011164010000000082111715612f3f57600080fd5b82525081516020918201928201910280838360005b83811015612f6c578181015183820152602001612f54565b5050505090500160405250505050505050565b6000612f8b858461346d565b612f95848361346d565b600c5460408051635a47ddc360e01b81526001600160a01b0388811660048301528781166024830152600060448301819052606483018890526084830187905260a4830181905260c483018190523060e4840152426101048401529251931692635a47ddc39261012480840193606093929083900390910190829087803b15801561301f57600080fd5b505af1158015613033573d6000803e3d6000fd5b505050506040513d606081101561304957600080fd5b506040015195945050505050565b600081836130a65760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612180578181015183820152602001612168565b5060008385816130b257fe5b0495945050505050565b600082820183811015610e1f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826001600160a01b0316846001600160a01b03161415613139575080613414565b60408051630820681160e11b8152600481018490526001600160a01b0386811660248301528581166044830152825160009391891692631040d022926064808301939192829003018186803b15801561319157600080fd5b505afa1580156131a5573d6000803e3d6000fd5b505050506040513d60408110156131bb57600080fd5b508051602090910151925090506001600160a01b03811661320d576040805162461bcd60e51b81526020600482015260076024820152662727afa820a4a960c91b604482015290519081900360640190fd5b6132276001600160a01b038616828563ffffffff612a1416565b836001600160a01b0316856001600160a01b0316101561332b57604080516000808252602082019283905263022c0d9f60e01b835260248201818152604483018690523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a9590939092909160c48501918083838b5b838110156132bf5781810151838201526020016132a7565b50505050905090810190601f1680156132ec5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561330e57600080fd5b505af1158015613322573d6000803e3d6000fd5b50505050613412565b604080516000808252602082019283905263022c0d9f60e01b835260248201858152604483018290523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a969590939092909160c48501918083838a5b838110156133aa578181015183820152602001613392565b50505050905090810190601f1680156133d75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156133f957600080fd5b505af115801561340d573d6000803e3d6000fd5b505050505b505b949350505050565b6000600382111561345f575080600160028204015b818110156134595780915060028182858161344857fe5b04018161345157fe5b049050613431565b50611e09565b8115611e0957506001919050565b600c5460408051636eb1769f60e11b81523060048201526001600160a01b0392831660248201529051839285169163dd62ed3e916044808301926020929190829003018186803b1580156134c057600080fd5b505afa1580156134d4573d6000803e3d6000fd5b505050506040513d60208110156134ea57600080fd5b5051106134f657613518565b600c54613518906001600160a01b03848116911660001963ffffffff611fd316565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061355d57805160ff191683800117855561358a565b8280016001018555821561358a579182015b8281111561358a57825182559160200191906001019061356f565b5061359692915061359a565b5090565b610f3d91905b8082111561359657600081556001016135a056fe454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775661756c74546f6b656e3a20494e564c445f5245494e564553545f424f554e54595661756c74546f6b656e3a20494e53554646494349454e545f5245534552564553a265627a7a723158207fc243e784c9777190baa9bcc6c3044dc7c060cc0f324c7dd47f1f57cb8ad94b64736f6c634300051000324f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a72315820dbc8d58c320468c0649ac1661288a7978dd01f5f8b43875bd0bb5761fced961064736f6c634300051000325661756c74546f6b656e466163746f72793a20494e56414c49445f4645455f464143544f52000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18000000000000000000000000a38cd27185a464914d3046f0ab9d43356b34829d00000000000000000000000026e1a0d851cf28e697870e1b7f053b605c8b060f000000000000000000000000888ef71766ca594ded1f0fa3ae64ed2941740a20000000000000000000000000d31fcd1f7ba190dbc75354046f6024a9b86014d7000000000000000000000000000000000000000000000000000000000000270f

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

000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18000000000000000000000000a38cd27185a464914d3046f0ab9d43356b34829d00000000000000000000000026e1a0d851cf28e697870e1b7f053b605c8b060f000000000000000000000000888ef71766ca594ded1f0fa3ae64ed2941740a20000000000000000000000000d31fcd1f7ba190dbc75354046f6024a9b86014d7000000000000000000000000000000000000000000000000000000000000270f

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

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18
Arg [1] : 000000000000000000000000a38cd27185a464914d3046f0ab9d43356b34829d
Arg [2] : 00000000000000000000000026e1a0d851cf28e697870e1b7f053b605c8b060f
Arg [3] : 000000000000000000000000888ef71766ca594ded1f0fa3ae64ed2941740a20
Arg [4] : 000000000000000000000000d31fcd1f7ba190dbc75354046f6024a9b86014d7
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.