FRAX Price: $0.97 (-0.37%)

Contract

0x31832f2a97Fd20664D76Cc421207669b55CE4BC0

Overview

FRAX Balance | FXTL Balance

0 FRAX | 192,856 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions and > 10 Token Transfers found.

Latest 20 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
230078792025-07-18 8:14:29190 days ago1752826469
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
177148922025-03-17 19:41:35312 days ago1742240495
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
168811842025-02-26 12:31:19332 days ago1740573079
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
145445842025-01-03 10:24:39386 days ago1735899879
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
145032002025-01-02 11:25:11387 days ago1735817111
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
145017332025-01-02 10:36:17387 days ago1735814177
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
145000832025-01-02 9:41:17387 days ago1735810877
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
144999892025-01-02 9:38:09387 days ago1735810689
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
141957632024-12-26 8:37:17394 days ago1735202237
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
141091882024-12-24 8:31:27396 days ago1735029087
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
140443792024-12-22 20:31:09397 days ago1734899469
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
135511352024-12-11 10:29:41409 days ago1733912981
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126896492024-11-21 11:53:29429 days ago1732190009
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126698622024-11-21 0:53:55429 days ago1732150435
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126698262024-11-21 0:52:43429 days ago1732150363
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126134262024-11-19 17:32:43430 days ago1732037563
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126133382024-11-19 17:29:47430 days ago1732037387
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126085772024-11-19 14:51:05431 days ago1732027865
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126084722024-11-19 14:47:35431 days ago1732027655
0x31832f2a...b55CE4BC0
 Contract Creation0 FRAX
126031012024-11-19 11:48:33431 days ago1732016913  Contract Creation0 FRAX

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PoolFactory

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.19 <0.9.0;

import {Clones} from "@openzeppelin5/contracts/proxy/Clones.sol";
import {ExcessivelySafeCall} from "@nomad-xyz/src/ExcessivelySafeCall.sol";

import {IPoolFactory} from "../interfaces/pools/IPoolFactory.sol";
import {IFeeModule} from "../interfaces/fees/IFeeModule.sol";
import {IPool} from "../interfaces/pools/IPool.sol";

/*

██╗   ██╗███████╗██╗      ██████╗ ██████╗ ██████╗  ██████╗ ███╗   ███╗███████╗               
██║   ██║██╔════╝██║     ██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██╔════╝               
██║   ██║█████╗  ██║     ██║   ██║██║  ██║██████╔╝██║   ██║██╔████╔██║█████╗                 
╚██╗ ██╔╝██╔══╝  ██║     ██║   ██║██║  ██║██╔══██╗██║   ██║██║╚██╔╝██║██╔══╝                 
 ╚████╔╝ ███████╗███████╗╚██████╔╝██████╔╝██║  ██║╚██████╔╝██║ ╚═╝ ██║███████╗               
  ╚═══╝  ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚═╝     ╚═╝╚══════╝               
                                                                                             
███████╗██╗   ██╗██████╗ ███████╗██████╗  ██████╗██╗  ██╗ █████╗ ██╗███╗   ██╗               
██╔════╝██║   ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██║  ██║██╔══██╗██║████╗  ██║               
███████╗██║   ██║██████╔╝█████╗  ██████╔╝██║     ███████║███████║██║██╔██╗ ██║               
╚════██║██║   ██║██╔═══╝ ██╔══╝  ██╔══██╗██║     ██╔══██║██╔══██║██║██║╚██╗██║               
███████║╚██████╔╝██║     ███████╗██║  ██║╚██████╗██║  ██║██║  ██║██║██║ ╚████║               
╚══════╝ ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═══╝               
                                                                                             
██████╗  ██████╗  ██████╗ ██╗     ███████╗ █████╗  ██████╗████████╗ ██████╗ ██████╗ ██╗   ██╗
██╔══██╗██╔═══██╗██╔═══██╗██║     ██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗╚██╗ ██╔╝
██████╔╝██║   ██║██║   ██║██║     █████╗  ███████║██║        ██║   ██║   ██║██████╔╝ ╚████╔╝ 
██╔═══╝ ██║   ██║██║   ██║██║     ██╔══╝  ██╔══██║██║        ██║   ██║   ██║██╔══██╗  ╚██╔╝  
██║     ╚██████╔╝╚██████╔╝███████╗██║     ██║  ██║╚██████╗   ██║   ╚██████╔╝██║  ██║   ██║   
╚═╝      ╚═════╝  ╚═════╝ ╚══════╝╚═╝     ╚═╝  ╚═╝ ╚═════╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝   ╚═╝   
                                                                                             
*/

