ETH Price: $3,490.94 (+0.08%)
Gas: 1 Gwei

Contract

0x25A862691978b47071244227Ff77969BC27031ce
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit ETH197179402024-04-23 11:56:5988 days ago1713873419IN
0x25A86269...BC27031ce
0.09 ETH0.0034333910.50114487
Deposit ETH196073252024-04-08 0:16:47104 days ago1712535407IN
0x25A86269...BC27031ce
1.2 ETH0.0040635211.38319439
Deposit ETH195954112024-04-06 8:11:59106 days ago1712391119IN
0x25A86269...BC27031ce
0.15 ETH0.0034914813.35493462
Deposit ETH195469532024-03-30 13:05:35112 days ago1711803935IN
0x25A86269...BC27031ce
0.37 ETH0.0084311825.81533904
Deposit ETH195394212024-03-29 11:40:11113 days ago1711712411IN
0x25A86269...BC27031ce
0.05 ETH0.0074920720.73351858
Deposit ETH194065812024-03-10 18:47:35132 days ago1710096455IN
0x25A86269...BC27031ce
0.501 ETH0.0226746863.45302941
Deposit ETH193670632024-03-05 6:06:11138 days ago1709618771IN
0x25A86269...BC27031ce
0.01 ETH0.0270381577.96829785
Deposit ETH193104632024-02-26 8:11:23146 days ago1708935083IN
0x25A86269...BC27031ce
0.3 ETH0.0090167928.87452765
Deposit ETH192458172024-02-17 6:31:47155 days ago1708151507IN
0x25A86269...BC27031ce
0.26 ETH0.0037606815.74417662
Deposit ETH192457952024-02-17 6:27:23155 days ago1708151243IN
0x25A86269...BC27031ce
0.1 ETH0.0039888116.29493044
Deposit ETH192457652024-02-17 6:21:23155 days ago1708150883IN
0x25A86269...BC27031ce
0.01 ETH0.0038864215.48007032
Deposit ETH192345002024-02-15 16:23:59156 days ago1708014239IN
0x25A86269...BC27031ce
0.35 ETH0.0085657239.21032124
Deposit ETH191894252024-02-09 8:36:47163 days ago1707467807IN
0x25A86269...BC27031ce
2.35 ETH0.0142291744.72727661
Deposit ETH189940382024-01-12 23:16:47190 days ago1705101407IN
0x25A86269...BC27031ce
0.3 ETH0.0057422321.52405462
Deposit ETH189625662024-01-08 13:23:11194 days ago1704720191IN
0x25A86269...BC27031ce
3.3 ETH0.0054174720.31741708
Deposit ETH189556142024-01-07 13:52:23195 days ago1704635543IN
0x25A86269...BC27031ce
0.18 ETH0.0084563731.70305952
Deposit ETH189278482024-01-03 15:53:35199 days ago1704297215IN
0x25A86269...BC27031ce
1.45 ETH0.0088165242.07260877
Deposit ETH189274252024-01-03 14:28:23199 days ago1704292103IN
0x25A86269...BC27031ce
0.49 ETH0.0114136854.46629423
Deposit ETH189270932024-01-03 13:21:35199 days ago1704288095IN
0x25A86269...BC27031ce
2 ETH0.0165436372.99040224
Deposit ETH189129292024-01-01 13:39:11201 days ago1704116351IN
0x25A86269...BC27031ce
0.0001 ETH0.0023513710.49531393
Deposit ETH188990222023-12-30 14:48:23203 days ago1703947703IN
0x25A86269...BC27031ce
0.3 ETH0.0038536316.56043834
Deposit ETH188958112023-12-30 3:55:59204 days ago1703908559IN
0x25A86269...BC27031ce
0.24 ETH0.00285814.84386539
Deposit ETH188958062023-12-30 3:54:59204 days ago1703908499IN
0x25A86269...BC27031ce
0.25875833 ETH0.0039982118.042893
Deposit ETH188957942023-12-30 3:52:35204 days ago1703908355IN
0x25A86269...BC27031ce
1.2 ETH0.0032393615.45218757
Deposit ETH188925332023-12-29 16:50:47204 days ago1703868647IN
0x25A86269...BC27031ce
0.18 ETH0.0093880828.72115857
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
197179402024-04-23 11:56:5988 days ago1713873419
0x25A86269...BC27031ce
0.09 ETH
196073252024-04-08 0:16:47104 days ago1712535407
0x25A86269...BC27031ce
1.2 ETH
195954112024-04-06 8:11:59106 days ago1712391119
0x25A86269...BC27031ce
0.15 ETH
195469532024-03-30 13:05:35112 days ago1711803935
0x25A86269...BC27031ce
0.37 ETH
195394212024-03-29 11:40:11113 days ago1711712411
0x25A86269...BC27031ce
0.05 ETH
194065812024-03-10 18:47:35132 days ago1710096455
0x25A86269...BC27031ce
0.501 ETH
193670632024-03-05 6:06:11138 days ago1709618771
0x25A86269...BC27031ce
0.01 ETH
193104632024-02-26 8:11:23146 days ago1708935083
0x25A86269...BC27031ce
0.3 ETH
192458172024-02-17 6:31:47155 days ago1708151507
0x25A86269...BC27031ce
0.26 ETH
192457952024-02-17 6:27:23155 days ago1708151243
0x25A86269...BC27031ce
0.1 ETH
192457652024-02-17 6:21:23155 days ago1708150883
0x25A86269...BC27031ce
0.01 ETH
192345002024-02-15 16:23:59156 days ago1708014239
0x25A86269...BC27031ce
0.35 ETH
191894252024-02-09 8:36:47163 days ago1707467807
0x25A86269...BC27031ce
2.35 ETH
189940382024-01-12 23:16:47190 days ago1705101407
0x25A86269...BC27031ce
0.3 ETH
189625662024-01-08 13:23:11194 days ago1704720191
0x25A86269...BC27031ce
3.3 ETH
189556142024-01-07 13:52:23195 days ago1704635543
0x25A86269...BC27031ce
0.18 ETH
189278482024-01-03 15:53:35199 days ago1704297215
0x25A86269...BC27031ce
1.45 ETH
189274252024-01-03 14:28:23199 days ago1704292103
0x25A86269...BC27031ce
0.49 ETH
189270932024-01-03 13:21:35199 days ago1704288095
0x25A86269...BC27031ce
2 ETH
189129292024-01-01 13:39:11201 days ago1704116351
0x25A86269...BC27031ce
0.0001 ETH
188990222023-12-30 14:48:23203 days ago1703947703
0x25A86269...BC27031ce
0.3 ETH
188958112023-12-30 3:55:59204 days ago1703908559
0x25A86269...BC27031ce
0.24 ETH
188958062023-12-30 3:54:59204 days ago1703908499
0x25A86269...BC27031ce
0.25875833 ETH
188957942023-12-30 3:52:35204 days ago1703908355
0x25A86269...BC27031ce
1.2 ETH
188925332023-12-29 16:50:47204 days ago1703868647
0x25A86269...BC27031ce
0.18 ETH
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x812eD17A...Fad832a1a
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ETHVaultWithSlippage

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : ETHVaultWithSlippage.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;

