LFJ Developer Docs
  • Liquidity Book
  • Introduction
  • LB V2.2 Key Changes
  • Guides
    • Swap Tokens
    • Add/Remove Liquidity
    • Tracking Volume
    • Tracking Pool Balances
    • Finding The Best Quote
    • Byte32 Decoding
    • Price From Bin Id
    • Bin Id From Price
    • Finding Liquidity Depth
    • User Balances
  • Concepts
    • Concentrated Liquidity
    • Bin Math
    • Bin Liquidity
    • Swaps
    • Fees
    • Oracle
  • Contracts
    • Interfaces
      • ILBLegacyFactory
      • ILBLegacyToken
      • ILBLegacyPair
      • ILBLegacyRouter
      • ILBFlashLoanCallback
      • IPendingOwnable
      • IJoeFactory
      • IJoePair
      • IJoeRouter01
      • IJoeRouter02
      • IWNATIVE
      • ILBFactory
      • ILBHooks
      • ILBPair
      • ILBRouter
      • ILBToken
    • Libraries
      • Math
        • BitMath
        • Encoded
        • LiquidityConfigurations
        • PackedUint128Math
        • SafeCast
        • SampleMath
        • TreeMath
        • Uint128x128Math
        • Uint256x256Math
      • BinHelper
      • Clone
      • Constants
      • FeeHelper
      • Hooks
      • ImmutableClone
      • JoeLibrary
      • OracleHelper
      • PairParameterHelper
      • PriceHelper
      • ReentrancyGuardUpgradeable
      • TokenHelper
    • LBBaseHooks
    • LBFactory
    • LBPair
    • LBQuoter
    • LBRouter
    • LBToken
  • Deployment Addresses
    • Avalanche C-Chain
    • Fuji Testnet
    • Arbitrum One
    • Binance Smart Chain
    • Binance Smart Chain Testnet
    • Ethereum Mainnet
    • Monad Testnet
  • SDK
    • Introduction
    • Making a Trade
    • Adding Liquidity
    • Removing Liquidity
  • Audits
  • AMM
    • Joe V1 Contracts
    • Joe V1 Audits
  • LFJ DEX API
    • Dex Analytics
    • Pools
    • Rewards
    • User
    • User Lifetime Stats
    • Vaults
    • Models
  • LFJ Aggregator API
    • Default
    • Models
Powered by GitBook
On this page
  • LBPairInformation
  • LBPairCreated
  • FeeRecipientSet
  • FlashLoanFeeSet
  • FeeParametersSet
  • FactoryLockedStatusUpdated
  • LBPairImplementationSet
  • LBPairIgnoredStateChanged
  • PresetSet
  • PresetRemoved
  • QuoteAssetAdded
  • QuoteAssetRemoved
  • MAX_FEE
  • MIN_BIN_STEP
  • MAX_BIN_STEP
  • MAX_PROTOCOL_SHARE
  • LBPairImplementation
  • getNumberOfQuoteAssets
  • getQuoteAsset
  • isQuoteAsset
  • feeRecipient
  • flashLoanFee
  • creationUnlocked
  • allLBPairs
  • getNumberOfLBPairs
  • getLBPairInformation
  • getPreset
  • getAllBinSteps
  • getAllLBPairs
  • setLBPairImplementation
  • createLBPair
  • setLBPairIgnored
  • setPreset
  • removePreset
  • setFeesParametersOnPair
  • setFeeRecipient
  • setFlashLoanFee
  • setFactoryLockedState
  • addQuoteAsset
  • removeQuoteAsset
  • forceDecay
  1. Contracts
  2. Interfaces

ILBLegacyFactory

Required interface of Legacy LBFactory contract

LBPairInformation

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)

FeeParametersSet

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)

getLBPairInformation

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
PreviousInterfacesNextILBLegacyToken

Last updated 8 days ago