Contract 0x5927b63E88764D6250b7801eBfDEb7B6c1ac35d0 6

 
Txn Hash Method
Block
From
To
Value
0xa36ce517938050ed9ea422f346022f064d16e816104173fe1ea52d1fb24d40efFlash Liquidate1164557612024-02-21 10:11:3911 hrs 52 mins ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001532157380.004852811
0x9c41725900cd90421b892d14e73103031f9e006032cae6e257b74cc2550e88b6Flash Liquidate1164538122024-02-21 9:06:4112 hrs 57 mins ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001048877030.00619865
0x0568071a5c20db3d930b2bc41a057cb7460ca7145c6aeabdfac7db99cb39c114Flash Liquidate1164518612024-02-21 8:01:3914 hrs 2 mins ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001060150830.004415375
0x92a35e1df02a6a96c68791ec33759495b4301bbe00e74979a933bd58747b6852Flash Liquidate1164211112024-02-20 14:56:391 day 7 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001813603810.008710582
0xb53dcaa3382f541609cb93fa9babcbef9c31ad92d6aa78f940973f5e9622415dFlash Liquidate1163101122024-02-18 1:16:413 days 20 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000926680280.00481081
0xd5c5312c6a0cd3e79f6cb55ef09d8239d05e96f648037123fbded560b395f107Flash Liquidate1162582112024-02-16 20:26:395 days 1 hr ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001076925370.005136367
0x9ac779f1cbbfc8d7746d9434de4ff7e3a5ff7ae8056e30f5e2f9e1be10283370Flash Liquidate1162559622024-02-16 19:11:415 days 2 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000997617910.005893863
0x2b8501af15406b5c82303731fd2da21582c66bf3c6763f2e353512764099e592Flash Liquidate1162537122024-02-16 17:56:415 days 4 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001158634160.005616828
0x0f51d0ac9caecbb61c80bac071b6f37cf3bb95c18d7cd55de4fc67e248517af1Flash Liquidate1162475612024-02-16 14:31:395 days 7 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001544136960.005678742
0x4468301be5fca24dd996a3bba70fbb4a98607d3c3db95a0c4de11166848a26daFlash Liquidate1162427632024-02-16 11:51:435 days 10 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000760007880.006338091
0x27e91fb3b01dcfd372a216da29f6527fdbb7d02c89382b56703dd25fc0f20bc4Flash Liquidate1162406632024-02-16 10:41:435 days 11 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000918088520.003040869
0x361aa1d1c5182c1225f2151db53300e0621663bf6675b7229ec1c81d6bf177b2Flash Liquidate1162384122024-02-16 9:26:415 days 12 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000851783870.006767491
0x225b23756294b5f78b99eb6e62b9f351028a05b992c0710185a3c5e2fe05efeeFlash Liquidate1162363142024-02-16 8:16:455 days 13 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.000079725710.004111791
0x975f1e69ff38aa99d9428b69fa555c493deecf41099743477cbd15331ab7eaa0Flash Liquidate1162120112024-02-15 18:46:396 days 3 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001976995690.004574375
0x8288a082f718bc823ba07ce7e1e58807b633be09e3a057478d285b1e0b4a874bFlash Liquidate1162063112024-02-15 15:36:396 days 6 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0002158698220.004632772
0xb5e281781f69713f35ca2ff9e7df4f9300ea1ecb7b4b004d796ea1c9d1151386Flash Liquidate1161991122024-02-15 11:36:416 days 10 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000929401270.005354056
0xec95fb45f412ab190735876b755719b48c6ae93a3f99f80cb258dc1363cb21f9Flash Liquidate1161932612024-02-15 8:21:396 days 13 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000641505810.004546138
0x69ca4de7339d5ce95d97572ea3362c055decec02ff0671f50f9f3ccef27cde5eFlash Liquidate1161342582024-02-13 23:34:537 days 22 hrs ago0x1169333d6c2f5bb5e3f8a1c075bc4d068e5ea41e IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.00013906560.102033782
0x736c50040970c190eb610c662c0cf9a5429c354c11166e46e8a9c063fa36c603Flash Liquidate1160510012024-02-12 1:19:399 days 20 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000799925410.002719213
0xf2d261212277582bccf3d74c9b6c006937029a38e031d8f571f288c266d93d49Flash Liquidate1160445512024-02-11 21:44:3910 days 19 mins ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000983206510.00256371
0xf1ff75f71e155f815d0c7736f21505b33ff0f4fd7923d3454c6725de11b12421Flash Liquidate1160424512024-02-11 20:34:3910 days 1 hr ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001259033030.003116521
0xf54af7c30735aa0eedb951bd93d979616d0c63f19d41c4134c30d4ab6bf167eaFlash Liquidate1160402022024-02-11 19:19:4110 days 2 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000849842880.003107094
0x35580e509c040ce1d1fd3a3555f2302a0c7aca193c5e26e6a7eab41311808c77Flash Liquidate1160384012024-02-11 18:19:3910 days 3 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000836470340.003413377
0x92fc7301d1a299bebc427c1b64accfda9170d45c00237bdf973286fcb42268e5Flash Liquidate1160364532024-02-11 17:14:4310 days 4 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0001009202120.003063992
0x171631d7d0782fc09727b84277c6d44ede0c051e49dfddca8b809ac542b3ef78Flash Liquidate1160345012024-02-11 16:09:3910 days 5 hrs ago0xcea11e14067697c085e1142afd2540b23f18304d IN  0x5927b63e88764d6250b7801ebfdeb7b6c1ac35d00 ETH0.0000802859740.004543198
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UniswapFlashLiquidation

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 9 : UniswapFlashLiquidation.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.23;