import {IWETH} from '../interfaces/IWETH.sol';
import {IETHVaultWithSlippage} from "../interfaces/IETHVaultWithSlippage.sol";
import {IICHIVault} from "../interfaces/IICHIVault.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 @notice wrapper contract around ICHI vault with wETH being a base token. Allows users to deposit ETH instead of wETH
 */
contract ETHVaultWithSlippage is ReentrancyGuard, IETHVaultWithSlippage {

    // WETH address
    address public immutable override wETH;

    // Vault address
    address public immutable override vault;

    // Flag that indicates whether the vault is inverted or not
    bool private immutable isInverted;

    address constant NULL_ADDRESS = address(0);

    /**
     @notice creates an instance of ETHVault (wrapped around an existing ICHI vault)
     @param _wETH wETH address
     @param _vault underlying vault
     */
    constructor(
        address _wETH,
        address _vault
    ) {
        require(_wETH != NULL_ADDRESS && _vault != NULL_ADDRESS, "EV.constructor: zero address");

        wETH = _wETH;
        vault = _vault;

        bool _isInverted = _wETH == IICHIVault(_vault).token0();

        require(_isInverted || _wETH == IICHIVault(_vault).token1(), "EV.constructor: one of the tokens must be wETH");
        isInverted = _isInverted;
        IERC20(_wETH).approve(_vault, uint256(-1));

        emit DeployETHVault(
            msg.sender,
            _vault,
            _wETH,
            _isInverted
        );
    }

    /**
     @notice Distributes shares to depositor equal to the ETH value of his deposit multiplied by the ratio of total liquidity shares issued divided by the pool's AUM measured in ETH value. 
     @param minimumProceeds Min amount of LPs the end user should receive.
     @param to Address to which liquidity tokens are minted
     @param shares Quantity of liquidity tokens minted as a result of deposit
     */
    function depositETH(
        uint256 minimumProceeds,
        address to
    ) external payable override nonReentrant returns (uint256 shares) {
        require(msg.value > 0, "EV.depositETH: can't deposit 0");

        IWETH(wETH).deposit{ value: msg.value }();
        shares = isInverted ? IICHIVault(vault).deposit(msg.value, 0, to) : IICHIVault(vault).deposit(0, msg.value, to);

        require(shares >= minimumProceeds, "EV.depositETH: slippage too great. Try again.");

        emit DepositForwarded(msg.sender, msg.value, shares, to);
    }

}

