Address Details
contract

0xEEdDB10353768f8C54320E84f5104Ae765b0419f

Contract Name
AaveStrategy
Creator
0x913503–14682a at 0x51c621–38557a
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
2 Transactions
Transfers
6,385 Transfers
Gas Used
50,582
Last Balance Update
24309872
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
AaveStrategy




Optimization enabled
true
Compiler version
v0.8.7+commit.e28d00a7




Optimization runs
1500
EVM Version
london




Verified at
2022-08-25T12:16:22.252158Z

project:/contracts/strategies/AaveStrategy.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

import "./IStrategy.sol";
import "../aave/ILendingPoolAddressesProvider.sol";
import "../aave/ILendingPool.sol";
import "../aave/AToken.sol";
import "../aave/IWETHGateway.sol";
import "../aave/IncentiveController.sol";
import "../polygon/WrappedToken.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

//*********************************************************************//
// --------------------------- custom errors ------------------------- //
//*********************************************************************//
error INVALID_DATA_PROVIDER();
error INVALID_LENDING_POOL_ADDRESS_PROVIDER();
error INVALID_TRANSACTIONAL_TOKEN_SENDER();
error TOKEN_TRANSFER_FAILURE();
error TRANSACTIONAL_TOKEN_TRANSFER_FAILURE();

