ETH Price: $2,860.07 (-2.76%)
 

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Withdraw Asset386269722025-11-25 4:01:3162 days ago1764043291IN
0xcf96D3a6...0631c3640
0 ETH0.000000390.00142084
Claim367012042025-10-11 14:09:15106 days ago1760191755IN
0xcf96D3a6...0631c3640
0 ETH0.000002730.01925708
Withdraw Asset367011302025-10-11 14:06:47106 days ago1760191607IN
0xcf96D3a6...0631c3640
0 ETH0.000004680.0182386
Claim366573612025-10-10 13:47:49107 days ago1760104069IN
0xcf96D3a6...0631c3640
0 ETH0.00000550.03745842
Claim361693072025-09-29 6:39:21118 days ago1759127961IN
0xcf96D3a6...0631c3640
0 ETH0.000000320.00222714
Withdraw Asset360861152025-09-27 8:26:17120 days ago1758961577IN
0xcf96D3a6...0631c3640
0 ETH0.000000570.00214201
Claim360860652025-09-27 8:24:37120 days ago1758961477IN
0xcf96D3a6...0631c3640
0 ETH0.000000310.00233625
Withdraw Asset341877112025-08-14 9:46:09164 days ago1755164769IN
0xcf96D3a6...0631c3640
0 ETH0.000001260.00470183
Withdraw Asset340020482025-08-10 2:37:23169 days ago1754793443IN
0xcf96D3a6...0631c3640
0 ETH0.00000150.00526613
Claim340020362025-08-10 2:36:59169 days ago1754793419IN
0xcf96D3a6...0631c3640
0 ETH0.000000650.00527376
Claim339639682025-08-09 5:28:03169 days ago1754717283IN
0xcf96D3a6...0631c3640
0 ETH0.000003870.02632209
Withdraw Asset335967982025-07-31 17:29:03178 days ago1753982943IN
0xcf96D3a6...0631c3640
0 ETH0.000005410.02011589
Withdraw Asset335265802025-07-30 2:28:27180 days ago1753842507IN
0xcf96D3a6...0631c3640
0 ETH0.000008050.0299
Withdraw Asset324427302025-07-05 0:20:07205 days ago1751674807IN
0xcf96D3a6...0631c3640
0 ETH0.000000370.00139834
Claim324427092025-07-05 0:19:25205 days ago1751674765IN
0xcf96D3a6...0631c3640
0 ETH0.000000180.00141174
Withdraw Asset320804962025-06-26 15:05:39213 days ago1750950339IN
0xcf96D3a6...0631c3640
0 ETH0.000004910.0182
Claim320804402025-06-26 15:03:47213 days ago1750950227IN
0xcf96D3a6...0631c3640
0 ETH0.000002540.019
Withdraw Asset319861192025-06-24 10:39:45215 days ago1750761585IN
0xcf96D3a6...0631c3640
0 ETH0.00000790.0276
Withdraw Asset318309892025-06-20 20:28:45219 days ago1750451325IN
0xcf96D3a6...0631c3640
0 ETH0.000001180.00433134
Claim302692822025-05-15 16:51:51255 days ago1747327911IN
0xcf96D3a6...0631c3640
0 ETH0.000007610.0609
Withdraw Asset296779062025-05-02 0:19:19269 days ago1746145159IN
0xcf96D3a6...0631c3640
0 ETH0.000000430.00150813
Withdraw Asset285904912025-04-06 20:12:09294 days ago1743970329IN
0xcf96D3a6...0631c3640
0 ETH0.000000820.00286165
Claim285904832025-04-06 20:11:53294 days ago1743970313IN
0xcf96D3a6...0631c3640
0 ETH0.000000410.00272947
Withdraw Asset277124102025-03-17 12:22:47314 days ago1742214167IN
0xcf96D3a6...0631c3640
0 ETH0.000000960.00332753
Claim277123812025-03-17 12:21:49314 days ago1742214109IN
0xcf96D3a6...0631c3640
0 ETH0.000000490.00333474
View all transactions

