FluidDexLiteAdminModule ​
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
| Name | Type | Description | 
|---|---|---|
auth_ | address | the address to update auth for | 
isAuth_ | bool | the auth status | 
initialize ​
initialize the dex
solidity
function initialize(InitializeParams memory i_) external payable _onlyDelegateCall;Parameters
| Name | Type | Description | 
|---|---|---|
i_ | InitializeParams | the 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
fee_ | uint256 | in 4 decimals, 10000 = 1% | 
revenueCut_ | uint256 | in 4 decimals, 10000 = 1% | 
updateRebalancingStatus ​
update the rebalancing status for the dex
solidity
function updateRebalancingStatus(DexKey calldata dexKey_, bool rebalancingStatus_) public _onlyDelegateCall;Parameters
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
rebalancingStatus_ | bool | the 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
upperPercent_ | uint256 | in 4 decimals, 10000 = 1% | 
lowerPercent_ | uint256 | in 4 decimals, 10000 = 1% | 
shiftTime_ | uint256 | in 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
shiftTime_ | uint256 | in 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
maxCenterPrice_ | uint256 | 1:1 means 1e27 | 
minCenterPrice_ | uint256 | 1: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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
upperThresholdPercent_ | uint256 | in 4 decimals, 10000 = 1% | 
lowerThresholdPercent_ | uint256 | in 4 decimals, 10000 = 1% | 
shiftTime_ | uint256 | in 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
centerPriceAddress_ | uint256 | nonce < X19, this nonce will be used to calculate contract address | 
percent_ | uint256 | in 4 decimals, 10000 = 1% | 
time_ | uint256 | in 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
token0Amount_ | uint256 | the token0 amount | 
token1Amount_ | uint256 | the 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
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | the dex key | 
token0Amount_ | uint256 | the token0 amount | 
token1Amount_ | uint256 | the token1 amount | 
to_ | address | the 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
| Name | Type | Description | 
|---|---|---|
extraDataAddress_ | address | the 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
| Name | Type | Description | 
|---|---|---|
tokens_ | address[] | the tokens to collect revenue from | 
amounts_ | uint256[] | the amounts of tokens to collect revenue from | 
to_ | address | the address to send the tokens to | 