import { ILiquidationPair } from "pt-v5-liquidator-interfaces/ILiquidationPair.sol";
import { IFlashSwapCallback } from "pt-v5-liquidator-interfaces/IFlashSwapCallback.sol";

import { IERC20 } from "./interfaces/IERC20.sol";
import { IUniswapV3StaticQuoter } from "./interfaces/IUniswapV3StaticQuoter.sol";
import { IV3SwapRouter } from "./interfaces/IV3SwapRouter.sol";
import { Constants } from "./libraries/UniswapConstants.sol";

/// @notice Thrown if the `IUniswapV3StaticQuoter` address passed to the constructor is the zero address.
error QuoterZeroAddress();

/// @notice Thrown if the `IV3SwapRouter` address passed to the constructor is the zero address.
error RouterZeroAddress();

/**
 * @notice Thrown when the `flashLiquidate` `deadline has passed.
 * @param timestamp Timestamp at which the flash liquidation has been executed
 * @param deadline The timestamp by which the flash liquidation should have been executed
 */
error FlashLiquidationExpired(uint256 timestamp, uint256 deadline);

/**
 * @notice Thrown when the amount of tokenIn left after the liquidation is lower than the expected `minProfit`.
 * @param profit Amount of `tokenIn` left after performing the flash liquidation
 * @param minProfit Minimum profit expected
 */
error InsufficientProfit(uint256 profit, uint256 minProfit);

/**
 * @notice This contract uses a flashswap on a PoolTogether V5 LiquidationPair to swap yield for
 * prize tokens on Uniswap V3 and then contributes the prize tokens to the prize pool while
 * sending any excess to the receiver as profit.
 * @author G9 Software Inc.
 */
