ETH Price: $2,078.12 (+9.97%)
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YearnTokenAdapterOptimism

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at optimistic.etherscan.io on 2024-08-28
*/

// Sources flattened with hardhat v2.9.9 https://hardhat.org

// File src/base/Errors.sol

pragma solidity ^0.8.13;

/// @notice An error used to indicate that an action could not be completed because either the `msg.sender` or
///         `msg.origin` is not authorized.
error Unauthorized();

/// @notice An error used to indicate that an action could not be completed because the contract either already existed
///         or entered an illegal condition which is not recoverable from.
error IllegalState();

/// @notice An error used to indicate that an action could not be completed because of an illegal argument was passed
///         to the function.
error IllegalArgument();


// File src/interfaces/ITokenAdapter.sol

pragma solidity >=0.5.0;

/// @title  ITokenAdapter
/// @author Alchemix Finance
interface ITokenAdapter {
    /// @notice Gets the current version.
    ///
    /// @return The version.
    function version() external view returns (string memory);

    /// @notice Gets the address of the yield token that this adapter supports.
    ///
    /// @return The address of the yield token.
    function token() external view returns (address);

    /// @notice Gets the address of the underlying token that the yield token wraps.
    ///
    /// @return The address of the underlying token.
    function underlyingToken() external view returns (address);

    /// @notice Gets the number of underlying tokens that a single whole yield token is redeemable
    ///         for.
    ///
    /// @return The price.
    function price() external view returns (uint256);

    /// @notice Wraps `amount` underlying tokens into the yield token.
    ///
    /// @param amount    The amount of the underlying token to wrap.
    /// @param recipient The address which will receive the yield tokens.
    ///
    /// @return amountYieldTokens The amount of yield tokens minted to `recipient`.
    function wrap(uint256 amount, address recipient)
        external
        returns (uint256 amountYieldTokens);

    /// @notice Unwraps `amount` yield tokens into the underlying token.
    ///
    /// @param amount    The amount of yield-tokens to redeem.
    /// @param recipient The recipient of the resulting underlying-tokens.
    ///
    /// @return amountUnderlyingTokens The amount of underlying tokens unwrapped to `recipient`.
    function unwrap(uint256 amount, address recipient)
        external
        returns (uint256 amountUnderlyingTokens);
}


// File src/interfaces/IERC20Minimal.sol

pragma solidity >=0.5.0;

/// @title  IERC20Minimal
/// @author Alchemix Finance
interface IERC20Minimal {
    /// @notice An event which is emitted when tokens are transferred between two parties.
    ///
    /// @param owner     The owner of the tokens from which the tokens were transferred.
    /// @param recipient The recipient of the tokens to which the tokens were transferred.
    /// @param amount    The amount of tokens which were transferred.
    event Transfer(address indexed owner, address indexed recipient, uint256 amount);

    /// @notice An event which is emitted when an approval is made.
    ///
    /// @param owner   The address which made the approval.
    /// @param spender The address which is allowed to transfer tokens on behalf of `owner`.
    /// @param amount  The amount of tokens that `spender` is allowed to transfer.
    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /// @notice Gets the current total supply of tokens.
    ///
    /// @return The total supply.
    function totalSupply() external view returns (uint256);

    /// @notice Gets the balance of tokens that an account holds.
    ///
    /// @param account The account address.
    ///
    /// @return The balance of the account.
    function balanceOf(address account) external view returns (uint256);

    /// @notice Gets the allowance that an owner has allotted for a spender.
    ///
    /// @param owner   The owner address.
    /// @param spender The spender address.
    ///
    /// @return The number of tokens that `spender` is allowed to transfer on behalf of `owner`.
    function allowance(address owner, address spender) external view returns (uint256);

    /// @notice Transfers `amount` tokens from `msg.sender` to `recipient`.
    ///
    /// @notice Emits a {Transfer} event.
    ///
    /// @param recipient The address which will receive the tokens.
    /// @param amount    The amount of tokens to transfer.
    ///
    /// @return If the transfer was successful.
    function transfer(address recipient, uint256 amount) external returns (bool);

    /// @notice Approves `spender` to transfer `amount` tokens on behalf of `msg.sender`.
    ///
    /// @notice Emits a {Approval} event.
    ///
    /// @param spender The address which is allowed to transfer tokens on behalf of `msg.sender`.
    /// @param amount  The amount of tokens that `spender` is allowed to transfer.
    ///
    /// @return If the approval was successful.
    function approve(address spender, uint256 amount) external returns (bool);

