ETH Price: $3,464.76 (+2.35%)

Contract

0x1E188DD74adf8CC95c98714407e88a4a99b759A5
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Token Transfers found.

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StargateCurveLevSwapper

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 690 runs

Other Settings:
default evmVersion
File 1 of 8 : StargateCurveLevSwapper.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/ILevSwapperGeneric.sol";
import "../../interfaces/IBentoBoxV1.sol";
import "../../interfaces/IERC20.sol";
import "../../interfaces/curve/ICurvePool.sol";
import "../../interfaces/stargate/IStargateRouter.sol";
import "../../interfaces/stargate/IStargatePool.sol";

/// @notice Leverage Swapper for Stargate LP using Curve
contract StargateCurveLevSwapper is ILevSwapperGeneric {
    using Address for address;

    IBentoBoxV1 public immutable degenBox;
    IStargatePool public immutable pool;
    IStargateRouter public immutable stargateRouter;
    CurvePool public immutable curvePool;
    int128 public immutable curvePoolI;
    int128 public immutable curvePoolJ;
    uint256 public immutable poolId;
    IERC20 public immutable underlyingPoolToken;
    IERC20 public immutable mim;

    constructor(
        IBentoBoxV1 _degenBox,
        IStargatePool _pool,
        uint16 _poolId,
        IStargateRouter _stargateRouter,
        CurvePool _curvePool,
        int128 _curvePoolI,
        int128 _curvePoolJ
    ) {
        degenBox = _degenBox;
        pool = _pool;
        poolId = _poolId;
        stargateRouter = _stargateRouter;
        curvePool = _curvePool;
        curvePoolI = _curvePoolI;
        curvePoolJ = _curvePoolJ;
        mim = IERC20(_curvePool.coins(uint128(_curvePoolI)));
        underlyingPoolToken = IERC20(_pool.token());

        mim.approve(address(_curvePool), type(uint256).max);
        _safeApprove(underlyingPoolToken, address(_stargateRouter), type(uint256).max);
        IERC20(address(pool)).approve(address(_degenBox), type(uint256).max);
    }

    // Swaps to a flexible amount, from an exact input amount
    function swap(
        address recipient,
        uint256 shareToMin,
        uint256 shareFrom
    ) public override returns (uint256 extraShare, uint256 shareReturned) {
        (uint256 amount, ) = degenBox.withdraw(mim, address(this), address(this), 0, shareFrom);

        // MIM -> Stargate Pool Underlying Token
        amount = curvePool.exchange_underlying(curvePoolI, curvePoolJ, amount, 0, address(this));

        // Underlying Token -> Stargate Pool LP
        stargateRouter.addLiquidity(poolId, amount, address(this));
        amount = IERC20(address(pool)).balanceOf(address(this));

        (, shareReturned) = degenBox.deposit(IERC20(address(pool)), address(this), recipient, amount, 0);
        extraShare = shareReturned - shareToMin;
    }

    /// @dev copied from @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol to avoid IERC20 naming conflict
    function _safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) private {
        // solhint-disable-next-line reason-string
        require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance");

        bytes memory returndata = address(token).functionCall(
            abi.encodeWithSelector(token.approve.selector, spender, value),
            "SafeERC20: low-level call failed"
        );
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line reason-string
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 2 of 8 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 8 : ILevSwapperGeneric.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;

interface ILevSwapperGeneric {
    /// @notice Swaps to a flexible amount, from an exact input amount
    function swap(
        address recipient,
        uint256 shareToMin,
        uint256 shareFrom
    ) external returns (uint256 extraShare, uint256 shareReturned);
}

File 4 of 8 : IBentoBoxV1.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;

import "./IERC20.sol";

interface IBentoBoxV1 {
    function toAmount(
        address _token,
        uint256 _share,
        bool _roundUp
    ) external view returns (uint256);

    function withdraw(
        IERC20 token,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256, uint256);

    function deposit(
        IERC20 token,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256, uint256);

    function deploy(
        address masterContract,
        bytes calldata data,
        bool useCreate2
    ) external payable returns (address cloneAddress);

    function setMasterContractApproval(
        address user,
        address masterContract,
        bool approved,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

    function totals(IERC20) external view returns (uint128 elastic, uint128 base);

    function flashLoan(
        address borrower,
        address receiver,
        IERC20 token,
        uint256 amount,
        bytes calldata data
    ) external;

    function toShare(
        address token,
        uint256 amount,
        bool roundUp
    ) external view returns (uint256 share);
}

File 5 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;

interface IERC20 {
    function totalSupply() external view returns (uint256);

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

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

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

    function transfer(address recipient, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

    /// @notice EIP 2612
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 6 of 8 : ICurvePool.sol
// SPDX-License-Identifier: MIT
// solhint-disable func-name-mixedcase, var-name-mixedcase
pragma solidity >=0.6.12;

interface CurvePool {
    function coins(uint256 i) external view returns (address);

    function exchange_underlying(
        int128 i,
        int128 j,
        uint256 dx,
        uint256 min_dy,
        address receiver
    ) external returns (uint256);

    function exchange(
        int128 i,
        int128 j,
        uint256 dx,
        uint256 min_dy,
        address receiver
    ) external returns (uint256);

    function exchange(
        uint256 i,
        uint256 j,
        uint256 dx,
        uint256 min_dy
    ) external returns (uint256);

    function get_dy_underlying(
        int128 i,
        int128 j,
        uint256 dx
    ) external view returns (uint256);

    function get_dy(
        int128 i,
        int128 j,
        uint256 dx
    ) external view returns (uint256);

    function approve(address _spender, uint256 _value) external returns (bool);

    function add_liquidity(uint256[2] memory amounts, uint256 _min_mint_amount) external;

    function add_liquidity(uint256[3] memory amounts, uint256 _min_mint_amount) external;

    function add_liquidity(uint256[4] memory amounts, uint256 _min_mint_amount) external;

    function remove_liquidity_one_coin(
        uint256 tokenAmount,
        int128 i,
        uint256 min_amount
    ) external returns (uint256);

    function remove_liquidity_one_coin(
        uint256 tokenAmount,
        uint256 i,
        uint256 min_amount
    ) external returns (uint256);

    function remove_liquidity_one_coin(
        uint256 tokenAmount,
        int128 i,
        uint256 min_amount,
        address receiver
    ) external returns (uint256);
}

File 7 of 8 : IStargateRouter.sol
// SPDX-License-Identifier: BUSL-1.1
// solhint-disable contract-name-camelcase

pragma solidity >=0.7.6;
pragma abicoder v2;

interface IStargateRouter {
    struct lzTxObj {
        uint256 dstGasForCall;
        uint256 dstNativeAmount;
        bytes dstNativeAddr;
    }

    function addLiquidity(
        uint256 _poolId,
        uint256 _amountLD,
        address _to
    ) external;

    function swap(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLD,
        uint256 _minAmountLD,
        lzTxObj memory _lzTxParams,
        bytes calldata _to,
        bytes calldata _payload
    ) external payable;

    function redeemRemote(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        uint256 _minAmountLD,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external payable;

    function instantRedeemLocal(
        uint16 _srcPoolId,
        uint256 _amountLP,
        address _to
    ) external returns (uint256);

    function redeemLocal(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external payable;

    function sendCredits(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress
    ) external payable;

    function quoteLayerZeroFee(
        uint16 _dstChainId,
        uint8 _functionType,
        bytes calldata _toAddress,
        bytes calldata _transferAndCallPayload,
        lzTxObj memory _lzTxParams
    ) external view returns (uint256, uint256);
}

File 8 of 8 : IStargatePool.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.6.12;

interface IStargatePool {
    function totalLiquidity() external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function localDecimals() external view returns (uint256);

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IBentoBoxV1","name":"_degenBox","type":"address"},{"internalType":"contract IStargatePool","name":"_pool","type":"address"},{"internalType":"uint16","name":"_poolId","type":"uint16"},{"internalType":"contract IStargateRouter","name":"_stargateRouter","type":"address"},{"internalType":"contract CurvePool","name":"_curvePool","type":"address"},{"internalType":"int128","name":"_curvePoolI","type":"int128"},{"internalType":"int128","name":"_curvePoolJ","type":"int128"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"curvePool","outputs":[{"internalType":"contract CurvePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curvePoolI","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curvePoolJ","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"degenBox","outputs":[{"internalType":"contract IBentoBoxV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mim","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract IStargatePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stargateRouter","outputs":[{"internalType":"contract IStargateRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"shareToMin","type":"uint256"},{"internalType":"uint256","name":"shareFrom","type":"uint256"}],"name":"swap","outputs":[{"internalType":"uint256","name":"extraShare","type":"uint256"},{"internalType":"uint256","name":"shareReturned","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingPoolToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101a06040523480156200001257600080fd5b50604051620011c8380380620011c883398101604081905262000035916200064e565b6001600160a01b0387811660805286811660a05261ffff86166101405284811660c052831660e0819052600f83810b6101005282900b6101205260405163c661065760e01b81526001600160801b038416600482015263c661065790602401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620006f7565b6001600160a01b0316610180816001600160a01b031681525050856001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620006f7565b6001600160a01b03908116610160526101805160405163095ea7b360e01b81528583166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620001b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d9919062000717565b5061016051620001ed908560001962000276565b60a05160405163095ea7b360e01b81526001600160a01b03898116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af115801562000242573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000268919062000717565b5050505050505050620007d7565b801580620002f45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015620002cc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f291906200073b565b155b6200036c5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663095ea7b360e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564848201526000936200040093928816929162000488811b6200065b17901c565b80519091501562000482578080602001905181019062000421919062000717565b620004825760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000363565b50505050565b6060620004998484600085620004a3565b90505b9392505050565b606082471015620005065760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000363565b6001600160a01b0385163b6200055f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000363565b600080866001600160a01b031685876040516200057d919062000784565b60006040518083038185875af1925050503d8060008114620005bc576040519150601f19603f3d011682016040523d82523d6000602084013e620005c1565b606091505b509092509050620005d4828286620005df565b979650505050505050565b60608315620005f05750816200049c565b825115620006015782518084602001fd5b8160405162461bcd60e51b8152600401620003639190620007a2565b6001600160a01b03811681146200063357600080fd5b50565b8051600f81900b81146200064957600080fd5b919050565b600080600080600080600060e0888a0312156200066a57600080fd5b875162000677816200061d565b60208901519097506200068a816200061d565b604089015190965061ffff81168114620006a357600080fd5b6060890151909550620006b6816200061d565b6080890151909450620006c9816200061d565b9250620006d960a0890162000636565b9150620006e960c0890162000636565b905092959891949750929550565b6000602082840312156200070a57600080fd5b81516200049c816200061d565b6000602082840312156200072a57600080fd5b815180151581146200049c57600080fd5b6000602082840312156200074e57600080fd5b5051919050565b60005b838110156200077257818101518382015260200162000758565b83811115620004825750506000910152565b600082516200079881846020870162000755565b9190910192915050565b6020815260008251806020840152620007c381604085016020870162000755565b601f01601f19169190910160400192915050565b60805160a05160c05160e051610100516101205161014051610160516101805161093b6200088d6000396000818161023f015261029f015260006101c901526000818161016d01526104550152600081816101a2015261039201526000818160c8015261036701526000818161014601526103d1015260008181610266015261048b01526000818161010701528181610502015261058d015260008181610218015281816102e901526105d4015261093b6000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80639dd6126e116100765780639f495c151161005b5780639f495c15146102135780639f67679e1461023a578063a9e56f3c1461026157600080fd5b80639dd6126e146101c45780639f1d0f59146101eb57600080fd5b8063218751b2116100a7578063218751b2146101415780633e0dc34e146101685780637c3e13e31461019d57600080fd5b806307a65882146100c357806316f0115b14610102575b600080fd5b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b604051600f9190910b81526020015b60405180910390f35b6101297f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100f9565b6101297f000000000000000000000000000000000000000000000000000000000000000081565b61018f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100f9565b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b6101297f000000000000000000000000000000000000000000000000000000000000000081565b6101fe6101f93660046107e3565b610288565b604080519283526020830191909152016100f9565b6101297f000000000000000000000000000000000000000000000000000000000000000081565b6101297f000000000000000000000000000000000000000000000000000000000000000081565b6101297f000000000000000000000000000000000000000000000000000000000000000081565b60405163097da6d360e41b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152306024830181905260448301526000606483018190526084830184905291829182917f0000000000000000000000000000000000000000000000000000000000000000909116906397da6d309060a40160408051808303816000875af1158015610333573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103579190610824565b506040516322770cc360e11b81527f0000000000000000000000000000000000000000000000000000000000000000600f90810b60048301527f0000000000000000000000000000000000000000000000000000000000000000900b602482015260448101829052600060648201523060848201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906344ee19869060a4016020604051808303816000875af1158015610422573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104469190610848565b6040516321ec87bf60e21b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018290523060448201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906387b21efc90606401600060405180830381600087803b1580156104d757600080fd5b505af11580156104eb573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506370a082319150602401602060405180830381865afa158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190610848565b60405162ae511b60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152306024830152888116604483015260648201839052600060848301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906302b9446c9060a40160408051808303816000875af115801561061e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106429190610824565b925061065090508583610861565b925050935093915050565b606061066a8484600085610674565b90505b9392505050565b6060824710156106da5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084015b60405180910390fd5b6001600160a01b0385163b6107315760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106d1565b600080866001600160a01b0316858760405161074d91906108b6565b60006040518083038185875af1925050503d806000811461078a576040519150601f19603f3d011682016040523d82523d6000602084013e61078f565b606091505b509150915061079f8282866107aa565b979650505050505050565b606083156107b957508161066d565b8251156107c95782518084602001fd5b8160405162461bcd60e51b81526004016106d191906108d2565b6000806000606084860312156107f857600080fd5b83356001600160a01b038116811461080f57600080fd5b95602085013595506040909401359392505050565b6000806040838503121561083757600080fd5b505080516020909101519092909150565b60006020828403121561085a57600080fd5b5051919050565b60008282101561088157634e487b7160e01b600052601160045260246000fd5b500390565b60005b838110156108a1578181015183820152602001610889565b838111156108b0576000848401525b50505050565b600082516108c8818460208701610886565b9190910192915050565b60208152600082518060208401526108f1816040850160208701610886565b601f01601f1916919091016040019291505056fea2646970667358221220b197ca8b8b57d667b2ecc0df26e273e0289362824304ee1ae5cfed698d6afcb764736f6c634300080a0033000000000000000000000000d96f48665a1410c0cd669a88898eca36b9fc2cce00000000000000000000000038ea452219524bb87e18de1c24d3bb59510bd78300000000000000000000000000000000000000000000000000000000000000020000000000000000000000008731d54e9d02c286767d56ac03e8037c07e01e980000000000000000000000005a6a4d54456819380173272a5e8e9b9904bdf41b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100be5760003560e01c80639dd6126e116100765780639f495c151161005b5780639f495c15146102135780639f67679e1461023a578063a9e56f3c1461026157600080fd5b80639dd6126e146101c45780639f1d0f59146101eb57600080fd5b8063218751b2116100a7578063218751b2146101415780633e0dc34e146101685780637c3e13e31461019d57600080fd5b806307a65882146100c357806316f0115b14610102575b600080fd5b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b604051600f9190910b81526020015b60405180910390f35b6101297f00000000000000000000000038ea452219524bb87e18de1c24d3bb59510bd78381565b6040516001600160a01b0390911681526020016100f9565b6101297f0000000000000000000000005a6a4d54456819380173272a5e8e9b9904bdf41b81565b61018f7f000000000000000000000000000000000000000000000000000000000000000281565b6040519081526020016100f9565b6100ea7f000000000000000000000000000000000000000000000000000000000000000381565b6101297f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b6101fe6101f93660046107e3565b610288565b604080519283526020830191909152016100f9565b6101297f000000000000000000000000d96f48665a1410c0cd669a88898eca36b9fc2cce81565b6101297f00000000000000000000000099d8a9c45b2eca8864373a26d1459e3dff1e17f381565b6101297f0000000000000000000000008731d54e9d02c286767d56ac03e8037c07e01e9881565b60405163097da6d360e41b81526001600160a01b037f00000000000000000000000099d8a9c45b2eca8864373a26d1459e3dff1e17f381166004830152306024830181905260448301526000606483018190526084830184905291829182917f000000000000000000000000d96f48665a1410c0cd669a88898eca36b9fc2cce909116906397da6d309060a40160408051808303816000875af1158015610333573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103579190610824565b506040516322770cc360e11b81527f0000000000000000000000000000000000000000000000000000000000000000600f90810b60048301527f0000000000000000000000000000000000000000000000000000000000000003900b602482015260448101829052600060648201523060848201529091507f0000000000000000000000005a6a4d54456819380173272a5e8e9b9904bdf41b6001600160a01b0316906344ee19869060a4016020604051808303816000875af1158015610422573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104469190610848565b6040516321ec87bf60e21b81527f00000000000000000000000000000000000000000000000000000000000000026004820152602481018290523060448201529091507f0000000000000000000000008731d54e9d02c286767d56ac03e8037c07e01e986001600160a01b0316906387b21efc90606401600060405180830381600087803b1580156104d757600080fd5b505af11580156104eb573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201527f00000000000000000000000038ea452219524bb87e18de1c24d3bb59510bd7836001600160a01b031692506370a082319150602401602060405180830381865afa158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190610848565b60405162ae511b60e21b81526001600160a01b037f00000000000000000000000038ea452219524bb87e18de1c24d3bb59510bd78381166004830152306024830152888116604483015260648201839052600060848301529192507f000000000000000000000000d96f48665a1410c0cd669a88898eca36b9fc2cce909116906302b9446c9060a40160408051808303816000875af115801561061e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106429190610824565b925061065090508583610861565b925050935093915050565b606061066a8484600085610674565b90505b9392505050565b6060824710156106da5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084015b60405180910390fd5b6001600160a01b0385163b6107315760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106d1565b600080866001600160a01b0316858760405161074d91906108b6565b60006040518083038185875af1925050503d806000811461078a576040519150601f19603f3d011682016040523d82523d6000602084013e61078f565b606091505b509150915061079f8282866107aa565b979650505050505050565b606083156107b957508161066d565b8251156107c95782518084602001fd5b8160405162461bcd60e51b81526004016106d191906108d2565b6000806000606084860312156107f857600080fd5b83356001600160a01b038116811461080f57600080fd5b95602085013595506040909401359392505050565b6000806040838503121561083757600080fd5b505080516020909101519092909150565b60006020828403121561085a57600080fd5b5051919050565b60008282101561088157634e487b7160e01b600052601160045260246000fd5b500390565b60005b838110156108a1578181015183820152602001610889565b838111156108b0576000848401525b50505050565b600082516108c8818460208701610886565b9190910192915050565b60208152600082518060208401526108f1816040850160208701610886565b601f01601f1916919091016040019291505056fea2646970667358221220b197ca8b8b57d667b2ecc0df26e273e0289362824304ee1ae5cfed698d6afcb764736f6c634300080a0033

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

000000000000000000000000d96f48665a1410c0cd669a88898eca36b9fc2cce00000000000000000000000038ea452219524bb87e18de1c24d3bb59510bd78300000000000000000000000000000000000000000000000000000000000000020000000000000000000000008731d54e9d02c286767d56ac03e8037c07e01e980000000000000000000000005a6a4d54456819380173272a5e8e9b9904bdf41b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003

-----Decoded View---------------
Arg [0] : _degenBox (address): 0xd96f48665a1410C0cd669A88898ecA36B9Fc2cce
Arg [1] : _pool (address): 0x38EA452219524Bb87e18dE1C24D3bB59510BD783
Arg [2] : _poolId (uint16): 2
Arg [3] : _stargateRouter (address): 0x8731d54E9D02c286767d56ac03e8037C07e01e98
Arg [4] : _curvePool (address): 0x5a6A4D54456819380173272A5E8E9B9904BdF41B
Arg [5] : _curvePoolI (int128): 0
Arg [6] : _curvePoolJ (int128): 3

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000d96f48665a1410c0cd669a88898eca36b9fc2cce
Arg [1] : 00000000000000000000000038ea452219524bb87e18de1c24d3bb59510bd783
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 0000000000000000000000008731d54e9d02c286767d56ac03e8037c07e01e98
Arg [4] : 0000000000000000000000005a6a4d54456819380173272a5e8e9b9904bdf41b
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.