/**
  @notice
  Interacts with Aave V2 protocol (or forks) to generate interest for the pool.
  This contract it's responsible for deposits and withdrawals to the external pool
  as well as getting the generated rewards and sending them back to the pool.
  @author Francis Odisi & Viraz Malhotra.
*/
contract AaveStrategy is Ownable, IStrategy {
    /// @notice Aave referral code
    uint16 constant REFERRAL_CODE = 155;

    /// @notice Address of the Aave V2 incentive controller contract
    IncentiveController public immutable incentiveController;

    /// @notice Address of the Aave V2 weth gateway contract
    IWETHGateway public immutable wethGateway;

    /// @notice Which Aave instance we use to swap Inbound Token to interest bearing aDAI
    ILendingPoolAddressesProvider public immutable lendingPoolAddressProvider;

    /// @notice Lending pool address
    ILendingPool public immutable lendingPool;

    /// @notice Atoken address
    AToken public immutable aToken;

    /// @notice AaveProtocolDataProvider address
    AaveProtocolDataProvider public dataProvider;

    /// @notice reward token address for eg wmatic in case of polygon deployment
    IERC20 public rewardToken;

    //*********************************************************************//
    // ------------------------- external views -------------------------- //
    //*********************************************************************//

    /** 
    @notice
    Get strategy owner address.
    @return Strategy owner.
    */
    function strategyOwner() external view override returns (address) {
        return super.owner();
    }

    /** 
    @notice
    Returns the total accumulated amount (i.e., principal + interest) stored in curve.
    Intended for usage by external clients and in case of variable deposit pools.
    @return Total accumulated amount.
    */
    function getTotalAmount() external view override returns (uint256) {
        return aToken.balanceOf(address(this));
    }

    /** 
    @notice
    Get the expected net deposit amount (amount minus slippage) for a given amount. Used only for AMM strategies.
    @return net amount.
    */
    function getNetDepositAmount(uint256 _amount) external pure override returns (uint256) {
        return _amount;
    }

    /** 
    @notice
    Returns the underlying inbound (deposit) token address.
    @return Underlying token address.
    */
    function getUnderlyingAsset() external view override returns (address) {
        return aToken.UNDERLYING_ASSET_ADDRESS();
    }

    /** 
    @notice
    Returns the instances of the reward tokens
    */
    function getRewardTokens() external view override returns (IERC20[] memory) {
        IERC20[] memory tokens = new IERC20[](1);
        tokens[0] = rewardToken;
        return tokens;
    }

    //*********************************************************************//
    // -------------------------- constructor ---------------------------- //
    //*********************************************************************//

    /** 
    @param _lendingPoolAddressProvider A contract which is used as a registry on aave.
    @param _wethGateway A contract which is used to make deposits/withdrawals on transaction token pool on aave.
    @param _dataProvider A contract which mints ERC-721's that represent project ownership and transfers.
    @param _incentiveController A contract which acts as a registry for reserve tokens on aave.
    @param _rewardToken A contract which acts as the reward token for this strategy.
    @param _inboundCurrency inbound currency address.
  */
    constructor(
        ILendingPoolAddressesProvider _lendingPoolAddressProvider,
        IWETHGateway _wethGateway,
        address _dataProvider,
        address _incentiveController,
        IERC20 _rewardToken,
        address _inboundCurrency
    ) {
        if (address(_lendingPoolAddressProvider) == address(0)) {
            revert INVALID_LENDING_POOL_ADDRESS_PROVIDER();
        }

        if (address(_dataProvider) == address(0)) {
            revert INVALID_DATA_PROVIDER();
        }

        lendingPoolAddressProvider = _lendingPoolAddressProvider;
        // address(0) for non-polygon deployment
        incentiveController = IncentiveController(_incentiveController);
        dataProvider = AaveProtocolDataProvider(_dataProvider);
        // lending pool needs to be approved in v2 since it is the core contract in v2 and not lending pool core
        lendingPool = ILendingPool(_lendingPoolAddressProvider.getLendingPool());
        wethGateway = _wethGateway;
        rewardToken = _rewardToken;
        address aTokenAddress;
        if (_inboundCurrency == address(0)) {
            (aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(address(rewardToken));
        } else {
            (aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_inboundCurrency);
        }
        aToken = AToken(aTokenAddress);
    }

    /**
    @notice
    Deposits funds into aave.
    @param _inboundCurrency Address of the inbound token.
    @param _minAmount Used for aam strategies, since every strategy overrides from the same strategy interface hence it is defined here.
    _minAmount isn't needed in this strategy but since all strategies override from the same interface and the amm strategies need it hence it is used here.
    */
    function invest(address _inboundCurrency, uint256 _minAmount) external payable override onlyOwner {
        if (_inboundCurrency == address(0) || _inboundCurrency == address(rewardToken)) {
            if (_inboundCurrency == address(rewardToken)) {
                // unwraps WrappedToken back into Native Token
                // UPDATE - A6 Audit Report
                WrappedToken(address(rewardToken)).withdraw(IERC20(_inboundCurrency).balanceOf(address(this)));
            }
            // Deposits MATIC into the pool
            wethGateway.depositETH{ value: address(this).balance }(address(lendingPool), address(this), REFERRAL_CODE);
        } else {
            uint256 balance = IERC20(_inboundCurrency).balanceOf(address(this));
            IERC20(_inboundCurrency).approve(address(lendingPool), balance);
            lendingPool.deposit(_inboundCurrency, balance, address(this), REFERRAL_CODE);
        }
    }

    /**
    @notice
    Withdraws funds from aave in case of an early withdrawal.
    @param _inboundCurrency Address of the inbound token.
    @param _amount Amount to withdraw.
    @param _minAmount Used for aam strategies, since every strategy overrides from the same strategy interface hence it is defined here.
    _minAmount isn't needed in this strategy but since all strategies override from the same interface and the amm strategies need it hence it is used here.
    */
    function earlyWithdraw(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount
    ) external override onlyOwner {
        if (_inboundCurrency == address(0) || _inboundCurrency == address(rewardToken)) {
            aToken.approve(address(wethGateway), _amount);

            wethGateway.withdrawETH(address(lendingPool), _amount, address(this));
            if (_inboundCurrency == address(rewardToken)) {
                // Wraps MATIC back into WMATIC
                WrappedToken(address(rewardToken)).deposit{ value: _amount }();
            }
        } else {
            lendingPool.withdraw(_inboundCurrency, _amount, address(this));
        }
        if (_inboundCurrency == address(0)) {
            (bool success, ) = msg.sender.call{ value: _amount }("");
            if (!success) {
                revert TRANSACTIONAL_TOKEN_TRANSFER_FAILURE();
            }
        } else {
            bool success = IERC20(_inboundCurrency).transfer(msg.sender, _amount);
            if (!success) {
                revert TOKEN_TRANSFER_FAILURE();
            }
        }
    }

    /**
    @notice
    Redeems funds from aave when the waiting round for the good ghosting pool is over.
    @param _inboundCurrency Address of the inbound token.
    @param _amount Amount to withdraw.
    @param _minAmount Used for aam strategies, since every strategy overrides from the same strategy interface hence it is defined here.
    _minAmount isn't needed in this strategy but since all strategies override from the same interface and the amm strategies need it hence it is used here.
    @param disableRewardTokenClaim Reward claim disable flag.
    */
    function redeem(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount,
        bool disableRewardTokenClaim
    ) external override onlyOwner {
        // Withdraws funds (principal + interest + rewards) from external pool
        if (_inboundCurrency == address(0) || _inboundCurrency == address(rewardToken)) {
            aToken.approve(address(wethGateway), _amount);

            wethGateway.withdrawETH(address(lendingPool), _amount, address(this));
            if (_inboundCurrency == address(rewardToken)) {
                // Wraps MATIC back into WMATIC
                WrappedToken(address(rewardToken)).deposit{ value: address(this).balance }();
            }
        } else {
            lendingPool.withdraw(_inboundCurrency, _amount, address(this));
        }
        if (!disableRewardTokenClaim) {
            // Claims the rewards from the external pool
            address[] memory assets = new address[](1);
            assets[0] = address(aToken);

            if (address(rewardToken) != address(0)) {
                // safety check for external services calling this function.
                // Aave forks like Moola may not have an incentive controller (it is set to address(0)).
                uint256 claimableRewards = incentiveController.getRewardsBalance(assets, address(this));
                // moola the celo version of aave does not have the incentive controller logic
                if (claimableRewards != 0) {
                    incentiveController.claimRewards(assets, claimableRewards, address(this));
                }
                // moola the celo version of aave does not have the incentive controller logic
                if (rewardToken.balanceOf(address(this)) != 0) {
                    bool success = rewardToken.transfer(msg.sender, rewardToken.balanceOf(address(this)));
                    if (!success) {
                        revert TOKEN_TRANSFER_FAILURE();
                    }
                }
            }
        }

        if (_inboundCurrency == address(0)) {
            (bool txTokenTransferSuccessful, ) = msg.sender.call{ value: address(this).balance }("");
            if (!txTokenTransferSuccessful) {
                revert TRANSACTIONAL_TOKEN_TRANSFER_FAILURE();
            }
        } else {
            bool success = IERC20(_inboundCurrency).transfer(
                msg.sender,
                IERC20(_inboundCurrency).balanceOf(address(this))
            );
            if (!success) {
                revert TOKEN_TRANSFER_FAILURE();
            }
        }
    }

    /**
    @notice
    Returns total accumulated reward token amount.
    @param disableRewardTokenClaim Reward claim disable flag.
    */
    function getAccumulatedRewardTokenAmounts(bool disableRewardTokenClaim)
        external
        view
        override
        returns (uint256[] memory)
    {
        uint256 amount = 0;
        // safety check for external services calling this function.
        // Aave forks like Moola may not have an incentive controller (it is set to address(0)).
        if (!disableRewardTokenClaim && address(incentiveController) != address(0)) {
            // atoken address in v2 is fetched from data provider contract
            // Claims the rewards from the external pool
            address[] memory assets = new address[](1);
            assets[0] = address(aToken);
            amount = incentiveController.getRewardsBalance(assets, address(this));
        }
        uint256[] memory amounts = new uint256[](1);
        amounts[0] = amount;
        return amounts;
    }

    // Fallback Functions for calldata and reciever for handling only ether transfer
    // UPDATE - A7 Audit Report
    receive() external payable {
        if (msg.sender != address(rewardToken) && msg.sender != address(wethGateway)) {
            revert INVALID_TRANSACTIONAL_TOKEN_SENDER();
        }
    }
}
        

/_openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
          

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}
          