File 2 of 6 : IWETH.sol
// SPDX-License-Identifier: Unlicense

pragma solidity 0.7.6;

interface IWETH {
  function deposit() external payable;

  function withdraw(uint256) external;

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

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

File 3 of 6 : IETHVaultWithSlippage.sol
// SPDX-License-Identifier: Unlicense

pragma solidity 0.7.6;

import "./IICHIVault.sol";

interface IETHVaultWithSlippage {

    // WETH address
    function wETH() external view returns(address);

    // Vault address
    function vault() external view returns(address);
    
    function depositETH(
        uint256 minimumProceeds,
        address to
    ) external payable returns (uint256 shares);

    event DeployETHVault(
        address indexed sender, 
        address indexed vault, 
        address wETH,
        bool isInverted);

    event DepositForwarded(
        address indexed sender,
        uint256 amount,
        uint256 shares,
        address to
    );

}

File 4 of 6 : IICHIVault.sol
// SPDX-License-Identifier: Unlicense

pragma solidity 0.7.6;

interface IICHIVault{

    function ichiVaultFactory() external view returns(address);

    function pool() external view returns(address);
    function token0() external view returns(address);
    function allowToken0() external view returns(bool);
    function token1() external view returns(address);
    function allowToken1() external view returns(bool);
    function fee() external view returns(uint24);
    function tickSpacing() external view returns(int24);
    function affiliate() external view returns(address);

    function baseLower() external view returns(int24);
    function baseUpper() external view returns(int24);
    function limitLower() external view returns(int24);
    function limitUpper() external view returns(int24);

    function deposit0Max() external view returns(uint256);
    function deposit1Max() external view returns(uint256);
    function maxTotalSupply() external view returns(uint256);
    function hysteresis() external view returns(uint256);

    function getTotalAmounts() external view returns (uint256, uint256);

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

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

    function rebalance(
        int24 _baseLower,
        int24 _baseUpper,
        int24 _limitLower,
        int24 _limitUpper,
        int256 swapQuantity
    ) external;