Latest 1 internal transaction

Parent Transaction Hash Block From To
146847312024-05-19 22:46:49616 days ago1716158809  Contract Creation0 ETH

Cross-Chain Transactions
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.approve(_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.approve(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() external {
        updateIndex(msg.sender);
        uint amount = accruedRewards[msg.sender];
        accruedRewards[msg.sender] = 0;
        gtr.transfer(msg.sender, amount);
        emit Claim(msg.sender, amount);
    }

    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":[],"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"}]

61012060405260016004553480156200001757600080fd5b5060405162001e4038038062001e408339810160408190526200003a916200017e565b6001600160a01b0383166080819052604080516338d52e0f60e01b815290516338d52e0f916004808201926020929091908290030181865afa15801562000085573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ab9190620001c8565b6001600160a01b0390811660a0819052600080546001600160a01b0319163317905583151560e05282821660c05260405163095ea7b360e01b8152918516600483015260001960248301529063095ea7b3906044016020604051808303816000875af115801562000120573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001469190620001ed565b505050506200020b565b80516001600160a01b03811681146200016857600080fd5b919050565b805180151581146200016857600080fd5b6000806000606084860312156200019457600080fd5b6200019f8462000150565b9250620001af602085016200016d565b9150620001bf6040850162000150565b90509250925092565b600060208284031215620001db57600080fd5b620001e68262000150565b9392505050565b6000602082840312156200020057600080fd5b620001e6826200016d565b60805160a05160c05160e05161010051611b79620002c760003960006103160152600081816103c9015281816106ae01528181610c64015281816114cd015261151501526000818161054d0152610bbc01526000818161034a015281816106fd01528181610e02015281816110e301528181611389015261145e01526000818161025f015281816107850152818161096f01528181610cc101528181610fcb0152818161112401528181611250015261142e0152611b796000f3fe6080604052600436106101d15760003560e01c80637d28a2f2116100f7578063c45a015511610095578063e76b2be511610064578063e76b2be5146105bc578063f14210a6146105e9578063f6326fb314610609578063fa2df4141461061157600080fd5b8063c45a01551461051b578063d10fc1041461053b578063d818f23a1461056f578063dd62ed3e1461058457600080fd5b806395e213d2116100d157806395e213d2146104a5578063b317f505146104c5578063b8767dd9146104e5578063c04637111461050557600080fd5b80637d28a2f2146104385780637ecebe00146104585780638d92fdf31461048557600080fd5b80633644e5151161016f5780634e71d92d1161013e5780634e71d92d146103a25780635a806ac0146103b757806367da598e146103eb57806370a082311461040b57600080fd5b80633644e5151461030457806338d52e0f14610338578063402914f51461036c5780634ae4ab921461038c57600080fd5b806318160ddd116101ab57806318160ddd1461029957806319810f3c146102af5780632d2da806146102d1578063318cbfac146102e457600080fd5b8063095ea7b3146101dd578063128fced11461021257806316f0115b1461024d57600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b506101fd6101f8366004611940565b610631565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b5061023f61022d36600461196c565b60096020526000908152604090205481565b604051908152602001610209565b34801561025957600080fd5b506102817f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610209565b3480156102a557600080fd5b5061023f60035481565b3480156102bb57600080fd5b506102cf6102ca366004611989565b61069e565b005b6102cf6102df36600461196c565b6106ac565b3480156102f057600080fd5b506102cf6102ff3660046119a2565b61088c565b34801561031057600080fd5b5061023f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034457600080fd5b506102817f000000000000000000000000000000000000000000000000000000000000000081565b34801561037857600080fd5b5061023f61038736600461196c565b610a39565b34801561039857600080fd5b5061023f60025481565b3480156103ae57600080fd5b506102cf610b79565b3480156103c357600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103f757600080fd5b506102cf6104063660046119a2565b610c62565b34801561041757600080fd5b5061023f61042636600461196c565b60056020526000908152604090205481565b34801561044457600080fd5b506102cf6104533660046119e4565b610f5a565b34801561046457600080fd5b5061023f61047336600461196c565b60066020526000908152604090205481565b34801561049157600080fd5b506102cf6104a0366004611989565b61107e565b3480156104b157600080fd5b506102cf6104c03660046119e4565b611089565b3480156104d157600080fd5b506102cf6104e03660046119a2565b61122e565b3480156104f157600080fd5b506102cf610500366004611989565b61140d565b34801561051157600080fd5b5061023f60015481565b34801561052757600080fd5b50600054610281906001600160a01b031681565b34801561054757600080fd5b506102817f000000000000000000000000000000000000000000000000000000000000000081565b34801561057b57600080fd5b506102cf611417565b34801561059057600080fd5b5061023f61059f366004611a14565b600760209081526000928352604080842090915290825290205481565b3480156105c857600080fd5b5061023f6105d736600461196c565b60086020526000908152604090205481565b3480156105f557600080fd5b506102cf610604366004611989565b6114cb565b6102cf611513565b34801561061d57600080fd5b506102cf61062c366004611989565b61155b565b3360008181526007602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061068c9086815260200190565b60405180910390a35060015b92915050565b6106a981333361088c565b50565b7f00000000000000000000000000000000000000000000000000000000000000006106f25760405162461bcd60e51b81526004016106e990611a42565b60405180910390fd5b6106fb81611565565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561075657600080fd5b505af115801561076a573d6000803e3d6000fd5b505060405163b6b55f2560e01b8152346004820152600093507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063b6b55f2591506024016020604051808303816000875af11580156107d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fc9190611a64565b6001600160a01b038316600090815260056020526040812080549293508392909190610829908490611a93565b9250508190555080600360008282546108429190611a93565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906020015b60405180910390a35050565b61089581611565565b336001600160a01b03821614610903576001600160a01b03811660009081526007602090815260408083203384529091529020546000198114610901576108dc8482611aa6565b6001600160a01b03831660009081526007602090815260408083203384529091529020555b505b6001600160a01b0381166000908152600560205260408120805485929061092b908490611aa6565b9250508190555082600360008282546109449190611aa6565b909155505060405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156109b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dc9190611ab9565b50806001600160a01b0316826001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f786604051610a2c91815260200190565b60405180910390a4505050565b6000805460405163402914f560e01b815230600482015282916001600160a01b03169063402914f590602401602060405180830381865afa158015610a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa69190611a64565b905060008060035411610abb57600254610ae7565b600354610ad0670de0b6b3a764000084611adb565b610ada9190611af2565b600254610ae79190611a93565b6001600160a01b03851660009081526008602052604081205491925090610b0e9083611aa6565b6001600160a01b038616600090815260056020526040812054919250670de0b6b3a7640000610b3d8484611adb565b610b479190611af2565b6001600160a01b038816600090815260096020526040902054909150610b6e908290611a93565b979650505050505050565b610b8233611565565b3360008181526009602052604080822080549290555163a9059cbb60e01b8152600481019290925260248201819052906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c299190611ab9565b5060405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a250565b7f0000000000000000000000000000000000000000000000000000000000000000610c9f5760405162461bcd60e51b81526004016106e990611a42565b610ca881611565565b604051632e1a7d4d60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024016020604051808303816000875af1158015610d12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d369190611a64565b9050336001600160a01b03831614610da6576001600160a01b03821660009081526007602090815260408083203384529091529020546000198114610da457610d7f8282611aa6565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b03821660009081526005602052604081208054839290610dce908490611aa6565b925050819055508060036000828254610de79190611aa6565b9091555050604051632e1a7d4d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610e4e57600080fd5b505af1158015610e62573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f784604051610eb591815260200190565b60405180910390a46000836001600160a01b03168560405160006040518083038185875af1925050503d8060008114610f0a576040519150601f19603f3d011682016040523d82523d6000602084013e610f0f565b606091505b5050905080610f535760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b60448201526064016106e9565b5050505050565b610f6381611565565b6001600160a01b03811660009081526005602052604081208054849290610f8b908490611a93565b925050819055508160036000828254610fa49190611a93565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561101c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110409190611ab9565b506040518281526001600160a01b0382169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6290602001610880565b6106a981333361122e565b6004546001146110c85760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b60448201526064016106e9565b60026004556110d681611565565b61110b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330856116ee565b60405163b6b55f2560e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024016020604051808303816000875af1158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611a64565b6001600160a01b0383166000908152600560205260408120805492935083929091906111c6908490611a93565b9250508190555080600360008282546111df9190611a93565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a35050600160045550565b61123781611565565b604051632e1a7d4d60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024016020604051808303816000875af11580156112a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c59190611a64565b9050336001600160a01b03831614611335576001600160a01b038216600090815260076020908152604080832033845290915290205460001981146113335761130e8282611aa6565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b0382166000908152600560205260408120805483929061135d908490611aa6565b9250508190555080600360008282546113769190611aa6565b909155506113b090506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016848661175b565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f7846040516113ff91815260200190565b60405180910390a450505050565b6106a98133610f5a565b60405163095ea7b360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260001960248301527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af11580156114a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a99190611ab9565b7f00000000000000000000000000000000000000000000000000000000000000006115085760405162461bcd60e51b81526004016106e990611a42565b6106a9813333610c62565b7f00000000000000000000000000000000000000000000000000000000000000006115505760405162461bcd60e51b81526004016106e990611a42565b611559336106ac565b565b6106a98133611089565b6000600154426115759190611aa6565b9050801561163e57600354156116395760008060009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156115db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ff9190611a64565b600354909150611617670de0b6b3a764000083611adb565b6116219190611af2565b600260008282546116329190611a93565b9091555050505b426001555b6001600160a01b0382166000908152600860205260408120546002546116649190611aa6565b6001600160a01b03841660009081526005602052604081205491925061168a8383611adb565b6002546001600160a01b03871660009081526008602052604090205590506116ba670de0b6b3a764000082611af2565b6001600160a01b038616600090815260096020526040812080549091906116e2908490611a93565b90915550505050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526117559186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611791565b50505050565b6040516001600160a01b0383811660248301526044820183905261178c91859182169063a9059cbb90606401611723565b505050565b60006117a66001600160a01b038416836117f4565b905080516000141580156117cb5750808060200190518101906117c99190611ab9565b155b1561178c57604051635274afe760e01b81526001600160a01b03841660048201526024016106e9565b606061180283836000611809565b9392505050565b60608147101561182e5760405163cd78605960e01b81523060048201526024016106e9565b600080856001600160a01b0316848660405161184a9190611b14565b60006040518083038185875af1925050503d8060008114611887576040519150601f19603f3d011682016040523d82523d6000602084013e61188c565b606091505b509150915061189c8683836118a6565b9695505050505050565b6060826118bb576118b682611902565b611802565b81511580156118d257506001600160a01b0384163b155b156118fb57604051639996b31560e01b81526001600160a01b03851660048201526024016106e9565b5080611802565b8051156119125780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146106a957600080fd5b6000806040838503121561195357600080fd5b823561195e8161192b565b946020939093013593505050565b60006020828403121561197e57600080fd5b81356118028161192b565b60006020828403121561199b57600080fd5b5035919050565b6000806000606084860312156119b757600080fd5b8335925060208401356119c98161192b565b915060408401356119d98161192b565b809150509250925092565b600080604083850312156119f757600080fd5b823591506020830135611a098161192b565b809150509250929050565b60008060408385031215611a2757600080fd5b8235611a328161192b565b91506020830135611a098161192b565b6020808252600890820152670dedcd8f2ae8aa8960c31b604082015260600190565b600060208284031215611a7657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069857610698611a7d565b8181038181111561069857610698611a7d565b600060208284031215611acb57600080fd5b8151801515811461180257600080fd5b808202811582820484141761069857610698611a7d565b600082611b0f57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b81811015611b355760208186018101518583015201611b1b565b50600092019182525091905056fea26469706673582212208961716fe407ef480a8935f062214186ea62787d43560cb6e80deeba6ea418b364736f6c63430008160033000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d6628366000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088a134ecd0c1dd20b14ab8f49f9f8b60291167bc

Deployed Bytecode

0x6080604052600436106101d15760003560e01c80637d28a2f2116100f7578063c45a015511610095578063e76b2be511610064578063e76b2be5146105bc578063f14210a6146105e9578063f6326fb314610609578063fa2df4141461061157600080fd5b8063c45a01551461051b578063d10fc1041461053b578063d818f23a1461056f578063dd62ed3e1461058457600080fd5b806395e213d2116100d157806395e213d2146104a5578063b317f505146104c5578063b8767dd9146104e5578063c04637111461050557600080fd5b80637d28a2f2146104385780637ecebe00146104585780638d92fdf31461048557600080fd5b80633644e5151161016f5780634e71d92d1161013e5780634e71d92d146103a25780635a806ac0146103b757806367da598e146103eb57806370a082311461040b57600080fd5b80633644e5151461030457806338d52e0f14610338578063402914f51461036c5780634ae4ab921461038c57600080fd5b806318160ddd116101ab57806318160ddd1461029957806319810f3c146102af5780632d2da806146102d1578063318cbfac146102e457600080fd5b8063095ea7b3146101dd578063128fced11461021257806316f0115b1461024d57600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b506101fd6101f8366004611940565b610631565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b5061023f61022d36600461196c565b60096020526000908152604090205481565b604051908152602001610209565b34801561025957600080fd5b506102817f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d662836681565b6040516001600160a01b039091168152602001610209565b3480156102a557600080fd5b5061023f60035481565b3480156102bb57600080fd5b506102cf6102ca366004611989565b61069e565b005b6102cf6102df36600461196c565b6106ac565b3480156102f057600080fd5b506102cf6102ff3660046119a2565b61088c565b34801561031057600080fd5b5061023f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034457600080fd5b506102817f000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291381565b34801561037857600080fd5b5061023f61038736600461196c565b610a39565b34801561039857600080fd5b5061023f60025481565b3480156103ae57600080fd5b506102cf610b79565b3480156103c357600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103f757600080fd5b506102cf6104063660046119a2565b610c62565b34801561041757600080fd5b5061023f61042636600461196c565b60056020526000908152604090205481565b34801561044457600080fd5b506102cf6104533660046119e4565b610f5a565b34801561046457600080fd5b5061023f61047336600461196c565b60066020526000908152604090205481565b34801561049157600080fd5b506102cf6104a0366004611989565b61107e565b3480156104b157600080fd5b506102cf6104c03660046119e4565b611089565b3480156104d157600080fd5b506102cf6104e03660046119a2565b61122e565b3480156104f157600080fd5b506102cf610500366004611989565b61140d565b34801561051157600080fd5b5061023f60015481565b34801561052757600080fd5b50600054610281906001600160a01b031681565b34801561054757600080fd5b506102817f00000000000000000000000088a134ecd0c1dd20b14ab8f49f9f8b60291167bc81565b34801561057b57600080fd5b506102cf611417565b34801561059057600080fd5b5061023f61059f366004611a14565b600760209081526000928352604080842090915290825290205481565b3480156105c857600080fd5b5061023f6105d736600461196c565b60086020526000908152604090205481565b3480156105f557600080fd5b506102cf610604366004611989565b6114cb565b6102cf611513565b34801561061d57600080fd5b506102cf61062c366004611989565b61155b565b3360008181526007602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061068c9086815260200190565b60405180910390a35060015b92915050565b6106a981333361088c565b50565b7f00000000000000000000000000000000000000000000000000000000000000006106f25760405162461bcd60e51b81526004016106e990611a42565b60405180910390fd5b6106fb81611565565b7f000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029136001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561075657600080fd5b505af115801561076a573d6000803e3d6000fd5b505060405163b6b55f2560e01b8152346004820152600093507f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d66283666001600160a01b0316925063b6b55f2591506024016020604051808303816000875af11580156107d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fc9190611a64565b6001600160a01b038316600090815260056020526040812080549293508392909190610829908490611a93565b9250508190555080600360008282546108429190611a93565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906020015b60405180910390a35050565b61089581611565565b336001600160a01b03821614610903576001600160a01b03811660009081526007602090815260408083203384529091529020546000198114610901576108dc8482611aa6565b6001600160a01b03831660009081526007602090815260408083203384529091529020555b505b6001600160a01b0381166000908152600560205260408120805485929061092b908490611aa6565b9250508190555082600360008282546109449190611aa6565b909155505060405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590527f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d6628366169063a9059cbb906044016020604051808303816000875af11580156109b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dc9190611ab9565b50806001600160a01b0316826001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f786604051610a2c91815260200190565b60405180910390a4505050565b6000805460405163402914f560e01b815230600482015282916001600160a01b03169063402914f590602401602060405180830381865afa158015610a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa69190611a64565b905060008060035411610abb57600254610ae7565b600354610ad0670de0b6b3a764000084611adb565b610ada9190611af2565b600254610ae79190611a93565b6001600160a01b03851660009081526008602052604081205491925090610b0e9083611aa6565b6001600160a01b038616600090815260056020526040812054919250670de0b6b3a7640000610b3d8484611adb565b610b479190611af2565b6001600160a01b038816600090815260096020526040902054909150610b6e908290611a93565b979650505050505050565b610b8233611565565b3360008181526009602052604080822080549290555163a9059cbb60e01b8152600481019290925260248201819052906001600160a01b037f00000000000000000000000088a134ecd0c1dd20b14ab8f49f9f8b60291167bc169063a9059cbb906044016020604051808303816000875af1158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c299190611ab9565b5060405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a250565b7f0000000000000000000000000000000000000000000000000000000000000000610c9f5760405162461bcd60e51b81526004016106e990611a42565b610ca881611565565b604051632e1a7d4d60e01b8152600481018490526000907f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d66283666001600160a01b031690632e1a7d4d906024016020604051808303816000875af1158015610d12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d369190611a64565b9050336001600160a01b03831614610da6576001600160a01b03821660009081526007602090815260408083203384529091529020546000198114610da457610d7f8282611aa6565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b03821660009081526005602052604081208054839290610dce908490611aa6565b925050819055508060036000828254610de79190611aa6565b9091555050604051632e1a7d4d60e01b8152600481018590527f000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029136001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610e4e57600080fd5b505af1158015610e62573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f784604051610eb591815260200190565b60405180910390a46000836001600160a01b03168560405160006040518083038185875af1925050503d8060008114610f0a576040519150601f19603f3d011682016040523d82523d6000602084013e610f0f565b606091505b5050905080610f535760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b60448201526064016106e9565b5050505050565b610f6381611565565b6001600160a01b03811660009081526005602052604081208054849290610f8b908490611a93565b925050819055508160036000828254610fa49190611a93565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d66283666001600160a01b0316906323b872dd906064016020604051808303816000875af115801561101c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110409190611ab9565b506040518281526001600160a01b0382169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6290602001610880565b6106a981333361122e565b6004546001146110c85760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b60448201526064016106e9565b60026004556110d681611565565b61110b6001600160a01b037f000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913163330856116ee565b60405163b6b55f2560e01b8152600481018390526000907f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d66283666001600160a01b03169063b6b55f25906024016020604051808303816000875af1158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611a64565b6001600160a01b0383166000908152600560205260408120805492935083929091906111c6908490611a93565b9250508190555080600360008282546111df9190611a93565b90915550506040518181526001600160a01b0383169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a35050600160045550565b61123781611565565b604051632e1a7d4d60e01b8152600481018490526000907f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d66283666001600160a01b031690632e1a7d4d906024016020604051808303816000875af11580156112a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c59190611a64565b9050336001600160a01b03831614611335576001600160a01b038216600090815260076020908152604080832033845290915290205460001981146113335761130e8282611aa6565b6001600160a01b03841660009081526007602090815260408083203384529091529020555b505b6001600160a01b0382166000908152600560205260408120805483929061135d908490611aa6565b9250508190555080600360008282546113769190611aa6565b909155506113b090506001600160a01b037f000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291316848661175b565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f7846040516113ff91815260200190565b60405180910390a450505050565b6106a98133610f5a565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d66283668116600483015260001960248301527f000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913169063095ea7b3906044016020604051808303816000875af11580156114a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a99190611ab9565b7f00000000000000000000000000000000000000000000000000000000000000006115085760405162461bcd60e51b81526004016106e990611a42565b6106a9813333610c62565b7f00000000000000000000000000000000000000000000000000000000000000006115505760405162461bcd60e51b81526004016106e990611a42565b611559336106ac565b565b6106a98133611089565b6000600154426115759190611aa6565b9050801561163e57600354156116395760008060009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156115db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ff9190611a64565b600354909150611617670de0b6b3a764000083611adb565b6116219190611af2565b600260008282546116329190611a93565b9091555050505b426001555b6001600160a01b0382166000908152600860205260408120546002546116649190611aa6565b6001600160a01b03841660009081526005602052604081205491925061168a8383611adb565b6002546001600160a01b03871660009081526008602052604090205590506116ba670de0b6b3a764000082611af2565b6001600160a01b038616600090815260096020526040812080549091906116e2908490611a93565b90915550505050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526117559186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611791565b50505050565b6040516001600160a01b0383811660248301526044820183905261178c91859182169063a9059cbb90606401611723565b505050565b60006117a66001600160a01b038416836117f4565b905080516000141580156117cb5750808060200190518101906117c99190611ab9565b155b1561178c57604051635274afe760e01b81526001600160a01b03841660048201526024016106e9565b606061180283836000611809565b9392505050565b60608147101561182e5760405163cd78605960e01b81523060048201526024016106e9565b600080856001600160a01b0316848660405161184a9190611b14565b60006040518083038185875af1925050503d8060008114611887576040519150601f19603f3d011682016040523d82523d6000602084013e61188c565b606091505b509150915061189c8683836118a6565b9695505050505050565b6060826118bb576118b682611902565b611802565b81511580156118d257506001600160a01b0384163b155b156118fb57604051639996b31560e01b81526001600160a01b03851660048201526024016106e9565b5080611802565b8051156119125780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146106a957600080fd5b6000806040838503121561195357600080fd5b823561195e8161192b565b946020939093013593505050565b60006020828403121561197e57600080fd5b81356118028161192b565b60006020828403121561199b57600080fd5b5035919050565b6000806000606084860312156119b757600080fd5b8335925060208401356119c98161192b565b915060408401356119d98161192b565b809150509250925092565b600080604083850312156119f757600080fd5b823591506020830135611a098161192b565b809150509250929050565b60008060408385031215611a2757600080fd5b8235611a328161192b565b91506020830135611a098161192b565b6020808252600890820152670dedcd8f2ae8aa8960c31b604082015260600190565b600060208284031215611a7657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069857610698611a7d565b8181038181111561069857610698611a7d565b600060208284031215611acb57600080fd5b8151801515811461180257600080fd5b808202811582820484141761069857610698611a7d565b600082611b0f57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b81811015611b355760208186018101518583015201611b1b565b50600092019182525091905056fea26469706673582212208961716fe407ef480a8935f062214186ea62787d43560cb6e80deeba6ea418b364736f6c63430008160033

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

000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d6628366000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088a134ecd0c1dd20b14ab8f49f9f8b60291167bc

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

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d82d7300e5d3b3db85594e9171af9d58d6628366
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 00000000000000000000000088a134ecd0c1dd20b14ab8f49f9f8b60291167bc


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.