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.
- contracts/Gyro2CLPPool.solmain11.15 KB
- @balancer-labs/v3-interfaces/contracts/pool-gyro/IGyro2CLPPool.sol3.55 KB
- @balancer-labs/v3-interfaces/contracts/pool-utils/IPoolInfo.sol2.92 KB
- @balancer-labs/v3-interfaces/contracts/solidity-utils/helpers/IAuthentication.sol608 B
- @balancer-labs/v3-interfaces/contracts/solidity-utils/helpers/IRateProvider.sol795 B
- @balancer-labs/v3-interfaces/contracts/solidity-utils/helpers/IVersion.sol657 B
- @balancer-labs/v3-interfaces/contracts/vault/IAuthorizer.sol625 B
- @balancer-labs/v3-interfaces/contracts/vault/IBasePool.sol4.55 KB
- @balancer-labs/v3-interfaces/contracts/vault/IHooks.sol13.27 KB
- @balancer-labs/v3-interfaces/contracts/vault/IProtocolFeeController.sol20.01 KB
- @balancer-labs/v3-interfaces/contracts/vault/ISwapFeePercentageBounds.sol1.51 KB
- @balancer-labs/v3-interfaces/contracts/vault/IUnbalancedLiquidityInvariantRatioBounds.sol1.38 KB
- @balancer-labs/v3-interfaces/contracts/vault/IVault.sol767 B
- @balancer-labs/v3-interfaces/contracts/vault/IVaultAdmin.sol23.61 KB
- @balancer-labs/v3-interfaces/contracts/vault/IVaultErrors.sol18.66 KB
- @balancer-labs/v3-interfaces/contracts/vault/IVaultEvents.sol11.07 KB
- @balancer-labs/v3-interfaces/contracts/vault/IVaultExtension.sol23.74 KB
- @balancer-labs/v3-interfaces/contracts/vault/IVaultMain.sol9.54 KB
- @balancer-labs/v3-interfaces/contracts/vault/VaultTypes.sol19.94 KB
- @balancer-labs/v3-pool-utils/contracts/PoolInfo.sol2.14 KB
- @balancer-labs/v3-solidity-utils/contracts/helpers/Version.sol1.19 KB
- @balancer-labs/v3-solidity-utils/contracts/math/FixedPoint.sol5.93 KB
- @balancer-labs/v3-solidity-utils/contracts/math/LogExpMath.sol22.49 KB
- @balancer-labs/v3-vault/contracts/BalancerPoolToken.sol7.14 KB
- @balancer-labs/v3-vault/contracts/VaultGuard.sol677 B
- @openzeppelin/contracts/interfaces/IERC1363.sol4.45 KB
- @openzeppelin/contracts/interfaces/IERC165.sol193 B
- @openzeppelin/contracts/interfaces/IERC20.sol182 B
- @openzeppelin/contracts/interfaces/IERC4626.sol12.18 KB
- @openzeppelin/contracts/interfaces/IERC5267.sol740 B
- @openzeppelin/contracts/interfaces/draft-IERC6093.sol6.54 KB
- @openzeppelin/contracts/proxy/Proxy.sol2.67 KB
- @openzeppelin/contracts/token/ERC20/IERC20.sol2.78 KB
- @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol684 B
- @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol3.81 KB
- @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol10.08 KB
- @openzeppelin/contracts/utils/Address.sol6 KB
- @openzeppelin/contracts/utils/Create2.sol4.47 KB
- @openzeppelin/contracts/utils/Errors.sol896 B
- @openzeppelin/contracts/utils/Nonces.sol1.49 KB
- @openzeppelin/contracts/utils/Panic.sol1.97 KB
- @openzeppelin/contracts/utils/ShortStrings.sol4.3 KB
- @openzeppelin/contracts/utils/StorageSlot.sol4.18 KB
- @openzeppelin/contracts/utils/Strings.sol19.28 KB
- @openzeppelin/contracts/utils/cryptography/ECDSA.sol7.82 KB
- @openzeppelin/contracts/utils/cryptography/EIP712.sol6.7 KB
- @openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol4.25 KB
- @openzeppelin/contracts/utils/introspection/ERC165.sol879 B
- @openzeppelin/contracts/utils/introspection/IERC165.sol871 B
- @openzeppelin/contracts/utils/math/Math.sol32.15 KB
- @openzeppelin/contracts/utils/math/SafeCast.sol34.94 KB
- @openzeppelin/contracts/utils/math/SignedMath.sol2.61 KB
- contracts/lib/Gyro2CLPMath.sol13.6 KB
- contracts/lib/GyroPoolMath.sol5.01 KB
@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.