contract UniswapFlashLiquidation is IFlashSwapCallback {
    /// @notice Uniswap V3 Static Quoter
    IUniswapV3StaticQuoter public immutable quoter;

    /// @notice Uniswap V3 Router
    IV3SwapRouter public immutable router;

    /**
     * @notice Emitted when a flashswap liquidation has been made.
     * @param receiver The address that received the profit
     * @param liquidationPair The pair that was liquidated
     * @param path The path used for the swap
     * @param profit The profit sent to the receiver
     */
    event FlashSwapLiquidation(
        address indexed receiver,
        ILiquidationPair indexed liquidationPair,
        bytes path,
        uint256 profit
    );

    /**
     * @notice UniswapFlashLiquidation constructor.
     * @param quoter_ The Uniswap V3 Static Quoter to use to quote swap prices
     * @param router_ The Uniswap V3 Swap Router to use for swaps
     */
    constructor(IUniswapV3StaticQuoter quoter_, IV3SwapRouter router_) {
        if (address(0) == address(quoter_)) {
            revert QuoterZeroAddress();
        }
        if (address(0) == address(router_)) {
            revert RouterZeroAddress();
        }

        quoter = quoter_;
        router = router_;
    }

    /**
     * @notice Liquidate yield via the LiquidationPair and swap `_amountOut` of tokenOut in exchange of
     * `_amountInMax` of tokenIn. Any excess in tokenOut is sent as profit to `_receiver`.
     * @dev Will revert if `block.timestamp` exceeds the `_deadline`.
     * @dev Will revert if the tokenIn profit is less than `_profitMin`.
     * @param _liquidationPair Address of the LiquidationPair to flash liquidate against
     * @param _receiver Address that will receive the liquidation profit
     * (i.e. the amount of tokenIn in excess)
     * @param _amountOut Amount of tokenOut to swap for tokenIn
     * @param _amountInMax Maximum amount of tokenIn to send to the LiquidationPair target
     * @param _profitMin Minimum amount of excess tokenIn to receive for performing the liquidation
     * @param _deadline The timestamp in seconds by which the flash liquidation must be executed
     * @param _path The Uniswap V3 path to take for the swap
     * @return The amount of tokenIn in excess sent to `_receiver`
     */
    function flashLiquidate(
        ILiquidationPair _liquidationPair,
        address _receiver,
        uint256 _amountOut,
        uint256 _amountInMax,
        uint256 _profitMin,
        uint256 _deadline,
        bytes calldata _path
    ) public returns (uint256) {
        if (block.timestamp > _deadline) {
            revert FlashLiquidationExpired(block.timestamp, _deadline);
        }

        _liquidationPair.swapExactAmountOut(address(this), _amountOut, _amountInMax, _path);

        IERC20 _tokenIn = IERC20(_liquidationPair.tokenIn());
        uint256 _profit = _tokenIn.balanceOf(address(this));

        if (_profit < _profitMin) {
            revert InsufficientProfit(_profit, _profitMin);
        }

        if (_profit > 0) {
            _tokenIn.transfer(_receiver, _profit);
        }

        emit FlashSwapLiquidation(_receiver, _liquidationPair, _path, _profit);

        return _profit;
    }

    /// @inheritdoc IFlashSwapCallback
    function flashSwapCallback(
        address /* _sender */,
        uint256 _amountIn,
        uint256 _amountOut,
        bytes calldata _path
    ) external {
        ILiquidationPair _liquidationPair = ILiquidationPair(msg.sender);
        IERC20(_liquidationPair.tokenOut()).transfer(address(router), _amountOut);

        router.exactInput(
            IV3SwapRouter.ExactInputParams({
                path: _path,
                recipient: Constants.MSG_SENDER, // Saves gas compared to using `address(this)`
                amountIn: Constants.CONTRACT_BALANCE, // Saves gas compared to sending `_amountOut`
                amountOutMinimum: _amountIn // The amount we must send to the LP target
            })
        );

        IERC20(_liquidationPair.tokenIn()).transfer(_liquidationPair.target(), _amountIn);
    }

    /// @notice Finds the biggest profit that can be made with the given liquidation pair and swap path.
    /// @dev SHOULD be called statically, not intended for onchain interactions!
    /// @param _liquidationPair The pair to liquidate
    /// @param _path The Uniswap V3 swap path to use
    /// @return The profit info for the best swap
    function findBestQuoteStatic(
        ILiquidationPair _liquidationPair,
        bytes calldata _path
    ) external returns (ProfitInfo memory) {
        ProfitInfo[] memory p = new ProfitInfo[](4);
        ProfitInfo memory pMax;
        uint256 _minOut = 0;
        uint256 _maxOut = _liquidationPair.maxAmountOut();
        uint256 _diffOut = _maxOut - _minOut;
        p[0] = getProfitInfoStatic(0, _liquidationPair, _path);
        p[1] = getProfitInfoStatic(_diffOut / 3, _liquidationPair, _path);
        p[2] = getProfitInfoStatic((_diffOut * 2) / 3, _liquidationPair, _path);
        p[3] = getProfitInfoStatic(_diffOut, _liquidationPair, _path);
        while (_diffOut > 6) {
            if (p[0].profit > p[1].profit) {
                // max between 0 and 1
                pMax = p[0];
                _minOut = p[0].amountOut;
                _maxOut = p[1].amountOut;
                _diffOut = _maxOut - _minOut;
                p[3] = p[1]; // new upper limit
                p[1] = getProfitInfoStatic(_minOut + _diffOut / 3, _liquidationPair, _path);
                p[2] = getProfitInfoStatic(_minOut + (_diffOut * 2) / 3, _liquidationPair, _path);
            } else if (p[1].profit > p[2].profit) {
                // max between 0 and 2
                pMax = p[1];
                _minOut = p[0].amountOut;
                _maxOut = p[2].amountOut;
                _diffOut = _maxOut - _minOut;
                p[3] = p[2]; // new upper limit
                p[1] = getProfitInfoStatic(_minOut + _diffOut / 3, _liquidationPair, _path);
                p[2] = getProfitInfoStatic(_minOut + (_diffOut * 2) / 3, _liquidationPair, _path);
            } else if (p[2].profit > p[3].profit) {
                // max between 1 and 3
                pMax = p[2];
                _minOut = p[1].amountOut;
                _maxOut = p[3].amountOut;
                _diffOut = _maxOut - _minOut;
                p[0] = p[1]; // new lower limit
                p[1] = getProfitInfoStatic(_minOut + _diffOut / 3, _liquidationPair, _path);
                p[2] = getProfitInfoStatic(_minOut + (_diffOut * 2) / 3, _liquidationPair, _path);
            } else {
                // max between 2 and 3
                pMax = p[3];
                _minOut = p[2].amountOut;
                _maxOut = p[3].amountOut;
                _diffOut = _maxOut - _minOut;
                p[0] = p[2]; // new lower limit
                p[1] = getProfitInfoStatic(_minOut + _diffOut / 3, _liquidationPair, _path);
                p[2] = getProfitInfoStatic(_minOut + (_diffOut * 2) / 3, _liquidationPair, _path);
            }
        }
        return pMax;
    }

    /// @notice Calculates the profit point at the given amount out.
    /// @dev SHOULD be called statically, not intended for onchain interactions!
    /// @param _amountOut The amount out at which to calculate the profit point
    /// @param _liquidationPair The pair to liquidate
    /// @param _path The Uniswap V3 swap path to use
    /// @return The profit point for the given amount out
    function getProfitInfoStatic(
        uint256 _amountOut,
        ILiquidationPair _liquidationPair,
        bytes calldata _path
    ) public returns (ProfitInfo memory) {
        ProfitInfo memory p;
        if (_amountOut == 0) return p;
        p.amountOut = _amountOut;
        p.amountIn = _liquidationPair.computeExactAmountIn(_amountOut);
        uint256 _tokenInFromSwap = quoter.quoteExactInput(_path, p.amountOut);
        if (_tokenInFromSwap >= p.amountIn) {
            p.profit = _tokenInFromSwap - p.amountIn;
            p.success = true;
        }
        return p;
    }

    /// @notice Struct to store current profit info with the associated liquidation parameters.
    /// @param amountIn The amount of tokenIn that will be sent to the LP
    /// @param amountOut The amount of tokenOut that will be swapped for tokenIn
    /// @param profit The amount of tokenIn profit that can be made
    /// @param success True if the liquidation will be successful, False otherwise
    struct ProfitInfo {
        uint256 amountIn;
        uint256 amountOut;
        uint256 profit;
        bool success;
    }
}