/_openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}
          

/project_/contracts/aave/AToken.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

interface AToken {
    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

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

    function UNDERLYING_ASSET_ADDRESS() external view returns (address);
}
          

/project_/contracts/aave/ILendingPool.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

interface ILendingPool {
    function deposit(
        address _reserve,
        uint256 _amount,
        address onBehalfOf,
        uint16 _referralCode
    ) external;

    function withdraw(
        address asset,
        uint256 amount,
        address to
    ) external;
}

interface AaveProtocolDataProvider {
    function getReserveTokensAddresses(address asset)
        external
        view
        returns (
            address,
            address,
            address
        );
}
          

/project_/contracts/aave/ILendingPoolAddressesProvider.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

abstract contract ILendingPoolAddressesProvider {
    function getLendingPool() public view virtual returns (address);

    function setLendingPoolImpl(address _pool) public virtual;

    function getAddress(bytes32 id) public view virtual returns (address);

    function getLendingPoolCore() public view virtual returns (address payable);

    function setLendingPoolCoreImpl(address _lendingPoolCore) public virtual;

    function getLendingPoolConfigurator() public view virtual returns (address);

    function setLendingPoolConfiguratorImpl(address _configurator) public virtual;

    function getLendingPoolDataProvider() public view virtual returns (address);

    function setLendingPoolDataProviderImpl(address _provider) public virtual;

    function getLendingPoolParametersProvider() public view virtual returns (address);

    function setLendingPoolParametersProviderImpl(address _parametersProvider) public virtual;

    function getTokenDistributor() public view virtual returns (address);

    function setTokenDistributor(address _tokenDistributor) public virtual;

    function getFeeProvider() public view virtual returns (address);

    function setFeeProviderImpl(address _feeProvider) public virtual;

    function getLendingPoolLiquidationManager() public view virtual returns (address);

    function setLendingPoolLiquidationManager(address _manager) public virtual;

    function getLendingPoolManager() public view virtual returns (address);

    function setLendingPoolManager(address _lendingPoolManager) public virtual;

    function getPriceOracle() public view virtual returns (address);

    function setPriceOracle(address _priceOracle) public virtual;

    function getLendingRateOracle() public view virtual returns (address);

    function setLendingRateOracle(address _lendingRateOracle) public virtual;
}
          

/project_/contracts/aave/IWETHGateway.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

interface IWETHGateway {
    function depositETH(
        address lendingPool,
        address onBehalfOf,
        uint16 referralCode
    ) external payable;

    function withdrawETH(
        address lendingPool,
        uint256 amount,
        address to
    ) external;
}
          

/project_/contracts/aave/IncentiveController.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

interface IncentiveController {
    function getRewardsBalance(address[] calldata assets, address user) external view returns (uint256);

    function claimRewards(
        address[] calldata assets,
        uint256 amount,
        address to
    ) external returns (uint256);
}
          