    /// @notice Transfers `amount` tokens from `owner` to `recipient` using an approval that `owner` gave to `msg.sender`.
    ///
    /// @notice Emits a {Approval} event.
    /// @notice Emits a {Transfer} event.
    ///
    /// @param owner     The address to transfer tokens from.
    /// @param recipient The address that will receive the tokens.
    /// @param amount    The amount of tokens to transfer.
    ///
    /// @return If the transfer was successful.
    function transferFrom(address owner, address recipient, uint256 amount) external returns (bool);
}


// File lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

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


// File lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}


// File src/interfaces/external/yearn/IYearnVaultV2.sol

pragma solidity >=0.5.0;


/// @title  IYearnVaultV2
/// @author Yearn Finance
interface IYearnVaultV2 is IERC20Metadata {
  struct StrategyParams {
    uint256 performanceFee;
    uint256 activation;
    uint256 debtRatio;
    uint256 minDebtPerHarvest;
    uint256 maxDebtPerHarvest;
    uint256 lastReport;
    uint256 totalDebt;
    uint256 totalGain;
    uint256 totalLoss;
    bool enforceChangeLimit;
    uint256 profitLimitRatio;
    uint256 lossLimitRatio;
    address customCheck;
  }

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

  function permit(
    address owner,
    address spender,
    uint256 amount,
    uint256 expiry,
    bytes calldata signature
  ) external returns (bool);

  // NOTE: Vyper produces multiple signatures for a given function with "default" args
  function deposit() external returns (uint256);

  function deposit(uint256 amount) external returns (uint256);

  function deposit(uint256 amount, address recipient) external returns (uint256);

  // NOTE: Vyper produces multiple signatures for a given function with "default" args
  function withdraw() external returns (uint256);

  function withdraw(uint256 maxShares) external returns (uint256);

  function withdraw(uint256 maxShares, address recipient) external returns (uint256);

  function withdraw(
    uint256 maxShares,
    address recipient,
    uint256 maxLoss
  ) external returns (uint256);

  function token() external view returns (address);

  function strategies(address _strategy) external view returns (StrategyParams memory);

  function pricePerShare() external view returns (uint256);

  function totalAssets() external view returns (uint256);

  function depositLimit() external view returns (uint256);

  function maxAvailableShares() external view returns (uint256);

  /// @notice View how much the Vault would increase this Strategy's borrow limit, based on its present performance
  ///         (since its last report). Can be used to determine expectedReturn in your Strategy.
  function creditAvailable() external view returns (uint256);

  /// @notice View how much the Vault would like to pull back from the Strategy, based on its present performance
  ///         (since its last report). Can be used to determine expectedReturn in your Strategy.
  function debtOutstanding() external view returns (uint256);

  /// @notice View how much the Vault expect this Strategy to return at the current block, based on its present
  ///         performance (since its last report). Can be used to determine expectedReturn in your Strategy.
  function expectedReturn() external view returns (uint256);

  /// @notice This is the main contact point where the Strategy interacts with the Vault. It is critical that this call
  ///         is handled as intended by the Strategy. Therefore, this function will be called by BaseStrategy to make
  ///         sure the integration is correct.
  function report(
    uint256 _gain,
    uint256 _loss,
    uint256 _debtPayment
  ) external returns (uint256);

  /// @notice This function should only be used in the scenario where the Strategy is being retired but no migration of
  ///         the positions are possible, or in the extreme scenario that the Strategy needs to be put into
  ///         "Emergency Exit" mode in order for it to exit as quickly as possible. The latter scenario could be for any
  ///         reason that is considered "critical" that the Strategy exits its position as fast as possible, such as a
  ///         sudden change in market conditions leading to losses, or an imminent failure in an external dependency.
  function revokeStrategy() external;

  /// @notice View the governance address of the Vault to assert privileged functions can only be called by governance.
  ///         The Strategy serves the Vault, so it is subject to governance defined by the Vault.
  function governance() external view returns (address);

  /// @notice View the management address of the Vault to assert privileged functions can only be called by management.
  ///         The Strategy serves the Vault, so it is subject to management defined by the Vault.
  function management() external view returns (address);

