ETH Price: $2,036.66 (+3.85%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit Asset213213282024-12-03 10:17:47454 days ago1733221067IN
0x53b3AEFe...3Fdbff731
0 ETH0.0043855416.28874034
Withdraw Asset211031782024-11-02 23:16:47485 days ago1730589407IN
0x53b3AEFe...3Fdbff731
0 ETH0.001045734.0568189
Withdraw Asset209493982024-10-12 12:03:23506 days ago1728734603IN
0x53b3AEFe...3Fdbff731
0 ETH0.002425399.40906899
Claim209493922024-10-12 12:02:11506 days ago1728734531IN
0x53b3AEFe...3Fdbff731
0 ETH0.001479210.06340485
Withdraw Asset204594802024-08-05 2:48:59574 days ago1722826139IN
0x53b3AEFe...3Fdbff731
0 ETH0.03098343119.92023504
Withdraw Asset204031002024-07-28 5:57:47582 days ago1722146267IN
0x53b3AEFe...3Fdbff731
0 ETH0.000376931.55518533
Deposit Asset203232892024-07-17 2:34:35593 days ago1721183675IN
0x53b3AEFe...3Fdbff731
0 ETH0.001666426.18141204
Deposit Asset203074922024-07-14 21:40:59596 days ago1720993259IN
0x53b3AEFe...3Fdbff731
0 ETH0.001108664.19088636
Deposit Asset203049832024-07-14 13:16:35596 days ago1720962995IN
0x53b3AEFe...3Fdbff731
0 ETH0.000704652.48743091
Deposit Asset202727352024-07-10 1:12:59600 days ago1720573979IN
0x53b3AEFe...3Fdbff731
0 ETH0.000832143.11716254
Deposit Asset201836072024-06-27 14:25:11613 days ago1719498311IN
0x53b3AEFe...3Fdbff731
0 ETH0.0033846312.37515721

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x61012060201790292024-06-26 23:05:47614 days ago1719443147  Contract Creation0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
Vault

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.22;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

interface IFactory {
    function claim() external returns (uint);
    function claimable(address vault) external view returns(uint);
}

interface IPool is IERC20 {
    function asset() external view returns (address);
    function deposit(uint256 assets) external returns (uint256 shares);
    function withdraw(uint256 assets) external returns (uint256 shares);
}

interface IWETH is IERC20 {
    function deposit() external payable;
    function withdraw(uint wad) external;
}

contract Vault {

    using SafeERC20 for IERC20;
    uint constant MANTISSA = 1e18;
    IPool public immutable pool;
    IERC20 public immutable asset;
    IERC20 public immutable gtr;
    bool public immutable isWETH;
    IFactory public factory;
    uint public lastUpdate;
    uint public rewardIndexMantissa;
    uint public totalSupply;
    uint256 private locked = 1;
    bytes32 public immutable DOMAIN_SEPARATOR;
    mapping(address => uint) public balanceOf;
    mapping(address => uint) public nonces;    
    mapping (address => mapping (address => uint)) public allowance;
    mapping (address => uint) public accountIndexMantissa;
    mapping (address => uint) public accruedRewards;

    constructor(
        address _pool,
        bool _isWETH,
        address _gtr
    ) {
        pool = IPool(_pool);
        asset = IERC20(IPool(_pool).asset());
        factory = IFactory(msg.sender);
        isWETH = _isWETH;
        gtr = IERC20(_gtr);
        asset.forceApprove(_pool, type(uint256).max);
    }

    modifier onlyWETH() {
        require(isWETH, "onlyWETH");
        _;
    }

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }

    receive() external payable {}

    function updateIndex(address user) internal {
        uint deltaT = block.timestamp - lastUpdate;
        // if deltaT is 0, no need to update
        if(deltaT > 0) {
            // if totalSupply is 0, skip but update lastUpdate
            if(totalSupply > 0) {
                uint rewardsAccrued = factory.claim();
                rewardIndexMantissa += rewardsAccrued * MANTISSA / totalSupply;
            }
            lastUpdate = block.timestamp;
        }

        // accrue rewards for user
        uint deltaIndex = rewardIndexMantissa - accountIndexMantissa[user];
        uint bal = balanceOf[user];
        uint accountDelta = bal * deltaIndex;
        accountIndexMantissa[user] = rewardIndexMantissa;
        // divide by MANTISSA because rewardIndexMantissa is scaled by MANTISSA
        accruedRewards[user] += accountDelta / MANTISSA;
    }

    function reapprove() external {
        asset.forceApprove(address(pool), type(uint256).max);
    }

    function depositShares(uint amount, address recipient) public {
        updateIndex(recipient);
        balanceOf[recipient] += amount;
        totalSupply += amount;
        pool.transferFrom(msg.sender, address(this), amount);
        emit Deposit(msg.sender, recipient, amount);
    }

    function depositShares(uint amount) external {
        depositShares(amount, msg.sender);
    }

    function depositAsset(uint amount, address recipient) public nonReentrant {
        updateIndex(recipient);
        asset.safeTransferFrom(msg.sender, address(this), amount);
        uint shares = pool.deposit(amount);
        balanceOf[recipient] += shares;
        totalSupply += shares;
        emit Deposit(msg.sender, recipient, shares);
    }

    function depositAsset(uint amount) external {
        depositAsset(amount, msg.sender);
    }

    function depositETH(address recipient) public payable onlyWETH {
        updateIndex(recipient);
        IWETH(address(asset)).deposit{value: msg.value}();
        uint shares = pool.deposit(msg.value);
        balanceOf[recipient] += shares;
        totalSupply += shares;
        emit Deposit(msg.sender, recipient, shares);
    }

    function depositETH() external payable onlyWETH {
        depositETH(msg.sender);
    }

    function withdrawETH(uint amount, address payable recipient, address owner) public onlyWETH {
        updateIndex(owner);
        uint shares = pool.withdraw(amount);
        if (msg.sender != owner) {
            uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.

            if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;
        }
        balanceOf[owner] -= shares;
        totalSupply -= shares;
        IWETH(address(asset)).withdraw(amount);
        emit Withdraw(msg.sender, recipient, owner, shares);
        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Transfer failed.");
    }

    function withdrawETH(uint amount) external onlyWETH {
        withdrawETH(amount, payable(msg.sender), msg.sender);
    }

    function withdrawShares(uint amount, address recipient, address owner) public {
        updateIndex(owner);
        if (msg.sender != owner) {
            uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.

            if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - amount;
        }
        balanceOf[owner] -= amount;
        totalSupply -= amount;
        pool.transfer(recipient, amount);
        emit Withdraw(msg.sender, recipient, owner, amount);
    }

    function withdrawShares(uint amount) external {
        withdrawShares(amount, msg.sender, msg.sender);
    }

    function withdrawAsset(uint amount, address recipient, address owner) public {
        updateIndex(owner);
        uint shares = pool.withdraw(amount);
        if (msg.sender != owner) {
            uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.

            if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;
        }
        balanceOf[owner] -= shares;
        totalSupply -= shares;
        asset.safeTransfer(recipient, amount);
        emit Withdraw(msg.sender, recipient, owner, shares);
    }

    function withdrawAsset(uint amount) external {
        withdrawAsset(amount, msg.sender, msg.sender);
    }

    function claimable(address user) public view returns(uint) {
        uint rewardsAccrued = factory.claimable(address(this));
        uint _rewardIndexMantissa = totalSupply > 0 ? rewardIndexMantissa + (rewardsAccrued * MANTISSA / totalSupply) : rewardIndexMantissa;
        uint deltaIndex = _rewardIndexMantissa - accountIndexMantissa[user];
        uint bal = balanceOf[user];
        uint accountDelta = bal * deltaIndex / MANTISSA;
        return (accruedRewards[user] + accountDelta);
    }

    function claim(address user) public {
        updateIndex(user);
        uint amount = accruedRewards[user];
        accruedRewards[user] = 0;
        gtr.transfer(user, amount);
        emit Claim(user, amount);
    }

    function claim() external {
        claim(msg.sender);
    }

    function approve(address spender, uint256 amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    event Approval(address indexed owner, address indexed spender, uint value);
    event Deposit(address indexed caller, address indexed owner, uint amount);
    event Withdraw(address indexed caller, address indexed recipient, address indexed owner, uint amount);
    event Claim(address indexed owner, uint amount);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

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

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"bool","name":"_isWETH","type":"bool"},{"internalType":"address","name":"_gtr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountIndexMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accruedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"depositAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"depositShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gtr","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWETH","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reapprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardIndexMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdrawAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdrawShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

61012060405260016004553480156200001757600080fd5b5060405162002261380380620022618339810160408190526200003a916200045a565b6001600160a01b0383166080819052604080516338d52e0f60e01b815290516338d52e0f916004808201926020929091908290030181865afa15801562000085573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ab9190620004a4565b6001600160a01b0390811660a0819052600080546001600160a01b0319163317905583151560e05290821660c052620000e89084600019620000f1565b50505062000511565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200014b9085908390620001bd16565b620001b757604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620001ab9186916200026e16565b620001b784826200026e565b50505050565b6000806000846001600160a01b031684604051620001dc9190620004c2565b6000604051808303816000865af19150503d80600081146200021b576040519150601f19603f3d011682016040523d82523d6000602084013e62000220565b606091505b50915091508180156200024e5750805115806200024e5750808060200190518101906200024e9190620004f3565b80156200026557506000856001600160a01b03163b115b95945050505050565b6000620002856001600160a01b03841683620002e1565b90508051600014158015620002ad575080806020019051810190620002ab9190620004f3565b155b15620002dc57604051635274afe760e01b81526001600160a01b03841660048201526024015b60405180910390fd5b505050565b6060620002f183836000620002f8565b9392505050565b6060814710156200031f5760405163cd78605960e01b8152306004820152602401620002d3565b600080856001600160a01b031684866040516200033d9190620004c2565b60006040518083038185875af1925050503d80600081146200037c576040519150601f19603f3d011682016040523d82523d6000602084013e62000381565b606091505b509092509050620003948683836200039e565b9695505050505050565b606082620003b757620003b18262000402565b620002f1565b8151158015620003cf57506001600160a01b0384163b155b15620003fa57604051639996b31560e01b81526001600160a01b0385166004820152602401620002d3565b5080620002f1565b805115620004135780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80516001600160a01b03811681146200044457600080fd5b919050565b805180151581146200044457600080fd5b6000806000606084860312156200047057600080fd5b6200047b846200042c565b92506200048b6020850162000449565b91506200049b604085016200042c565b90509250925092565b600060208284031215620004b757600080fd5b620002f1826200042c565b6000825160005b81811015620004e55760208186018101518583015201620004c9565b506000920191825250919050565b6000602082840312156200050657600080fd5b620002f18262000449565b60805160a05160c05160e05161010051611c94620005cd60003960006103410152600081816103f4015281816107d301528181610cab015281816114b601526114fe015260008181610578015261071c0152600081816103750152818161082201528181610e490152818161112a015281816113d0015261146b01526000818161026a015281816108aa01528181610a9401528181610d08015281816110120152818161116b01528181611297015261148d0152611c946000f3fe6080604052600436106101dc5760003560e01c806370a0823111610102578063c45a015511610095578063e76b2be511610064578063e76b2be5146105e7578063f14210a614610614578063f6326fb314610634578063fa2df4141461063c57600080fd5b8063c45a015514610546578063d10fc10414610566578063d818f23a1461059a578063dd62ed3e146105af57600080fd5b806395e213d2116100d157806395e213d2146104d0578063b317f505146104f0578063b8767dd914610510578063c04637111461053057600080fd5b806370a08231146104365780637d28a2f2146104635780637ecebe00146104835780638d92fdf3146104b057600080fd5b8063318cbfac1161017a5780634ae4ab92116101495780634ae4ab92146103b75780634e71d92d146103cd5780635a806ac0146103e257806367da598e1461041657600080fd5b8063318cbfac1461030f5780633644e5151461032f57806338d52e0f14610363578063402914f51461039757600080fd5b806318160ddd116101b657806318160ddd146102a457806319810f3c146102ba5780631e83409a146102dc5780632d2da806146102fc57600080fd5b8063095ea7b3146101e8578063128fced11461021d57806316f0115b1461025857600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610208610203366004611a5b565b61065c565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061024a610238366004611a87565b60096020526000908152604090205481565b604051908152602001610214565b34801561026457600080fd5b5061028c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610214565b3480156102b057600080fd5b5061024a60035481565b3480156102c657600080fd5b506102da6102d5366004611aa4565b6106c9565b005b3480156102e857600080fd5b506102da6102f7366004611a87565b6106d7565b6102da61030a366004611a87565b6107d1565b34801561031b57600080fd5b506102da61032a366004611abd565b6109b1565b34801561033b57600080fd5b5061024a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036f57600080fd5b5061028c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103a357600080fd5b5061024a6103b2366004611a87565b610b5e565b3480156103c357600080fd5b5061024a60025481565b3480156103d957600080fd5b506102da610c9e565b3480156103ee57600080fd5b506102087f000000000000000000000000000000000000000000000000000000000000000081565b34801561042257600080fd5b506102da610431366004611abd565b610ca9565b34801561044257600080fd5b5061024a610451366004611a87565b60056020526000908152604090205481565b34801561046f57600080fd5b506102da61047e366004611aff565b610fa1565b34801561048f57600080fd5b5061024a61049e366004611a87565b60066020526000908152604090205481565b3480156104bc57600080fd5b506102da6104cb366004611aa4565b6110c5565b3480156104dc57600080fd5b506102da6104eb366004611aff565b6110d0565b3480156104fc57600080fd5b506102da61050b366004611abd565b611275565b34801561051c57600080fd5b506102da61052b366004611aa4565b611454565b34801561053c57600080fd5b5061024a60015481565b34801561055257600080fd5b5060005461028c906001600160a01b031681565b34801561057257600080fd5b5061028c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506102da61145e565b3480156105bb57600080fd5b5061024a6105ca366004611b2f565b600760209081526000928352604080842090915290825290205481565b3480156105f357600080fd5b5061024a610602366004611a87565b60086020526000908152604090205481565b34801561062057600080fd5b506102da61062f366004611aa4565b6114b4565b6102da6114fc565b34801561064857600080fd5b506102da610657366004611aa4565b611542565b3360008181526007602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906106b79086815260200190565b60405180910390a35060015b92915050565b6106d48133336109b1565b50565b6106e08161154c565b6001600160a01b0381811660008181526009602052604080822080549290555163a9059cbb60e01b8152600481019290925260248201819052917f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610765573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107899190611b5d565b50816001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4826040516107c591815260200190565b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006108175760405162461bcd60e51b815260040161080e90611b7f565b60405180910390fd5b6108208161154c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b505060405163b6b55f2560e01b8152346004820152600093507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063b6b55f2591506024016020604051808303816000875af11580156108fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109219190611ba1565b6001600160a01b03831660009081526005602052604081208054929350839290919061094e908490611bd0565b9250508190555080600360008282546109679190611bd0565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906020015b60405180910390a35050565b6109ba8161154c565b336001600160a01b03821614610a28576001600160a01b03811660009081526007602090815260408083203384529091529020546000198114610a2657610a018482611be3565b6001600160a01b03831660009081526007602090815260408083203384529091529020555b505b6001600160a01b03811660009081526005602052604081208054859290610a50908490611be3565b925050819055508260036000828254610a699190611be3565b909155505060405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610add573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b019190611b5d565b50806001600160a01b0316826001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f786604051610b5191815260200190565b60405180910390a4505050565b6000805460405163402914f560e01b815230600482015282916001600160a01b03169063402914f590602401602060405180830381865afa158015610ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcb9190611ba1565b905060008060035411610be057600254610c0c565b600354610bf5670de0b6b3a764000084611bf6565b610bff9190611c0d565b600254610c0c9190611bd0565b6001600160a01b03851660009081526008602052604081205491925090610c339083611be3565b6001600160a01b038616600090815260056020526040812054919250670de0b6b3a7640000610c628484611bf6565b610c6c9190611c0d565b6001600160a01b038816600090815260096020526040902054909150610c93908290611bd0565b979650505050505050565b610ca7336106d7565b565b7f0000000000000000000000000000000000000000000000000000000000000000610ce65760405162461bcd60e51b815260040161080e90611b7f565b610cef8161154c565b604051632e1a7d4d60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024016020604051808303816000875af1158015610d59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7d9190611ba1565b9050336001600160a01b03831614610ded576001600160a01b03821660009081526007602090815260408083203384529091529020546000198114610deb57610dc68282611be3565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b03821660009081526005602052604081208054839290610e15908490611be3565b925050819055508060036000828254610e2e9190611be3565b9091555050604051632e1a7d4d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610e9557600080fd5b505af1158015610ea9573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f784604051610efc91815260200190565b60405180910390a46000836001600160a01b03168560405160006040518083038185875af1925050503d8060008114610f51576040519150601f19603f3d011682016040523d82523d6000602084013e610f56565b606091505b5050905080610f9a5760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161080e565b5050505050565b610faa8161154c565b6001600160a01b03811660009081526005602052604081208054849290610fd2908490611bd0565b925050819055508160036000828254610feb9190611bd0565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611063573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110879190611b5d565b506040518281526001600160a01b0382169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906020016109a5565b6106d4813333611275565b60045460011461110f5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015260640161080e565b600260045561111d8161154c565b6111526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330856116d5565b60405163b6b55f2560e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024016020604051808303816000875af11580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e09190611ba1565b6001600160a01b03831660009081526005602052604081208054929350839290919061120d908490611bd0565b9250508190555080600360008282546112269190611bd0565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a35050600160045550565b61127e8161154c565b604051632e1a7d4d60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024016020604051808303816000875af11580156112e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130c9190611ba1565b9050336001600160a01b0383161461137c576001600160a01b0382166000908152600760209081526040808320338452909152902054600019811461137a576113558282611be3565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b038216600090815260056020526040812080548392906113a4908490611be3565b9250508190555080600360008282546113bd9190611be3565b909155506113f790506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486611742565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f78460405161144691815260200190565b60405180910390a450505050565b6106d48133610fa1565b610ca76001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000600019611778565b7f00000000000000000000000000000000000000000000000000000000000000006114f15760405162461bcd60e51b815260040161080e90611b7f565b6106d4813333610ca9565b7f00000000000000000000000000000000000000000000000000000000000000006115395760405162461bcd60e51b815260040161080e90611b7f565b610ca7336107d1565b6106d481336110d0565b60006001544261155c9190611be3565b9050801561162557600354156116205760008060009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e69190611ba1565b6003549091506115fe670de0b6b3a764000083611bf6565b6116089190611c0d565b600260008282546116199190611bd0565b9091555050505b426001555b6001600160a01b03821660009081526008602052604081205460025461164b9190611be3565b6001600160a01b0384166000908152600560205260408120549192506116718383611bf6565b6002546001600160a01b03871660009081526008602052604090205590506116a1670de0b6b3a764000082611c0d565b6001600160a01b038616600090815260096020526040812080549091906116c9908490611bd0565b90915550505050505050565b6040516001600160a01b03848116602483015283811660448301526064820183905261173c9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611804565b50505050565b6040516001600160a01b0383811660248301526044820183905261177391859182169063a9059cbb9060640161170a565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526117c98482611867565b61173c576040516001600160a01b038481166024830152600060448301526117fe91869182169063095ea7b39060640161170a565b61173c84825b60006118196001600160a01b0384168361190f565b9050805160001415801561183e57508080602001905181019061183c9190611b5d565b155b1561177357604051635274afe760e01b81526001600160a01b038416600482015260240161080e565b6000806000846001600160a01b0316846040516118849190611c2f565b6000604051808303816000865af19150503d80600081146118c1576040519150601f19603f3d011682016040523d82523d6000602084013e6118c6565b606091505b50915091508180156118f05750805115806118f05750808060200190518101906118f09190611b5d565b801561190657506000856001600160a01b03163b115b95945050505050565b606061191d83836000611924565b9392505050565b6060814710156119495760405163cd78605960e01b815230600482015260240161080e565b600080856001600160a01b031684866040516119659190611c2f565b60006040518083038185875af1925050503d80600081146119a2576040519150601f19603f3d011682016040523d82523d6000602084013e6119a7565b606091505b50915091506119b78683836119c1565b9695505050505050565b6060826119d6576119d182611a1d565b61191d565b81511580156119ed57506001600160a01b0384163b155b15611a1657604051639996b31560e01b81526001600160a01b038516600482015260240161080e565b508061191d565b805115611a2d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146106d457600080fd5b60008060408385031215611a6e57600080fd5b8235611a7981611a46565b946020939093013593505050565b600060208284031215611a9957600080fd5b813561191d81611a46565b600060208284031215611ab657600080fd5b5035919050565b600080600060608486031215611ad257600080fd5b833592506020840135611ae481611a46565b91506040840135611af481611a46565b809150509250925092565b60008060408385031215611b1257600080fd5b823591506020830135611b2481611a46565b809150509250929050565b60008060408385031215611b4257600080fd5b8235611b4d81611a46565b91506020830135611b2481611a46565b600060208284031215611b6f57600080fd5b8151801515811461191d57600080fd5b6020808252600890820152670dedcd8f2ae8aa8960c31b604082015260600190565b600060208284031215611bb357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106c3576106c3611bba565b818103818111156106c3576106c3611bba565b80820281158282048414176106c3576106c3611bba565b600082611c2a57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b81811015611c505760208186018101518583015201611c36565b50600092019182525091905056fea26469706673582212204b4842fd1bd65c67ba208f857be56b852302948efad44445bf844d178dfd573f64736f6c63430008160033000000000000000000000000332ce425328b5d20bf581101bce099d98dc126860000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d921552c27f5e420fc8565cbff0724cb84a7f0f4

Deployed Bytecode

0x6080604052600436106101dc5760003560e01c806370a0823111610102578063c45a015511610095578063e76b2be511610064578063e76b2be5146105e7578063f14210a614610614578063f6326fb314610634578063fa2df4141461063c57600080fd5b8063c45a015514610546578063d10fc10414610566578063d818f23a1461059a578063dd62ed3e146105af57600080fd5b806395e213d2116100d157806395e213d2146104d0578063b317f505146104f0578063b8767dd914610510578063c04637111461053057600080fd5b806370a08231146104365780637d28a2f2146104635780637ecebe00146104835780638d92fdf3146104b057600080fd5b8063318cbfac1161017a5780634ae4ab92116101495780634ae4ab92146103b75780634e71d92d146103cd5780635a806ac0146103e257806367da598e1461041657600080fd5b8063318cbfac1461030f5780633644e5151461032f57806338d52e0f14610363578063402914f51461039757600080fd5b806318160ddd116101b657806318160ddd146102a457806319810f3c146102ba5780631e83409a146102dc5780632d2da806146102fc57600080fd5b8063095ea7b3146101e8578063128fced11461021d57806316f0115b1461025857600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610208610203366004611a5b565b61065c565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061024a610238366004611a87565b60096020526000908152604090205481565b604051908152602001610214565b34801561026457600080fd5b5061028c7f000000000000000000000000332ce425328b5d20bf581101bce099d98dc1268681565b6040516001600160a01b039091168152602001610214565b3480156102b057600080fd5b5061024a60035481565b3480156102c657600080fd5b506102da6102d5366004611aa4565b6106c9565b005b3480156102e857600080fd5b506102da6102f7366004611a87565b6106d7565b6102da61030a366004611a87565b6107d1565b34801561031b57600080fd5b506102da61032a366004611abd565b6109b1565b34801561033b57600080fd5b5061024a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036f57600080fd5b5061028c7f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce481565b3480156103a357600080fd5b5061024a6103b2366004611a87565b610b5e565b3480156103c357600080fd5b5061024a60025481565b3480156103d957600080fd5b506102da610c9e565b3480156103ee57600080fd5b506102087f000000000000000000000000000000000000000000000000000000000000000081565b34801561042257600080fd5b506102da610431366004611abd565b610ca9565b34801561044257600080fd5b5061024a610451366004611a87565b60056020526000908152604090205481565b34801561046f57600080fd5b506102da61047e366004611aff565b610fa1565b34801561048f57600080fd5b5061024a61049e366004611a87565b60066020526000908152604090205481565b3480156104bc57600080fd5b506102da6104cb366004611aa4565b6110c5565b3480156104dc57600080fd5b506102da6104eb366004611aff565b6110d0565b3480156104fc57600080fd5b506102da61050b366004611abd565b611275565b34801561051c57600080fd5b506102da61052b366004611aa4565b611454565b34801561053c57600080fd5b5061024a60015481565b34801561055257600080fd5b5060005461028c906001600160a01b031681565b34801561057257600080fd5b5061028c7f000000000000000000000000d921552c27f5e420fc8565cbff0724cb84a7f0f481565b3480156105a657600080fd5b506102da61145e565b3480156105bb57600080fd5b5061024a6105ca366004611b2f565b600760209081526000928352604080842090915290825290205481565b3480156105f357600080fd5b5061024a610602366004611a87565b60086020526000908152604090205481565b34801561062057600080fd5b506102da61062f366004611aa4565b6114b4565b6102da6114fc565b34801561064857600080fd5b506102da610657366004611aa4565b611542565b3360008181526007602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906106b79086815260200190565b60405180910390a35060015b92915050565b6106d48133336109b1565b50565b6106e08161154c565b6001600160a01b0381811660008181526009602052604080822080549290555163a9059cbb60e01b8152600481019290925260248201819052917f000000000000000000000000d921552c27f5e420fc8565cbff0724cb84a7f0f4169063a9059cbb906044016020604051808303816000875af1158015610765573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107899190611b5d565b50816001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4826040516107c591815260200190565b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006108175760405162461bcd60e51b815260040161080e90611b7f565b60405180910390fd5b6108208161154c565b7f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce46001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b505060405163b6b55f2560e01b8152346004820152600093507f000000000000000000000000332ce425328b5d20bf581101bce099d98dc126866001600160a01b0316925063b6b55f2591506024016020604051808303816000875af11580156108fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109219190611ba1565b6001600160a01b03831660009081526005602052604081208054929350839290919061094e908490611bd0565b9250508190555080600360008282546109679190611bd0565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906020015b60405180910390a35050565b6109ba8161154c565b336001600160a01b03821614610a28576001600160a01b03811660009081526007602090815260408083203384529091529020546000198114610a2657610a018482611be3565b6001600160a01b03831660009081526007602090815260408083203384529091529020555b505b6001600160a01b03811660009081526005602052604081208054859290610a50908490611be3565b925050819055508260036000828254610a699190611be3565b909155505060405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590527f000000000000000000000000332ce425328b5d20bf581101bce099d98dc12686169063a9059cbb906044016020604051808303816000875af1158015610add573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b019190611b5d565b50806001600160a01b0316826001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f786604051610b5191815260200190565b60405180910390a4505050565b6000805460405163402914f560e01b815230600482015282916001600160a01b03169063402914f590602401602060405180830381865afa158015610ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcb9190611ba1565b905060008060035411610be057600254610c0c565b600354610bf5670de0b6b3a764000084611bf6565b610bff9190611c0d565b600254610c0c9190611bd0565b6001600160a01b03851660009081526008602052604081205491925090610c339083611be3565b6001600160a01b038616600090815260056020526040812054919250670de0b6b3a7640000610c628484611bf6565b610c6c9190611c0d565b6001600160a01b038816600090815260096020526040902054909150610c93908290611bd0565b979650505050505050565b610ca7336106d7565b565b7f0000000000000000000000000000000000000000000000000000000000000000610ce65760405162461bcd60e51b815260040161080e90611b7f565b610cef8161154c565b604051632e1a7d4d60e01b8152600481018490526000907f000000000000000000000000332ce425328b5d20bf581101bce099d98dc126866001600160a01b031690632e1a7d4d906024016020604051808303816000875af1158015610d59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7d9190611ba1565b9050336001600160a01b03831614610ded576001600160a01b03821660009081526007602090815260408083203384529091529020546000198114610deb57610dc68282611be3565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b03821660009081526005602052604081208054839290610e15908490611be3565b925050819055508060036000828254610e2e9190611be3565b9091555050604051632e1a7d4d60e01b8152600481018590527f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce46001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610e9557600080fd5b505af1158015610ea9573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f784604051610efc91815260200190565b60405180910390a46000836001600160a01b03168560405160006040518083038185875af1925050503d8060008114610f51576040519150601f19603f3d011682016040523d82523d6000602084013e610f56565b606091505b5050905080610f9a5760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161080e565b5050505050565b610faa8161154c565b6001600160a01b03811660009081526005602052604081208054849290610fd2908490611bd0565b925050819055508160036000828254610feb9190611bd0565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f000000000000000000000000332ce425328b5d20bf581101bce099d98dc126866001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611063573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110879190611b5d565b506040518281526001600160a01b0382169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906020016109a5565b6106d4813333611275565b60045460011461110f5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015260640161080e565b600260045561111d8161154c565b6111526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4163330856116d5565b60405163b6b55f2560e01b8152600481018390526000907f000000000000000000000000332ce425328b5d20bf581101bce099d98dc126866001600160a01b03169063b6b55f25906024016020604051808303816000875af11580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e09190611ba1565b6001600160a01b03831660009081526005602052604081208054929350839290919061120d908490611bd0565b9250508190555080600360008282546112269190611bd0565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a35050600160045550565b61127e8161154c565b604051632e1a7d4d60e01b8152600481018490526000907f000000000000000000000000332ce425328b5d20bf581101bce099d98dc126866001600160a01b031690632e1a7d4d906024016020604051808303816000875af11580156112e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130c9190611ba1565b9050336001600160a01b0383161461137c576001600160a01b0382166000908152600760209081526040808320338452909152902054600019811461137a576113558282611be3565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b038216600090815260056020526040812080548392906113a4908490611be3565b9250508190555080600360008282546113bd9190611be3565b909155506113f790506001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4168486611742565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f78460405161144691815260200190565b60405180910390a450505050565b6106d48133610fa1565b610ca76001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4167f000000000000000000000000332ce425328b5d20bf581101bce099d98dc12686600019611778565b7f00000000000000000000000000000000000000000000000000000000000000006114f15760405162461bcd60e51b815260040161080e90611b7f565b6106d4813333610ca9565b7f00000000000000000000000000000000000000000000000000000000000000006115395760405162461bcd60e51b815260040161080e90611b7f565b610ca7336107d1565b6106d481336110d0565b60006001544261155c9190611be3565b9050801561162557600354156116205760008060009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e69190611ba1565b6003549091506115fe670de0b6b3a764000083611bf6565b6116089190611c0d565b600260008282546116199190611bd0565b9091555050505b426001555b6001600160a01b03821660009081526008602052604081205460025461164b9190611be3565b6001600160a01b0384166000908152600560205260408120549192506116718383611bf6565b6002546001600160a01b03871660009081526008602052604090205590506116a1670de0b6b3a764000082611c0d565b6001600160a01b038616600090815260096020526040812080549091906116c9908490611bd0565b90915550505050505050565b6040516001600160a01b03848116602483015283811660448301526064820183905261173c9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611804565b50505050565b6040516001600160a01b0383811660248301526044820183905261177391859182169063a9059cbb9060640161170a565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526117c98482611867565b61173c576040516001600160a01b038481166024830152600060448301526117fe91869182169063095ea7b39060640161170a565b61173c84825b60006118196001600160a01b0384168361190f565b9050805160001415801561183e57508080602001905181019061183c9190611b5d565b155b1561177357604051635274afe760e01b81526001600160a01b038416600482015260240161080e565b6000806000846001600160a01b0316846040516118849190611c2f565b6000604051808303816000865af19150503d80600081146118c1576040519150601f19603f3d011682016040523d82523d6000602084013e6118c6565b606091505b50915091508180156118f05750805115806118f05750808060200190518101906118f09190611b5d565b801561190657506000856001600160a01b03163b115b95945050505050565b606061191d83836000611924565b9392505050565b6060814710156119495760405163cd78605960e01b815230600482015260240161080e565b600080856001600160a01b031684866040516119659190611c2f565b60006040518083038185875af1925050503d80600081146119a2576040519150601f19603f3d011682016040523d82523d6000602084013e6119a7565b606091505b50915091506119b78683836119c1565b9695505050505050565b6060826119d6576119d182611a1d565b61191d565b81511580156119ed57506001600160a01b0384163b155b15611a1657604051639996b31560e01b81526001600160a01b038516600482015260240161080e565b508061191d565b805115611a2d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146106d457600080fd5b60008060408385031215611a6e57600080fd5b8235611a7981611a46565b946020939093013593505050565b600060208284031215611a9957600080fd5b813561191d81611a46565b600060208284031215611ab657600080fd5b5035919050565b600080600060608486031215611ad257600080fd5b833592506020840135611ae481611a46565b91506040840135611af481611a46565b809150509250925092565b60008060408385031215611b1257600080fd5b823591506020830135611b2481611a46565b809150509250929050565b60008060408385031215611b4257600080fd5b8235611b4d81611a46565b91506020830135611b2481611a46565b600060208284031215611b6f57600080fd5b8151801515811461191d57600080fd5b6020808252600890820152670dedcd8f2ae8aa8960c31b604082015260600190565b600060208284031215611bb357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106c3576106c3611bba565b818103818111156106c3576106c3611bba565b80820281158282048414176106c3576106c3611bba565b600082611c2a57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b81811015611c505760208186018101518583015201611c36565b50600092019182525091905056fea26469706673582212204b4842fd1bd65c67ba208f857be56b852302948efad44445bf844d178dfd573f64736f6c63430008160033

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

000000000000000000000000332ce425328b5d20bf581101bce099d98dc126860000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d921552c27f5e420fc8565cbff0724cb84a7f0f4

-----Decoded View---------------
Arg [0] : _pool (address): 0x332cE425328b5d20bF581101BCe099d98DC12686
Arg [1] : _isWETH (bool): False
Arg [2] : _gtr (address): 0xd921552C27f5e420fC8565cBff0724cb84A7f0f4

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000332ce425328b5d20bf581101bce099d98dc12686
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000d921552c27f5e420fc8565cbff0724cb84a7f0f4


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.