Skip to content

FluidDexLiteAdminModule ​

Git Source

Inherits:AdminModuleHelpers

Functions ​

constructor ​

solidity
constructor(address liquidity_, address deployerContract_);

updateAuth ​

update the auth for the dex

solidity
function updateAuth(address auth_, bool isAuth_) external _onlyDelegateCall;

Parameters

NameTypeDescription
auth_addressthe address to update auth for
isAuth_boolthe auth status

initialize ​

initialize the dex

solidity
function initialize(InitializeParams memory i_) external payable _onlyDelegateCall;

Parameters

NameTypeDescription
i_InitializeParamsthe initialize params

updateFeeAndRevenueCut ​

update the fee and revenue cut for the dex

solidity
function updateFeeAndRevenueCut(DexKey calldata dexKey_, uint256 fee_, uint256 revenueCut_) public _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
fee_uint256in 4 decimals, 10000 = 1%
revenueCut_uint256in 4 decimals, 10000 = 1%

updateRebalancingStatus ​

update the rebalancing status for the dex

solidity
function updateRebalancingStatus(DexKey calldata dexKey_, bool rebalancingStatus_) public _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
rebalancingStatus_boolthe rebalancing status (true = on, false = off)

updateRangePercents ​

update the range percents for the dex

solidity
function updateRangePercents(DexKey calldata dexKey_, uint256 upperPercent_, uint256 lowerPercent_, uint256 shiftTime_)
    public
    _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
upperPercent_uint256in 4 decimals, 10000 = 1%
lowerPercent_uint256in 4 decimals, 10000 = 1%
shiftTime_uint256in secs, in how much time the upper percent configs change should be fully done

updateShiftTime ​

update the shift time for the dex for rebalancing

solidity
function updateShiftTime(DexKey calldata dexKey_, uint256 shiftTime_) public _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
shiftTime_uint256in secs, in how much time rebalancing should be fully done.

updateCenterPriceLimits ​

update the center price limits for the dex

solidity
function updateCenterPriceLimits(DexKey calldata dexKey_, uint256 maxCenterPrice_, uint256 minCenterPrice_)
    public
    _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
maxCenterPrice_uint2561:1 means 1e27
minCenterPrice_uint2561:1 means 1e27

updateThresholdPercent ​

update the threshold percent for the dex

solidity
function updateThresholdPercent(
    DexKey calldata dexKey_,
    uint256 upperThresholdPercent_,
    uint256 lowerThresholdPercent_,
    uint256 shiftTime_
) public _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
upperThresholdPercent_uint256in 4 decimals, 10000 = 1%
lowerThresholdPercent_uint256in 4 decimals, 10000 = 1%
shiftTime_uint256in secs, in how much time the upper config changes should be fully done.

updateCenterPriceAddress ​

update the center price address (nonce) for the dex

solidity
function updateCenterPriceAddress(DexKey calldata dexKey_, uint256 centerPriceAddress_, uint256 percent_, uint256 time_)
    public
    _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
centerPriceAddress_uint256nonce < X19, this nonce will be used to calculate contract address
percent_uint256in 4 decimals, 10000 = 1%
time_uint256in secs, in how much time the center price should be fully shifted.

deposit ​

deposit tokens into the dex

solidity
function deposit(
    DexKey calldata dexKey_,
    uint256 token0Amount_,
    uint256 token1Amount_,
    uint256 priceMax_,
    uint256 priceMin_
) public _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
token0Amount_uint256the token0 amount
token1Amount_uint256the token1 amount
priceMax_uint256
priceMin_uint256

withdraw ​

withdraw tokens from the dex

solidity
function withdraw(
    DexKey calldata dexKey_,
    uint256 token0Amount_,
    uint256 token1Amount_,
    address to_,
    uint256 priceMax_,
    uint256 priceMin_
) public _onlyDelegateCall;

Parameters

NameTypeDescription
dexKey_DexKeythe dex key
token0Amount_uint256the token0 amount
token1Amount_uint256the token1 amount
to_addressthe address to send the tokens to
priceMax_uint256
priceMin_uint256

updateExtraDataAddress ​

update the extra data address in storage slot

solidity
function updateExtraDataAddress(address extraDataAddress_) public _onlyDelegateCall;

Parameters

NameTypeDescription
extraDataAddress_addressthe address to set in the extra data slot

collectRevenue ​

collect revenue from the dex

solidity
function collectRevenue(address[] calldata tokens_, uint256[] calldata amounts_, address to_)
    public
    _onlyDelegateCall;

Parameters

NameTypeDescription
tokens_address[]the tokens to collect revenue from
amounts_uint256[]the amounts of tokens to collect revenue from
to_addressthe address to send the tokens to