  /// @notice View the guardian address of the Vault to assert privileged functions can only be called by guardian. The
  ///         Strategy serves the Vault, so it is subject to guardian defined by the Vault.
  function guardian() external view returns (address);
}


// File src/interfaces/external/yearn/IStakingRewards.sol

pragma solidity >=0.5.0;

interface IStakingRewards {
    // Views

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

    function earned(address account) external view returns (uint256);

    function getRewardForDuration() external view returns (uint256);

    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

    function rewardsDistribution() external view returns (address);

    function rewardsToken() external view returns (address);

    function totalSupply() external view returns (uint256);

    // Mutative

    function exit() external;

    function getReward() external;

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;
}


// File src/interfaces/external/yearn/IYearnStakingToken.sol

pragma solidity >=0.5.0;


interface IYearnStakingToken {
    function claimRewards() external returns (uint256);
    function deposit(address recipient, uint256 amount, bool fromUnderlying) external returns (uint256);
    function withdraw(address recipient, uint256 amount, uint256 maxSlippage, bool fromUnderlying) external returns (uint256, uint256);
    function YEARN_VAULT() external view returns (IYearnVaultV2);
    function STAKNG_REWARDS() external view returns (IStakingRewards);
}


// File src/interfaces/IERC20Burnable.sol

pragma solidity >=0.5.0;

/// @title  IERC20Burnable
/// @author Alchemix Finance
interface IERC20Burnable is IERC20 {
    /// @notice Burns `amount` tokens from the balance of `msg.sender`.
    ///
    /// @param amount The amount of tokens to burn.
    ///
    /// @return If burning the tokens was successful.
    function burn(uint256 amount) external returns (bool);

    /// @notice Burns `amount` tokens from `owner`'s balance.
    ///
    /// @param owner  The address to burn tokens from.
    /// @param amount The amount of tokens to burn.
    ///
    /// @return If burning the tokens was successful.
    function burnFrom(address owner, uint256 amount) external returns (bool);
}


// File src/interfaces/IERC20Mintable.sol

pragma solidity >=0.5.0;

/// @title  IERC20Mintable
/// @author Alchemix Finance
interface IERC20Mintable is IERC20 {
    /// @notice Mints `amount` tokens to `recipient`.
    ///
    /// @param recipient The address which will receive the minted tokens.
    /// @param amount    The amount of tokens to mint.
    function mint(address recipient, uint256 amount) external;
}


// File src/libraries/TokenUtils.sol

pragma solidity ^0.8.13;