    function setDepositMax(
        uint256 _deposit0Max, 
        uint256 _deposit1Max) external;

    function setAffiliate(
        address _affiliate) external;

    event DeployICHIVault(
        address indexed sender, 
        address indexed pool, 
        bool allowToken0,
        bool allowToken1,
        address owner,
        uint256 twapPeriod);

    event SetTwapPeriod(
        address sender, 
        uint32 newTwapPeriod
    );

    event Deposit(
        address indexed sender,
        address indexed to,
        uint256 shares,
        uint256 amount0,
        uint256 amount1
    );

    event Withdraw(
        address indexed sender,
        address indexed to,
        uint256 shares,
        uint256 amount0,
        uint256 amount1
    );

    event Rebalance(
        int24 tick,
        uint256 totalAmount0,
        uint256 totalAmount1,
        uint256 feeAmount0,
        uint256 feeAmount1,
        uint256 totalSupply
    );

    event MaxTotalSupply(
        address indexed sender, 
        uint256 maxTotalSupply);

    event Hysteresis(
        address indexed sender, 
        uint256 hysteresis);

    event DepositMax(
        address indexed sender, 
        uint256 deposit0Max, 
        uint256 deposit1Max);
        
    event Affiliate(
        address indexed sender, 
        address affiliate);    
}

File 5 of 6 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_wETH","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"wETH","type":"address"},{"indexed":false,"internalType":"bool","name":"isInverted","type":"bool"}],"name":"DeployETHVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"DepositForwarded","type":"event"},{"inputs":[{"internalType":"uint256","name":"minimumProceeds","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"depositETH","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x6080604052600436106100345760003560e01c806356150edf14610039578063f242862114610077578063fbfa77cf146100a8575b600080fd5b6100656004803603604081101561004f57600080fd5b50803590602001356001600160a01b03166100bd565b60408051918252519081900360200190f35b34801561008357600080fd5b5061008c6103fc565b604080516001600160a01b039092168252519081900360200190f35b3480156100b457600080fd5b5061008c610420565b600060026000541415610117576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000553461016e576040805162461bcd60e51b815260206004820152601e60248201527f45562e6465706f7369744554483a2063616e2774206465706f73697420300000604482015290519081900360640190fd5b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156101c957600080fd5b505af11580156101dd573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000016102b8577f00000000000000000000000052692cc6637c985817d3c14bc99ad898565d14ff6001600160a01b0316638dbdbe6d600034856040518463ffffffff1660e01b815260040180848152602001838152602001826001600160a01b031681526020019350505050602060405180830381600087803b15801561028757600080fd5b505af115801561029b573d6000803e3d6000fd5b505050506040513d60208110156102b157600080fd5b5051610365565b7f00000000000000000000000052692cc6637c985817d3c14bc99ad898565d14ff6001600160a01b0316638dbdbe6d346000856040518463ffffffff1660e01b815260040180848152602001838152602001826001600160a01b031681526020019350505050602060405180830381600087803b15801561033857600080fd5b505af115801561034c573d6000803e3d6000fd5b505050506040513d602081101561036257600080fd5b50515b9050828110156103a65760405162461bcd60e51b815260040180806020018281038252602d815260200180610445602d913960400191505060405180910390fd5b60408051348152602081018390526001600160a01b03841681830152905133917ff9218816936b5494d6f8b9a36ddc3f373b4ddbfa954c205e8852ab703373e970919081900360600190a2600160005592915050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f00000000000000000000000052692cc6637c985817d3c14bc99ad898565d14ff8156fe45562e6465706f7369744554483a20736c69707061676520746f6f2067726561742e2054727920616761696e2ea2646970667358221220a44676eb01ce5f940d533609a2f2bd242f4f0139a10907df5664b500f9ee72ce64736f6c63430007060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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