/project_/contracts/polygon/WrappedToken.sol

pragma solidity 0.8.7;

interface WrappedToken {
    function deposit() external payable;

    function withdraw(uint256 wad) external;

    function totalSupply() external view returns (uint256);

    function approve(address guy, uint256 wad) external returns (bool);

    function transfer(address dst, uint256 wad) external returns (bool);

    function transferFrom(
        address src,
        address dst,
        uint256 wad
    ) external returns (bool);
}
          

/project_/contracts/strategies/IStrategy.sol

pragma solidity 0.8.7;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IStrategy {
    function invest(address _inboundCurrency, uint256 _minAmount) external payable;

    function earlyWithdraw(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount
    ) external;

    function redeem(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount,
        bool disableRewardTokenClaim
    ) external;

    function getTotalAmount() external view returns (uint256);

    function getNetDepositAmount(uint256 _amount) external view returns (uint256);

    function getAccumulatedRewardTokenAmounts(bool disableRewardTokenClaim) external returns (uint256[] memory);

    function getRewardTokens() external view returns (IERC20[] memory);

    function getUnderlyingAsset() external view returns (address);

    function strategyOwner() external view returns (address);
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_lendingPoolAddressProvider","internalType":"contract ILendingPoolAddressesProvider"},{"type":"address","name":"_wethGateway","internalType":"contract IWETHGateway"},{"type":"address","name":"_dataProvider","internalType":"address"},{"type":"address","name":"_incentiveController","internalType":"address"},{"type":"address","name":"_rewardToken","internalType":"contract IERC20"},{"type":"address","name":"_inboundCurrency","internalType":"address"}]},{"type":"error","name":"INVALID_DATA_PROVIDER","inputs":[]},{"type":"error","name":"INVALID_LENDING_POOL_ADDRESS_PROVIDER","inputs":[]},{"type":"error","name":"INVALID_TRANSACTIONAL_TOKEN_SENDER","inputs":[]},{"type":"error","name":"TOKEN_TRANSFER_FAILURE","inputs":[]},{"type":"error","name":"TRANSACTIONAL_TOKEN_TRANSFER_FAILURE","inputs":[]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract AToken"}],"name":"aToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract AaveProtocolDataProvider"}],"name":"dataProvider","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"earlyWithdraw","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_minAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getAccumulatedRewardTokenAmounts","inputs":[{"type":"bool","name":"disableRewardTokenClaim","internalType":"bool"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNetDepositAmount","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"contract IERC20[]"}],"name":"getRewardTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getUnderlyingAsset","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IncentiveController"}],"name":"incentiveController","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"invest","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"uint256","name":"_minAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ILendingPool"}],"name":"lendingPool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ILendingPoolAddressesProvider"}],"name":"lendingPoolAddressProvider","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeem","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_minAmount","internalType":"uint256"},{"type":"bool","name":"disableRewardTokenClaim","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"rewardToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"strategyOwner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IWETHGateway"}],"name":"wethGateway","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x6101206040523480156200001257600080fd5b50604051620021fc380380620021fc833981016040819052620000359162000387565b6200004033620002bc565b6001600160a01b038616620000685760405163a1cea47560e01b815260040160405180910390fd5b6001600160a01b03841662000090576040516309e3f0b960e01b815260040160405180910390fd5b6001600160601b0319606087811b821660c05284901b16608052600180546001600160a01b038681166001600160a01b03199092169190911790915560408051630261bf8b60e01b8152905191881691630261bf8b91600480820192602092909190829003018186803b1580156200010757600080fd5b505afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200014291906200030c565b606090811b6001600160601b031990811660e0529086901b1660a052600280546001600160a01b0319166001600160a01b0384811691909117909155600090821662000217576001546002546040516334924edb60e21b81526001600160a01b03918216600482015291169063d2493b6c9060240160606040518083038186803b158015620001d057600080fd5b505afa158015620001e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020b919062000333565b509091506200029e9050565b6001546040516334924edb60e21b81526001600160a01b0384811660048301529091169063d2493b6c9060240160606040518083038186803b1580156200025d57600080fd5b505afa15801562000272573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000298919062000333565b50909150505b60601b6001600160601b031916610100525062000434945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156200031f57600080fd5b81516200032c816200041b565b9392505050565b6000806000606084860312156200034957600080fd5b835162000356816200041b565b602085015190935062000369816200041b565b60408501519092506200037c816200041b565b809150509250925092565b60008060008060008060c08789031215620003a157600080fd5b8651620003ae816200041b565b6020880151909650620003c1816200041b565b6040880151909550620003d4816200041b565b6060880151909450620003e7816200041b565b6080880151909350620003fa816200041b565b60a08801519092506200040d816200041b565b809150509295509295509295565b6001600160a01b03811681146200043157600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c611cd3620005296000396000818161032f0152818161047f015281816105e00152818161096601528181610ab001528181610d0e015261175701526000818161036301528181610674015281816107b801528181610b4401528181610c880152818161144901528181611571015261164d0152600061026701526000818161016e015281816103ec015281816105b1015281816106a901528181610a8101528181610b79015261147e01526000818161023301528181610d7901528181610e380152818161170301526117ae0152611cd36000f3fe6080604052600436106101485760003560e01c8063a0c1f15e116100c0578063c5e10eef11610074578063e3daf45611610059578063e3daf456146102ff578063f2fde38b1461043b578063f7c618c11461045b57600080fd5b8063c5e10eef146103da578063ca63279b1461040e57600080fd5b8063b334ed86116100a5578063b334ed8614610385578063b9b8c246146103a5578063c4f59f9b146103b857600080fd5b8063a0c1f15e1461031d578063a59a99731461035157600080fd5b806365237abb1161011757806365e0d731116100fc57806365e0d731146102ca578063715018a6146102ea5780638da5cb5b146102ff57600080fd5b806365237abb1461028957806365ac4341146102b557600080fd5b80631b206b73146101cf5780634bfd6571146102015780635b9fe37f14610221578063633803001461025557600080fd5b366101ca576002546001600160a01b031633148015906101915750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156101c8576040517f0b94abda00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b3480156101db57600080fd5b506101e461047b565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561020d57600080fd5b506101c861021c366004611a3a565b610513565b34801561022d57600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561026157600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561029557600080fd5b506102a76102a4366004611af3565b90565b6040519081526020016101f8565b3480156102c157600080fd5b506102a761094e565b3480156102d657600080fd5b506101c86102e5366004611a6f565b6109e8565b3480156102f657600080fd5b506101c8611245565b34801561030b57600080fd5b506000546001600160a01b03166101e4565b34801561032957600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561035d57600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561039157600080fd5b506001546101e4906001600160a01b031681565b6101c86103b3366004611a0e565b6112ab565b3480156103c457600080fd5b506103cd611691565b6040516101f89190611bc6565b3480156103e657600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561041a57600080fd5b5061042e610429366004611ab9565b6116f4565b6040516101f89190611c13565b34801561044757600080fd5b506101c86104563660046119cd565b611883565b34801561046757600080fd5b506002546101e4906001600160a01b031681565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b16a19de6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104d657600080fd5b505afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e91906119f1565b905090565b6000546001600160a01b031633146105725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038316158061059557506002546001600160a01b038481169116145b1561078c5760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390604401602060405180830381600087803b15801561062457600080fd5b505af1158015610638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065c9190611ad6565b50604051630402806960e51b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490523060448301527f000000000000000000000000000000000000000000000000000000000000000016906380500d2090606401600060405180830381600087803b1580156106ed57600080fd5b505af1158015610701573d6000803e3d6000fd5b50506002546001600160a01b03868116911614159150610787905057600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561076d57600080fd5b505af1158015610781573d6000803e3d6000fd5b50505050505b610815565b604051631a4ca37b60e21b81526001600160a01b038481166004830152602482018490523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec90606401600060405180830381600087803b1580156107fc57600080fd5b505af1158015610810573d6000803e3d6000fd5b505050505b6001600160a01b03831661089257604051600090339084908381818185875af1925050503d8060008114610865576040519150601f19603f3d011682016040523d82523d6000602084013e61086a565b606091505b505090508061088c57604051634d4c5bd160e11b815260040160405180910390fd5b50505050565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390526000906001600160a01b0385169063a9059cbb90604401602060405180830381600087803b1580156108f657600080fd5b505af115801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e9190611ad6565b90508061088c57604051638dc18fdb60e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156109b057600080fd5b505afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e9190611b0c565b6000546001600160a01b03163314610a425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6001600160a01b0384161580610a6557506002546001600160a01b038581169116145b15610c5c5760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390604401602060405180830381600087803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190611ad6565b50604051630402806960e51b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018590523060448301527f000000000000000000000000000000000000000000000000000000000000000016906380500d2090606401600060405180830381600087803b158015610bbd57600080fd5b505af1158015610bd1573d6000803e3d6000fd5b50506002546001600160a01b03878116911614159150610c57905057600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c3d57600080fd5b505af1158015610c51573d6000803e3d6000fd5b50505050505b610ce5565b604051631a4ca37b60e21b81526001600160a01b038581166004830152602482018590523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec90606401600060405180830381600087803b158015610ccc57600080fd5b505af1158015610ce0573d6000803e3d6000fd5b505050505b8061108757604080516001808252818301909252600091602080830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610d4057610d40611c4b565b6001600160a01b0392831660209182029290920101526002541615611085576040516345accf9360e11b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638b599f2690610db09085903090600401611b69565b60206040518083038186803b158015610dc857600080fd5b505afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e009190611b0c565b90508015610ec5576040517f3111e7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633111e7b390610e7190859085903090600401611b94565b602060405180830381600087803b158015610e8b57600080fd5b505af1158015610e9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec39190611b0c565b505b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610f0857600080fd5b505afa158015610f1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f409190611b0c565b15611083576002546040516370a0823160e01b81523060048201526000916001600160a01b03169063a9059cbb90339083906370a082319060240160206040518083038186803b158015610f9357600080fd5b505afa158015610fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fcb9190611b0c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561102957600080fd5b505af115801561103d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110619190611ad6565b90508061108157604051638dc18fdb60e01b815260040160405180910390fd5b505b505b505b6001600160a01b03841661110457604051600090339047908381818185875af1925050503d80600081146110d7576040519150601f19603f3d011682016040523d82523d6000602084013e6110dc565b606091505b50509050806110fe57604051634d4c5bd160e11b815260040160405180910390fd5b5061088c565b6040516370a0823160e01b81523060048201526000906001600160a01b0386169063a9059cbb90339083906370a082319060240160206040518083038186803b15801561115057600080fd5b505afa158015611164573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111889190611b0c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156111e657600080fd5b505af11580156111fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121e9190611ad6565b90508061123e57604051638dc18fdb60e01b815260040160405180910390fd5b5050505050565b6000546001600160a01b0316331461129f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6112a96000611965565b565b6000546001600160a01b031633146113055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6001600160a01b038216158061132857506002546001600160a01b038381169116145b156114e0576002546001600160a01b0383811691161415611419576002546040516370a0823160e01b81523060048201526001600160a01b0391821691632e1a7d4d91908516906370a082319060240160206040518083038186803b15801561139057600080fd5b505afa1580156113a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c89190611b0c565b6040518263ffffffff1660e01b81526004016113e691815260200190565b600060405180830381600087803b15801561140057600080fd5b505af1158015611414573d6000803e3d6000fd5b505050505b6040517f474cf53d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152306024830152609b60448301527f0000000000000000000000000000000000000000000000000000000000000000169063474cf53d9047906064016000604051808303818588803b1580156114c357600080fd5b505af11580156114d7573d6000803e3d6000fd5b50505050505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561152257600080fd5b505afa158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a9190611b0c565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390529192509084169063095ea7b390604401602060405180830381600087803b1580156115c857600080fd5b505af11580156115dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116009190611ad6565b506040517fe8eda9df0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201839052306044830152609b60648301527f0000000000000000000000000000000000000000000000000000000000000000169063e8eda9df90608401600060405180830381600087803b1580156114c357600080fd5b6040805160018082528183019092526060916000919060208083019080368337505060025482519293506001600160a01b0316918391506000906116d7576116d7611c4b565b6001600160a01b0390921660209283029190910190910152919050565b606060008215801561172e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615155b1561183b57604080516001808252818301909252600091602080830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000008160008151811061178957611789611c4b565b6001600160a01b0392831660209182029290920101526040516345accf9360e11b81527f000000000000000000000000000000000000000000000000000000000000000090911690638b599f26906117e79084903090600401611b69565b60206040518083038186803b1580156117ff57600080fd5b505afa158015611813573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118379190611b0c565b9150505b60408051600180825281830190925260009160208083019080368337019050509050818160008151811061187157611871611c4b565b60209081029190910101529392505050565b6000546001600160a01b031633146118dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6001600160a01b0381166119595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610569565b61196281611965565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156119df57600080fd5b81356119ea81611c7a565b9392505050565b600060208284031215611a0357600080fd5b81516119ea81611c7a565b60008060408385031215611a2157600080fd5b8235611a2c81611c7a565b946020939093013593505050565b600080600060608486031215611a4f57600080fd5b8335611a5a81611c7a565b95602085013595506040909401359392505050565b60008060008060808587031215611a8557600080fd5b8435611a9081611c7a565b935060208501359250604085013591506060850135611aae81611c8f565b939692955090935050565b600060208284031215611acb57600080fd5b81356119ea81611c8f565b600060208284031215611ae857600080fd5b81516119ea81611c8f565b600060208284031215611b0557600080fd5b5035919050565b600060208284031215611b1e57600080fd5b5051919050565b600081518084526020808501945080840160005b83811015611b5e5781516001600160a01b031687529582019590820190600101611b39565b509495945050505050565b604081526000611b7c6040830185611b25565b90506001600160a01b03831660208301529392505050565b606081526000611ba76060830186611b25565b90508360208301526001600160a01b0383166040830152949350505050565b6020808252825182820181905260009190848201906040850190845b81811015611c075783516001600160a01b031683529284019291840191600101611be2565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611c0757835183529284019291840191600101611c2f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6001600160a01b038116811461196257600080fd5b801515811461196257600080fdfea2646970667358221220c591944c09168fe387b24290c8a358c38272b857a841248ac3e5b168e3c15f4a64736f6c63430008070033000000000000000000000000d1088091a174d33412a968fa34cb67131188b332000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043d067ed784d9dd2ffeda73775e2cc4c560103a100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000471ece3750da237f93b8e339c536989b8978a438