File 2 of 9 : ILiquidationPair.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { ILiquidationSource } from "./ILiquidationSource.sol";

interface ILiquidationPair {
    /**
     * @notice The liquidation source that the pair is using.
     * @dev The source executes the actual token swap, while the pair handles the pricing.
     */
    function source() external view returns (ILiquidationSource);

    /**
     * @notice Returns the token that is used to pay for auctions.
     * @return address of the token coming in
     */
    function tokenIn() external view returns (address);

    /**
     * @notice Returns the token that is being auctioned.
     * @return address of the token coming out
     */
    function tokenOut() external view returns (address);

    /**
     * @notice Get the address that will receive `tokenIn`.
     * @return Address of the target
     */
    function target() external returns (address);

    /**
     * @notice Gets the maximum amount of tokens that can be swapped out from the source.
     * @return The maximum amount of tokens that can be swapped out.
     */
    function maxAmountOut() external returns (uint256);

    /**
     * @notice Swaps the given amount of tokens out and ensures the amount of tokens in doesn't exceed the given maximum.
     * @dev The amount of tokens being swapped in must be sent to the target before calling this function.
     * @param _receiver The address to send the tokens to.
     * @param _amountOut The amount of tokens to receive out.
     * @param _amountInMax The maximum amount of tokens to send in.
     * @param _flashSwapData If non-zero, the _receiver is called with this data prior to
     * @return The amount of tokens sent in.
     */
    function swapExactAmountOut(
        address _receiver,
        uint256 _amountOut,
        uint256 _amountInMax,
        bytes calldata _flashSwapData
    ) external returns (uint256);

    /**
     * @notice Computes the exact amount of tokens to send in for the given amount of tokens to receive out.
     * @param _amountOut The amount of tokens to receive out.
     * @return The amount of tokens to send in.
     */
    function computeExactAmountIn(uint256 _amountOut) external returns (uint256);
}

File 3 of 9 : IFlashSwapCallback.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @notice Interface for the flash swap callback
interface IFlashSwapCallback {
    /// @notice Called on the token receiver by the LiquidationPair during a liquidation if the flashSwap data length is non-zero
    /// @param _sender The address that triggered the liquidation swap
    /// @param _amountOut The amount of tokens that were sent to the receiver
    /// @param _amountIn The amount of tokens expected to be sent to the target
    /// @param _flashSwapData The flash swap data that was passed into the swap function.
    function flashSwapCallback(
        address _sender,
        uint256 _amountIn,
        uint256 _amountOut,
        bytes calldata _flashSwapData
    ) external;
}

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

pragma solidity ^0.8.23;

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

File 5 of 9 : IUniswapV3StaticQuoter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.23;

interface IUniswapV3StaticQuoter {
    /// @notice Returns the amount out received for a given exact input swap without executing the swap
    /// @param path The path of the swap, i.e. each token pair and the pool fee
    /// @param amountIn The amount of the first token to swap
    /// @return amountOut The amount of the last token that would be received
    function quoteExactInput(bytes memory path, uint256 amountIn) external view returns (uint256 amountOut);

    struct QuoteExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint256 amountIn;
        uint24 fee;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Returns the amount out received for a given exact input but for a swap of a single pool
    /// @param params The params for the quote, encoded as `QuoteExactInputSingleParams`
    /// tokenIn The token being swapped in
    /// tokenOut The token being swapped out
    /// fee The fee of the token pool to consider for the pair
    /// amountIn The desired input amount
    /// sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap
    /// @return amountOut The amount of `tokenOut` that would be received
    function quoteExactInputSingle(QuoteExactInputSingleParams memory params) external view returns (uint256 amountOut);
}

File 6 of 9 : IV3SwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.23;
pragma abicoder v2;

import { IUniswapV3SwapCallback } from "./IUniswapV3SwapCallback.sol";

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface IV3SwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance,
    /// and swap the entire amount, enabling contracts to send tokens before calling this function.
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance,
    /// and swap the entire amount, enabling contracts to send tokens before calling this function.
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// that may remain in the router after the swap.
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// that may remain in the router after the swap.
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 7 of 9 : UniswapConstants.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.23;

/// @title Constant state
/// @notice Constant state used by the swap router
library Constants {
    /// @dev Used for identifying cases when this contract's balance of a token is to be used
    uint256 internal constant CONTRACT_BALANCE = 0;

    /// @dev Used as a flag for identifying msg.sender, saves gas by sending more 0 bytes
    address internal constant MSG_SENDER = address(1);

    /// @dev Used as a flag for identifying address(this), saves gas by sending more 0 bytes
    address internal constant ADDRESS_THIS = address(2);
}