/// @title  TokenUtils
/// @author Alchemix Finance
library TokenUtils {
    /// @notice An error used to indicate that a call to an ERC20 contract failed.
    ///
    /// @param target  The target address.
    /// @param success If the call to the token was a success.
    /// @param data    The resulting data from the call. This is error data when the call was not a success. Otherwise,
    ///                this is malformed data when the call was a success.
    error ERC20CallFailed(address target, bool success, bytes data);

    /// @dev A safe function to get the decimals of an ERC20 token.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the query fails or returns an unexpected value.
    ///
    /// @param token The target token.
    ///
    /// @return The amount of decimals of the token.
    function expectDecimals(address token) internal view returns (uint8) {
        (bool success, bytes memory data) = token.staticcall(
            abi.encodeWithSelector(IERC20Metadata.decimals.selector)
        );

        if (token.code.length == 0 || !success || data.length < 32) {
            revert ERC20CallFailed(token, success, data);
        }

        return abi.decode(data, (uint8));
    }

    /// @dev Gets the balance of tokens held by an account.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the query fails or returns an unexpected value.
    ///
    /// @param token   The token to check the balance of.
    /// @param account The address of the token holder.
    ///
    /// @return The balance of the tokens held by an account.
    function safeBalanceOf(address token, address account) internal view returns (uint256) {
        (bool success, bytes memory data) = token.staticcall(
            abi.encodeWithSelector(IERC20.balanceOf.selector, account)
        );

        if (token.code.length == 0 || !success || data.length < 32) {
            revert ERC20CallFailed(token, success, data);
        }

        return abi.decode(data, (uint256));
    }

    /// @dev Transfers tokens to another address.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the transfer failed or returns an unexpected value.
    ///
    /// @param token     The token to transfer.
    /// @param recipient The address of the recipient.
    /// @param amount    The amount of tokens to transfer.
    function safeTransfer(address token, address recipient, uint256 amount) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, recipient, amount)
        );

        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
            revert ERC20CallFailed(token, success, data);
        }
    }

    /// @dev Approves tokens for the smart contract.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the approval fails or returns an unexpected value.
    ///
    /// @param token   The token to approve.
    /// @param spender The contract to spend the tokens.
    /// @param value   The amount of tokens to approve.
    function safeApprove(address token, address spender, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.approve.selector, spender, value)
        );

        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
            revert ERC20CallFailed(token, success, data);
        }
    }

    /// @dev Transfer tokens from one address to another address.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the transfer fails or returns an unexpected value.
    ///
    /// @param token     The token to transfer.
    /// @param owner     The address of the owner.
    /// @param recipient The address of the recipient.
    /// @param amount    The amount of tokens to transfer.
    function safeTransferFrom(address token, address owner, address recipient, uint256 amount) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transferFrom.selector, owner, recipient, amount)
        );

        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
            revert ERC20CallFailed(token, success, data);
        }
    }

    /// @dev Mints tokens to an address.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the mint fails or returns an unexpected value.
    ///
    /// @param token     The token to mint.
    /// @param recipient The address of the recipient.
    /// @param amount    The amount of tokens to mint.
    function safeMint(address token, address recipient, uint256 amount) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20Mintable.mint.selector, recipient, amount)
        );

        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
            revert ERC20CallFailed(token, success, data);
        }
    }

    /// @dev Burns tokens.
    ///
    /// Reverts with a `CallFailed` error if execution of the burn fails or returns an unexpected value.
    ///
    /// @param token  The token to burn.
    /// @param amount The amount of tokens to burn.
    function safeBurn(address token, uint256 amount) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20Burnable.burn.selector, amount)
        );

        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
            revert ERC20CallFailed(token, success, data);
        }
    }

    /// @dev Burns tokens from its total supply.
    ///
    /// @dev Reverts with a {CallFailed} error if execution of the burn fails or returns an unexpected value.
    ///
    /// @param token  The token to burn.
    /// @param owner  The owner of the tokens.
    /// @param amount The amount of tokens to burn.
    function safeBurnFrom(address token, address owner, uint256 amount) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20Burnable.burnFrom.selector, owner, amount)
        );

        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
            revert ERC20CallFailed(token, success, data);
        }
    }
}


// File src/adapters/yearn/YearnTokenAdapterOptimism.sol

pragma solidity 0.8.13;