Deployed ByteCode

0x6080604052600436106101485760003560e01c8063a0c1f15e116100c0578063c5e10eef11610074578063e3daf45611610059578063e3daf456146102ff578063f2fde38b1461043b578063f7c618c11461045b57600080fd5b8063c5e10eef146103da578063ca63279b1461040e57600080fd5b8063b334ed86116100a5578063b334ed8614610385578063b9b8c246146103a5578063c4f59f9b146103b857600080fd5b8063a0c1f15e1461031d578063a59a99731461035157600080fd5b806365237abb1161011757806365e0d731116100fc57806365e0d731146102ca578063715018a6146102ea5780638da5cb5b146102ff57600080fd5b806365237abb1461028957806365ac4341146102b557600080fd5b80631b206b73146101cf5780634bfd6571146102015780635b9fe37f14610221578063633803001461025557600080fd5b366101ca576002546001600160a01b031633148015906101915750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156101c8576040517f0b94abda00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b3480156101db57600080fd5b506101e461047b565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561020d57600080fd5b506101c861021c366004611a3a565b610513565b34801561022d57600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561026157600080fd5b506101e47f000000000000000000000000d1088091a174d33412a968fa34cb67131188b33281565b34801561029557600080fd5b506102a76102a4366004611af3565b90565b6040519081526020016101f8565b3480156102c157600080fd5b506102a761094e565b3480156102d657600080fd5b506101c86102e5366004611a6f565b6109e8565b3480156102f657600080fd5b506101c8611245565b34801561030b57600080fd5b506000546001600160a01b03166101e4565b34801561032957600080fd5b506101e47f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d81565b34801561035d57600080fd5b506101e47f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67081565b34801561039157600080fd5b506001546101e4906001600160a01b031681565b6101c86103b3366004611a0e565b6112ab565b3480156103c457600080fd5b506103cd611691565b6040516101f89190611bc6565b3480156103e657600080fd5b506101e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561041a57600080fd5b5061042e610429366004611ab9565b6116f4565b6040516101f89190611c13565b34801561044757600080fd5b506101c86104563660046119cd565b611883565b34801561046757600080fd5b506002546101e4906001600160a01b031681565b60007f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d6001600160a01b031663b16a19de6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104d657600080fd5b505afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e91906119f1565b905090565b6000546001600160a01b031633146105725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038316158061059557506002546001600160a01b038481169116145b1561078c5760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490527f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d169063095ea7b390604401602060405180830381600087803b15801561062457600080fd5b505af1158015610638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065c9190611ad6565b50604051630402806960e51b81526001600160a01b037f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67081166004830152602482018490523060448301527f000000000000000000000000000000000000000000000000000000000000000016906380500d2090606401600060405180830381600087803b1580156106ed57600080fd5b505af1158015610701573d6000803e3d6000fd5b50506002546001600160a01b03868116911614159150610787905057600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561076d57600080fd5b505af1158015610781573d6000803e3d6000fd5b50505050505b610815565b604051631a4ca37b60e21b81526001600160a01b038481166004830152602482018490523060448301527f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67016906369328dec90606401600060405180830381600087803b1580156107fc57600080fd5b505af1158015610810573d6000803e3d6000fd5b505050505b6001600160a01b03831661089257604051600090339084908381818185875af1925050503d8060008114610865576040519150601f19603f3d011682016040523d82523d6000602084013e61086a565b606091505b505090508061088c57604051634d4c5bd160e11b815260040160405180910390fd5b50505050565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390526000906001600160a01b0385169063a9059cbb90604401602060405180830381600087803b1580156108f657600080fd5b505af115801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e9190611ad6565b90508061088c57604051638dc18fdb60e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d6001600160a01b0316906370a082319060240160206040518083038186803b1580156109b057600080fd5b505afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e9190611b0c565b6000546001600160a01b03163314610a425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6001600160a01b0384161580610a6557506002546001600160a01b038581169116145b15610c5c5760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018590527f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d169063095ea7b390604401602060405180830381600087803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190611ad6565b50604051630402806960e51b81526001600160a01b037f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67081166004830152602482018590523060448301527f000000000000000000000000000000000000000000000000000000000000000016906380500d2090606401600060405180830381600087803b158015610bbd57600080fd5b505af1158015610bd1573d6000803e3d6000fd5b50506002546001600160a01b03878116911614159150610c57905057600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c3d57600080fd5b505af1158015610c51573d6000803e3d6000fd5b50505050505b610ce5565b604051631a4ca37b60e21b81526001600160a01b038581166004830152602482018590523060448301527f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67016906369328dec90606401600060405180830381600087803b158015610ccc57600080fd5b505af1158015610ce0573d6000803e3d6000fd5b505050505b8061108757604080516001808252818301909252600091602080830190803683370190505090507f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d81600081518110610d4057610d40611c4b565b6001600160a01b0392831660209182029290920101526002541615611085576040516345accf9360e11b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638b599f2690610db09085903090600401611b69565b60206040518083038186803b158015610dc857600080fd5b505afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e009190611b0c565b90508015610ec5576040517f3111e7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633111e7b390610e7190859085903090600401611b94565b602060405180830381600087803b158015610e8b57600080fd5b505af1158015610e9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec39190611b0c565b505b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610f0857600080fd5b505afa158015610f1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f409190611b0c565b15611083576002546040516370a0823160e01b81523060048201526000916001600160a01b03169063a9059cbb90339083906370a082319060240160206040518083038186803b158015610f9357600080fd5b505afa158015610fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fcb9190611b0c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561102957600080fd5b505af115801561103d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110619190611ad6565b90508061108157604051638dc18fdb60e01b815260040160405180910390fd5b505b505b505b6001600160a01b03841661110457604051600090339047908381818185875af1925050503d80600081146110d7576040519150601f19603f3d011682016040523d82523d6000602084013e6110dc565b606091505b50509050806110fe57604051634d4c5bd160e11b815260040160405180910390fd5b5061088c565b6040516370a0823160e01b81523060048201526000906001600160a01b0386169063a9059cbb90339083906370a082319060240160206040518083038186803b15801561115057600080fd5b505afa158015611164573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111889190611b0c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156111e657600080fd5b505af11580156111fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121e9190611ad6565b90508061123e57604051638dc18fdb60e01b815260040160405180910390fd5b5050505050565b6000546001600160a01b0316331461129f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6112a96000611965565b565b6000546001600160a01b031633146113055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6001600160a01b038216158061132857506002546001600160a01b038381169116145b156114e0576002546001600160a01b0383811691161415611419576002546040516370a0823160e01b81523060048201526001600160a01b0391821691632e1a7d4d91908516906370a082319060240160206040518083038186803b15801561139057600080fd5b505afa1580156113a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c89190611b0c565b6040518263ffffffff1660e01b81526004016113e691815260200190565b600060405180830381600087803b15801561140057600080fd5b505af1158015611414573d6000803e3d6000fd5b505050505b6040517f474cf53d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67081166004830152306024830152609b60448301527f0000000000000000000000000000000000000000000000000000000000000000169063474cf53d9047906064016000604051808303818588803b1580156114c357600080fd5b505af11580156114d7573d6000803e3d6000fd5b50505050505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561152257600080fd5b505afa158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a9190611b0c565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f67081166004830152602482018390529192509084169063095ea7b390604401602060405180830381600087803b1580156115c857600080fd5b505af11580156115dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116009190611ad6565b506040517fe8eda9df0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201839052306044830152609b60648301527f000000000000000000000000970b12522ca9b4054807a2c5b736149a5be6f670169063e8eda9df90608401600060405180830381600087803b1580156114c357600080fd5b6040805160018082528183019092526060916000919060208083019080368337505060025482519293506001600160a01b0316918391506000906116d7576116d7611c4b565b6001600160a01b0390921660209283029190910190910152919050565b606060008215801561172e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615155b1561183b57604080516001808252818301909252600091602080830190803683370190505090507f0000000000000000000000007d00cd74ff385c955ea3d79e47bf06bd7386387d8160008151811061178957611789611c4b565b6001600160a01b0392831660209182029290920101526040516345accf9360e11b81527f000000000000000000000000000000000000000000000000000000000000000090911690638b599f26906117e79084903090600401611b69565b60206040518083038186803b1580156117ff57600080fd5b505afa158015611813573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118379190611b0c565b9150505b60408051600180825281830190925260009160208083019080368337019050509050818160008151811061187157611871611c4b565b60209081029190910101529392505050565b6000546001600160a01b031633146118dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610569565b6001600160a01b0381166119595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610569565b61196281611965565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156119df57600080fd5b81356119ea81611c7a565b9392505050565b600060208284031215611a0357600080fd5b81516119ea81611c7a565b60008060408385031215611a2157600080fd5b8235611a2c81611c7a565b946020939093013593505050565b600080600060608486031215611a4f57600080fd5b8335611a5a81611c7a565b95602085013595506040909401359392505050565b60008060008060808587031215611a8557600080fd5b8435611a9081611c7a565b935060208501359250604085013591506060850135611aae81611c8f565b939692955090935050565b600060208284031215611acb57600080fd5b81356119ea81611c8f565b600060208284031215611ae857600080fd5b81516119ea81611c8f565b600060208284031215611b0557600080fd5b5035919050565b600060208284031215611b1e57600080fd5b5051919050565b600081518084526020808501945080840160005b83811015611b5e5781516001600160a01b031687529582019590820190600101611b39565b509495945050505050565b604081526000611b7c6040830185611b25565b90506001600160a01b03831660208301529392505050565b606081526000611ba76060830186611b25565b90508360208301526001600160a01b0383166040830152949350505050565b6020808252825182820181905260009190848201906040850190845b81811015611c075783516001600160a01b031683529284019291840191600101611be2565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611c0757835183529284019291840191600101611c2f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6001600160a01b038116811461196257600080fd5b801515811461196257600080fdfea2646970667358221220c591944c09168fe387b24290c8a358c38272b857a841248ac3e5b168e3c15f4a64736f6c63430008070033