File 8 of 9 : ILiquidationSource.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ILiquidationSource {
    /**
     * @notice Emitted when a new liquidation pair is set for the given `tokenOut`.
     * @param tokenOut The token being liquidated
     * @param liquidationPair The new liquidation pair for the token
     */
    event LiquidationPairSet(address indexed tokenOut, address indexed liquidationPair);

    /**
     * @notice Get the available amount of tokens that can be swapped.
     * @param tokenOut Address of the token to get available balance for
     * @return uint256 Available amount of `token`
     */
    function liquidatableBalanceOf(address tokenOut) external view returns (uint256);

    /**
     * @notice Transfers tokens to the receiver
     * @param sender Address that triggered the liquidation
     * @param receiver Address of the account that will receive `tokenOut`
     * @param tokenOut Address of the token being bought
     * @param amountOut Amount of token being bought
     */
    function transferTokensOut(
        address sender,
        address receiver,
        address tokenOut,
        uint256 amountOut
    ) external returns (bytes memory);

    /**
     * @notice Verifies that tokens have been transferred in.
     * @param tokenIn Address of the token being sold
     * @param amountIn Amount of token being sold
     * @param transferTokensOutData Data returned by the corresponding transferTokensOut call
     */
    function verifyTokensIn(address tokenIn, uint256 amountIn, bytes calldata transferTokensOutData) external;

    /**
     * @notice Get the address that will receive `tokenIn`.
     * @param tokenIn Address of the token to get the target address for
     * @return address Address of the target
     */
    function targetOf(address tokenIn) external view returns (address);

    /**
     * @notice Checks if a liquidation pair can be used to liquidate the given tokenOut from this source.
     * @param tokenOut The address of the token to liquidate
     * @param liquidationPair The address of the liquidation pair that is being checked
     * @return bool True if the liquidation pair can be used, false otherwise
     */
    function isLiquidationPair(address tokenOut, address liquidationPair) external view returns (bool);
}