/// @title  YearnTokenAdapter for Optimism
/// @author Alchemix Finance
contract YearnTokenAdapterOptimism is ITokenAdapter {
    uint256 private constant MAXIMUM_SLIPPAGE = 10000;
    string public constant override version = "1.0.0";

    address public immutable override token;
    address public immutable override underlyingToken;

    constructor(address _token, address _underlyingToken) {
        token = _token;
        underlyingToken = _underlyingToken;
    }

    /// @inheritdoc ITokenAdapter
    function price() external view override returns (uint256) {
        return IYearnVaultV2(address(IYearnStakingToken(token).YEARN_VAULT())).pricePerShare();
    }

    /// @inheritdoc ITokenAdapter
    function wrap(uint256 amount, address recipient) external override returns (uint256) {
        TokenUtils.safeTransferFrom(underlyingToken, msg.sender, address(this), amount);
        TokenUtils.safeApprove(underlyingToken, token, 0);
        TokenUtils.safeApprove(underlyingToken, token, amount);

        return IYearnStakingToken(token).deposit(recipient, amount, true);
    }

    /// @inheritdoc ITokenAdapter
    function unwrap(uint256 amount, address recipient) external override returns (uint256) {
        TokenUtils.safeTransferFrom(token, msg.sender, address(this), amount);

        uint256 balanceBefore = TokenUtils.safeBalanceOf(token, address(this));

        (, uint256 amountWithdrawn) = IYearnStakingToken(token).withdraw(recipient, amount, MAXIMUM_SLIPPAGE, true);

        uint256 balanceAfter = TokenUtils.safeBalanceOf(token, address(this));

        // If the Yearn vault did not burn all of the shares then revert. This is critical in mathematical operations
        // performed by the system because the system always expects that all of the tokens were unwrapped. In Yearn,
        // this sometimes does not happen in cases where strategies cannot withdraw all of the requested tokens (an
        // example strategy where this can occur is with Compound and AAVE where funds may not be accessible because
        // they were lent out).
        if (balanceBefore - balanceAfter != amount) {
            revert IllegalState();
        }

        return amountWithdrawn;
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_underlyingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"ERC20CallFailed","type":"error"},{"inputs":[],"name":"IllegalState","type":"error"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"wrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b50604051610afc380380610afc83398101604081905261002f91610062565b6001600160a01b039182166080521660a052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516109f6610106600039600081816092015281816101460152818161017201526101be01526000818161011d01528181610193015281816101df01528181610231015281816102ac015281816102da0152818161033a015281816103b0015261040d01526109f66000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806313bac820146100675780632495a5991461008d57806354fd4d50146100cc5780637647691d146100fd578063a035b1fe14610110578063fc0c546a14610118575b600080fd5b61007a610075366004610838565b61013f565b6040519081526020015b60405180910390f35b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610084565b6100f0604051806040016040528060058152602001640312e302e360dc1b81525081565b60405161008491906108c4565b61007a61010b366004610838565b6102a5565b61007a610409565b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b600061016d7f00000000000000000000000000000000000000000000000000000000000000003330866104f3565b6101b97f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006000610611565b6102047f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000085610611565b6040516307dba22560e31b81526001600160a01b03838116600483015260248201859052600160448301527f00000000000000000000000000000000000000000000000000000000000000001690633edd1128906064016020604051808303816000875af115801561027a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029e91906108d7565b9392505050565b60006102d37f00000000000000000000000000000000000000000000000000000000000000003330866104f3565b60006102ff7f00000000000000000000000000000000000000000000000000000000000000003061071d565b60405163234b674560e01b81526001600160a01b038581166004830152602482018790526127106044830152600160648301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063234b67459060840160408051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906108f0565b91505060006103d57f00000000000000000000000000000000000000000000000000000000000000003061071d565b9050856103e28285610914565b1461040057604051634a613c4160e01b815260040160405180910390fd5b50949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166321115d6d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048d9190610939565b6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ee91906108d7565b905090565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916105579190610956565b6000604051808303816000865af19150503d8060008114610594576040519150601f19603f3d011682016040523d82523d6000602084013e610599565b606091505b5091509150856001600160a01b03163b600014806105b5575081155b806105dc57508051158015906105dc5750808060200190518101906105da9190610972565b155b156106095785828260405163e7e40b5b60e01b815260040161060093929190610994565b60405180910390fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161066d9190610956565b6000604051808303816000865af19150503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b5091509150846001600160a01b03163b600014806106cb575081155b806106f257508051158015906106f25750808060200190518101906106f09190610972565b155b156107165784828260405163e7e40b5b60e01b815260040161060093929190610994565b5050505050565b604080516001600160a01b0383811660248084019190915283518084039091018152604490920183526020820180516001600160e01b03166370a0823160e01b179052915160009283928392918716916107779190610956565b600060405180830381855afa9150503d80600081146107b2576040519150601f19603f3d011682016040523d82523d6000602084013e6107b7565b606091505b5091509150846001600160a01b03163b600014806107d3575081155b806107df575060208151105b156108035784828260405163e7e40b5b60e01b815260040161060093929190610994565b8080602001905181019061081791906108d7565b95945050505050565b6001600160a01b038116811461083557600080fd5b50565b6000806040838503121561084b57600080fd5b82359150602083013561085d81610820565b809150509250929050565b60005b8381101561088357818101518382015260200161086b565b83811115610892576000848401525b50505050565b600081518084526108b0816020860160208601610868565b601f01601f19169290920160200192915050565b60208152600061029e6020830184610898565b6000602082840312156108e957600080fd5b5051919050565b6000806040838503121561090357600080fd5b505080516020909101519092909150565b60008282101561093457634e487b7160e01b600052601160045260246000fd5b500390565b60006020828403121561094b57600080fd5b815161029e81610820565b60008251610968818460208701610868565b9190910192915050565b60006020828403121561098457600080fd5b8151801515811461029e57600080fd5b6001600160a01b038416815282151560208201526060604082018190526000906108179083018461089856fea26469706673582212208900a6e8719408dda75ed15e61e5c1ff6d15037e27fd8f07c3f906db9456f59864736f6c634300080d0033000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c806313bac820146100675780632495a5991461008d57806354fd4d50146100cc5780637647691d146100fd578063a035b1fe14610110578063fc0c546a14610118575b600080fd5b61007a610075366004610838565b61013f565b6040519081526020015b60405180910390f35b6100b47f000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da181565b6040516001600160a01b039091168152602001610084565b6100f0604051806040016040528060058152602001640312e302e360dc1b81525081565b60405161008491906108c4565b61007a61010b366004610838565b6102a5565b61007a610409565b6100b47f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac81565b600061016d7f000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da13330866104f3565b6101b97f000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da17f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac6000610611565b6102047f000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da17f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac85610611565b6040516307dba22560e31b81526001600160a01b03838116600483015260248201859052600160448301527f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac1690633edd1128906064016020604051808303816000875af115801561027a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029e91906108d7565b9392505050565b60006102d37f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac3330866104f3565b60006102ff7f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac3061071d565b60405163234b674560e01b81526001600160a01b038581166004830152602482018790526127106044830152600160648301529192506000917f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac169063234b67459060840160408051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906108f0565b91505060006103d57f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac3061071d565b9050856103e28285610914565b1461040057604051634a613c4160e01b815260040160405180910390fd5b50949350505050565b60007f000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac6001600160a01b03166321115d6d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048d9190610939565b6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ee91906108d7565b905090565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916105579190610956565b6000604051808303816000865af19150503d8060008114610594576040519150601f19603f3d011682016040523d82523d6000602084013e610599565b606091505b5091509150856001600160a01b03163b600014806105b5575081155b806105dc57508051158015906105dc5750808060200190518101906105da9190610972565b155b156106095785828260405163e7e40b5b60e01b815260040161060093929190610994565b60405180910390fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161066d9190610956565b6000604051808303816000865af19150503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b5091509150846001600160a01b03163b600014806106cb575081155b806106f257508051158015906106f25750808060200190518101906106f09190610972565b155b156107165784828260405163e7e40b5b60e01b815260040161060093929190610994565b5050505050565b604080516001600160a01b0383811660248084019190915283518084039091018152604490920183526020820180516001600160e01b03166370a0823160e01b179052915160009283928392918716916107779190610956565b600060405180830381855afa9150503d80600081146107b2576040519150601f19603f3d011682016040523d82523d6000602084013e6107b7565b606091505b5091509150846001600160a01b03163b600014806107d3575081155b806107df575060208151105b156108035784828260405163e7e40b5b60e01b815260040161060093929190610994565b8080602001905181019061081791906108d7565b95945050505050565b6001600160a01b038116811461083557600080fd5b50565b6000806040838503121561084b57600080fd5b82359150602083013561085d81610820565b809150509250929050565b60005b8381101561088357818101518382015260200161086b565b83811115610892576000848401525b50505050565b600081518084526108b0816020860160208601610868565b601f01601f19169290920160200192915050565b60208152600061029e6020830184610898565b6000602082840312156108e957600080fd5b5051919050565b6000806040838503121561090357600080fd5b505080516020909101519092909150565b60008282101561093457634e487b7160e01b600052601160045260246000fd5b500390565b60006020828403121561094b57600080fd5b815161029e81610820565b60008251610968818460208701610868565b9190910192915050565b60006020828403121561098457600080fd5b8151801515811461029e57600080fd5b6001600160a01b038416815282151560208201526060604082018190526000906108179083018461089856fea26469706673582212208900a6e8719408dda75ed15e61e5c1ff6d15037e27fd8f07c3f906db9456f59864736f6c634300080d0033

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

000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1

-----Decoded View---------------
Arg [0] : _token (address): 0xfbef713696465DDab297164c3b6A0122D92A3bAc
Arg [1] : _underlyingToken (address): 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fbef713696465ddab297164c3b6a0122d92a3bac
Arg [1] : 000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1


Deployed Bytecode Sourcemap

23604:2195:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24262:386;;;;;;:::i;:::-;;:::i;:::-;;;616:25:1;;;604:2;589:18;24262:386:0;;;;;;;;23823:49;;;;;;;;-1:-1:-1;;;;;816:32:1;;;798:51;;786:2;771:18;23823:49:0;652:203:1;23719:49:0;;;;;;;;;;;;;;;-1:-1:-1;;;23719:49:0;;;;;;;;;;;;:::i;24691:1105::-;;;;;;:::i;:::-;;:::i;24056:163::-;;;:::i;23777:39::-;;;;;24262:386;24338:7;24358:79;24386:15;24403:10;24423:4;24430:6;24358:27;:79::i;:::-;24448:49;24471:15;24488:5;24495:1;24448:22;:49::i;:::-;24508:54;24531:15;24548:5;24555:6;24508:22;:54::i;:::-;24582:58;;-1:-1:-1;;;24582:58:0;;-1:-1:-1;;;;;1825:32:1;;;24582:58:0;;;1807:51:1;1874:18;;;1867:34;;;24635:4:0;1917:18:1;;;1910:50;24601:5:0;24582:33;;;;1780:18:1;;24582:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;24575:65;24262:386;-1:-1:-1;;;24262:386:0:o;24691:1105::-;24769:7;24789:69;24817:5;24824:10;24844:4;24851:6;24789:27;:69::i;:::-;24871:21;24895:46;24920:5;24935:4;24895:24;:46::i;:::-;24984:77;;-1:-1:-1;;;24984:77:0;;-1:-1:-1;;;;;2403:32:1;;;24984:77:0;;;2385:51:1;2452:18;;;2445:34;;;23707:5:0;2495:18:1;;;2488:34;25056:4:0;2538:18:1;;;2531:50;24871:70:0;;-1:-1:-1;24957:23:0;;25003:5;24984:34;;;;2357:19:1;;24984:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;24954:107;;;25074:20;25097:46;25122:5;25137:4;25097:24;:46::i;:::-;25074:69;-1:-1:-1;25698:6:0;25666:28;25074:69;25666:13;:28;:::i;:::-;:38;25662:92;;25728:14;;-1:-1:-1;;;25728:14:0;;;;;;;;;;;25662:92;-1:-1:-1;25773:15:0;24691:1105;-1:-1:-1;;;;24691:1105:0:o;24056:163::-;24105:7;24173:5;-1:-1:-1;;;;;24154:37:0;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;24132:77:0;;:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;24125:86;;24056:163;:::o;20857:443::-;21029:78;;;-1:-1:-1;;;;;3604:15:1;;;21029:78:0;;;3586:34:1;3656:15;;;3636:18;;;3629:43;3688:18;;;;3681:34;;;21029:78:0;;;;;;;;;;3521:18:1;;;;21029:78:0;;;;;;;-1:-1:-1;;;;;21029:78:0;-1:-1:-1;;;21029:78:0;;;21004:114;;-1:-1:-1;;;;21004:10:0;;;;:114;;21029:78;21004:114;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20968:150;;;;21135:5;-1:-1:-1;;;;;21135:17:0;;21156:1;21135:22;:34;;;;21162:7;21161:8;21135:34;:85;;;-1:-1:-1;21174:11:0;;:16;;;;:45;;;21206:4;21195:24;;;;;;;;;;;;:::i;:::-;21194:25;21174:45;21131:162;;;21260:5;21267:7;21276:4;21244:37;;-1:-1:-1;;;21244:37:0;;;;;;;;;;:::i;:::-;;;;;;;;21131:162;20957:343;;20857:443;;;;:::o;20027:405::-;20176:63;;;-1:-1:-1;;;;;4880:32:1;;;20176:63:0;;;4862:51:1;4929:18;;;;4922:34;;;20176:63:0;;;;;;;;;;4835:18:1;;;;20176:63:0;;;;;;;-1:-1:-1;;;;;20176:63:0;-1:-1:-1;;;20176:63:0;;;20151:99;;-1:-1:-1;;;;20151:10:0;;;;:99;;20176:63;20151:99;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20115:135;;;;20267:5;-1:-1:-1;;;;;20267:17:0;;20288:1;20267:22;:34;;;;20294:7;20293:8;20267:34;:85;;;-1:-1:-1;20306:11:0;;:16;;;;:45;;;20338:4;20327:24;;;;;;;;;;;;:::i;:::-;20326:25;20306:45;20263:162;;;20392:5;20399:7;20408:4;20376:37;;-1:-1:-1;;;20376:37:0;;;;;;;;;;:::i;20263:162::-;20104:328;;20027:405;;;:::o;18468:432::-;18633:58;;;-1:-1:-1;;;;;816:32:1;;;18633:58:0;;;;798:51:1;;;;18633:58:0;;;;;;;;;;771:18:1;;;;18633:58:0;;;;;;;-1:-1:-1;;;;;18633:58:0;-1:-1:-1;;;18633:58:0;;;18602:100;;18546:7;;;;;;18602:16;;;;:100;;18633:58;18602:100;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18566:136;;;;18719:5;-1:-1:-1;;;;;18719:17:0;;18740:1;18719:22;:34;;;;18746:7;18745:8;18719:34;:54;;;;18771:2;18757:4;:11;:16;18719:54;18715:131;;;18813:5;18820:7;18829:4;18797:37;;-1:-1:-1;;;18797:37:0;;;;;;;;;;:::i;18715:131::-;18876:4;18865:27;;;;;;;;;;;;:::i;:::-;18858:34;18468:432;-1:-1:-1;;;;;18468:432:0:o;14:131:1:-;-1:-1:-1;;;;;89:31:1;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:315::-;218:6;226;279:2;267:9;258:7;254:23;250:32;247:52;;;295:1;292;285:12;247:52;331:9;318:23;308:33;;391:2;380:9;376:18;363:32;404:31;429:5;404:31;:::i;:::-;454:5;444:15;;;150:315;;;;;:::o;860:258::-;932:1;942:113;956:6;953:1;950:13;942:113;;;1032:11;;;1026:18;1013:11;;;1006:39;978:2;971:10;942:113;;;1073:6;1070:1;1067:13;1064:48;;;1108:1;1099:6;1094:3;1090:16;1083:27;1064:48;;860:258;;;:::o;1123:::-;1165:3;1203:5;1197:12;1230:6;1225:3;1218:19;1246:63;1302:6;1295:4;1290:3;1286:14;1279:4;1272:5;1268:16;1246:63;:::i;:::-;1363:2;1342:15;-1:-1:-1;;1338:29:1;1329:39;;;;1370:4;1325:50;;1123:258;-1:-1:-1;;1123:258:1:o;1386:220::-;1535:2;1524:9;1517:21;1498:4;1555:45;1596:2;1585:9;1581:18;1573:6;1555:45;:::i;1971:184::-;2041:6;2094:2;2082:9;2073:7;2069:23;2065:32;2062:52;;;2110:1;2107;2100:12;2062:52;-1:-1:-1;2133:16:1;;1971:184;-1:-1:-1;1971:184:1:o;2592:245::-;2671:6;2679;2732:2;2720:9;2711:7;2707:23;2703:32;2700:52;;;2748:1;2745;2738:12;2700:52;-1:-1:-1;;2771:16:1;;2827:2;2812:18;;;2806:25;2771:16;;2806:25;;-1:-1:-1;2592:245:1:o;2842:222::-;2882:4;2910:1;2907;2904:8;2901:131;;;2954:10;2949:3;2945:20;2942:1;2935:31;2989:4;2986:1;2979:15;3017:4;3014:1;3007:15;2901:131;-1:-1:-1;3049:9:1;;2842:222::o;3069:272::-;3160:6;3213:2;3201:9;3192:7;3188:23;3184:32;3181:52;;;3229:1;3226;3219:12;3181:52;3261:9;3255:16;3280:31;3305:5;3280:31;:::i;3726:274::-;3855:3;3893:6;3887:13;3909:53;3955:6;3950:3;3943:4;3935:6;3931:17;3909:53;:::i;:::-;3978:16;;;;;3726:274;-1:-1:-1;;3726:274:1:o;4005:277::-;4072:6;4125:2;4113:9;4104:7;4100:23;4096:32;4093:52;;;4141:1;4138;4131:12;4093:52;4173:9;4167:16;4226:5;4219:13;4212:21;4205:5;4202:32;4192:60;;4248:1;4245;4238:12;4287:396;-1:-1:-1;;;;;4484:32:1;;4466:51;;4560:14;;4553:22;4548:2;4533:18;;4526:50;4612:2;4607;4592:18;;4585:30;;;-1:-1:-1;;4632:45:1;;4658:18;;4650:6;4632:45;:::i

Swarm Source

ipfs://8900a6e8719408dda75ed15e61e5c1ff6d15037e27fd8f07c3f906db9456f598

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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.