ETH Price: $2,416.04 (+0.50%)

Contract

0x8d5473f91D04f55D0b288032d603163E092c6098

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
0x60806040292275562022-10-14 1:51:36728 days ago1665712296IN
 Contract Creation
0 ETH0.0008502385220.001

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073178102023-07-24 21:33:17444 days ago1690234397
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
1073177222023-07-24 21:30:21444 days ago1690234221
0x8d5473f9...E092c6098
0 ETH
View All Internal Transactions

Loading...
Loading

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

Contract Name:
VelodromeStableLPAggregator

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 20 runs

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

pragma solidity 0.7.6;

import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";

import "../interfaces/IAggregatorV3Interface.sol";
import "../interfaces/velodrome/IVelodromePair.sol";
import "../interfaces/IERC20Extended.sol"; // includes decimals()
import "../interfaces/IHasAssetInfo.sol";
import "../utils/DhedgeMath.sol";

/**
 * @title Velodrome Stable LP aggregator. For dHEDGE LP Price Feeds.
 * @notice You can use this contract for Velodrome lp token pricing oracle.
 * @dev This should have `latestRoundData` function as chainlink pricing oracle.
 */
contract VelodromeStableLPAggregator is IAggregatorV3Interface {
  using SafeMathUpgradeable for uint256;

  address public pair;
  address public token0;
  address public token1;
  address public factory;

  constructor(address _pair, address _factory) {
    require(_pair != address(0), "_pair address cannot be 0");
    require(_factory != address(0), "_factory address cannot be 0");
    pair = _pair;
    token0 = IVelodromePair(pair).token0();
    token1 = IVelodromePair(pair).token1();
    factory = _factory;
  }

  /* ========== VIEWS ========== */

  function decimals() external pure override returns (uint8) {
    return 8;
  }

  function _calculateFairReserves(
    uint256 x,
    uint256 y,
    uint256 px,
    uint256 py
  ) private pure returns (uint256 fairX, uint256 fairY) {
    // NOTE:
    // x = reserve0 (18 decimals), y = reserve1 (18 decimals), px = token0 price (18 decimals), py = token1 price (18 decimals)
    // constant product = x^3 * y + x * y^3
    // constraints:
    // - fairX^3 * fairY + fairX * fairY^3 = constant product
    // - fairX * px = fairY * py
    // Solving equations:
    // --> fairY = fairX * px / py
    // --> fairX^4 * px / py + fairX^4 * (px / py)^3 = constant product
    // --> ratio = px / py
    // --> fairX^4 * (ratio + ratio^3) = x * y * (x^2 + y^2)
    // --> fairX^2 = sqrt(x * y) * sqrt(x^2 + y^2) / (sqrt(ratio) * sqrt(1 + ratio^2))
    // --> fairX = sqrt(sqrt(x * y) * sqrt(x^2 + y^2)) / sqrt(sqrt(ratio) * sqrt(1 + ratio^2))

    // r0 = sqrt(x * y)
    uint256 r0 = DhedgeMath.sqrt(x.mul(y)); // decimal = 18
    // r1 = sqrt(x^2 + y^2)
    uint256 r1 = DhedgeMath.sqrt(x.mul(x) + y.mul(y)); // decimal = 18
    // r = sqrt(sqrt(x * y) * sqrt(x^2 + y^2))
    uint256 r = DhedgeMath.sqrt(r0.mul(r1)); // decimal = 18

    // ratio = px / py
    uint256 ratio = px.mul(10**18).div(py); // decimal = 18
    // p0 = sqrt(ratio)
    uint256 p0 = DhedgeMath.sqrt(ratio.mul(10**18)); // decimal = 18
    // p1 = sqrt(1 + ratio^2)
    uint256 p1 = DhedgeMath.sqrt(10**36 + ratio.mul(ratio)); // decimal = 18
    // p = sqrt(sqrt(ratio) * sqrt(1 + ratio^2))
    uint256 p = DhedgeMath.sqrt(p0.mul(p1)); // decimal = 18

    // fairX = sqrt(sqrt(x * y) * sqrt(x^2 + y^2)) / sqrt(sqrt(ratio) * sqrt(1 + ratio^2))
    fairX = r.mul(10**18).div(p);
    fairY = fairX.mul(px).div(py);
  }

  /**
   * @notice Get the latest round data. Should be the same format as chainlink aggregator.
   * @return roundId The round ID.
   * @return answer The price - the latest round data of a given velodrome lp token (price decimal: 8)
   * @return startedAt Timestamp of when the round started.
   * @return updatedAt Timestamp of when the round was updated.
   * @return answeredInRound The round ID of the round in which the answer was computed.
   */
  function latestRoundData()
    external
    view
    override
    returns (
      uint80,
      int256,
      uint256,
      uint256,
      uint80
    )
  {
    (uint256 answer0, uint256 answer1) = _getTokenPrices();
    uint256 totalSupply = IVelodromePair(pair).totalSupply();
    (uint256 r0, uint256 r1, ) = IVelodromePair(pair).getReserves();
    uint256 decimal0 = IERC20Extended(token0).decimals();
    uint256 decimal1 = IERC20Extended(token1).decimals();

    r0 = r0.mul(10**18).div(10**decimal0); // decimal = 18
    r1 = r1.mul(10**18).div(10**decimal1); // decimal = 18

    (uint256 fairX, uint256 fairY) = _calculateFairReserves(r0, r1, answer0, answer1);

    uint256 answer = fairX.mul(answer0).add(fairY.mul(answer1)).div(totalSupply); // decimal = 18

    // we don't need roundId, startedAt and answeredInRound
    return (0, int256(answer.div(10**10)), 0, block.timestamp, 0);
  }

  /* ========== INTERNAL ========== */

  function _getTokenPrices() internal view returns (uint256, uint256) {
    return (IHasAssetInfo(factory).getAssetPrice(token0), IHasAssetInfo(factory).getAssetPrice(token1));
  }
}