/// @title PoolFactory
/// @author velodrome.finance, Solidly, Uniswap Labs
/// @notice Velodrome V2 pool factory
contract PoolFactory is IPoolFactory {
    using ExcessivelySafeCall for address;

    /// @inheritdoc IPoolFactory
    address public immutable implementation;

    /// @inheritdoc IPoolFactory
    bool public isPaused;
    /// @inheritdoc IPoolFactory
    address public pauser;

    /// @inheritdoc IPoolFactory
    uint256 public stableFee;
    /// @inheritdoc IPoolFactory
    uint256 public volatileFee;
    /// @inheritdoc IPoolFactory
    uint256 public constant MAX_FEE = 300; // 3%
    /// @inheritdoc IPoolFactory
    address public feeManager;
    /// @inheritdoc IPoolFactory
    address public feeModule;
    /// @inheritdoc IPoolFactory
    address public poolAdmin;

    mapping(address => mapping(address => mapping(bool => address))) internal _getPool;
    address[] internal _allPools;
    /// @dev simplified check if its a pool, given that `stable` flag might not be available in peripherals
    mapping(address => bool) internal _isPool;

    constructor(address _implementation, address _poolAdmin, address _pauser, address _feeManager) {
        implementation = _implementation;
        poolAdmin = _poolAdmin;
        pauser = _pauser;
        feeManager = _feeManager;
        isPaused = false;
        stableFee = 5; // 0.05%
        volatileFee = 30; // 0.3%
        emit SetPoolAdmin(_poolAdmin);
        emit SetPauser(_pauser);
        emit SetFeeManager(_feeManager);
        emit SetDefaultFee(true, 5);
        emit SetDefaultFee(false, 30);
    }

    /// @inheritdoc IPoolFactory
    function allPools(uint256 index) external view returns (address) {
        return _allPools[index];
    }

    /// @inheritdoc IPoolFactory
    function allPools() external view returns (address[] memory) {
        return _allPools;
    }

    /// @inheritdoc IPoolFactory
    function allPoolsLength() external view returns (uint256) {
        return _allPools.length;
    }

    /// @inheritdoc IPoolFactory
    function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address) {
        return fee > 1 ? address(0) : _getPool[tokenA][tokenB][fee == 1];
    }

    /// @inheritdoc IPoolFactory
    function getPool(address tokenA, address tokenB, bool stable) external view returns (address) {
        return _getPool[tokenA][tokenB][stable];
    }

    /// @inheritdoc IPoolFactory
    function isPool(address pool) external view returns (bool) {
        return _isPool[pool];
    }

    /// @inheritdoc IPoolFactory
    function setPoolAdmin(address _poolAdmin) external {
        if (msg.sender != poolAdmin) revert NotPoolAdmin();
        if (_poolAdmin == address(0)) revert ZeroAddress();
        poolAdmin = _poolAdmin;
        emit SetPoolAdmin(_poolAdmin);
    }

    /// @inheritdoc IPoolFactory
    function setPauser(address _pauser) external {
        if (msg.sender != pauser) revert NotPauser();
        if (_pauser == address(0)) revert ZeroAddress();
        pauser = _pauser;
        emit SetPauser(_pauser);
    }

    /// @inheritdoc IPoolFactory
    function setPauseState(bool _state) external {
        if (msg.sender != pauser) revert NotPauser();
        isPaused = _state;
        emit SetPauseState(_state);
    }

    /// @inheritdoc IPoolFactory
    function setFeeManager(address _feeManager) external {
        if (msg.sender != feeManager) revert NotFeeManager();
        if (_feeManager == address(0)) revert ZeroAddress();
        feeManager = _feeManager;
        emit SetFeeManager(_feeManager);
    }

    /// @inheritdoc IPoolFactory
    function setFeeModule(address _feeModule) external {
        if (msg.sender != feeManager) revert NotFeeManager();
        if (_feeModule == address(0)) revert ZeroAddress();
        address oldFeeModule = feeModule;
        feeModule = _feeModule;
        emit FeeModuleChanged({oldFeeModule: oldFeeModule, newFeeModule: _feeModule});
    }

    /// @inheritdoc IPoolFactory
    function setFee(bool _stable, uint256 _fee) external {
        if (msg.sender != feeManager) revert NotFeeManager();
        if (_fee > MAX_FEE) revert FeeTooHigh();
        if (_fee == 0) revert ZeroFee();
        if (_stable) {
            stableFee = _fee;
        } else {
            volatileFee = _fee;
        }
        emit SetDefaultFee(_stable, _fee);
    }

    /// @inheritdoc IPoolFactory
    function getFee(address _pool, bool _stable) external view returns (uint256) {
        if (feeModule != address(0)) {
            (bool success, bytes memory data) = feeModule.excessivelySafeStaticCall(
                500_000, 32, abi.encodeWithSelector(IFeeModule.getFee.selector, _pool)
            );
            if (success) {
                uint256 fee = abi.decode(data, (uint24));
                if (fee <= 1_000) {
                    return fee;
                }
            }
        }
        return _stable ? stableFee : volatileFee;
    }

    /// @inheritdoc IPoolFactory
    function createPool(address tokenA, address tokenB, uint24 fee) external returns (address pool) {
        if (fee > 1) revert FeeInvalid();
        bool stable = fee == 1;
        return createPool(tokenA, tokenB, stable);
    }

    /// @inheritdoc IPoolFactory
    function createPool(address tokenA, address tokenB, bool stable) public returns (address pool) {
        if (tokenA == tokenB) revert SameAddress();
        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        if (token0 == address(0)) revert ZeroAddress();
        if (_getPool[token0][token1][stable] != address(0)) revert PoolAlreadyExists();
        bytes32 salt = keccak256(abi.encodePacked(token0, token1, stable)); // salt includes stable as well, 3 parameters
        pool = Clones.cloneDeterministic(implementation, salt);
        IPool(pool).initialize(token0, token1, stable);
        _getPool[token0][token1][stable] = pool;
        _getPool[token1][token0][stable] = pool; // populate mapping in the reverse direction
        _allPools.push(pool);
        _isPool[pool] = true;
        emit PoolCreated(token0, token1, stable, pool, _allPools.length);
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 */
library Clones {
    /**
     * @dev A clone instance deployment failed.
     */
    error ERC1167FailedCreateClone();

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        if (instance == address(0)) {
            revert ERC1167FailedCreateClone();
        }
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        if (instance == address(0)) {
            revert ERC1167FailedCreateClone();
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt
    ) internal view returns (address predicted) {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.7.6;

library ExcessivelySafeCall {
    uint256 constant LOW_28_MASK =
        0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice Use when you _really_ really _really_ don't trust the called
    /// contract. This prevents the called contract from causing reversion of
    /// the caller in as many ways as we can.
    /// @dev The main difference between this and a solidity low-level call is
    /// that we limit the number of bytes that the callee can cause to be
    /// copied to caller memory. This prevents stupid things like malicious
    /// contracts returning 10,000,000 bytes causing a local OOG when copying
    /// to memory.
    /// @param _target The address to call
    /// @param _gas The amount of gas to forward to the remote contract
    /// @param _value The value in wei to send to the remote contract
    /// @param _maxCopy The maximum number of bytes of returndata to copy
    /// to memory.
    /// @param _calldata The data to send to the remote contract
    /// @return success and returndata, as `.call()`. Returndata is capped to
    /// `_maxCopy` bytes.
    function excessivelySafeCall(
        address _target,
        uint256 _gas,
        uint256 _value,
        uint16 _maxCopy,
        bytes memory _calldata
    ) internal returns (bool, bytes memory) {
        // set up for assembly call
        uint256 _toCopy;
        bool _success;
        bytes memory _returnData = new bytes(_maxCopy);
        // dispatch message to recipient
        // by assembly calling "handle" function
        // we call via assembly to avoid memcopying a very large returndata
        // returned by a malicious contract
        assembly {
            _success := call(
                _gas, // gas
                _target, // recipient
                _value, // ether value
                add(_calldata, 0x20), // inloc
                mload(_calldata), // inlen
                0, // outloc
                0 // outlen
            )
            // limit our copy to 256 bytes
            _toCopy := returndatasize()
            if gt(_toCopy, _maxCopy) {
                _toCopy := _maxCopy
            }
            // Store the length of the copied bytes
            mstore(_returnData, _toCopy)
            // copy the bytes from returndata[0:_toCopy]
            returndatacopy(add(_returnData, 0x20), 0, _toCopy)
        }
        return (_success, _returnData);
    }

    /// @notice Use when you _really_ really _really_ don't trust the called
    /// contract. This prevents the called contract from causing reversion of
    /// the caller in as many ways as we can.
    /// @dev The main difference between this and a solidity low-level call is
    /// that we limit the number of bytes that the callee can cause to be
    /// copied to caller memory. This prevents stupid things like malicious
    /// contracts returning 10,000,000 bytes causing a local OOG when copying
    /// to memory.
    /// @param _target The address to call
    /// @param _gas The amount of gas to forward to the remote contract
    /// @param _maxCopy The maximum number of bytes of returndata to copy
    /// to memory.
    /// @param _calldata The data to send to the remote contract
    /// @return success and returndata, as `.call()`. Returndata is capped to
    /// `_maxCopy` bytes.
    function excessivelySafeStaticCall(
        address _target,
        uint256 _gas,
        uint16 _maxCopy,
        bytes memory _calldata
    ) internal view returns (bool, bytes memory) {
        // set up for assembly call
        uint256 _toCopy;
        bool _success;
        bytes memory _returnData = new bytes(_maxCopy);
        // dispatch message to recipient
        // by assembly calling "handle" function
        // we call via assembly to avoid memcopying a very large returndata
        // returned by a malicious contract
        assembly {
            _success := staticcall(
                _gas, // gas
                _target, // recipient
                add(_calldata, 0x20), // inloc
                mload(_calldata), // inlen
                0, // outloc
                0 // outlen
            )
            // limit our copy to 256 bytes
            _toCopy := returndatasize()
            if gt(_toCopy, _maxCopy) {
                _toCopy := _maxCopy
            }
            // Store the length of the copied bytes
            mstore(_returnData, _toCopy)
            // copy the bytes from returndata[0:_toCopy]
            returndatacopy(add(_returnData, 0x20), 0, _toCopy)
        }
        return (_success, _returnData);
    }

    /**
     * @notice Swaps function selectors in encoded contract calls
     * @dev Allows reuse of encoded calldata for functions with identical
     * argument types but different names. It simply swaps out the first 4 bytes
     * for the new selector. This function modifies memory in place, and should
     * only be used with caution.
     * @param _newSelector The new 4-byte selector
     * @param _buf The encoded contract args
     */
    function swapSelector(bytes4 _newSelector, bytes memory _buf)
        internal
        pure
    {
        require(_buf.length >= 4);
        uint256 _mask = LOW_28_MASK;
        assembly {
            // load the first word of
            let _word := mload(add(_buf, 0x20))
            // mask out the top 4 bytes
            // /x
            _word := and(_word, _mask)
            _word := or(_newSelector, _word)
            mstore(add(_buf, 0x20), _word)
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IPoolFactory {
    event SetFeeManager(address indexed feeManager);
    event SetPauser(address indexed pauser);
    event SetPauseState(bool indexed state);
    event SetPoolAdmin(address indexed poolAdmin);
    event PoolCreated(address indexed token0, address indexed token1, bool indexed stable, address pool, uint256);
    event SetDefaultFee(bool indexed stable, uint256 fee);
    event FeeModuleChanged(address indexed oldFeeModule, address indexed newFeeModule);

    error FeeInvalid();
    error FeeTooHigh();
    error NotFeeManager();
    error NotPauser();
    error NotPoolAdmin();
    error PoolAlreadyExists();
    error SameAddress();
    error ZeroFee();
    error ZeroAddress();

    /// @notice Return a single pool created by this factory
    /// @return Address of pool
    function allPools(uint256 index) external view returns (address);

    /// @notice Returns all pools created by this factory
    /// @return Array of pool addresses
    function allPools() external view returns (address[] memory);

    /// @notice returns the number of pools created from this factory
    function allPoolsLength() external view returns (uint256);

    /// @notice Is a valid pool created by this factory.
    /// @param .
    function isPool(address pool) external view returns (bool);

    /// @notice Return address of pool created by this factory
    /// @param tokenA .
    /// @param tokenB .
    /// @param stable True if stable, false if volatile
    function getPool(address tokenA, address tokenB, bool stable) external view returns (address);

    /// @notice Support for v3-style pools which wraps around getPool(tokenA,tokenB,stable)
    /// @dev fee is converted to stable boolean.
    /// @param tokenA .
    /// @param tokenB .
    /// @param fee  1 if stable, 0 if volatile, else returns address(0)
    function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address);

    /// @notice Set pool administrator
    /// @dev Allowed to change the name and symbol of any pool created by this factory
    /// @param _poolAdmin Address of the pool administrator
    function setPoolAdmin(address _poolAdmin) external;

    /// @notice Set the pauser for the factory contract
    /// @dev The pauser can pause swaps on pools associated with the factory. Liquidity will always be withdrawable.
    /// @dev Must be called by the pauser
    /// @param _pauser Address of the pauser
    function setPauser(address _pauser) external;

    /// @notice Pause or unpause swaps on pools associated with the factory
    /// @param _state True to pause, false to unpause
    function setPauseState(bool _state) external;

    /// @notice Set the fee manager for the factory contract
    /// @dev The fee manager can set fees on pools associated with the factory.
    /// @dev Must be called by the fee manager
    /// @param _feeManager Address of the fee manager
    function setFeeManager(address _feeManager) external;

    /// @notice Updates the feeModule of the factory
    /// @dev Must be called by the current fee manager
    /// @param _feeModule The new feeModule of the factory
    function setFeeModule(address _feeModule) external;

    /// @notice Set default fee for stable and volatile pools.
    /// @dev Throws if higher than maximum fee.
    ///      Throws if fee is zero.
    /// @param _stable Stable or volatile pool.
    /// @param _fee .
    function setFee(bool _stable, uint256 _fee) external;

    /// @notice Returns fee for a pool, as custom fees are possible.
    function getFee(address _pool, bool _stable) external view returns (uint256);

    /// @notice Create a pool given two tokens and if they're stable/volatile
    /// @dev token order does not matter
    /// @param tokenA .
    /// @param tokenB .
    /// @param stable .
    function createPool(address tokenA, address tokenB, bool stable) external returns (address pool);

    /// @notice Support for v3-style pools which wraps around createPool(tokenA,tokenB,stable)
    /// @dev fee is converted to stable boolean
    /// @dev token order does not matter
    /// @param tokenA .
    /// @param tokenB .
    /// @param fee 1 if stable, 0 if volatile, else revert
    function createPool(address tokenA, address tokenB, uint24 fee) external returns (address pool);

    /// @notice The pool implementation used to create pools
    /// @return Address of pool implementation
    function implementation() external view returns (address);

    /// @notice Whether the pools associated with the factory are paused or not.
    /// @dev Pause only pauses swaps, liquidity will always be withdrawable.
    function isPaused() external view returns (bool);

    /// @notice The address of the pauser, can pause swaps on pools associated with factory.
    /// @return Address of the pauser
    function pauser() external view returns (address);

    /// @notice The default fee for all stable pools
    /// @return Default stable fee
    function stableFee() external view returns (uint256);

    /// @notice The default fee for all volatile pools
    /// @return Default volatile fee
    function volatileFee() external view returns (uint256);

    /// @notice Maximum possible fee for default stable or volatile fee
    /// @return 3%
    function MAX_FEE() external view returns (uint256);

    /// @notice Address of the fee manager, can set fees on pools associated with factory.
    /// @notice This overrides the default fee for that pool.
    /// @return Address of the fee manager
    function feeManager() external view returns (address);

    /// @notice Address of the fee module of the factory
    /// @dev Can be changed by the current fee manager via setFeeModule
    /// @return Address of the fee module
    function feeModule() external view returns (address);

    /// @notice Address of the pool administrator, can change the name and symbol of pools created by factory.
    /// @return Address of the pool administrator
    function poolAdmin() external view returns (address);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../pools/IPoolFactory.sol";

interface IFeeModule {
    /// @notice Get the factory that the fee module belongs to
    function factory() external view returns (IPoolFactory);

    /// @notice Get fee for a given pool. Accounts for default and dynamic fees
    /// @dev Fee is denominated in bips.
    /// @param pool The pool to get the fee for
    /// @return The fee for the given pool
    function getFee(address pool) external view returns (uint24);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IPool {
    error DepositsNotEqual();
    error BelowMinimumK();
    error FactoryAlreadySet();
    error InsufficientLiquidity();
    error InsufficientLiquidityMinted();
    error InsufficientLiquidityBurned();
    error InsufficientOutputAmount();
    error InsufficientInputAmount();
    error IsPaused();
    error InvalidTo();
    error K();

    event Fees(address indexed sender, uint256 amount0, uint256 amount1);
    event Mint(address indexed sender, address indexed to, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, address indexed to, uint256 amount0, uint256 amount1);
    event Swap(
        address indexed sender,
        address indexed to,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out
    );
    event Sync(uint256 reserve0, uint256 reserve1);
    event Claim(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1);

    // Struct to capture time period obervations every 30 minutes, used for local oracles
    struct Observation {
        uint256 timestamp;
        uint256 reserve0Cumulative;
        uint256 reserve1Cumulative;
    }

    /// @notice Returns the decimal (dec), reserves (r), stable (st), and tokens (t) of token0 and token1
    function metadata()
        external
        view
        returns (uint256 dec0, uint256 dec1, uint256 r0, uint256 r1, bool st, address t0, address t1);

    /// @notice Claim accumulated but unclaimed fees (claimable0 and claimable1)
    function claimFees() external returns (uint256, uint256);

    /// @notice Returns [token0, token1]
    function tokens() external view returns (address, address);

    /// @notice Address of token in the pool with the lower address value
    function token0() external view returns (address);

    /// @notice Address of token in the pool with the higher address value
    function token1() external view returns (address);

    /// @notice Address of linked PoolFees.sol
    function poolFees() external view returns (address);

    /// @notice Address of PoolFactory that created this contract
    function factory() external view returns (address);

    /// @notice Capture oracle reading every 30 minutes (1800 seconds)
    function periodSize() external view returns (uint256);

    /// @notice Amount of token0 in pool
    function reserve0() external view returns (uint256);

    /// @notice Amount of token1 in pool
    function reserve1() external view returns (uint256);

    /// @notice Timestamp of last update to pool
    function blockTimestampLast() external view returns (uint256);

    /// @notice Cumulative of reserve0 factoring in time elapsed
    function reserve0CumulativeLast() external view returns (uint256);

    /// @notice Cumulative of reserve1 factoring in time elapsed
    function reserve1CumulativeLast() external view returns (uint256);

    /// @notice Accumulated fees of token0 (global)
    function index0() external view returns (uint256);

    /// @notice Accumulated fees of token1 (global)
    function index1() external view returns (uint256);

    /// @notice Get an LP's relative index0 to index0
    function supplyIndex0(address) external view returns (uint256);

    /// @notice Get an LP's relative index1 to index1
    function supplyIndex1(address) external view returns (uint256);

    /// @notice Amount of unclaimed, but claimable tokens from fees of token0 for an LP
    function claimable0(address) external view returns (uint256);

    /// @notice Amount of unclaimed, but claimable tokens from fees of token1 for an LP
    function claimable1(address) external view returns (uint256);

    /// @notice Returns the value of K in the Pool, based on its reserves.
    function getK() external returns (uint256);

    /// @notice Set pool name
    ///         Only callable by Voter.emergencyCouncil()
    /// @param __name String of new name
    function setName(string calldata __name) external;

    /// @notice Set pool symbol
    ///         Only callable by Voter.emergencyCouncil()
    /// @param __symbol String of new symbol
    function setSymbol(string calldata __symbol) external;

    /// @notice Get the number of observations recorded
    function observationLength() external view returns (uint256);

    /// @notice Get the value of the most recent observation
    function lastObservation() external view returns (Observation memory);

    /// @notice True if pool is stable, false if volatile
    function stable() external view returns (bool);

    /// @notice Produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
    function currentCumulativePrices()
        external
        view
        returns (uint256 reserve0Cumulative, uint256 reserve1Cumulative, uint256 blockTimestamp);

    /// @notice Provides twap price with user configured granularity, up to the full window size
    /// @param tokenIn .
    /// @param amountIn .
    /// @param granularity .
    /// @return amountOut .
    function quote(address tokenIn, uint256 amountIn, uint256 granularity) external view returns (uint256 amountOut);

    /// @notice Returns a memory set of TWAP prices
    ///         Same as calling sample(tokenIn, amountIn, points, 1)
    /// @param tokenIn .
    /// @param amountIn .
    /// @param points Number of points to return
    /// @return Array of TWAP prices
    function prices(address tokenIn, uint256 amountIn, uint256 points) external view returns (uint256[] memory);

    /// @notice Same as prices with with an additional window argument.
    ///         Window = 2 means 2 * 30min (or 1 hr) between observations
    /// @param tokenIn .
    /// @param amountIn .
    /// @param points .
    /// @param window .
    /// @return Array of TWAP prices
    function sample(address tokenIn, uint256 amountIn, uint256 points, uint256 window)
        external
        view
        returns (uint256[] memory);

    /// @notice This low-level function should be called from a contract which performs important safety checks
    /// @param amount0Out   Amount of token0 to send to `to`
    /// @param amount1Out   Amount of token1 to send to `to`
    /// @param to           Address to recieve the swapped output
    /// @param data         Additional calldata for flashloans
    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;

    /// @notice This low-level function should be called from a contract which performs important safety checks
    ///         standard uniswap v2 implementation
    /// @param to Address to receive token0 and token1 from burning the pool token
    /// @return amount0 Amount of token0 returned
    /// @return amount1 Amount of token1 returned
    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    /// @notice This low-level function should be called by addLiquidity functions in Router.sol, which performs important safety checks
    ///         standard uniswap v2 implementation
    /// @param to           Address to receive the minted LP token
    /// @return liquidity   Amount of LP token minted
    function mint(address to) external returns (uint256 liquidity);

    /// @notice Update reserves and, on the first call per block, price accumulators
    /// @return _reserve0 .
    /// @return _reserve1 .
    /// @return _blockTimestampLast .
    function getReserves() external view returns (uint256 _reserve0, uint256 _reserve1, uint256 _blockTimestampLast);

    /// @notice Get the amount of tokenOut given the amount of tokenIn
    /// @param amountIn Amount of token in
    /// @param tokenIn  Address of token
    /// @return Amount out
    function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256);

    /// @notice Force balances to match reserves
    /// @param to Address to receive any skimmed rewards
    function skim(address to) external;

    /// @notice Force reserves to match balances
    function sync() external;

    /// @notice Called on pool creation by PoolFactory
    /// @param _token0 Address of token0
    /// @param _token1 Address of token1
    /// @param _stable True if stable, false if volatile
    function initialize(address _token0, address _token1, bool _stable) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"address","name":"_poolAdmin","type":"address"},{"internalType":"address","name":"_pauser","type":"address"},{"internalType":"address","name":"_feeManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ERC1167FailedCreateClone","type":"error"},{"inputs":[],"name":"FeeInvalid","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"NotFeeManager","type":"error"},{"inputs":[],"name":"NotPauser","type":"error"},{"inputs":[],"name":"NotPoolAdmin","type":"error"},{"inputs":[],"name":"PoolAlreadyExists","type":"error"},{"inputs":[],"name":"SameAddress","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroFee","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldFeeModule","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeModule","type":"address"}],"name":"FeeModuleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":true,"internalType":"bool","name":"stable","type":"bool"},{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"stable","type":"bool"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetDefaultFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeManager","type":"address"}],"name":"SetFeeManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"state","type":"bool"}],"name":"SetPauseState","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pauser","type":"address"}],"name":"SetPauser","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"poolAdmin","type":"address"}],"name":"SetPoolAdmin","type":"event"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"allPools","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPools","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPoolsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"name":"createPool","outputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"}],"name":"createPool","outputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeModule","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"bool","name":"_stable","type":"bool"}],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"}],"name":"getPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"name":"getPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"isPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_stable","type":"bool"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeManager","type":"address"}],"name":"setFeeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeModule","type":"address"}],"name":"setFeeModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPauseState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pauser","type":"address"}],"name":"setPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_poolAdmin","type":"address"}],"name":"setPoolAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stableFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"volatileFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b5060405161116e38038061116e83398101604081905261002f916101b4565b6001600160a01b03848116608052600580546001600160a01b031990811686841690811783556000805460038054909416878716179093556001600160a81b03199092166101009487169490940260ff1916939093178155600191909155601e6002556040517fc0ef652ec5e1ffbc985804cde4457ba9413f0747ac6f2f4a7e195de5330bbd909190a26040516001600160a01b038316907fe02efb9e8f0fc21546730ab32d594f62d586e1bbb15bb5045edd0b1878a77b3590600090a26040516001600160a01b038216907f5d0517e3a4eabea892d9750138cd21d4a6cf3b935b43d0598df7055f463819b290600090a2604051600581526001907f3f15a5f4cc98ad5cfa4ae55040b513ee00b15b742d2b2274d91964c6ff92a34f9060200160405180910390a2604051601e81526000907f3f15a5f4cc98ad5cfa4ae55040b513ee00b15b742d2b2274d91964c6ff92a34f9060200160405180910390a250505050610208565b80516001600160a01b03811681146101af57600080fd5b919050565b600080600080608085870312156101ca57600080fd5b6101d385610198565b93506101e160208601610198565b92506101ef60408601610198565b91506101fd60608601610198565b905092959194509250565b608051610f4461022a6000396000818161026201526106ff0152610f446000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80639fd0506d116100c3578063c5c63e651161007c578063c5c63e651461032f578063cc56b2c514610344578063cdb88ad114610357578063d0fb02031461036a578063e1f76b441461037d578063efde4e641461039057600080fd5b80639fd0506d146102c8578063a1671295146102e0578063b187bd26146102f3578063b782cc4914610300578063bae41cbf14610313578063bc063e1a1461032657600080fd5b806341d1de971161011557806341d1de97146101f2578063472d35b9146102055780635084ed03146102185780635b16ebb7146102215780635c60da1b1461025d57806379bc57d51461028457600080fd5b80631698ee821461015d5780632088df1b1461018d578063283d62ad146101a25780632d88af4a146101b557806336bf95a0146101c857806340bbd775146101db575b600080fd5b61017061016b366004610d2c565b610398565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a061019b366004610d73565b6103ef565b005b6101a06101b0366004610d73565b610493565b6101a06101c3366004610d73565b61052e565b6101706101d6366004610d9e565b6105d5565b6101e460015481565b604051908152602001610184565b610170610200366004610de1565b610894565b6101a0610213366004610d73565b6108c4565b6101e460025481565b61024d61022f366004610d73565b6001600160a01b031660009081526008602052604090205460ff1690565b6040519015158152602001610184565b6101707f000000000000000000000000000000000000000000000000000000000000000081565b610170610292366004610d9e565b6001600160a01b039283166000908152600660209081526040808320948616835293815283822092151582529190915220541690565b6000546101709061010090046001600160a01b031681565b6101706102ee366004610d2c565b610960565b60005461024d9060ff1681565b600554610170906001600160a01b031681565b600454610170906001600160a01b031681565b6101e461012c81565b6103376109a6565b6040516101849190610dfa565b6101e4610352366004610e46565b610a08565b6101a0610365366004610e79565b610ad5565b600354610170906001600160a01b031681565b6101a061038b366004610e94565b610b40565b6007546101e4565b600060018262ffffff16116103e4576001600160a01b03808516600090815260066020908152604080832087851684528252808320600162ffffff8816148452909152902054166103e7565b60005b949350505050565b6003546001600160a01b0316331461041a5760405163f5d267eb60e01b815260040160405180910390fd5b6001600160a01b0381166104415760405163d92e233d60e01b815260040160405180910390fd5b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f307ab001eeada03f10e50285db18fcf7dc97c742531d046e2043eb828cd8d51a90600090a35050565b6005546001600160a01b031633146104bd5760405162b145b560e31b815260040160405180910390fd5b6001600160a01b0381166104e45760405163d92e233d60e01b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040517fc0ef652ec5e1ffbc985804cde4457ba9413f0747ac6f2f4a7e195de5330bbd9090600090a250565b60005461010090046001600160a01b0316331461055e5760405163492f678160e01b815260040160405180910390fd5b6001600160a01b0381166105855760405163d92e233d60e01b815260040160405180910390fd5b60008054610100600160a81b0319166101006001600160a01b03841690810291909117825560405190917fe02efb9e8f0fc21546730ab32d594f62d586e1bbb15bb5045edd0b1878a77b3591a250565b6000826001600160a01b0316846001600160a01b0316036106095760405163367558c360e01b815260040160405180910390fd5b600080846001600160a01b0316866001600160a01b03161061062c57848661062f565b85855b90925090506001600160a01b03821661065b5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03828116600090815260066020908152604080832085851684528252808320881515845290915290205416156106ab57604051630188c99160e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b16603482015284151560f81b60488201526000906049016040516020818303038152906040528051906020012090506107247f000000000000000000000000000000000000000000000000000000000000000082610c05565b604051631c9776b560e31b81526001600160a01b038581166004830152848116602483015287151560448301529195509085169063e4bbb5a890606401600060405180830381600087803b15801561077b57600080fd5b505af115801561078f573d6000803e3d6000fd5b505050506001600160a01b0383811660008181526006602081815260408084208887168086529083528185208c15158087529084528286208054988d166001600160a01b0319998a16811790915582875294845282862087875284528286208187528452828620805489168617905560078054600181810183557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889091018054909a1687179099558587526008855295839020805460ff191690981790975593548151938452918301919091529192917f2128d88d14c80cb081c1252a5acff7a264671bf199ce226b53788fb26065005e910160405180910390a45050509392505050565b6000600782815481106108a9576108a9610ebe565b6000918252602090912001546001600160a01b031692915050565b6003546001600160a01b031633146108ef5760405163f5d267eb60e01b815260040160405180910390fd5b6001600160a01b0381166109165760405163d92e233d60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517f5d0517e3a4eabea892d9750138cd21d4a6cf3b935b43d0598df7055f463819b290600090a250565b600060018262ffffff161115610989576040516352dadcf960e01b815260040160405180910390fd5b600162ffffff83161461099d8585836105d5565b95945050505050565b606060078054806020026020016040519081016040528092919081815260200182805480156109fe57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e0575b5050505050905090565b6004546000906001600160a01b031615610abb57604080516001600160a01b03858116602480840191909152835180840390910181526044909201909252602081810180516001600160e01b0316631711922960e31b1790526004546000938493610a7c9392909116916207a12091610c73565b915091508115610ab857600081806020019051810190610a9c9190610ed4565b62ffffff1690506103e88111610ab6579250610acf915050565b505b50505b81610ac857600254610acc565b6001545b90505b92915050565b60005461010090046001600160a01b03163314610b055760405163492f678160e01b815260040160405180910390fd5b6000805460ff1916821515908117825560405190917f0d76538efc408318a051137c2720a9e82902acdbd46b802d488b74ca3a09a11691a250565b6003546001600160a01b03163314610b6b5760405163f5d267eb60e01b815260040160405180910390fd5b61012c811115610b8e5760405163cd4e616760e01b815260040160405180910390fd5b80600003610baf5760405163af13986d60e01b815260040160405180910390fd5b8115610bbf576001819055610bc5565b60028190555b8115157f3f15a5f4cc98ad5cfa4ae55040b513ee00b15b742d2b2274d91964c6ff92a34f82604051610bf991815260200190565b60405180910390a25050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b038116610acf576040516330be1a3d60e21b815260040160405180910390fd5b6000606060008060008661ffff1667ffffffffffffffff811115610c9957610c99610ef8565b6040519080825280601f01601f191660200182016040528015610cc3576020820181803683370190505b5090506000808751602089018c8cfa91503d925086831115610ce3578692505b828152826000602083013e909890975095505050505050565b80356001600160a01b0381168114610d1357600080fd5b919050565b62ffffff81168114610d2957600080fd5b50565b600080600060608486031215610d4157600080fd5b610d4a84610cfc565b9250610d5860208501610cfc565b91506040840135610d6881610d18565b809150509250925092565b600060208284031215610d8557600080fd5b610acc82610cfc565b80358015158114610d1357600080fd5b600080600060608486031215610db357600080fd5b610dbc84610cfc565b9250610dca60208501610cfc565b9150610dd860408501610d8e565b90509250925092565b600060208284031215610df357600080fd5b5035919050565b602080825282518282018190526000918401906040840190835b81811015610e3b5783516001600160a01b0316835260209384019390920191600101610e14565b509095945050505050565b60008060408385031215610e5957600080fd5b610e6283610cfc565b9150610e7060208401610d8e565b90509250929050565b600060208284031215610e8b57600080fd5b610acc82610d8e565b60008060408385031215610ea757600080fd5b610eb083610d8e565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ee657600080fd5b8151610ef181610d18565b9392505050565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220f6b1c4bd85cdef0ad1f9de14eba9910df6f4581af385f240053a49f2148d5c6a64736f6c634300081b003300000000000000000000000010499d88bd32af443fc936f67de32be1c8bb374c000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c80639fd0506d116100c3578063c5c63e651161007c578063c5c63e651461032f578063cc56b2c514610344578063cdb88ad114610357578063d0fb02031461036a578063e1f76b441461037d578063efde4e641461039057600080fd5b80639fd0506d146102c8578063a1671295146102e0578063b187bd26146102f3578063b782cc4914610300578063bae41cbf14610313578063bc063e1a1461032657600080fd5b806341d1de971161011557806341d1de97146101f2578063472d35b9146102055780635084ed03146102185780635b16ebb7146102215780635c60da1b1461025d57806379bc57d51461028457600080fd5b80631698ee821461015d5780632088df1b1461018d578063283d62ad146101a25780632d88af4a146101b557806336bf95a0146101c857806340bbd775146101db575b600080fd5b61017061016b366004610d2c565b610398565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a061019b366004610d73565b6103ef565b005b6101a06101b0366004610d73565b610493565b6101a06101c3366004610d73565b61052e565b6101706101d6366004610d9e565b6105d5565b6101e460015481565b604051908152602001610184565b610170610200366004610de1565b610894565b6101a0610213366004610d73565b6108c4565b6101e460025481565b61024d61022f366004610d73565b6001600160a01b031660009081526008602052604090205460ff1690565b6040519015158152602001610184565b6101707f00000000000000000000000010499d88bd32af443fc936f67de32be1c8bb374c81565b610170610292366004610d9e565b6001600160a01b039283166000908152600660209081526040808320948616835293815283822092151582529190915220541690565b6000546101709061010090046001600160a01b031681565b6101706102ee366004610d2c565b610960565b60005461024d9060ff1681565b600554610170906001600160a01b031681565b600454610170906001600160a01b031681565b6101e461012c81565b6103376109a6565b6040516101849190610dfa565b6101e4610352366004610e46565b610a08565b6101a0610365366004610e79565b610ad5565b600354610170906001600160a01b031681565b6101a061038b366004610e94565b610b40565b6007546101e4565b600060018262ffffff16116103e4576001600160a01b03808516600090815260066020908152604080832087851684528252808320600162ffffff8816148452909152902054166103e7565b60005b949350505050565b6003546001600160a01b0316331461041a5760405163f5d267eb60e01b815260040160405180910390fd5b6001600160a01b0381166104415760405163d92e233d60e01b815260040160405180910390fd5b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f307ab001eeada03f10e50285db18fcf7dc97c742531d046e2043eb828cd8d51a90600090a35050565b6005546001600160a01b031633146104bd5760405162b145b560e31b815260040160405180910390fd5b6001600160a01b0381166104e45760405163d92e233d60e01b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040517fc0ef652ec5e1ffbc985804cde4457ba9413f0747ac6f2f4a7e195de5330bbd9090600090a250565b60005461010090046001600160a01b0316331461055e5760405163492f678160e01b815260040160405180910390fd5b6001600160a01b0381166105855760405163d92e233d60e01b815260040160405180910390fd5b60008054610100600160a81b0319166101006001600160a01b03841690810291909117825560405190917fe02efb9e8f0fc21546730ab32d594f62d586e1bbb15bb5045edd0b1878a77b3591a250565b6000826001600160a01b0316846001600160a01b0316036106095760405163367558c360e01b815260040160405180910390fd5b600080846001600160a01b0316866001600160a01b03161061062c57848661062f565b85855b90925090506001600160a01b03821661065b5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03828116600090815260066020908152604080832085851684528252808320881515845290915290205416156106ab57604051630188c99160e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b16603482015284151560f81b60488201526000906049016040516020818303038152906040528051906020012090506107247f00000000000000000000000010499d88bd32af443fc936f67de32be1c8bb374c82610c05565b604051631c9776b560e31b81526001600160a01b038581166004830152848116602483015287151560448301529195509085169063e4bbb5a890606401600060405180830381600087803b15801561077b57600080fd5b505af115801561078f573d6000803e3d6000fd5b505050506001600160a01b0383811660008181526006602081815260408084208887168086529083528185208c15158087529084528286208054988d166001600160a01b0319998a16811790915582875294845282862087875284528286208187528452828620805489168617905560078054600181810183557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889091018054909a1687179099558587526008855295839020805460ff191690981790975593548151938452918301919091529192917f2128d88d14c80cb081c1252a5acff7a264671bf199ce226b53788fb26065005e910160405180910390a45050509392505050565b6000600782815481106108a9576108a9610ebe565b6000918252602090912001546001600160a01b031692915050565b6003546001600160a01b031633146108ef5760405163f5d267eb60e01b815260040160405180910390fd5b6001600160a01b0381166109165760405163d92e233d60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517f5d0517e3a4eabea892d9750138cd21d4a6cf3b935b43d0598df7055f463819b290600090a250565b600060018262ffffff161115610989576040516352dadcf960e01b815260040160405180910390fd5b600162ffffff83161461099d8585836105d5565b95945050505050565b606060078054806020026020016040519081016040528092919081815260200182805480156109fe57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e0575b5050505050905090565b6004546000906001600160a01b031615610abb57604080516001600160a01b03858116602480840191909152835180840390910181526044909201909252602081810180516001600160e01b0316631711922960e31b1790526004546000938493610a7c9392909116916207a12091610c73565b915091508115610ab857600081806020019051810190610a9c9190610ed4565b62ffffff1690506103e88111610ab6579250610acf915050565b505b50505b81610ac857600254610acc565b6001545b90505b92915050565b60005461010090046001600160a01b03163314610b055760405163492f678160e01b815260040160405180910390fd5b6000805460ff1916821515908117825560405190917f0d76538efc408318a051137c2720a9e82902acdbd46b802d488b74ca3a09a11691a250565b6003546001600160a01b03163314610b6b5760405163f5d267eb60e01b815260040160405180910390fd5b61012c811115610b8e5760405163cd4e616760e01b815260040160405180910390fd5b80600003610baf5760405163af13986d60e01b815260040160405180910390fd5b8115610bbf576001819055610bc5565b60028190555b8115157f3f15a5f4cc98ad5cfa4ae55040b513ee00b15b742d2b2274d91964c6ff92a34f82604051610bf991815260200190565b60405180910390a25050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b038116610acf576040516330be1a3d60e21b815260040160405180910390fd5b6000606060008060008661ffff1667ffffffffffffffff811115610c9957610c99610ef8565b6040519080825280601f01601f191660200182016040528015610cc3576020820181803683370190505b5090506000808751602089018c8cfa91503d925086831115610ce3578692505b828152826000602083013e909890975095505050505050565b80356001600160a01b0381168114610d1357600080fd5b919050565b62ffffff81168114610d2957600080fd5b50565b600080600060608486031215610d4157600080fd5b610d4a84610cfc565b9250610d5860208501610cfc565b91506040840135610d6881610d18565b809150509250925092565b600060208284031215610d8557600080fd5b610acc82610cfc565b80358015158114610d1357600080fd5b600080600060608486031215610db357600080fd5b610dbc84610cfc565b9250610dca60208501610cfc565b9150610dd860408501610d8e565b90509250925092565b600060208284031215610df357600080fd5b5035919050565b602080825282518282018190526000918401906040840190835b81811015610e3b5783516001600160a01b0316835260209384019390920191600101610e14565b509095945050505050565b60008060408385031215610e5957600080fd5b610e6283610cfc565b9150610e7060208401610d8e565b90509250929050565b600060208284031215610e8b57600080fd5b610acc82610d8e565b60008060408385031215610ea757600080fd5b610eb083610d8e565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ee657600080fd5b8151610ef181610d18565b9392505050565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220f6b1c4bd85cdef0ad1f9de14eba9910df6f4581af385f240053a49f2148d5c6a64736f6c634300081b0033

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

00000000000000000000000010499d88bd32af443fc936f67de32be1c8bb374c000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312

-----Decoded View---------------
Arg [0] : _implementation (address): 0x10499d88Bd32AF443Fc936F67DE32bE1c8Bb374C
Arg [1] : _poolAdmin (address): 0x607EbA808EF2685fAc3da68aB96De961fa8F3312
Arg [2] : _pauser (address): 0x607EbA808EF2685fAc3da68aB96De961fa8F3312
Arg [3] : _feeManager (address): 0x607EbA808EF2685fAc3da68aB96De961fa8F3312

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000010499d88bd32af443fc936f67de32be1c8bb374c
Arg [1] : 000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312
Arg [2] : 000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312
Arg [3] : 000000000000000000000000607eba808ef2685fac3da68ab96de961fa8f3312


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.