File 9 of 9 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.23;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUniswapV3StaticQuoter","name":"quoter_","type":"address"},{"internalType":"contract IV3SwapRouter","name":"router_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"FlashLiquidationExpired","type":"error"},{"inputs":[{"internalType":"uint256","name":"profit","type":"uint256"},{"internalType":"uint256","name":"minProfit","type":"uint256"}],"name":"InsufficientProfit","type":"error"},{"inputs":[],"name":"QuoterZeroAddress","type":"error"},{"inputs":[],"name":"RouterZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"contract ILiquidationPair","name":"liquidationPair","type":"address"},{"indexed":false,"internalType":"bytes","name":"path","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"}],"name":"FlashSwapLiquidation","type":"event"},{"inputs":[{"internalType":"contract ILiquidationPair","name":"_liquidationPair","type":"address"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"findBestQuoteStatic","outputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"profit","type":"uint256"},{"internalType":"bool","name":"success","type":"bool"}],"internalType":"struct UniswapFlashLiquidation.ProfitInfo","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILiquidationPair","name":"_liquidationPair","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amountOut","type":"uint256"},{"internalType":"uint256","name":"_amountInMax","type":"uint256"},{"internalType":"uint256","name":"_profitMin","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"flashLiquidate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_amountOut","type":"uint256"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"flashSwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountOut","type":"uint256"},{"internalType":"contract ILiquidationPair","name":"_liquidationPair","type":"address"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"getProfitInfoStatic","outputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"profit","type":"uint256"},{"internalType":"bool","name":"success","type":"bool"}],"internalType":"struct UniswapFlashLiquidation.ProfitInfo","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"contract IUniswapV3StaticQuoter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IV3SwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b50604051620013a8380380620013a8833981016040819052610031916100b4565b6001600160a01b03821660000361005b57604051638e2ab12560e01b815260040160405180910390fd5b6001600160a01b03811660000361008557604051636bab716b60e11b815260040160405180910390fd5b6001600160a01b039182166080521660a0526100ee565b6001600160a01b03811681146100b157600080fd5b50565b600080604083850312156100c757600080fd5b82516100d28161009c565b60208401519092506100e38161009c565b809150509250929050565b60805160a05161127f620001296000396000818161014501528181610609015261068a0152600081816101060152610263015261127f6000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80633e4ab27d146100675780637bfa9459146100b8578063a5a6edad146100d9578063b4e7b65f146100ee578063c6bbd5a714610101578063f887ea4014610140575b600080fd5b61007a610075366004610ea7565b610167565b6040516100af919081518152602080830151908201526040808301519082015260609182015115159181019190915260800190565b60405180910390f35b6100cb6100c6366004610f03565b61030b565b6040519081526020016100af565b6100ec6100e7366004610f92565b61058b565b005b61007a6100fc366004610ffc565b6108c3565b6101287f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100af565b6101287f000000000000000000000000000000000000000000000000000000000000000081565b61019460405180608001604052806000815260200160008152602001600081526020016000151581525090565b6101c160405180608001604052806000815260200160008152602001600081526020016000151581525090565b856000036101d0579050610303565b60208101869052604051630aa58b2160e01b8152600481018790526001600160a01b03861690630aa58b21906024016020604051808303816000875af115801561021e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102429190611051565b8152602081015160405163cdca175360e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163cdca17539161029a9189918991600401611093565b602060405180830381865afa1580156102b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102db9190611051565b825190915081106102ff5781516102f290826110cd565b6040830152600160608301525b5090505b949350505050565b60008342111561033c5760405163ede5043b60e01b8152426004820152602481018590526044015b60405180910390fd5b604051631cf8287d60e01b81526001600160a01b038a1690631cf8287d906103709030908b908b90899089906004016110e6565b6020604051808303816000875af115801561038f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b39190611051565b506000896001600160a01b0316636daf390b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610418919061111f565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610462573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104869190611051565b9050868110156104b357604051632744211560e11b81526004810182905260248101889052604401610333565b801561052e5760405163a9059cbb60e01b81526001600160a01b038b811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015610508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052c9190611143565b505b8a6001600160a01b03168a6001600160a01b03167fb06bd1ec047ffc3817152bad1c8ccf88a28cbace040e67b8e6b59fe8599a223587878560405161057593929190611093565b60405180910390a39a9950505050505050505050565b6000339050806001600160a01b031663d0202d3b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f2919061111f565b60405163a9059cbb60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201879052919091169063a9059cbb906044016020604051808303816000875af1158015610663573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106879190611143565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b858183f604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060016020840152506040808301919091526060909101899052516001600160e01b031960e084901b1681526107319190600401611165565b6020604051808303816000875af1158015610750573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107749190611051565b50806001600160a01b0316636daf390b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d7919061111f565b6001600160a01b031663a9059cbb826001600160a01b031663d4b839926040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610849919061111f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018890526044016020604051808303816000875af1158015610896573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ba9190611143565b50505050505050565b6108f060405180608001604052806000815260200160008152602001600081526020016000151581525090565b60408051600480825260a08201909252600091816020015b61093560405180608001604052806000815260200160008152602001600081526020016000151581525090565b81526020019060019003908161090857905050905061097760405180608001604052806000815260200160008152602001600081526020016000151581525090565b600080876001600160a01b0316637ed9038b6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156109ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109de9190611051565b905060006109ec83836110cd565b90506109fb60008a8a8a610167565b85600081518110610a0e57610a0e6111e7565b6020908102919091010152610a2f610a276003836111fd565b8a8a8a610167565b85600181518110610a4257610a426111e7565b6020908102919091010152610a676003610a5d83600261121f565b610a2791906111fd565b85600281518110610a7a57610a7a6111e7565b6020026020010181905250610a91818a8a8a610167565b85600381518110610aa457610aa46111e7565b60200260200101819052505b6006811115610e395784600181518110610acc57610acc6111e7565b60200260200101516040015185600081518110610aeb57610aeb6111e7565b6020026020010151604001511115610c165784600081518110610b1057610b106111e7565b6020026020010151935084600081518110610b2d57610b2d6111e7565b602002602001015160200151925084600181518110610b4e57610b4e6111e7565b60200260200101516020015191508282610b6891906110cd565b905084600181518110610b7d57610b7d6111e7565b602002602001015185600381518110610b9857610b986111e7565b6020908102919091010152610bbb610bb16003836111fd565b610a279085611236565b85600181518110610bce57610bce6111e7565b6020908102919091010152610bf36003610be983600261121f565b610bb191906111fd565b85600281518110610c0657610c066111e7565b6020026020010181905250610ab0565b84600281518110610c2957610c296111e7565b60200260200101516040015185600181518110610c4857610c486111e7565b6020026020010151604001511115610cda5784600181518110610c6d57610c6d6111e7565b6020026020010151935084600081518110610c8a57610c8a6111e7565b602002602001015160200151925084600281518110610cab57610cab6111e7565b60200260200101516020015191508282610cc591906110cd565b905084600281518110610b7d57610b7d6111e7565b84600381518110610ced57610ced6111e7565b60200260200101516040015185600281518110610d0c57610d0c6111e7565b6020026020010151604001511115610db95784600281518110610d3157610d316111e7565b6020026020010151935084600181518110610d4e57610d4e6111e7565b602002602001015160200151925084600381518110610d6f57610d6f6111e7565b60200260200101516020015191508282610d8991906110cd565b905084600181518110610d9e57610d9e6111e7565b602002602001015185600081518110610b9857610b986111e7565b84600381518110610dcc57610dcc6111e7565b6020026020010151935084600281518110610de957610de96111e7565b602002602001015160200151925084600381518110610e0a57610e0a6111e7565b60200260200101516020015191508282610e2491906110cd565b905084600281518110610d9e57610d9e6111e7565b5091979650505050505050565b6001600160a01b0381168114610e5b57600080fd5b50565b60008083601f840112610e7057600080fd5b50813567ffffffffffffffff811115610e8857600080fd5b602083019150836020828501011115610ea057600080fd5b9250929050565b60008060008060608587031215610ebd57600080fd5b843593506020850135610ecf81610e46565b9250604085013567ffffffffffffffff811115610eeb57600080fd5b610ef787828801610e5e565b95989497509550505050565b60008060008060008060008060e0898b031215610f1f57600080fd5b8835610f2a81610e46565b97506020890135610f3a81610e46565b965060408901359550606089013594506080890135935060a0890135925060c089013567ffffffffffffffff811115610f7257600080fd5b610f7e8b828c01610e5e565b999c989b5096995094979396929594505050565b600080600080600060808688031215610faa57600080fd5b8535610fb581610e46565b94506020860135935060408601359250606086013567ffffffffffffffff811115610fdf57600080fd5b610feb88828901610e5e565b969995985093965092949392505050565b60008060006040848603121561101157600080fd5b833561101c81610e46565b9250602084013567ffffffffffffffff81111561103857600080fd5b61104486828701610e5e565b9497909650939450505050565b60006020828403121561106357600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6040815260006110a760408301858761106a565b9050826020830152949350505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156110e0576110e06110b7565b92915050565b60018060a01b038616815284602082015283604082015260806060820152600061111460808301848661106a565b979650505050505050565b60006020828403121561113157600080fd5b815161113c81610e46565b9392505050565b60006020828403121561115557600080fd5b8151801515811461113c57600080fd5b6000602080835283516080602085015280518060a086015260005b8181101561119c5782810184015186820160c001528301611180565b50600085820160c0015260208601516001600160a01b038116604087015292506040860151606086810191909152909501516080850152505050601f91909101601f19160160c00190565b634e487b7160e01b600052603260045260246000fd5b60008261121a57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176110e0576110e06110b7565b808201808211156110e0576110e06110b756fea26469706673582212200fa8f987ba96061818c65f911783872577d91ef1121f86c3c9aace299fbfc83a64736f6c63430008170033000000000000000000000000c80f61d1bdabd8f5285117e1558fddf8c64870fe00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80633e4ab27d146100675780637bfa9459146100b8578063a5a6edad146100d9578063b4e7b65f146100ee578063c6bbd5a714610101578063f887ea4014610140575b600080fd5b61007a610075366004610ea7565b610167565b6040516100af919081518152602080830151908201526040808301519082015260609182015115159181019190915260800190565b60405180910390f35b6100cb6100c6366004610f03565b61030b565b6040519081526020016100af565b6100ec6100e7366004610f92565b61058b565b005b61007a6100fc366004610ffc565b6108c3565b6101287f000000000000000000000000c80f61d1bdabd8f5285117e1558fddf8c64870fe81565b6040516001600160a01b0390911681526020016100af565b6101287f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc4581565b61019460405180608001604052806000815260200160008152602001600081526020016000151581525090565b6101c160405180608001604052806000815260200160008152602001600081526020016000151581525090565b856000036101d0579050610303565b60208101869052604051630aa58b2160e01b8152600481018790526001600160a01b03861690630aa58b21906024016020604051808303816000875af115801561021e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102429190611051565b8152602081015160405163cdca175360e01b81526000916001600160a01b037f000000000000000000000000c80f61d1bdabd8f5285117e1558fddf8c64870fe169163cdca17539161029a9189918991600401611093565b602060405180830381865afa1580156102b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102db9190611051565b825190915081106102ff5781516102f290826110cd565b6040830152600160608301525b5090505b949350505050565b60008342111561033c5760405163ede5043b60e01b8152426004820152602481018590526044015b60405180910390fd5b604051631cf8287d60e01b81526001600160a01b038a1690631cf8287d906103709030908b908b90899089906004016110e6565b6020604051808303816000875af115801561038f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b39190611051565b506000896001600160a01b0316636daf390b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610418919061111f565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610462573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104869190611051565b9050868110156104b357604051632744211560e11b81526004810182905260248101889052604401610333565b801561052e5760405163a9059cbb60e01b81526001600160a01b038b811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015610508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052c9190611143565b505b8a6001600160a01b03168a6001600160a01b03167fb06bd1ec047ffc3817152bad1c8ccf88a28cbace040e67b8e6b59fe8599a223587878560405161057593929190611093565b60405180910390a39a9950505050505050505050565b6000339050806001600160a01b031663d0202d3b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f2919061111f565b60405163a9059cbb60e01b81526001600160a01b037f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc458116600483015260248201879052919091169063a9059cbb906044016020604051808303816000875af1158015610663573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106879190611143565b507f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc456001600160a01b031663b858183f604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060016020840152506040808301919091526060909101899052516001600160e01b031960e084901b1681526107319190600401611165565b6020604051808303816000875af1158015610750573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107749190611051565b50806001600160a01b0316636daf390b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d7919061111f565b6001600160a01b031663a9059cbb826001600160a01b031663d4b839926040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610849919061111f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018890526044016020604051808303816000875af1158015610896573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ba9190611143565b50505050505050565b6108f060405180608001604052806000815260200160008152602001600081526020016000151581525090565b60408051600480825260a08201909252600091816020015b61093560405180608001604052806000815260200160008152602001600081526020016000151581525090565b81526020019060019003908161090857905050905061097760405180608001604052806000815260200160008152602001600081526020016000151581525090565b600080876001600160a01b0316637ed9038b6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156109ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109de9190611051565b905060006109ec83836110cd565b90506109fb60008a8a8a610167565b85600081518110610a0e57610a0e6111e7565b6020908102919091010152610a2f610a276003836111fd565b8a8a8a610167565b85600181518110610a4257610a426111e7565b6020908102919091010152610a676003610a5d83600261121f565b610a2791906111fd565b85600281518110610a7a57610a7a6111e7565b6020026020010181905250610a91818a8a8a610167565b85600381518110610aa457610aa46111e7565b60200260200101819052505b6006811115610e395784600181518110610acc57610acc6111e7565b60200260200101516040015185600081518110610aeb57610aeb6111e7565b6020026020010151604001511115610c165784600081518110610b1057610b106111e7565b6020026020010151935084600081518110610b2d57610b2d6111e7565b602002602001015160200151925084600181518110610b4e57610b4e6111e7565b60200260200101516020015191508282610b6891906110cd565b905084600181518110610b7d57610b7d6111e7565b602002602001015185600381518110610b9857610b986111e7565b6020908102919091010152610bbb610bb16003836111fd565b610a279085611236565b85600181518110610bce57610bce6111e7565b6020908102919091010152610bf36003610be983600261121f565b610bb191906111fd565b85600281518110610c0657610c066111e7565b6020026020010181905250610ab0565b84600281518110610c2957610c296111e7565b60200260200101516040015185600181518110610c4857610c486111e7565b6020026020010151604001511115610cda5784600181518110610c6d57610c6d6111e7565b6020026020010151935084600081518110610c8a57610c8a6111e7565b602002602001015160200151925084600281518110610cab57610cab6111e7565b60200260200101516020015191508282610cc591906110cd565b905084600281518110610b7d57610b7d6111e7565b84600381518110610ced57610ced6111e7565b60200260200101516040015185600281518110610d0c57610d0c6111e7565b6020026020010151604001511115610db95784600281518110610d3157610d316111e7565b6020026020010151935084600181518110610d4e57610d4e6111e7565b602002602001015160200151925084600381518110610d6f57610d6f6111e7565b60200260200101516020015191508282610d8991906110cd565b905084600181518110610d9e57610d9e6111e7565b602002602001015185600081518110610b9857610b986111e7565b84600381518110610dcc57610dcc6111e7565b6020026020010151935084600281518110610de957610de96111e7565b602002602001015160200151925084600381518110610e0a57610e0a6111e7565b60200260200101516020015191508282610e2491906110cd565b905084600281518110610d9e57610d9e6111e7565b5091979650505050505050565b6001600160a01b0381168114610e5b57600080fd5b50565b60008083601f840112610e7057600080fd5b50813567ffffffffffffffff811115610e8857600080fd5b602083019150836020828501011115610ea057600080fd5b9250929050565b60008060008060608587031215610ebd57600080fd5b843593506020850135610ecf81610e46565b9250604085013567ffffffffffffffff811115610eeb57600080fd5b610ef787828801610e5e565b95989497509550505050565b60008060008060008060008060e0898b031215610f1f57600080fd5b8835610f2a81610e46565b97506020890135610f3a81610e46565b965060408901359550606089013594506080890135935060a0890135925060c089013567ffffffffffffffff811115610f7257600080fd5b610f7e8b828c01610e5e565b999c989b5096995094979396929594505050565b600080600080600060808688031215610faa57600080fd5b8535610fb581610e46565b94506020860135935060408601359250606086013567ffffffffffffffff811115610fdf57600080fd5b610feb88828901610e5e565b969995985093965092949392505050565b60008060006040848603121561101157600080fd5b833561101c81610e46565b9250602084013567ffffffffffffffff81111561103857600080fd5b61104486828701610e5e565b9497909650939450505050565b60006020828403121561106357600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6040815260006110a760408301858761106a565b9050826020830152949350505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156110e0576110e06110b7565b92915050565b60018060a01b038616815284602082015283604082015260806060820152600061111460808301848661106a565b979650505050505050565b60006020828403121561113157600080fd5b815161113c81610e46565b9392505050565b60006020828403121561115557600080fd5b8151801515811461113c57600080fd5b6000602080835283516080602085015280518060a086015260005b8181101561119c5782810184015186820160c001528301611180565b50600085820160c0015260208601516001600160a01b038116604087015292506040860151606086810191909152909501516080850152505050601f91909101601f19160160c00190565b634e487b7160e01b600052603260045260246000fd5b60008261121a57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176110e0576110e06110b7565b808201808211156110e0576110e06110b756fea26469706673582212200fa8f987ba96061818c65f911783872577d91ef1121f86c3c9aace299fbfc83a64736f6c63430008170033

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

000000000000000000000000c80f61d1bdabd8f5285117e1558fddf8c64870fe00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45

-----Decoded View---------------
Arg [0] : quoter_ (address): 0xc80f61d1bdAbD8f5285117e1558fDDf8C64870FE
Arg [1] : router_ (address): 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c80f61d1bdabd8f5285117e1558fddf8c64870fe
Arg [1] : 00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.