More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 118 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Sweep ERC20 | 15080242 | 937 days ago | IN | 0 ETH | 0.00240943 | ||||
Rebalance | 14626742 | 1012 days ago | IN | 0 ETH | 0.01154163 | ||||
Sweep ERC20 | 14626694 | 1012 days ago | IN | 0 ETH | 0.00432363 | ||||
Rebalance | 14614814 | 1014 days ago | IN | 0 ETH | 0.0155831 | ||||
Rebalance | 14601785 | 1016 days ago | IN | 0 ETH | 0.00835604 | ||||
Rebalance | 14588670 | 1018 days ago | IN | 0 ETH | 0.00841393 | ||||
Rebalance | 14575890 | 1020 days ago | IN | 0 ETH | 0.00824774 | ||||
Rebalance | 14557017 | 1023 days ago | IN | 0 ETH | 0.00570107 | ||||
Rebalance | 14544236 | 1025 days ago | IN | 0 ETH | 0.00927103 | ||||
Rebalance | 14527331 | 1027 days ago | IN | 0 ETH | 0.01905233 | ||||
Rebalance | 14520779 | 1028 days ago | IN | 0 ETH | 0.01678065 | ||||
Rebalance | 14511918 | 1030 days ago | IN | 0 ETH | 0.00912304 | ||||
Rebalance | 14498763 | 1032 days ago | IN | 0 ETH | 0.01200997 | ||||
Rebalance | 14486692 | 1034 days ago | IN | 0 ETH | 0.00784242 | ||||
Rebalance | 14474223 | 1035 days ago | IN | 0 ETH | 0.00715809 | ||||
Rebalance | 14460870 | 1038 days ago | IN | 0 ETH | 0.00715128 | ||||
Rebalance | 14447681 | 1040 days ago | IN | 0 ETH | 0.00645127 | ||||
Rebalance | 14434580 | 1042 days ago | IN | 0 ETH | 0.0054222 | ||||
Rebalance | 14416942 | 1044 days ago | IN | 0 ETH | 0.00624128 | ||||
Rebalance | 14403827 | 1046 days ago | IN | 0 ETH | 0.00595834 | ||||
Rebalance | 14390682 | 1048 days ago | IN | 0 ETH | 0.00638862 | ||||
Rebalance | 14377583 | 1051 days ago | IN | 0 ETH | 0.00621386 | ||||
Rebalance | 14364550 | 1053 days ago | IN | 0 ETH | 0.00522447 | ||||
Rebalance | 14351358 | 1055 days ago | IN | 0 ETH | 0.00770045 | ||||
Rebalance | 14338215 | 1057 days ago | IN | 0 ETH | 0.00770286 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
RariFuseStrategy
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../compound/CompoundStrategy.sol"; import "../../interfaces/rari-fuse/IComptroller.sol"; import "../../interfaces/rari-fuse/IFusePoolDirectory.sol"; /// @title This strategy will deposit collateral token in a Rari Fuse Pool and earn interest. contract RariFuseStrategy is CompoundStrategy { using SafeERC20 for IERC20; string public constant NAME = "RariFuse-Strategy"; string public constant VERSION = "3.0.13"; uint256 public fusePoolId; address private constant FUSE_POOL_DIRECTORY = 0x835482FE0532f169024d5E9410199369aAD5C77E; event FusePoolChanged(uint256 indexed newFusePoolId, address indexed oldCToken, address indexed newCToken); // solhint-disable no-empty-blocks constructor( address _pool, address _swapManager, uint256 _fusePoolId ) CompoundStrategy(_pool, _swapManager, _cTokenByUnderlying(_fusePoolId, address(IVesperPool(_pool).token()))) { fusePoolId = _fusePoolId; } // solhint-enable no-empty-blocks /** * @notice Calculate total value using underlying token * @dev Report total value in collateral token */ function totalValue() public view override returns (uint256 _totalValue) { _totalValue = _convertToCollateral(cToken.balanceOf(address(this))); } /** * @notice Changes the underlying Fuse Pool to a new one * @dev Redeems cTokens from current fuse pool and mints cTokens of new Fuse Pool * @param _newPoolId Fuse Pool ID */ function migrateFusePool(uint256 _newPoolId) external virtual onlyGovernor { address _newCToken = _cTokenByUnderlying(_newPoolId, address(collateralToken)); require(address(cToken) != _newCToken, "same-fuse-pool"); require(cToken.redeem(cToken.balanceOf(address(this))) == 0, "withdraw-from-fuse-pool-failed"); uint256 _collateralBalance = collateralToken.balanceOf(address(this)); collateralToken.safeApprove(_newCToken, _collateralBalance); require(CToken(_newCToken).mint(_collateralBalance) == 0, "deposit-to-fuse-pool-failed"); emit FusePoolChanged(_newPoolId, address(cToken), _newCToken); cToken = CToken(_newCToken); receiptToken = _newCToken; fusePoolId = _newPoolId; } function isReservedToken(address _token) public view override returns (bool) { return _token == address(cToken); } /** * @notice Gets the cToken to mint for a Fuse Pool * @param _poolId Fuse Pool ID * @param _collateralToken address of the collateralToken */ function _cTokenByUnderlying(uint256 _poolId, address _collateralToken) internal view returns (address) { (, , address _comptroller, , ) = IFusePoolDirectory(FUSE_POOL_DIRECTORY).pools(_poolId); require(_comptroller != address(0), "rari-fuse-invalid-comptroller"); if (_collateralToken == WETH) { // cETH is mapped with 0x0 _collateralToken = address(0x0); } address _cToken = IComptroller(_comptroller).cTokensByUnderlying(_collateralToken); require(_cToken != address(0), "rari-fuse-invalid-ctoken"); return _cToken; } // solhint-disable-next-line function _beforeMigration(address _newStrategy) internal override {} /** * @notice Calculate earning and withdraw it from Rari Fuse * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal virtual override returns (uint256) { uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); if (_collateralBalance > _totalDebt) { _withdrawHere(_collateralBalance - _totalDebt); } return collateralToken.balanceOf(address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.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 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. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IAddressList { function add(address a) external returns (bool); function remove(address a) external returns (bool); function get(address a) external view returns (uint256); function contains(address a) external view returns (bool); function length() external view returns (uint256); function grantRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IAddressListFactory { function ours(address a) external view returns (bool); function listCount() external view returns (uint256); function listAt(uint256 idx) external view returns (address); function createList() external returns (address listaddr); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; /* solhint-disable func-name-mixedcase */ import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; interface ISwapManager { event OracleCreated(address indexed _sender, address indexed _newOracle, uint256 _period); function N_DEX() external view returns (uint256); function ROUTERS(uint256 i) external view returns (IUniswapV2Router02); function bestOutputFixedInput( address _from, address _to, uint256 _amountIn ) external view returns ( address[] memory path, uint256 amountOut, uint256 rIdx ); function bestPathFixedInput( address _from, address _to, uint256 _amountIn, uint256 _i ) external view returns (address[] memory path, uint256 amountOut); function bestInputFixedOutput( address _from, address _to, uint256 _amountOut ) external view returns ( address[] memory path, uint256 amountIn, uint256 rIdx ); function bestPathFixedOutput( address _from, address _to, uint256 _amountOut, uint256 _i ) external view returns (address[] memory path, uint256 amountIn); function safeGetAmountsOut( uint256 _amountIn, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function unsafeGetAmountsOut( uint256 _amountIn, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function safeGetAmountsIn( uint256 _amountOut, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function unsafeGetAmountsIn( uint256 _amountOut, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function comparePathsFixedInput( address[] memory pathA, address[] memory pathB, uint256 _amountIn, uint256 _i ) external view returns (address[] memory path, uint256 amountOut); function comparePathsFixedOutput( address[] memory pathA, address[] memory pathB, uint256 _amountOut, uint256 _i ) external view returns (address[] memory path, uint256 amountIn); function ours(address a) external view returns (bool); function oracleCount() external view returns (uint256); function oracleAt(uint256 idx) external view returns (address); function getOracle( address _tokenA, address _tokenB, uint256 _period, uint256 _i ) external view returns (address); function createOrUpdateOracle( address _tokenA, address _tokenB, uint256 _period, uint256 _i ) external returns (address oracleAddr); function consultForFree( address _from, address _to, uint256 _amountIn, uint256 _period, uint256 _i ) external view returns (uint256 amountOut, uint256 lastUpdatedAt); /// get the data we want and pay the gas to update function consult( address _from, address _to, uint256 _amountIn, uint256 _period, uint256 _i ) external returns ( uint256 amountOut, uint256 lastUpdatedAt, bool updated ); function updateOracles() external returns (uint256 updated, uint256 expected); function updateOracles(address[] memory _oracleAddrs) external returns (uint256 updated, uint256 expected); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface CToken { function accrueInterest() external returns (uint256); function balanceOf(address owner) external view returns (uint256); function balanceOfUnderlying(address owner) external returns (uint256); function borrowBalanceCurrent(address account) external returns (uint256); function borrowBalanceStored(address account) external view returns (uint256); function exchangeRateCurrent() external returns (uint256); function exchangeRateStored() external view returns (uint256); function getAccountSnapshot(address account) external view returns ( uint256, uint256, uint256, uint256 ); function borrow(uint256 borrowAmount) external returns (uint256); function mint() external payable; // For ETH function mint(uint256 mintAmount) external returns (uint256); // For ERC20 function redeem(uint256 redeemTokens) external returns (uint256); function redeemUnderlying(uint256 redeemAmount) external returns (uint256); function repayBorrow() external payable; // For ETH function repayBorrow(uint256 repayAmount) external returns (uint256); // For ERC20 function transfer(address user, uint256 amount) external returns (bool); function getCash() external view returns (uint256); function transferFrom( address owner, address user, uint256 amount ) external returns (bool); function underlying() external view returns (address); } interface Comptroller { function claimComp(address holder, address[] memory) external; function enterMarkets(address[] memory cTokens) external returns (uint256[] memory); function exitMarket(address cToken) external returns (uint256); function compAccrued(address holder) external view returns (uint256); function getAccountLiquidity(address account) external view returns ( uint256, uint256, uint256 ); function markets(address market) external view returns ( bool isListed, uint256 collateralFactorMantissa, bool isCompted ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IComptroller { function cTokensByUnderlying(address) external view returns (address cToken); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IFusePoolDirectory { function pools(uint256) external view returns ( string memory name, address creator, address comptroller, uint256 blockPosted, uint256 timestampPosted ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IStrategy { function rebalance() external; function sweepERC20(address _fromToken) external; function withdraw(uint256 _amount) external; function feeCollector() external view returns (address); function isReservedToken(address _token) external view returns (bool); function migrate(address _newStrategy) external; function token() external view returns (address); function totalValue() external view returns (uint256); function totalValueCurrent() external returns (uint256); function pool() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../bloq/IAddressList.sol"; interface IVesperPool is IERC20 { function deposit() external payable; function deposit(uint256 _share) external; function multiTransfer(address[] memory _recipients, uint256[] memory _amounts) external returns (bool); function excessDebt(address _strategy) external view returns (uint256); function permit( address, address, uint256, uint256, uint8, bytes32, bytes32 ) external; function poolRewards() external returns (address); function reportEarning( uint256 _profit, uint256 _loss, uint256 _payback ) external; function reportLoss(uint256 _loss) external; function resetApproval() external; function sweepERC20(address _fromToken) external; function withdraw(uint256 _amount) external; function withdrawETH(uint256 _amount) external; function whitelistedWithdraw(uint256 _amount) external; function governor() external view returns (address); function keepers() external view returns (IAddressList); function maintainers() external view returns (IAddressList); function feeCollector() external view returns (address); function pricePerShare() external view returns (uint256); function strategy(address _strategy) external view returns ( bool _active, uint256 _interestFee, uint256 _debtRate, uint256 _lastRebalance, uint256 _totalDebt, uint256 _totalLoss, uint256 _totalProfit, uint256 _debtRatio ); function stopEverything() external view returns (bool); function token() external view returns (IERC20); function tokensHere() external view returns (uint256); function totalDebtOf(address _strategy) external view returns (uint256); function totalValue() external view returns (uint256); function withdrawFee() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "../interfaces/bloq/ISwapManager.sol"; import "../interfaces/bloq/IAddressList.sol"; import "../interfaces/bloq/IAddressListFactory.sol"; import "../interfaces/vesper/IStrategy.sol"; import "../interfaces/vesper/IVesperPool.sol"; abstract contract Strategy is IStrategy, Context { using SafeERC20 for IERC20; IERC20 public immutable collateralToken; address public receiptToken; address public immutable override pool; IAddressList public keepers; address public override feeCollector; ISwapManager public swapManager; uint256 public oraclePeriod = 3600; // 1h uint256 public oracleRouterIdx = 0; // Uniswap V2 uint256 public swapSlippage = 10000; // 100% Don't use oracles by default address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 internal constant MAX_UINT_VALUE = type(uint256).max; event UpdatedFeeCollector(address indexed previousFeeCollector, address indexed newFeeCollector); event UpdatedSwapManager(address indexed previousSwapManager, address indexed newSwapManager); event UpdatedSwapSlippage(uint256 oldSwapSlippage, uint256 newSwapSlippage); event UpdatedOracleConfig(uint256 oldPeriod, uint256 newPeriod, uint256 oldRouterIdx, uint256 newRouterIdx); constructor( address _pool, address _swapManager, address _receiptToken ) { require(_pool != address(0), "pool-address-is-zero"); require(_swapManager != address(0), "sm-address-is-zero"); swapManager = ISwapManager(_swapManager); pool = _pool; collateralToken = IVesperPool(_pool).token(); receiptToken = _receiptToken; } modifier onlyGovernor { require(_msgSender() == IVesperPool(pool).governor(), "caller-is-not-the-governor"); _; } modifier onlyKeeper() { require(keepers.contains(_msgSender()), "caller-is-not-a-keeper"); _; } modifier onlyPool() { require(_msgSender() == pool, "caller-is-not-vesper-pool"); _; } /** * @notice Add given address in keepers list. * @param _keeperAddress keeper address to add. */ function addKeeper(address _keeperAddress) external onlyGovernor { require(keepers.add(_keeperAddress), "add-keeper-failed"); } /** * @notice Create keeper list * NOTE: Any function with onlyKeeper modifier will not work until this function is called. * NOTE: Due to gas constraint this function cannot be called in constructor. * @param _addressListFactory To support same code in eth side chain, user _addressListFactory as param * ethereum- 0xded8217De022706A191eE7Ee0Dc9df1185Fb5dA3 * polygon-0xD10D5696A350D65A9AA15FE8B258caB4ab1bF291 */ function init(address _addressListFactory) external onlyGovernor { require(address(keepers) == address(0), "keeper-list-already-created"); // Prepare keeper list IAddressListFactory _factory = IAddressListFactory(_addressListFactory); keepers = IAddressList(_factory.createList()); require(keepers.add(_msgSender()), "add-keeper-failed"); } /** * @notice Migrate all asset and vault ownership,if any, to new strategy * @dev _beforeMigration hook can be implemented in child strategy to do extra steps. * @param _newStrategy Address of new strategy */ function migrate(address _newStrategy) external virtual override onlyPool { require(_newStrategy != address(0), "new-strategy-address-is-zero"); require(IStrategy(_newStrategy).pool() == pool, "not-valid-new-strategy"); _beforeMigration(_newStrategy); IERC20(receiptToken).safeTransfer(_newStrategy, IERC20(receiptToken).balanceOf(address(this))); collateralToken.safeTransfer(_newStrategy, collateralToken.balanceOf(address(this))); } /** * @notice Remove given address from keepers list. * @param _keeperAddress keeper address to remove. */ function removeKeeper(address _keeperAddress) external onlyGovernor { require(keepers.remove(_keeperAddress), "remove-keeper-failed"); } /** * @notice Update fee collector * @param _feeCollector fee collector address */ function updateFeeCollector(address _feeCollector) external onlyGovernor { require(_feeCollector != address(0), "fee-collector-address-is-zero"); require(_feeCollector != feeCollector, "fee-collector-is-same"); emit UpdatedFeeCollector(feeCollector, _feeCollector); feeCollector = _feeCollector; } /** * @notice Update swap manager address * @param _swapManager swap manager address */ function updateSwapManager(address _swapManager) external onlyGovernor { require(_swapManager != address(0), "sm-address-is-zero"); require(_swapManager != address(swapManager), "sm-is-same"); emit UpdatedSwapManager(address(swapManager), _swapManager); swapManager = ISwapManager(_swapManager); } function updateSwapSlippage(uint256 _newSwapSlippage) external onlyGovernor { require(_newSwapSlippage <= 10000, "invalid-slippage-value"); emit UpdatedSwapSlippage(swapSlippage, _newSwapSlippage); swapSlippage = _newSwapSlippage; } function updateOracleConfig(uint256 _newPeriod, uint256 _newRouterIdx) external onlyGovernor { require(_newRouterIdx < swapManager.N_DEX(), "invalid-router-index"); if (_newPeriod == 0) _newPeriod = oraclePeriod; require(_newPeriod > 59, "invalid-oracle-period"); emit UpdatedOracleConfig(oraclePeriod, _newPeriod, oracleRouterIdx, _newRouterIdx); oraclePeriod = _newPeriod; oracleRouterIdx = _newRouterIdx; } /// @dev Approve all required tokens function approveToken() external onlyKeeper { _approveToken(0); _approveToken(MAX_UINT_VALUE); } function setupOracles() external onlyKeeper { _setupOracles(); } /** * @dev Withdraw collateral token from lending pool. * @param _amount Amount of collateral token */ function withdraw(uint256 _amount) external override onlyPool { _withdraw(_amount); } /** * @dev Rebalance profit, loss and investment of this strategy */ function rebalance() external virtual override onlyKeeper { (uint256 _profit, uint256 _loss, uint256 _payback) = _generateReport(); IVesperPool(pool).reportEarning(_profit, _loss, _payback); _reinvest(); } /** * @dev sweep given token to feeCollector of strategy * @param _fromToken token address to sweep */ function sweepERC20(address _fromToken) external override onlyKeeper { require(feeCollector != address(0), "fee-collector-not-set"); require(_fromToken != address(collateralToken), "not-allowed-to-sweep-collateral"); require(!isReservedToken(_fromToken), "not-allowed-to-sweep"); if (_fromToken == ETH) { Address.sendValue(payable(feeCollector), address(this).balance); } else { uint256 _amount = IERC20(_fromToken).balanceOf(address(this)); IERC20(_fromToken).safeTransfer(feeCollector, _amount); } } /// @notice Returns address of token correspond to collateral token function token() external view override returns (address) { return receiptToken; } /// @dev Convert from 18 decimals to token defined decimals. Default no conversion. function convertFrom18(uint256 amount) public pure virtual returns (uint256) { return amount; } /** * @notice Calculate total value of asset under management * @dev Report total value in collateral token */ function totalValue() public view virtual override returns (uint256 _value); /** * @notice Calculate total value of asset under management (in real-time) * @dev Report total value in collateral token */ function totalValueCurrent() external virtual override returns (uint256) { return totalValue(); } /// @notice Check whether given token is reserved or not. Reserved tokens are not allowed to sweep. function isReservedToken(address _token) public view virtual override returns (bool); /** * @notice some strategy may want to prepare before doing migration. Example In Maker old strategy want to give vault ownership to new strategy * @param _newStrategy . */ function _beforeMigration(address _newStrategy) internal virtual; /** * @notice Generate report for current profit and loss. Also liquidate asset to payback * excess debt, if any. * @return _profit Calculate any realized profit and convert it to collateral, if not already. * @return _loss Calculate any loss that strategy has made on investment. Convert into collateral token. * @return _payback If strategy has any excess debt, we have to liquidate asset to payback excess debt. */ function _generateReport() internal virtual returns ( uint256 _profit, uint256 _loss, uint256 _payback ) { uint256 _excessDebt = IVesperPool(pool).excessDebt(address(this)); uint256 _totalDebt = IVesperPool(pool).totalDebtOf(address(this)); _profit = _realizeProfit(_totalDebt); _loss = _realizeLoss(_totalDebt); _payback = _liquidate(_excessDebt); } function _calcAmtOutAfterSlippage(uint256 _amount, uint256 _slippage) internal pure returns (uint256) { return (_amount * (10000 - _slippage)) / (10000); } function _simpleOraclePath(address _from, address _to) internal pure returns (address[] memory path) { if (_from == WETH || _to == WETH) { path = new address[](2); path[0] = _from; path[1] = _to; } else { path = new address[](3); path[0] = _from; path[1] = WETH; path[2] = _to; } } function _consultOracle( address _from, address _to, uint256 _amt ) internal returns (uint256, bool) { // from, to, amountIn, period, router (uint256 rate, uint256 lastUpdate, ) = swapManager.consult(_from, _to, _amt, oraclePeriod, oracleRouterIdx); // We're looking at a TWAP ORACLE with a 1 hr Period that has been updated within the last hour if ((lastUpdate > (block.timestamp - oraclePeriod)) && (rate != 0)) return (rate, true); return (0, false); } function _getOracleRate(address[] memory path, uint256 _amountIn) internal returns (uint256 amountOut) { require(path.length > 1, "invalid-oracle-path"); amountOut = _amountIn; bool isValid; for (uint256 i = 0; i < path.length - 1; i++) { (amountOut, isValid) = _consultOracle(path[i], path[i + 1], amountOut); require(isValid, "invalid-oracle-rate"); } } /** * @notice Safe swap via Uniswap / Sushiswap (better rate of the two) * @dev There are many scenarios when token swap via Uniswap can fail, so this * method will wrap Uniswap call in a 'try catch' to make it fail safe. * however, this method will throw minAmountOut is not met * @param _from address of from token * @param _to address of to token * @param _amountIn Amount to be swapped * @param _minAmountOut minimum amount out */ function _safeSwap( address _from, address _to, uint256 _amountIn, uint256 _minAmountOut ) internal { (address[] memory path, uint256 amountOut, uint256 rIdx) = swapManager.bestOutputFixedInput(_from, _to, _amountIn); if (_minAmountOut == 0) _minAmountOut = 1; if (amountOut != 0) { swapManager.ROUTERS(rIdx).swapExactTokensForTokens( _amountIn, _minAmountOut, path, address(this), block.timestamp ); } } // These methods can be implemented by the inheriting strategy. /* solhint-disable no-empty-blocks */ function _claimRewardsAndConvertTo(address _toToken) internal virtual {} /** * @notice Set up any oracles that are needed for this strategy. */ function _setupOracles() internal virtual {} /* solhint-enable */ // These methods must be implemented by the inheriting strategy function _withdraw(uint256 _amount) internal virtual; function _approveToken(uint256 _amount) internal virtual; /** * @notice Withdraw collateral to payback excess debt in pool. * @param _excessDebt Excess debt of strategy in collateral token * @return _payback amount in collateral token. Usually it is equal to excess debt. */ function _liquidate(uint256 _excessDebt) internal virtual returns (uint256 _payback); /** * @notice Calculate earning and withdraw/convert it into collateral token. * @param _totalDebt Total collateral debt of this strategy * @return _profit Profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal virtual returns (uint256 _profit); /** * @notice Calculate loss * @param _totalDebt Total collateral debt of this strategy * @return _loss Realized loss in collateral token */ function _realizeLoss(uint256 _totalDebt) internal virtual returns (uint256 _loss); /** * @notice Reinvest collateral. * @dev Once we file report back in pool, we might have some collateral in hand * which we want to reinvest aka deposit in lender/provider. */ function _reinvest() internal virtual; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../Strategy.sol"; import "../../interfaces/compound/ICompound.sol"; /// @title This strategy will deposit collateral token in Compound and earn interest. abstract contract CompoundStrategy is Strategy { using SafeERC20 for IERC20; CToken internal cToken; address internal constant COMP = 0xc00e94Cb662C3520282E6f5717214004A7f26888; Comptroller internal constant COMPTROLLER = Comptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); constructor( address _pool, address _swapManager, address _receiptToken ) Strategy(_pool, _swapManager, _receiptToken) { require(_receiptToken != address(0), "cToken-address-is-zero"); cToken = CToken(_receiptToken); swapSlippage = 10000; // disable oracles on reward swaps by default } /** * @notice Calculate total value using COMP accrued and cToken * @dev Report total value in collateral token */ function totalValue() public view virtual override returns (uint256 _totalValue) { _totalValue = _calculateTotalValue(COMPTROLLER.compAccrued(address(this))); } function totalValueCurrent() external virtual override returns (uint256 _totalValue) { _claimComp(); _totalValue = _calculateTotalValue(IERC20(COMP).balanceOf(address(this))); } function _calculateTotalValue(uint256 _compAccrued) internal view returns (uint256 _totalValue) { if (_compAccrued != 0) { (, _totalValue) = swapManager.bestPathFixedInput(COMP, address(collateralToken), _compAccrued, 0); } _totalValue += _convertToCollateral(cToken.balanceOf(address(this))); } function isReservedToken(address _token) public view virtual override returns (bool) { return _token == address(cToken) || _token == COMP; } /// @notice Approve all required tokens function _approveToken(uint256 _amount) internal virtual override { collateralToken.safeApprove(pool, _amount); collateralToken.safeApprove(address(cToken), _amount); for (uint256 i = 0; i < swapManager.N_DEX(); i++) { IERC20(COMP).safeApprove(address(swapManager.ROUTERS(i)), _amount); } } /** * @notice Claim COMP and transfer to new strategy * @param _newStrategy Address of new strategy. */ function _beforeMigration(address _newStrategy) internal virtual override { _claimComp(); IERC20(COMP).safeTransfer(_newStrategy, IERC20(COMP).balanceOf(address(this))); } /// @notice Claim comp function _claimComp() internal { address[] memory _markets = new address[](1); _markets[0] = address(cToken); COMPTROLLER.claimComp(address(this), _markets); } /// @notice Claim COMP and convert COMP into collateral token. function _claimRewardsAndConvertTo(address _toToken) internal virtual override { _claimComp(); uint256 _compAmount = IERC20(COMP).balanceOf(address(this)); if (_compAmount != 0) { uint256 minAmtOut = (swapSlippage != 10000) ? _calcAmtOutAfterSlippage( _getOracleRate(_simpleOraclePath(COMP, _toToken), _compAmount), swapSlippage ) : 1; _safeSwap(COMP, _toToken, _compAmount, minAmtOut); } } /// @notice Withdraw collateral to payback excess debt function _liquidate(uint256 _excessDebt) internal override returns (uint256 _payback) { if (_excessDebt != 0) { _payback = _safeWithdraw(_excessDebt); } } /** * @notice Calculate earning and withdraw it from Compound. * @dev Claim COMP and convert into collateral * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal virtual override returns (uint256) { _claimRewardsAndConvertTo(address(collateralToken)); uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); if (_collateralBalance > _totalDebt) { _withdrawHere(_collateralBalance - _totalDebt); } return collateralToken.balanceOf(address(this)); } /** * @notice Calculate realized loss. * @return _loss Realized loss in collateral token */ function _realizeLoss(uint256 _totalDebt) internal view override returns (uint256 _loss) { uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); if (_collateralBalance < _totalDebt) { _loss = _totalDebt - _collateralBalance; } } /// @notice Deposit collateral in Compound function _reinvest() internal virtual override { uint256 _collateralBalance = collateralToken.balanceOf(address(this)); if (_collateralBalance != 0) { require(cToken.mint(_collateralBalance) == 0, "deposit-to-compound-failed"); } } /// @dev Withdraw collateral and transfer it to pool function _withdraw(uint256 _amount) internal override { _safeWithdraw(_amount); collateralToken.safeTransfer(pool, collateralToken.balanceOf(address(this))); } /** * @notice Safe withdraw will make sure to check asking amount against available amount. * @param _amount Amount of collateral to withdraw. * @return Actual collateral withdrawn */ function _safeWithdraw(uint256 _amount) internal returns (uint256) { uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); // Get available liquidity from Compound uint256 _availableLiquidity = cToken.getCash(); // Get minimum of _amount and _avaialbleLiquidity uint256 _withdrawAmount = _amount < _availableLiquidity ? _amount : _availableLiquidity; // Get minimum of _withdrawAmount and _collateralBalance return _withdrawHere(_withdrawAmount < _collateralBalance ? _withdrawAmount : _collateralBalance); } /// @dev Withdraw collateral here. Do not transfer to pool function _withdrawHere(uint256 _amount) internal returns (uint256) { if (_amount != 0) { require(cToken.redeemUnderlying(_amount) == 0, "withdraw-from-compound-failed"); _afterRedeem(); } return _amount; } function _setupOracles() internal virtual override { swapManager.createOrUpdateOracle(COMP, WETH, oraclePeriod, oracleRouterIdx); if (address(collateralToken) != WETH) { swapManager.createOrUpdateOracle(WETH, address(collateralToken), oraclePeriod, oracleRouterIdx); } } /** * @dev Compound support ETH as collateral not WETH. This hook will take * care of conversion from WETH to ETH and vice versa. * @dev This will be used in ETH strategy only, hence empty implementation */ //solhint-disable-next-line no-empty-blocks function _afterRedeem() internal virtual {} function _convertToCollateral(uint256 _cTokenAmount) internal view returns (uint256) { return (_cTokenAmount * cToken.exchangeRateStored()) / 1e18; } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_swapManager","type":"address"},{"internalType":"uint256","name":"_fusePoolId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newFusePoolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"oldCToken","type":"address"},{"indexed":true,"internalType":"address","name":"newCToken","type":"address"}],"name":"FusePoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousFeeCollector","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeCollector","type":"address"}],"name":"UpdatedFeeCollector","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldRouterIdx","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRouterIdx","type":"uint256"}],"name":"UpdatedOracleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousSwapManager","type":"address"},{"indexed":true,"internalType":"address","name":"newSwapManager","type":"address"}],"name":"UpdatedSwapManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldSwapSlippage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newSwapSlippage","type":"uint256"}],"name":"UpdatedSwapSlippage","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"addKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collateralToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertFrom18","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fusePoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addressListFactory","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isReservedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keepers","outputs":[{"internalType":"contract IAddressList","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newStrategy","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPoolId","type":"uint256"}],"name":"migrateFusePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oraclePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleRouterIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiptToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"removeKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setupOracles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapManager","outputs":[{"internalType":"contract ISwapManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"}],"name":"sweepERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValue","outputs":[{"internalType":"uint256","name":"_totalValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValueCurrent","outputs":[{"internalType":"uint256","name":"_totalValue","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeCollector","type":"address"}],"name":"updateFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPeriod","type":"uint256"},{"internalType":"uint256","name":"_newRouterIdx","type":"uint256"}],"name":"updateOracleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapManager","type":"address"}],"name":"updateSwapManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSwapSlippage","type":"uint256"}],"name":"updateSwapSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052610e1060045560006005556127106006553480156200002257600080fd5b5060405162003ede38038062003ede833981016040819052620000459162000506565b8282620000c783866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200008657600080fd5b505afa1580156200009b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c19190620004e0565b620002d1565b8282826001600160a01b038316620001265760405162461bcd60e51b815260206004820152601460248201527f706f6f6c2d616464726573732d69732d7a65726f00000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620001735760405162461bcd60e51b8152602060048201526012602482015271736d2d616464726573732d69732d7a65726f60701b60448201526064016200011d565b600380546001600160a01b0319166001600160a01b0384811691909117909155606084901b6001600160601b03191660a05260408051637e062a3560e11b815290519185169163fc0c546a91600480820192602092909190829003018186803b158015620001e057600080fd5b505afa158015620001f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200021b9190620004e0565b60601b6001600160601b031916608052600080546001600160a01b0319166001600160a01b039283161790558316151591506200029d90505760405162461bcd60e51b815260206004820152601660248201527f63546f6b656e2d616464726573732d69732d7a65726f0000000000000000000060448201526064016200011d565b600780546001600160a01b0319166001600160a01b03929092169190911790555050612710600655600855506200068c9050565b6040516315895f4760e31b815260048101839052600090819073835482fe0532f169024d5e9410199369aad5c77e9063ac4afa389060240160006040518083038186803b1580156200032257600080fd5b505afa15801562000337573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200036191908101906200054d565b509093505050506001600160a01b038116620003c05760405162461bcd60e51b815260206004820152601d60248201527f726172692d667573652d696e76616c69642d636f6d7074726f6c6c657200000060448201526064016200011d565b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415620003eb57600092505b6040516318ffa3fd60e11b81526001600160a01b038481166004830152600091908316906331ff47fa9060240160206040518083038186803b1580156200043157600080fd5b505afa15801562000446573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200046c9190620004e0565b90506001600160a01b038116620004c65760405162461bcd60e51b815260206004820152601860248201527f726172692d667573652d696e76616c69642d63746f6b656e000000000000000060448201526064016200011d565b949350505050565b8051620004db8162000673565b919050565b600060208284031215620004f2578081fd5b8151620004ff8162000673565b9392505050565b6000806000606084860312156200051b578182fd5b8351620005288162000673565b60208501519093506200053b8162000673565b80925050604084015190509250925092565b600080600080600060a0868803121562000565578081fd5b85516001600160401b03808211156200057c578283fd5b818801915088601f83011262000590578283fd5b815181811115620005a557620005a56200065d565b604051601f8201601f19908116603f01168101908382118183101715620005d057620005d06200065d565b81604052828152602093508b84848701011115620005ec578586fd5b8591505b828210156200060f5784820184015181830185015290830190620005f0565b828211156200062057858484830101525b985062000632915050888201620004ce565b955050506200064460408701620004ce565b6060870151608090970151959894975095949392505050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200068957600080fd5b50565b60805160601c60a05160601c6137546200078a60003960008181610204015281816104770152818161060601528181610881015281816108fd01528181610a9401528181610c47015281816110c9015281816112f90152818161142001528181611703015281816117cc01528181611a1901528181611fc00152818161238601528181612423015261266301526000818161039401528181610d0e01528181610edc01528181610f6d0152818161196b015281816119f001528181611d6401528181611fea015281816124df0152818161264101528181612699015281816128b60152818161293d01528181612cc80152612fb601526137546000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80639b0db5d01161010f578063d2c35ce8116100a2578063ec78e83211610071578063ec78e8321461041b578063fb589de21461042e578063fc0c546a1461043f578063ffa1ad7414610450576101e5565b8063d2c35ce8146103e5578063d4c3eea0146103f8578063e00af4a714610400578063e645c20214610413576101e5565b8063b2016bd4116100de578063b2016bd41461038f578063c415b95c146103b6578063cd2d7ebe146103c9578063ce5494bb146103d2576101e5565b80639b0db5d01461032e578063a3f4df7e14610337578063a923b2a614610374578063aa10188614610387576101e5565b8063440d724811610187578063709d039d11610156578063709d039d146102f85780637d7c2a1c1461030b578063951dc22c1461031357806399b71d5c14610326576101e5565b8063440d72481461029c5780634c36fad7146102bf5780634dda5222146102d257806367f5e4b8146102e5576101e5565b80631aedeabe116101c35780631aedeabe146102565780632e1a7d4d1461026d5780634032b72b1461028057806342189c8f14610293576101e5565b806314ae9f2e146101ea57806316f0115b146101ff57806319ab453c14610243575b600080fd5b6101fd6101f836600461328e565b610475565b005b6102267f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101fd61025136600461328e565b610604565b61025f60065481565b60405190815260200161023a565b6101fd61027b366004613467565b61087e565b6101fd61028e36600461328e565b6108fb565b61025f60045481565b6102af6102aa36600461328e565b610a7b565b604051901515815260200161023a565b6101fd6102cd36600461328e565b610a92565b6101fd6102e0366004613467565b610c45565b6101fd6102f3366004613467565b6110c7565b600354610226906001600160a01b031681565b6101fd611213565b600154610226906001600160a01b031681565b6101fd611362565b61025f60085481565b6103676040518060400160405280601181526020017052617269467573652d537472617465677960781b81525081565b60405161023a9190613559565b6101fd610382366004613497565b61141e565b6101fd611653565b6102267f000000000000000000000000000000000000000000000000000000000000000081565b600254610226906001600160a01b031681565b61025f60055481565b6101fd6103e036600461328e565b611700565b6101fd6103f336600461328e565b611a17565b61025f611be0565b6101fd61040e36600461328e565b611c6d565b61025f611f08565b600054610226906001600160a01b031681565b61025f61043c366004613467565b90565b6000546001600160a01b0316610226565b61036760405180604001604052806006815260200165332e302e313360d01b81525081565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ce57600080fd5b505afa1580156104e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050691906132aa565b6001600160a01b0316336001600160a01b03161461053f5760405162461bcd60e51b8152600401610536906135bc565b60405180910390fd5b600154604051631484968760e11b81526001600160a01b038381166004830152909116906329092d0e90602401602060405180830381600087803b15801561058657600080fd5b505af115801561059a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105be9190613382565b6106015760405162461bcd60e51b81526020600482015260146024820152731c995b5bdd994b5ad9595c195c8b59985a5b195960621b6044820152606401610536565b50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561065d57600080fd5b505afa158015610671573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069591906132aa565b6001600160a01b0316336001600160a01b0316146106c55760405162461bcd60e51b8152600401610536906135bc565b6001546001600160a01b03161561071e5760405162461bcd60e51b815260206004820152601b60248201527f6b65657065722d6c6973742d616c72656164792d6372656174656400000000006044820152606401610536565b6000819050806001600160a01b0316630fab4d256040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561075e57600080fd5b505af1158015610772573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079691906132aa565b600180546001600160a01b0319166001600160a01b03929092169182179055630a3b0a4f6107c13390565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381600087803b15801561080257600080fd5b505af1158015610816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083a9190613382565b61087a5760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610536565b5050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146108f25760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610536565b61060181611f9d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561095457600080fd5b505afa158015610968573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098c91906132aa565b6001600160a01b0316336001600160a01b0316146109bc5760405162461bcd60e51b8152600401610536906135bc565b600154604051630a3b0a4f60e01b81526001600160a01b03838116600483015290911690630a3b0a4f90602401602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190613382565b6106015760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610536565b6007546001600160a01b038281169116145b919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610aeb57600080fd5b505afa158015610aff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2391906132aa565b6001600160a01b0316336001600160a01b031614610b535760405162461bcd60e51b8152600401610536906135bc565b6001600160a01b038116610b9e5760405162461bcd60e51b8152602060048201526012602482015271736d2d616464726573732d69732d7a65726f60701b6044820152606401610536565b6003546001600160a01b0382811691161415610be95760405162461bcd60e51b815260206004820152600a602482015269736d2d69732d73616d6560b01b6044820152606401610536565b6003546040516001600160a01b038084169216907f2d19927e7cac08ceb98b38898a4fdff6da6a27295b9a2d62fe250408ebe044e190600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610c9e57600080fd5b505afa158015610cb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd691906132aa565b6001600160a01b0316336001600160a01b031614610d065760405162461bcd60e51b8152600401610536906135bc565b6000610d32827f0000000000000000000000000000000000000000000000000000000000000000612019565b6007549091506001600160a01b0380831691161415610d845760405162461bcd60e51b815260206004820152600e60248201526d1cd85b594b599d5cd94b5c1bdbdb60921b6044820152606401610536565b6007546040516370a0823160e01b81523060048201526001600160a01b039091169063db006a759082906370a082319060240160206040518083038186803b158015610dcf57600080fd5b505afa158015610de3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e07919061347f565b6040518263ffffffff1660e01b8152600401610e2591815260200190565b602060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e77919061347f565b15610ec45760405162461bcd60e51b815260206004820152601e60248201527f77697468647261772d66726f6d2d667573652d706f6f6c2d6661696c656400006044820152606401610536565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610f2657600080fd5b505afa158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e919061347f565b9050610f946001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383612209565b60405163140e25ad60e31b8152600481018290526001600160a01b0383169063a0712d6890602401602060405180830381600087803b158015610fd657600080fd5b505af1158015610fea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100e919061347f565b1561105b5760405162461bcd60e51b815260206004820152601b60248201527f6465706f7369742d746f2d667573652d706f6f6c2d6661696c656400000000006044820152606401610536565b6007546040516001600160a01b0380851692169085907f7725294be69fa7d941c001b388e2086daa9acdf58fbbc7aef3fd8cce3c316b6e90600090a450600780546001600160a01b039092166001600160a01b0319928316811790915560008054909216179055600855565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561112057600080fd5b505afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115891906132aa565b6001600160a01b0316336001600160a01b0316146111885760405162461bcd60e51b8152600401610536906135bc565b6127108111156111d35760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642d736c6970706167652d76616c756560501b6044820152606401610536565b60065460408051918252602082018390527ef1c5db862c7598b3b6765552ca951f498611e06412c2d57f8d0b58f82e7f82910160405180910390a1600655565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561126457600080fd5b505afa158015611278573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129c9190613382565b6112b85760405162461bcd60e51b81526004016105369061358c565b60008060006112c5612360565b6040516302df682360e11b815260048101849052602481018390526044810182905292955090935091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906305bed04690606401600060405180830381600087803b15801561133d57600080fd5b505af1158015611351573d6000803e3d6000fd5b5050505061135d6124c7565b505050565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156113b357600080fd5b505afa1580156113c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113eb9190613382565b6114075760405162461bcd60e51b81526004016105369061358c565b6114116000612634565b61141c600019612634565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561147757600080fd5b505afa15801561148b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114af91906132aa565b6001600160a01b0316336001600160a01b0316146114df5760405162461bcd60e51b8152600401610536906135bc565b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b15801561152d57600080fd5b505afa158015611541573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611565919061347f565b81106115aa5760405162461bcd60e51b81526020600482015260146024820152730d2dcecc2d8d2c85ae4deeae8cae45ad2dcc8caf60631b6044820152606401610536565b816115b55760045491505b603b82116115fd5760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590b5bdc9858db194b5c195c9a5bd9605a1b6044820152606401610536565b6004546005546040805192835260208301859052820152606081018290527f83bc5ab8030537fcf1d29c2334f6d22c26c82dcbe5ff03923d2cff5c692c0a7f9060800160405180910390a1600491909155600555565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156116a457600080fd5b505afa1580156116b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dc9190613382565b6116f85760405162461bcd60e51b81526004016105369061358c565b61141c6127fe565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146117745760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610536565b6001600160a01b0381166117ca5760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f000000006044820152606401610536565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561182d57600080fd5b505afa158015611841573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186591906132aa565b6001600160a01b0316146118b45760405162461bcd60e51b81526020600482015260166024820152756e6f742d76616c69642d6e65772d737472617465677960501b6044820152606401610536565b6000546040516370a0823160e01b81523060048201526119489183916001600160a01b03909116906370a082319060240160206040518083038186803b1580156118fd57600080fd5b505afa158015611911573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611935919061347f565b6000546001600160a01b031691906129b9565b6040516370a0823160e01b81523060048201526106019082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b60206040518083038186803b1580156119ae57600080fd5b505afa1580156119c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e6919061347f565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906129b9565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7057600080fd5b505afa158015611a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa891906132aa565b6001600160a01b0316336001600160a01b031614611ad85760405162461bcd60e51b8152600401610536906135bc565b6001600160a01b038116611b2e5760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f0000006044820152606401610536565b6002546001600160a01b0382811691161415611b845760405162461bcd60e51b81526020600482015260156024820152746665652d636f6c6c6563746f722d69732d73616d6560581b6044820152606401610536565b6002546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6007546040516370a0823160e01b8152306004820152600091611c68916001600160a01b03909116906370a08231906024015b60206040518083038186803b158015611c2b57600080fd5b505afa158015611c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c63919061347f565b6129e9565b905090565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611cbe57600080fd5b505afa158015611cd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf69190613382565b611d125760405162461bcd60e51b81526004016105369061358c565b6002546001600160a01b0316611d625760405162461bcd60e51b81526020600482015260156024820152741999594b58dbdb1b1958dd1bdc8b5b9bdd0b5cd95d605a1b6044820152606401610536565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611de45760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610536565b611ded81610a7b565b15611e315760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610536565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611e7157600254611e6c906001600160a01b031647612a94565b610601565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015611eb357600080fd5b505afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb919061347f565b60025490915061087a906001600160a01b038481169116836129b9565b6000611f12612bad565b6040516370a0823160e01b8152306004820152611c689073c00e94cb662c3520282e6f5717214004a7f26888906370a082319060240160206040518083038186803b158015611f6057600080fd5b505afa158015611f74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f98919061347f565b612c82565b611fa681612d89565b506040516370a0823160e01b8152306004820152610601907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401611996565b6040516315895f4760e31b815260048101839052600090819073835482fe0532f169024d5e9410199369aad5c77e9063ac4afa389060240160006040518083038186803b15801561206957600080fd5b505afa15801561207d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120a591908101906133a2565b509093505050506001600160a01b0381166121025760405162461bcd60e51b815260206004820152601d60248201527f726172692d667573652d696e76616c69642d636f6d7074726f6c6c65720000006044820152606401610536565b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141561212c57600092505b6040516318ffa3fd60e11b81526001600160a01b038481166004830152600091908316906331ff47fa9060240160206040518083038186803b15801561217157600080fd5b505afa158015612185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a991906132aa565b90506001600160a01b0381166122015760405162461bcd60e51b815260206004820152601860248201527f726172692d667573652d696e76616c69642d63746f6b656e00000000000000006044820152606401610536565b949350505050565b8015806122925750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561225857600080fd5b505afa15801561226c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612290919061347f565b155b6122fd5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610536565b6040516001600160a01b03831660248201526044810182905261135d90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612e7f565b604051636a9eee1360e11b81523060048201526000908190819081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d53ddc269060240160206040518083038186803b1580156123c857600080fd5b505afa1580156123dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612400919061347f565b604051639f2b283360e01b81523060048201529091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639f2b28339060240160206040518083038186803b15801561246557600080fd5b505afa158015612479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249d919061347f565b90506124a881612f51565b94506124b38161303f565b93506124be82613090565b92505050909192565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561252957600080fd5b505afa15801561253d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612561919061347f565b905080156106015760075460405163140e25ad60e31b8152600481018390526001600160a01b039091169063a0712d6890602401602060405180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e7919061347f565b156106015760405162461bcd60e51b815260206004820152601a60248201527f6465706f7369742d746f2d636f6d706f756e642d6661696c65640000000000006044820152606401610536565b6126886001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083612209565b6007546126c2906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612209565b60005b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b15801561271357600080fd5b505afa158015612727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274b919061347f565b81101561087a57600354604051636e74a6f760e01b8152600481018390526127ec916001600160a01b031690636e74a6f79060240160206040518083038186803b15801561279857600080fd5b505afa1580156127ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d091906132aa565b73c00e94cb662c3520282e6f5717214004a7f268889084612209565b806127f6816136c2565b9150506126c5565b60035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936128619373c00e94cb662c3520282e6f5717214004a7f268889373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29391929091016134d4565b602060405180830381600087803b15801561287b57600080fd5b505af115801561288f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b391906132aa565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21461141c5760035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936129679373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2937f00000000000000000000000000000000000000000000000000000000000000009391929091016134d4565b602060405180830381600087803b15801561298157600080fd5b505af1158015612995573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060191906132aa565b6040516001600160a01b03831660248201526044810182905261135d90849063a9059cbb60e01b90606401612329565b6000670de0b6b3a7640000600760009054906101000a90046001600160a01b03166001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4257600080fd5b505afa158015612a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7a919061347f565b612a84908461365c565b612a8e919061363c565b92915050565b80471015612ae45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610536565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612b31576040519150601f19603f3d011682016040523d82523d6000602084013e612b36565b606091505b505090508061135d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610536565b60408051600180825281830190925260009160208083019080368337505060075482519293506001600160a01b031691839150600090612bfd57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015260405162e1ed9760e51b8152733d9819210a31b4961b30ef54be2aed79b9c9cd3b90631c3db2e090612c4d90309085906004016134fd565b600060405180830381600087803b158015612c6757600080fd5b505af1158015612c7b573d6000803e3d6000fd5b5050505050565b60008115612d4d576003546040516340b4c54560e11b81526001600160a01b03909116906381698a8a90612cf59073c00e94cb662c3520282e6f5717214004a7f26888907f00000000000000000000000000000000000000000000000000000000000000009087906000906004016134d4565b60006040518083038186803b158015612d0d57600080fd5b505afa158015612d21573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d4991908101906132c6565b9150505b6007546040516370a0823160e01b8152306004820152612d7f916001600160a01b0316906370a0823190602401611c13565b612a8e9082613624565b6007546040516370a0823160e01b81523060048201526000918291612dc0916001600160a01b0316906370a0823190602401611c13565b90506000600760009054906101000a90046001600160a01b03166001600160a01b0316633b1d21a26040518163ffffffff1660e01b815260040160206040518083038186803b158015612e1257600080fd5b505afa158015612e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e4a919061347f565b90506000818510612e5b5781612e5d565b845b9050612e76838210612e6f5783612e71565b815b6130a1565b95945050505050565b6000612ed4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131789092919063ffffffff16565b80519091501561135d5780806020019051810190612ef29190613382565b61135d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610536565b6007546040516370a0823160e01b81523060048201526000918291612f88916001600160a01b0316906370a0823190602401611c13565b905082811115612fa157612f9f612e71848361367b565b505b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561300057600080fd5b505afa158015613014573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613038919061347f565b9392505050565b6007546040516370a0823160e01b81523060048201526000918291613076916001600160a01b0316906370a0823190602401611c13565b90508281101561308a57613038818461367b565b50919050565b60008115610a8d57612a8e82612d89565b600081156131745760075460405163852a12e360e01b8152600481018490526001600160a01b039091169063852a12e390602401602060405180830381600087803b1580156130ef57600080fd5b505af1158015613103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613127919061347f565b156131745760405162461bcd60e51b815260206004820152601d60248201527f77697468647261772d66726f6d2d636f6d706f756e642d6661696c65640000006044820152606401610536565b5090565b6060612201848460008585843b6131d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610536565b600080866001600160a01b031685876040516131ed91906134b8565b60006040518083038185875af1925050503d806000811461322a576040519150601f19603f3d011682016040523d82523d6000602084013e61322f565b606091505b509150915061323f82828661324a565b979650505050505050565b60608315613259575081613038565b8251156132695782518084602001fd5b8160405162461bcd60e51b81526004016105369190613559565b8051610a8d81613709565b60006020828403121561329f578081fd5b813561303881613709565b6000602082840312156132bb578081fd5b815161303881613709565b600080604083850312156132d8578081fd5b825167ffffffffffffffff808211156132ef578283fd5b818501915085601f830112613302578283fd5b8151602082821115613316576133166136f3565b8160051b92506133278184016135f3565b8281528181019085830185870184018b1015613341578788fd5b8796505b8487101561336f578051955061335a86613709565b85835260019690960195918301918301613345565b5097909101519698969750505050505050565b600060208284031215613393578081fd5b81518015158114613038578182fd5b600080600080600060a086880312156133b9578081fd5b855167ffffffffffffffff808211156133d0578283fd5b818801915088601f8301126133e3578283fd5b8151818111156133f5576133f56136f3565b613408601f8201601f19166020016135f3565b915080825289602082850101111561341e578384fd5b61342f816020840160208601613692565b509550613440905060208701613283565b935061344e60408701613283565b6060870151608090970151959894975095949392505050565b600060208284031215613478578081fd5b5035919050565b600060208284031215613490578081fd5b5051919050565b600080604083850312156134a9578182fd5b50508035926020909101359150565b600082516134ca818460208701613692565b9190910192915050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b8181101561354b57855185168352948301949183019160010161352d565b509098975050505050505050565b6000602082528251806020840152613578816040850160208701613692565b601f01601f19169190910160400192915050565b60208082526016908201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b604082015260600190565b6020808252601a908201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f72000000000000604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561361c5761361c6136f3565b604052919050565b60008219821115613637576136376136dd565b500190565b60008261365757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613676576136766136dd565b500290565b60008282101561368d5761368d6136dd565b500390565b60005b838110156136ad578181015183820152602001613695565b838111156136bc576000848401525b50505050565b60006000198214156136d6576136d66136dd565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461060157600080fdfea26469706673582212209814722e6bba464ffcdb99e1868133b12e2380c5573147cdd7d1e67b236bfdb864736f6c634300080300330000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee000000000000000000000000e382d9f2394a359b01006faa8a1864b8a60d27100000000000000000000000000000000000000000000000000000000000000006
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80639b0db5d01161010f578063d2c35ce8116100a2578063ec78e83211610071578063ec78e8321461041b578063fb589de21461042e578063fc0c546a1461043f578063ffa1ad7414610450576101e5565b8063d2c35ce8146103e5578063d4c3eea0146103f8578063e00af4a714610400578063e645c20214610413576101e5565b8063b2016bd4116100de578063b2016bd41461038f578063c415b95c146103b6578063cd2d7ebe146103c9578063ce5494bb146103d2576101e5565b80639b0db5d01461032e578063a3f4df7e14610337578063a923b2a614610374578063aa10188614610387576101e5565b8063440d724811610187578063709d039d11610156578063709d039d146102f85780637d7c2a1c1461030b578063951dc22c1461031357806399b71d5c14610326576101e5565b8063440d72481461029c5780634c36fad7146102bf5780634dda5222146102d257806367f5e4b8146102e5576101e5565b80631aedeabe116101c35780631aedeabe146102565780632e1a7d4d1461026d5780634032b72b1461028057806342189c8f14610293576101e5565b806314ae9f2e146101ea57806316f0115b146101ff57806319ab453c14610243575b600080fd5b6101fd6101f836600461328e565b610475565b005b6102267f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee81565b6040516001600160a01b0390911681526020015b60405180910390f35b6101fd61025136600461328e565b610604565b61025f60065481565b60405190815260200161023a565b6101fd61027b366004613467565b61087e565b6101fd61028e36600461328e565b6108fb565b61025f60045481565b6102af6102aa36600461328e565b610a7b565b604051901515815260200161023a565b6101fd6102cd36600461328e565b610a92565b6101fd6102e0366004613467565b610c45565b6101fd6102f3366004613467565b6110c7565b600354610226906001600160a01b031681565b6101fd611213565b600154610226906001600160a01b031681565b6101fd611362565b61025f60085481565b6103676040518060400160405280601181526020017052617269467573652d537472617465677960781b81525081565b60405161023a9190613559565b6101fd610382366004613497565b61141e565b6101fd611653565b6102267f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b600254610226906001600160a01b031681565b61025f60055481565b6101fd6103e036600461328e565b611700565b6101fd6103f336600461328e565b611a17565b61025f611be0565b6101fd61040e36600461328e565b611c6d565b61025f611f08565b600054610226906001600160a01b031681565b61025f61043c366004613467565b90565b6000546001600160a01b0316610226565b61036760405180604001604052806006815260200165332e302e313360d01b81525081565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ce57600080fd5b505afa1580156104e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050691906132aa565b6001600160a01b0316336001600160a01b03161461053f5760405162461bcd60e51b8152600401610536906135bc565b60405180910390fd5b600154604051631484968760e11b81526001600160a01b038381166004830152909116906329092d0e90602401602060405180830381600087803b15801561058657600080fd5b505af115801561059a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105be9190613382565b6106015760405162461bcd60e51b81526020600482015260146024820152731c995b5bdd994b5ad9595c195c8b59985a5b195960621b6044820152606401610536565b50565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561065d57600080fd5b505afa158015610671573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069591906132aa565b6001600160a01b0316336001600160a01b0316146106c55760405162461bcd60e51b8152600401610536906135bc565b6001546001600160a01b03161561071e5760405162461bcd60e51b815260206004820152601b60248201527f6b65657065722d6c6973742d616c72656164792d6372656174656400000000006044820152606401610536565b6000819050806001600160a01b0316630fab4d256040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561075e57600080fd5b505af1158015610772573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079691906132aa565b600180546001600160a01b0319166001600160a01b03929092169182179055630a3b0a4f6107c13390565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381600087803b15801561080257600080fd5b505af1158015610816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083a9190613382565b61087a5760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610536565b5050565b337f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316146108f25760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610536565b61060181611f9d565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561095457600080fd5b505afa158015610968573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098c91906132aa565b6001600160a01b0316336001600160a01b0316146109bc5760405162461bcd60e51b8152600401610536906135bc565b600154604051630a3b0a4f60e01b81526001600160a01b03838116600483015290911690630a3b0a4f90602401602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190613382565b6106015760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610536565b6007546001600160a01b038281169116145b919050565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610aeb57600080fd5b505afa158015610aff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2391906132aa565b6001600160a01b0316336001600160a01b031614610b535760405162461bcd60e51b8152600401610536906135bc565b6001600160a01b038116610b9e5760405162461bcd60e51b8152602060048201526012602482015271736d2d616464726573732d69732d7a65726f60701b6044820152606401610536565b6003546001600160a01b0382811691161415610be95760405162461bcd60e51b815260206004820152600a602482015269736d2d69732d73616d6560b01b6044820152606401610536565b6003546040516001600160a01b038084169216907f2d19927e7cac08ceb98b38898a4fdff6da6a27295b9a2d62fe250408ebe044e190600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610c9e57600080fd5b505afa158015610cb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd691906132aa565b6001600160a01b0316336001600160a01b031614610d065760405162461bcd60e51b8152600401610536906135bc565b6000610d32827f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f612019565b6007549091506001600160a01b0380831691161415610d845760405162461bcd60e51b815260206004820152600e60248201526d1cd85b594b599d5cd94b5c1bdbdb60921b6044820152606401610536565b6007546040516370a0823160e01b81523060048201526001600160a01b039091169063db006a759082906370a082319060240160206040518083038186803b158015610dcf57600080fd5b505afa158015610de3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e07919061347f565b6040518263ffffffff1660e01b8152600401610e2591815260200190565b602060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e77919061347f565b15610ec45760405162461bcd60e51b815260206004820152601e60248201527f77697468647261772d66726f6d2d667573652d706f6f6c2d6661696c656400006044820152606401610536565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906370a082319060240160206040518083038186803b158015610f2657600080fd5b505afa158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e919061347f565b9050610f946001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f168383612209565b60405163140e25ad60e31b8152600481018290526001600160a01b0383169063a0712d6890602401602060405180830381600087803b158015610fd657600080fd5b505af1158015610fea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100e919061347f565b1561105b5760405162461bcd60e51b815260206004820152601b60248201527f6465706f7369742d746f2d667573652d706f6f6c2d6661696c656400000000006044820152606401610536565b6007546040516001600160a01b0380851692169085907f7725294be69fa7d941c001b388e2086daa9acdf58fbbc7aef3fd8cce3c316b6e90600090a450600780546001600160a01b039092166001600160a01b0319928316811790915560008054909216179055600855565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561112057600080fd5b505afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115891906132aa565b6001600160a01b0316336001600160a01b0316146111885760405162461bcd60e51b8152600401610536906135bc565b6127108111156111d35760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642d736c6970706167652d76616c756560501b6044820152606401610536565b60065460408051918252602082018390527ef1c5db862c7598b3b6765552ca951f498611e06412c2d57f8d0b58f82e7f82910160405180910390a1600655565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561126457600080fd5b505afa158015611278573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129c9190613382565b6112b85760405162461bcd60e51b81526004016105369061358c565b60008060006112c5612360565b6040516302df682360e11b815260048101849052602481018390526044810182905292955090935091506001600160a01b037f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee16906305bed04690606401600060405180830381600087803b15801561133d57600080fd5b505af1158015611351573d6000803e3d6000fd5b5050505061135d6124c7565b505050565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156113b357600080fd5b505afa1580156113c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113eb9190613382565b6114075760405162461bcd60e51b81526004016105369061358c565b6114116000612634565b61141c600019612634565b565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561147757600080fd5b505afa15801561148b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114af91906132aa565b6001600160a01b0316336001600160a01b0316146114df5760405162461bcd60e51b8152600401610536906135bc565b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b15801561152d57600080fd5b505afa158015611541573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611565919061347f565b81106115aa5760405162461bcd60e51b81526020600482015260146024820152730d2dcecc2d8d2c85ae4deeae8cae45ad2dcc8caf60631b6044820152606401610536565b816115b55760045491505b603b82116115fd5760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590b5bdc9858db194b5c195c9a5bd9605a1b6044820152606401610536565b6004546005546040805192835260208301859052820152606081018290527f83bc5ab8030537fcf1d29c2334f6d22c26c82dcbe5ff03923d2cff5c692c0a7f9060800160405180910390a1600491909155600555565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156116a457600080fd5b505afa1580156116b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dc9190613382565b6116f85760405162461bcd60e51b81526004016105369061358c565b61141c6127fe565b337f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316146117745760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610536565b6001600160a01b0381166117ca5760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f000000006044820152606401610536565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561182d57600080fd5b505afa158015611841573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186591906132aa565b6001600160a01b0316146118b45760405162461bcd60e51b81526020600482015260166024820152756e6f742d76616c69642d6e65772d737472617465677960501b6044820152606401610536565b6000546040516370a0823160e01b81523060048201526119489183916001600160a01b03909116906370a082319060240160206040518083038186803b1580156118fd57600080fd5b505afa158015611911573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611935919061347f565b6000546001600160a01b031691906129b9565b6040516370a0823160e01b81523060048201526106019082906001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16906370a08231906024015b60206040518083038186803b1580156119ae57600080fd5b505afa1580156119c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e6919061347f565b6001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f1691906129b9565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7057600080fd5b505afa158015611a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa891906132aa565b6001600160a01b0316336001600160a01b031614611ad85760405162461bcd60e51b8152600401610536906135bc565b6001600160a01b038116611b2e5760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f0000006044820152606401610536565b6002546001600160a01b0382811691161415611b845760405162461bcd60e51b81526020600482015260156024820152746665652d636f6c6c6563746f722d69732d73616d6560581b6044820152606401610536565b6002546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6007546040516370a0823160e01b8152306004820152600091611c68916001600160a01b03909116906370a08231906024015b60206040518083038186803b158015611c2b57600080fd5b505afa158015611c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c63919061347f565b6129e9565b905090565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611cbe57600080fd5b505afa158015611cd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf69190613382565b611d125760405162461bcd60e51b81526004016105369061358c565b6002546001600160a01b0316611d625760405162461bcd60e51b81526020600482015260156024820152741999594b58dbdb1b1958dd1bdc8b5b9bdd0b5cd95d605a1b6044820152606401610536565b7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316816001600160a01b03161415611de45760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610536565b611ded81610a7b565b15611e315760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610536565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611e7157600254611e6c906001600160a01b031647612a94565b610601565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015611eb357600080fd5b505afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb919061347f565b60025490915061087a906001600160a01b038481169116836129b9565b6000611f12612bad565b6040516370a0823160e01b8152306004820152611c689073c00e94cb662c3520282e6f5717214004a7f26888906370a082319060240160206040518083038186803b158015611f6057600080fd5b505afa158015611f74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f98919061347f565b612c82565b611fa681612d89565b506040516370a0823160e01b8152306004820152610601907f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee906001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16906370a0823190602401611996565b6040516315895f4760e31b815260048101839052600090819073835482fe0532f169024d5e9410199369aad5c77e9063ac4afa389060240160006040518083038186803b15801561206957600080fd5b505afa15801561207d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120a591908101906133a2565b509093505050506001600160a01b0381166121025760405162461bcd60e51b815260206004820152601d60248201527f726172692d667573652d696e76616c69642d636f6d7074726f6c6c65720000006044820152606401610536565b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141561212c57600092505b6040516318ffa3fd60e11b81526001600160a01b038481166004830152600091908316906331ff47fa9060240160206040518083038186803b15801561217157600080fd5b505afa158015612185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a991906132aa565b90506001600160a01b0381166122015760405162461bcd60e51b815260206004820152601860248201527f726172692d667573652d696e76616c69642d63746f6b656e00000000000000006044820152606401610536565b949350505050565b8015806122925750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561225857600080fd5b505afa15801561226c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612290919061347f565b155b6122fd5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610536565b6040516001600160a01b03831660248201526044810182905261135d90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612e7f565b604051636a9eee1360e11b81523060048201526000908190819081906001600160a01b037f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee169063d53ddc269060240160206040518083038186803b1580156123c857600080fd5b505afa1580156123dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612400919061347f565b604051639f2b283360e01b81523060048201529091506000906001600160a01b037f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee1690639f2b28339060240160206040518083038186803b15801561246557600080fd5b505afa158015612479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249d919061347f565b90506124a881612f51565b94506124b38161303f565b93506124be82613090565b92505050909192565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906370a082319060240160206040518083038186803b15801561252957600080fd5b505afa15801561253d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612561919061347f565b905080156106015760075460405163140e25ad60e31b8152600481018390526001600160a01b039091169063a0712d6890602401602060405180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e7919061347f565b156106015760405162461bcd60e51b815260206004820152601a60248201527f6465706f7369742d746f2d636f6d706f756e642d6661696c65640000000000006044820152606401610536565b6126886001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f167f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee83612209565b6007546126c2906001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f8116911683612209565b60005b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b15801561271357600080fd5b505afa158015612727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274b919061347f565b81101561087a57600354604051636e74a6f760e01b8152600481018390526127ec916001600160a01b031690636e74a6f79060240160206040518083038186803b15801561279857600080fd5b505afa1580156127ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d091906132aa565b73c00e94cb662c3520282e6f5717214004a7f268889084612209565b806127f6816136c2565b9150506126c5565b60035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936128619373c00e94cb662c3520282e6f5717214004a7f268889373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29391929091016134d4565b602060405180830381600087803b15801561287b57600080fd5b505af115801561288f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b391906132aa565b507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21461141c5760035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936129679373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2937f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f9391929091016134d4565b602060405180830381600087803b15801561298157600080fd5b505af1158015612995573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060191906132aa565b6040516001600160a01b03831660248201526044810182905261135d90849063a9059cbb60e01b90606401612329565b6000670de0b6b3a7640000600760009054906101000a90046001600160a01b03166001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4257600080fd5b505afa158015612a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7a919061347f565b612a84908461365c565b612a8e919061363c565b92915050565b80471015612ae45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610536565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612b31576040519150601f19603f3d011682016040523d82523d6000602084013e612b36565b606091505b505090508061135d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610536565b60408051600180825281830190925260009160208083019080368337505060075482519293506001600160a01b031691839150600090612bfd57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015260405162e1ed9760e51b8152733d9819210a31b4961b30ef54be2aed79b9c9cd3b90631c3db2e090612c4d90309085906004016134fd565b600060405180830381600087803b158015612c6757600080fd5b505af1158015612c7b573d6000803e3d6000fd5b5050505050565b60008115612d4d576003546040516340b4c54560e11b81526001600160a01b03909116906381698a8a90612cf59073c00e94cb662c3520282e6f5717214004a7f26888907f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f9087906000906004016134d4565b60006040518083038186803b158015612d0d57600080fd5b505afa158015612d21573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d4991908101906132c6565b9150505b6007546040516370a0823160e01b8152306004820152612d7f916001600160a01b0316906370a0823190602401611c13565b612a8e9082613624565b6007546040516370a0823160e01b81523060048201526000918291612dc0916001600160a01b0316906370a0823190602401611c13565b90506000600760009054906101000a90046001600160a01b03166001600160a01b0316633b1d21a26040518163ffffffff1660e01b815260040160206040518083038186803b158015612e1257600080fd5b505afa158015612e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e4a919061347f565b90506000818510612e5b5781612e5d565b845b9050612e76838210612e6f5783612e71565b815b6130a1565b95945050505050565b6000612ed4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131789092919063ffffffff16565b80519091501561135d5780806020019051810190612ef29190613382565b61135d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610536565b6007546040516370a0823160e01b81523060048201526000918291612f88916001600160a01b0316906370a0823190602401611c13565b905082811115612fa157612f9f612e71848361367b565b505b6040516370a0823160e01b81523060048201527f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906370a082319060240160206040518083038186803b15801561300057600080fd5b505afa158015613014573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613038919061347f565b9392505050565b6007546040516370a0823160e01b81523060048201526000918291613076916001600160a01b0316906370a0823190602401611c13565b90508281101561308a57613038818461367b565b50919050565b60008115610a8d57612a8e82612d89565b600081156131745760075460405163852a12e360e01b8152600481018490526001600160a01b039091169063852a12e390602401602060405180830381600087803b1580156130ef57600080fd5b505af1158015613103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613127919061347f565b156131745760405162461bcd60e51b815260206004820152601d60248201527f77697468647261772d66726f6d2d636f6d706f756e642d6661696c65640000006044820152606401610536565b5090565b6060612201848460008585843b6131d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610536565b600080866001600160a01b031685876040516131ed91906134b8565b60006040518083038185875af1925050503d806000811461322a576040519150601f19603f3d011682016040523d82523d6000602084013e61322f565b606091505b509150915061323f82828661324a565b979650505050505050565b60608315613259575081613038565b8251156132695782518084602001fd5b8160405162461bcd60e51b81526004016105369190613559565b8051610a8d81613709565b60006020828403121561329f578081fd5b813561303881613709565b6000602082840312156132bb578081fd5b815161303881613709565b600080604083850312156132d8578081fd5b825167ffffffffffffffff808211156132ef578283fd5b818501915085601f830112613302578283fd5b8151602082821115613316576133166136f3565b8160051b92506133278184016135f3565b8281528181019085830185870184018b1015613341578788fd5b8796505b8487101561336f578051955061335a86613709565b85835260019690960195918301918301613345565b5097909101519698969750505050505050565b600060208284031215613393578081fd5b81518015158114613038578182fd5b600080600080600060a086880312156133b9578081fd5b855167ffffffffffffffff808211156133d0578283fd5b818801915088601f8301126133e3578283fd5b8151818111156133f5576133f56136f3565b613408601f8201601f19166020016135f3565b915080825289602082850101111561341e578384fd5b61342f816020840160208601613692565b509550613440905060208701613283565b935061344e60408701613283565b6060870151608090970151959894975095949392505050565b600060208284031215613478578081fd5b5035919050565b600060208284031215613490578081fd5b5051919050565b600080604083850312156134a9578182fd5b50508035926020909101359150565b600082516134ca818460208701613692565b9190910192915050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b8181101561354b57855185168352948301949183019160010161352d565b509098975050505050505050565b6000602082528251806020840152613578816040850160208701613692565b601f01601f19169190910160400192915050565b60208082526016908201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b604082015260600190565b6020808252601a908201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f72000000000000604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561361c5761361c6136f3565b604052919050565b60008219821115613637576136376136dd565b500190565b60008261365757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613676576136766136dd565b500290565b60008282101561368d5761368d6136dd565b500390565b60005b838110156136ad578181015183820152602001613695565b838111156136bc576000848401525b50505050565b60006000198214156136d6576136d66136dd565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461060157600080fdfea26469706673582212209814722e6bba464ffcdb99e1868133b12e2380c5573147cdd7d1e67b236bfdb864736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee000000000000000000000000e382d9f2394a359b01006faa8a1864b8a60d27100000000000000000000000000000000000000000000000000000000000000006
-----Decoded View---------------
Arg [0] : _pool (address): 0x0538C8bAc84E95A9dF8aC10Aad17DbE81b9E36ee
Arg [1] : _swapManager (address): 0xe382d9f2394A359B01006faa8A1864b8a60d2710
Arg [2] : _fusePoolId (uint256): 6
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee
Arg [1] : 000000000000000000000000e382d9f2394a359b01006faa8a1864b8a60d2710
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000006
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.