Skip to content
Verified contractExactLicenseRef-Gyro-1.0

Gyro2CLPPool

Address0xdeba7d498ccf617c06f53ee110c2cfc65cec0ece
Balance

0 ETH

 

Transactions

0

 

Compiler

solc 0.8.27

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.27+commit.40a35a09
Language
solidity
Optimization
Yes, 9,999 runs
EVM version
cancun
Via IR
yes
License
LicenseRef-Gyro-1.0
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
24,349,799
Creation transaction
0x2d4f1b89df…0829c3bcb3

54 files

The source code is large: one file is shown at a time. Choose a file in the list.

@balancer-labs/v3-interfaces/contracts/pool-gyro/IGyro2CLPPool.sol

// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.24;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import { IBasePool } from "../vault/IBasePool.sol";

/**
 * @notice Gyro 2-CLP Pool data that cannot change after deployment.
 * @param tokens Pool tokens, sorted in token registration order
 * @param decimalScalingFactors Conversion factor used to adjust for token decimals for uniform precision in
 * calculations. FP(1) for 18-decimal tokens
 * @param sqrtAlpha Square root of alpha (the lowest price in the price interval of the 2-CLP price curve)
 * @param sqrtBeta Square root of beta (the highest price in the price interval of the 2-CLP price curve)
 */
struct Gyro2CLPPoolImmutableData {
    IERC20[] tokens;
    uint256[] decimalScalingFactors;
    uint256 sqrtAlpha;
    uint256 sqrtBeta;
}

/**
 * @notice Snapshot of current Gyro 2-CLP Pool data that can change.
 * @dev Note that live balances will not necessarily be accurate if the pool is in Recovery Mode. Withdrawals
 * in Recovery Mode do not make external calls (including those necessary for updating live balances), so if
 * there are withdrawals, raw and live balances will be out of sync until Recovery Mode is disabled.
 *
 * @param balancesLiveScaled18 Token balances after paying yield fees, applying decimal scaling and rates
 * @param tokenRates 18-decimal FP values for rate tokens (e.g., yield-bearing), or FP(1) for standard tokens
 * @param staticSwapFeePercentage 18-decimal FP value of the static swap fee percentage
 * @param totalSupply The current total supply of the pool tokens (BPT)
 * @param bptRate The current rate of a pool token (BPT) = invariant / totalSupply
 * @param isPoolInitialized If false, the pool has not been seeded with initial liquidity, so operations will revert
 * @param isPoolPaused If true, the pool is paused, and all non-recovery-mode state-changing operations will revert
 * @param isPoolInRecoveryMode If true, Recovery Mode withdrawals are enabled, and live balances may be inaccurate
 */
struct Gyro2CLPPoolDynamicData {
    uint256[] balancesLiveScaled18;
    uint256[] tokenRates;
    uint256 staticSwapFeePercentage;
    uint256 totalSupply;
    uint256 bptRate;
    bool isPoolInitialized;
    bool isPoolPaused;
    bool isPoolInRecoveryMode;
}

interface IGyro2CLPPool is IBasePool {
    /**
     * @notice Gyro 2-CLP pool configuration.
     * @param name Pool name
     * @param symbol Pool symbol
     * @param sqrtAlpha Square root of alpha (the lowest price in the price interval of the 2-CLP price curve)
     * @param sqrtBeta Square root of beta (the highest price in the price interval of the 2-CLP price curve)
     * @param version JSON specifying pool version
     */
    struct GyroParams {
        string name;
        string symbol;
        uint256 sqrtAlpha;
        uint256 sqrtBeta;
        string version;
    }

    /// @notice The informed alpha is greater than beta.
    error SqrtParamsWrong();

    /**
     * @notice Get dynamic pool data relevant to swap/add/remove calculations.
     * @return data A struct containing all dynamic stable pool parameters
     */
    function getGyro2CLPPoolDynamicData() external view returns (Gyro2CLPPoolDynamicData memory data);

    /**
     * @notice Get immutable pool data relevant to swap/add/remove calculations.
     * @return data A struct containing all immutable stable pool parameters
     */
    function getGyro2CLPPoolImmutableData() external view returns (Gyro2CLPPoolImmutableData memory data);
}
Compiler settingsShow
{
  "viaIR": true,
  "optimizer": {
    "runs": 9999,
    "details": {
      "yulDetails": {
        "optimizerSteps": "dhfoDgvulfnTUtnIf [ xa[r]EscLM cCTUtTOntnfDIul Lcul Vcul [j] Tpeul xa[rul] xa[r]cL gvif CTUca[r]LSsTFOtfDnca[r]Iulc ] jmul[jul] VcTOcul jmul : fDnTOcmu"
      }
    },
    "enabled": true
  },
  "evmVersion": "cancun"
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.