Required interface of Legacy LBFactory contract
struct LBPairInformation {
uint24 binStep;
contract ILBPair LBPair;
bool createdByOwner;
bool ignoredForRouting;
}
LBPairCreated
event LBPairCreated(contract IERC20 tokenX, contract IERC20 tokenY, uint256 binStep, contract ILBPair LBPair, uint256 pid)
FeeRecipientSet
event FeeRecipientSet(address oldRecipient, address newRecipient)
FlashLoanFeeSet
event FlashLoanFeeSet(uint256 oldFlashLoanFee, uint256 newFlashLoanFee)
event FeeParametersSet(address sender, contract ILBPair LBPair, uint256 binStep, uint256 baseFactor, uint256 filterPeriod, uint256 decayPeriod, uint256 reductionFactor, uint256 variableFeeControl, uint256 protocolShare, uint256 maxVolatilityAccumulated)
FactoryLockedStatusUpdated
event FactoryLockedStatusUpdated(bool unlocked)
LBPairImplementationSet
event LBPairImplementationSet(address oldLBPairImplementation, address LBPairImplementation)
LBPairIgnoredStateChanged
event LBPairIgnoredStateChanged(contract ILBPair LBPair, bool ignored)
PresetSet
event PresetSet(uint256 binStep, uint256 baseFactor, uint256 filterPeriod, uint256 decayPeriod, uint256 reductionFactor, uint256 variableFeeControl, uint256 protocolShare, uint256 maxVolatilityAccumulated, uint256 sampleLifetime)
PresetRemoved
event PresetRemoved(uint256 binStep)
QuoteAssetAdded
event QuoteAssetAdded(contract IERC20 quoteAsset)
QuoteAssetRemoved
event QuoteAssetRemoved(contract IERC20 quoteAsset)
MAX_FEE
function MAX_FEE() external pure returns (uint256)
MIN_BIN_STEP
function MIN_BIN_STEP() external pure returns (uint256)
MAX_BIN_STEP
function MAX_BIN_STEP() external pure returns (uint256)
MAX_PROTOCOL_SHARE
function MAX_PROTOCOL_SHARE() external pure returns (uint256)
LBPairImplementation
function LBPairImplementation() external view returns (address)
getNumberOfQuoteAssets
function getNumberOfQuoteAssets() external view returns (uint256)
getQuoteAsset
function getQuoteAsset(uint256 index) external view returns (contract IERC20)
isQuoteAsset
function isQuoteAsset(contract IERC20 token) external view returns (bool)
feeRecipient
function feeRecipient() external view returns (address)
flashLoanFee
function flashLoanFee() external view returns (uint256)
creationUnlocked
function creationUnlocked() external view returns (bool)
allLBPairs
function allLBPairs(uint256 id) external returns (contract ILBPair)
getNumberOfLBPairs
function getNumberOfLBPairs() external view returns (uint256)
function getLBPairInformation(contract IERC20 tokenA, contract IERC20 tokenB, uint256 binStep) external view returns (struct ILBFactory.LBPairInformation)
getPreset
function getPreset(uint16 binStep) external view returns (uint256 baseFactor, uint256 filterPeriod, uint256 decayPeriod, uint256 reductionFactor, uint256 variableFeeControl, uint256 protocolShare, uint256 maxAccumulator, uint256 sampleLifetime)
getAllBinSteps
function getAllBinSteps() external view returns (uint256[] presetsBinStep)
getAllLBPairs
function getAllLBPairs(contract IERC20 tokenX, contract IERC20 tokenY) external view returns (struct ILBFactory.LBPairInformation[] LBPairsBinStep)
setLBPairImplementation
function setLBPairImplementation(address LBPairImplementation) external
createLBPair
function createLBPair(contract IERC20 tokenX, contract IERC20 tokenY, uint24 activeId, uint16 binStep) external returns (contract ILBPair pair)
setLBPairIgnored
function setLBPairIgnored(contract IERC20 tokenX, contract IERC20 tokenY, uint256 binStep, bool ignored) external
setPreset
function setPreset(uint16 binStep, uint16 baseFactor, uint16 filterPeriod, uint16 decayPeriod, uint16 reductionFactor, uint24 variableFeeControl, uint16 protocolShare, uint24 maxVolatilityAccumulated, uint16 sampleLifetime) external
removePreset
function removePreset(uint16 binStep) external
setFeesParametersOnPair
function setFeesParametersOnPair(contract IERC20 tokenX, contract IERC20 tokenY, uint16 binStep, uint16 baseFactor, uint16 filterPeriod, uint16 decayPeriod, uint16 reductionFactor, uint24 variableFeeControl, uint16 protocolShare, uint24 maxVolatilityAccumulated) external
setFeeRecipient
function setFeeRecipient(address feeRecipient) external
setFlashLoanFee
function setFlashLoanFee(uint256 flashLoanFee) external
setFactoryLockedState
function setFactoryLockedState(bool locked) external
addQuoteAsset
function addQuoteAsset(contract IERC20 quoteAsset) external
removeQuoteAsset
function removeQuoteAsset(contract IERC20 quoteAsset) external
forceDecay
function forceDecay(contract ILBPair LBPair) external