File 2 of 7 : SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathUpgradeable {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 3 of 7 : IAggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;

interface IAggregatorV3Interface {
  function decimals() external view returns (uint8);

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 4 of 7 : IVelodromePair.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.7.6;

interface IVelodromePair {
  function token0() external view returns (address);

  function token1() external view returns (address);

  function claimable0(address user) external view returns (uint256);

  function claimable1(address user) external view returns (uint256);

  function totalSupply() external view returns (uint256);

  function current(address tokenIn, uint256 amountIn) external view returns (uint256 amountOut);

  function burn(address to) external returns (uint256 amount0, uint256 amount1);

  function getReserves()
    external
    view
    returns (
      uint112 reserve0,
      uint112 reserve1,
      uint32 blockTimestampLast
    );

  function claimFees() external returns (uint256 claimed0, uint256 claimed1);
}

File 5 of 7 : IERC20Extended.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;

// With aditional optional views

interface IERC20Extended {
  // ERC20 Optional Views
  function name() external view returns (string memory);

  function symbol() external view returns (string memory);

  function decimals() external view returns (uint8);

  // Views
  function totalSupply() external view returns (uint256);

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

  function scaledBalanceOf(address user) external view returns (uint256);

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

  // Mutative functions
  function transfer(address to, uint256 value) external returns (bool);

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

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool);

  // Events
  event Transfer(address indexed from, address indexed to, uint256 value);

  event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 6 of 7 : IHasAssetInfo.sol
//
//        __  __    __  ________  _______    ______   ________
//       /  |/  |  /  |/        |/       \  /      \ /        |
//   ____$$ |$$ |  $$ |$$$$$$$$/ $$$$$$$  |/$$$$$$  |$$$$$$$$/
//  /    $$ |$$ |__$$ |$$ |__    $$ |  $$ |$$ | _$$/ $$ |__
// /$$$$$$$ |$$    $$ |$$    |   $$ |  $$ |$$ |/    |$$    |
// $$ |  $$ |$$$$$$$$ |$$$$$/    $$ |  $$ |$$ |$$$$ |$$$$$/
// $$ \__$$ |$$ |  $$ |$$ |_____ $$ |__$$ |$$ \__$$ |$$ |_____
// $$    $$ |$$ |  $$ |$$       |$$    $$/ $$    $$/ $$       |
//  $$$$$$$/ $$/   $$/ $$$$$$$$/ $$$$$$$/   $$$$$$/  $$$$$$$$/
//
// dHEDGE DAO - https://dhedge.org
//
// Copyright (c) 2021 dHEDGE DAO
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

interface IHasAssetInfo {
  function isValidAsset(address asset) external view returns (bool);

  function getAssetPrice(address asset) external view returns (uint256);

  function getAssetType(address asset) external view returns (uint16);

  function getMaximumSupportedAssetCount() external view returns (uint256);
}

File 7 of 7 : DhedgeMath.sol
//        __  __    __  ________  _______    ______   ________
//       /  |/  |  /  |/        |/       \  /      \ /        |
//   ____$$ |$$ |  $$ |$$$$$$$$/ $$$$$$$  |/$$$$$$  |$$$$$$$$/
//  /    $$ |$$ |__$$ |$$ |__    $$ |  $$ |$$ | _$$/ $$ |__
// /$$$$$$$ |$$    $$ |$$    |   $$ |  $$ |$$ |/    |$$    |
// $$ |  $$ |$$$$$$$$ |$$$$$/    $$ |  $$ |$$ |$$$$ |$$$$$/
// $$ \__$$ |$$ |  $$ |$$ |_____ $$ |__$$ |$$ \__$$ |$$ |_____
// $$    $$ |$$ |  $$ |$$       |$$    $$/ $$    $$/ $$       |
//  $$$$$$$/ $$/   $$/ $$$$$$$$/ $$$$$$$/   $$$$$$/  $$$$$$$$/
//
// dHEDGE DAO - https://dhedge.org
//
// Copyright (c) 2021 dHEDGE DAO
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

/**
 * @title A library for mathematical calculations.
 * @dev For not only `sqrt` functionality is available. More functionalities can be added.
 */
library DhedgeMath {
  /**
   * @notice credit for this implementation goes to https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol
   * @dev Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer number.
   * @param x unsigned 256-bit integer number
   * @return sqrt(`x`) unsigned 128-bit integer number
   */
  function sqrt(uint256 x) internal pure returns (uint128) {
    if (x == 0) return 0;
    else {
      uint256 xx = x;
      uint256 r = 1;
      if (xx >= 0x100000000000000000000000000000000) {
        xx >>= 128;
        r <<= 64;
      }
      if (xx >= 0x10000000000000000) {
        xx >>= 64;
        r <<= 32;
      }
      if (xx >= 0x100000000) {
        xx >>= 32;
        r <<= 16;
      }
      if (xx >= 0x10000) {
        xx >>= 16;
        r <<= 8;
      }
      if (xx >= 0x100) {
        xx >>= 8;
        r <<= 4;
      }
      if (xx >= 0x10) {
        xx >>= 4;
        r <<= 2;
      }
      if (xx >= 0x8) {
        r <<= 1;
      }
      r = (r + x / r) >> 1;
      r = (r + x / r) >> 1;
      r = (r + x / r) >> 1;
      r = (r + x / r) >> 1;
      r = (r + x / r) >> 1;
      r = (r + x / r) >> 1;
      r = (r + x / r) >> 1; // Seven iterations should be enough
      uint256 r1 = x / r;
      return uint128(r < r1 ? r : r1);
    }
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"address","name":"_factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"","type":"uint80"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80630dfe168114610067578063313ce5671461008b578063a8aa1b31146100a9578063c45a0155146100b1578063d21220a7146100b9578063feaf968c146100c1575b600080fd5b61006f61010d565b604080516001600160a01b039092168252519081900360200190f35b61009361011c565b6040805160ff9092168252519081900360200190f35b61006f610121565b61006f610130565b61006f61013f565b6100c961014e565b60405180866001600160501b03168152602001858152602001848152602001838152602001826001600160501b031681526020019550505050505060405180910390f35b6001546001600160a01b031681565b600890565b6000546001600160a01b031681565b6003546001600160a01b031681565b6002546001600160a01b031681565b600080600080600080600061016161040a565b9150915060008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101b457600080fd5b505afa1580156101c8573d6000803e3d6000fd5b505050506040513d60208110156101de57600080fd5b50516000805460408051630240bc6b60e21b81529051939450919283926001600160a01b0390921691630902f1ac916004808301926060929190829003018186803b15801561022c57600080fd5b505afa158015610240573d6000803e3d6000fd5b505050506040513d606081101561025657600080fd5b5080516020918201516001546040805163313ce56760e01b815290516001600160701b0394851697509390921694506000936001600160a01b039091169263313ce567926004808201939291829003018186803b1580156102b657600080fd5b505afa1580156102ca573d6000803e3d6000fd5b505050506040513d60208110156102e057600080fd5b50516002546040805163313ce56760e01b8152905160ff90931693506000926001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561033157600080fd5b505afa158015610345573d6000803e3d6000fd5b505050506040513d602081101561035b57600080fd5b505160ff169050610382600a83900a61037c86670de0b6b3a764000061050d565b9061056f565b935061039e600a82900a61037c85670de0b6b3a764000061050d565b92506000806103af86868b8b6105d3565b909250905060006103d78861037c6103c7858d61050d565b6103d1878f61050d565b906106f5565b905060006103ea826402540be40061056f565b60004260009e509e509e509e509e50505050505050505050509091929394565b6003546001546040805163b3596f0760e01b81526001600160a01b03928316600482015290516000938493169163b3596f07916024808301926020929190829003018186803b15801561045c57600080fd5b505afa158015610470573d6000803e3d6000fd5b505050506040513d602081101561048657600080fd5b50516003546002546040805163b3596f0760e01b81526001600160a01b0392831660048201529051919092169163b3596f07916024808301926020929190829003018186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d602081101561050257600080fd5b505190925090509091565b60008261051c57506000610569565b8282028284828161052957fe5b04146105665760405162461bcd60e51b81526004018080602001828103825260218152602001806108906021913960400191505060405180910390fd5b90505b92915050565b60008082116105c2576040805162461bcd60e51b815260206004820152601a602482015279536166654d6174683a206469766973696f6e206279207a65726f60301b604482015290519081900360640190fd5b8183816105cb57fe5b049392505050565b600080806105e96105e4888861050d565b61074d565b6001600160801b031690506000610613610603888061050d565b61060d8a8061050d565b0161074d565b6001600160801b03169050600061062d6105e4848461050d565b6001600160801b0316905060006106508761037c8a670de0b6b3a764000061050d565b905060006106696105e483670de0b6b3a764000061050d565b6001600160801b031690506000610698610683848061050d565b6a0c097ce7bc90715b34b9f160241b0161074d565b6001600160801b0316905060006106b26105e4848461050d565b6001600160801b031690506106d38161037c87670de0b6b3a764000061050d565b98506106e38a61037c8b8e61050d565b97505050505050505094509492505050565b600082820183811015610566576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b60008161075c5750600061088a565b816001600160801b82106107755760809190911c9060401b5b600160401b821061078b5760409190911c9060201b5b600160201b82106107a15760209190911c9060101b5b6201000082106107b65760109190911c9060081b5b61010082106107ca5760089190911c9060041b5b601082106107dd5760049190911c9060021b5b600882106107e95760011b5b60018185816107f457fe5b048201901c9050600181858161080657fe5b048201901c9050600181858161081857fe5b048201901c9050600181858161082a57fe5b048201901c9050600181858161083c57fe5b048201901c9050600181858161084e57fe5b048201901c9050600181858161086057fe5b048201901c9050600081858161087257fe5b0490508082106108825780610884565b815b93505050505b91905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122076899994b1e56d5ae3b800eb52b5badd6f2d6c2481212aa533d03eb87135f3fb64736f6c63430007060033

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
[ 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.