FluidPauseAuthLiquidity ​
Inherits:Variables, Events, Error, BasicValidations, IFluidPauseAuthLiquidity
Title: FluidPauseAuthLiquidity
Executes pause/unpause operations at the Fluid Liquidity layer. Callable only by the main FluidPauseAuth contract. Does NOT emit operational events — the main contract handles all event emission based on return values.
Functions ​
onlyPauseAuthContract ​
modifier onlyPauseAuthContract() ;constructor ​
constructor(address liquidity_, address vaultFactory_, address dexFactory_, address authGate_)
validAddress(liquidity_)
validAddress(vaultFactory_)
validAddress(dexFactory_)
validAddress(authGate_);setPauseAuthContract ​
Sets the FluidPauseAuth main contract address. Can only be called once (permanently locked after).
function setPauseAuthContract(address pauseAuth_) external validAddress(pauseAuth_);pauseVault ​
Pauses selected vault operations at the Liquidity layer.
function pauseVault(uint256 vaultId_, bool pauseSupply_, bool pauseWithdraw_, bool pauseBorrow_, bool pausePayback_)
external
override
onlyPauseAuthContract
returns (
address vault_,
bool actedSupply_,
bool actedWithdraw_,
bool actedBorrow_,
bool actedPayback_,
uint256 skippedUserClass_
);Parameters
| Name | Type | Description |
|---|---|---|
vaultId_ | uint256 | Vault ID to pause. |
pauseSupply_ | bool | Whether to pause supply/deposit operations. |
pauseWithdraw_ | bool | Whether to pause withdraw operations. |
pauseBorrow_ | bool | Whether to pause borrow operations. |
pausePayback_ | bool | Whether to pause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
vault_ | address | Resolved vault address. |
actedSupply_ | bool | Whether supply/deposit pause state changed. |
actedWithdraw_ | bool | Whether withdraw pause state changed. |
actedBorrow_ | bool | Whether borrow pause state changed. |
actedPayback_ | bool | Whether payback pause state changed. |
skippedUserClass_ | uint256 | Liquidity user class skipped by the helper, or zero if none. |
unpauseVault ​
Unpauses selected vault operations at the Liquidity layer.
function unpauseVault(
uint256 vaultId_,
bool unpauseSupply_,
bool unpauseWithdraw_,
bool unpauseBorrow_,
bool unpausePayback_
)
external
override
onlyPauseAuthContract
returns (
address vault_,
bool actedSupply_,
bool actedWithdraw_,
bool actedBorrow_,
bool actedPayback_,
uint256 skippedUserClass_
);Parameters
| Name | Type | Description |
|---|---|---|
vaultId_ | uint256 | Vault ID to unpause. |
unpauseSupply_ | bool | Whether to unpause supply/deposit operations. |
unpauseWithdraw_ | bool | Whether to unpause withdraw operations. |
unpauseBorrow_ | bool | Whether to unpause borrow operations. |
unpausePayback_ | bool | Whether to unpause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
vault_ | address | Resolved vault address. |
actedSupply_ | bool | Whether supply/deposit unpause state changed. |
actedWithdraw_ | bool | Whether withdraw unpause state changed. |
actedBorrow_ | bool | Whether borrow unpause state changed. |
actedPayback_ | bool | Whether payback unpause state changed. |
skippedUserClass_ | uint256 | Liquidity user class skipped by the helper, or zero if none. |
pauseDex ​
Pauses selected DEX-as-Liquidity-user operations.
function pauseDex(uint256 dexId_, bool pauseSupply_, bool pauseWithdraw_, bool pauseBorrow_, bool pausePayback_)
external
override
onlyPauseAuthContract
returns (
address dex_,
bool actedSupply_,
bool actedWithdraw_,
bool actedBorrow_,
bool actedPayback_,
uint256 skippedUserClass_
);Parameters
| Name | Type | Description |
|---|---|---|
dexId_ | uint256 | DEX ID to pause at the Liquidity layer. |
pauseSupply_ | bool | Whether to pause supply/deposit operations. |
pauseWithdraw_ | bool | Whether to pause withdraw operations. |
pauseBorrow_ | bool | Whether to pause borrow operations. |
pausePayback_ | bool | Whether to pause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
dex_ | address | Resolved DEX address. |
actedSupply_ | bool | Whether supply/deposit pause state changed. |
actedWithdraw_ | bool | Whether withdraw pause state changed. |
actedBorrow_ | bool | Whether borrow pause state changed. |
actedPayback_ | bool | Whether payback pause state changed. |
skippedUserClass_ | uint256 | Liquidity user class skipped by the helper, or zero if none. |
unpauseDex ​
Unpauses selected DEX-as-Liquidity-user operations.
function unpauseDex(
uint256 dexId_,
bool unpauseSupply_,
bool unpauseWithdraw_,
bool unpauseBorrow_,
bool unpausePayback_
)
external
override
onlyPauseAuthContract
returns (
address dex_,
bool actedSupply_,
bool actedWithdraw_,
bool actedBorrow_,
bool actedPayback_,
uint256 skippedUserClass_
);Parameters
| Name | Type | Description |
|---|---|---|
dexId_ | uint256 | DEX ID to unpause at the Liquidity layer. |
unpauseSupply_ | bool | Whether to unpause supply/deposit operations. |
unpauseWithdraw_ | bool | Whether to unpause withdraw operations. |
unpauseBorrow_ | bool | Whether to unpause borrow operations. |
unpausePayback_ | bool | Whether to unpause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
dex_ | address | Resolved DEX address. |
actedSupply_ | bool | Whether supply/deposit unpause state changed. |
actedWithdraw_ | bool | Whether withdraw unpause state changed. |
actedBorrow_ | bool | Whether borrow unpause state changed. |
actedPayback_ | bool | Whether payback unpause state changed. |
skippedUserClass_ | uint256 | Liquidity user class skipped by the helper, or zero if none. |
pauseTokens ​
Pauses selected token operations at the Liquidity layer.
function pauseTokens(
address[] calldata tokens_,
bool pauseSupply_,
bool pauseWithdraw_,
bool pauseBorrow_,
bool pausePayback_
)
external
override
onlyPauseAuthContract
returns (
bool[] memory actedSupply_,
bool[] memory actedWithdraw_,
bool[] memory actedBorrow_,
bool[] memory actedPayback_
);Parameters
| Name | Type | Description |
|---|---|---|
tokens_ | address[] | Token addresses to pause. |
pauseSupply_ | bool | Whether to pause supply operations. |
pauseWithdraw_ | bool | Whether to pause withdraw operations. |
pauseBorrow_ | bool | Whether to pause borrow operations. |
pausePayback_ | bool | Whether to pause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | Per-token flags for supply pause state changes. |
actedWithdraw_ | bool[] | Per-token flags for withdraw pause state changes. |
actedBorrow_ | bool[] | Per-token flags for borrow pause state changes. |
actedPayback_ | bool[] | Per-token flags for payback pause state changes. |
unpauseTokens ​
Unpauses selected token operations at the Liquidity layer.
function unpauseTokens(
address[] calldata tokens_,
bool unpauseSupply_,
bool unpauseWithdraw_,
bool unpauseBorrow_,
bool unpausePayback_
)
external
override
onlyPauseAuthContract
returns (
bool[] memory actedSupply_,
bool[] memory actedWithdraw_,
bool[] memory actedBorrow_,
bool[] memory actedPayback_
);Parameters
| Name | Type | Description |
|---|---|---|
tokens_ | address[] | Token addresses to unpause. |
unpauseSupply_ | bool | Whether to unpause supply operations. |
unpauseWithdraw_ | bool | Whether to unpause withdraw operations. |
unpauseBorrow_ | bool | Whether to unpause borrow operations. |
unpausePayback_ | bool | Whether to unpause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | Per-token flags for supply pause state changes. |
actedWithdraw_ | bool[] | Per-token flags for withdraw pause state changes. |
actedBorrow_ | bool[] | Per-token flags for borrow pause state changes. |
actedPayback_ | bool[] | Per-token flags for payback pause state changes. |
pauseUserSupply ​
Pauses a user's supply-side token operations at the Liquidity layer.
function pauseUserSupply(address user_, address[] calldata tokens_, bool pauseSupply_, bool pauseWithdraw_)
external
override
onlyPauseAuthContract
returns (bool[] memory actedSupply_, bool[] memory actedWithdraw_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | Liquidity user address to pause. |
tokens_ | address[] | Supply tokens to pause. |
pauseSupply_ | bool | Whether to pause supply operations. |
pauseWithdraw_ | bool | Whether to pause withdraw operations. |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | Per-token flags for supply pause state changes. |
actedWithdraw_ | bool[] | Per-token flags for withdraw pause state changes. |
pauseUserBorrow ​
Pauses a user's borrow-side token operations at the Liquidity layer.
function pauseUserBorrow(address user_, address[] calldata tokens_, bool pauseBorrow_, bool pausePayback_)
external
override
onlyPauseAuthContract
returns (bool[] memory actedBorrow_, bool[] memory actedPayback_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | Liquidity user address to pause. |
tokens_ | address[] | Borrow tokens to pause. |
pauseBorrow_ | bool | Whether to pause borrow operations. |
pausePayback_ | bool | Whether to pause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
actedBorrow_ | bool[] | Per-token flags for borrow pause state changes. |
actedPayback_ | bool[] | Per-token flags for payback pause state changes. |
unpauseUserSupply ​
Unpauses a user's supply-side token operations at the Liquidity layer.
function unpauseUserSupply(address user_, address[] calldata tokens_, bool unpauseSupply_, bool unpauseWithdraw_)
external
override
onlyPauseAuthContract
returns (bool[] memory actedSupply_, bool[] memory actedWithdraw_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | Liquidity user address to unpause. |
tokens_ | address[] | Supply tokens to unpause. |
unpauseSupply_ | bool | Whether to unpause supply operations. |
unpauseWithdraw_ | bool | Whether to unpause withdraw operations. |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | Per-token flags for supply pause state changes. |
actedWithdraw_ | bool[] | Per-token flags for withdraw pause state changes. |
unpauseUserBorrow ​
Unpauses a user's borrow-side token operations at the Liquidity layer.
function unpauseUserBorrow(address user_, address[] calldata tokens_, bool unpauseBorrow_, bool unpausePayback_)
external
override
onlyPauseAuthContract
returns (bool[] memory actedBorrow_, bool[] memory actedPayback_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | Liquidity user address to unpause. |
tokens_ | address[] | Borrow tokens to unpause. |
unpauseBorrow_ | bool | Whether to unpause borrow operations. |
unpausePayback_ | bool | Whether to unpause payback operations. |
Returns
| Name | Type | Description |
|---|---|---|
actedBorrow_ | bool[] | Per-token flags for borrow pause state changes. |
actedPayback_ | bool[] | Per-token flags for payback pause state changes. |
_setVaultPauseState ​
Shared vault pause/unpause logic. wantsPaused_ == true -> pause, false -> unpause. Resolves vault tokens; DEX-backed sides return empty token arrays and are skipped here.
function _setVaultPauseState(
uint256 vaultId_,
bool pauseSupply_,
bool pauseWithdraw_,
bool pauseBorrow_,
bool pausePayback_,
bool wantsPaused_
)
internal
returns (
address vault_,
bool actedSupply_,
bool actedWithdraw_,
bool actedBorrow_,
bool actedPayback_,
uint256 skippedUserClass_
);_setDexPauseState ​
Shared DEX pause/unpause logic at the Liquidity layer. wantsPaused_ == true -> pause, false -> unpause.
function _setDexPauseState(
uint256 dexId_,
bool pauseSupply_,
bool pauseWithdraw_,
bool pauseBorrow_,
bool pausePayback_,
bool wantsPaused_
)
internal
returns (
address dex_,
bool actedSupply_,
bool actedWithdraw_,
bool actedBorrow_,
bool actedPayback_,
uint256 skippedUserClass_
);_setProtocolSupplyPauseState ​
Applies supply-side Liquidity pause state for any protocol represented as a Liquidity user.
function _setProtocolSupplyPauseState(
address user_,
address[] memory tokens_,
bool pauseSupply_,
bool pauseWithdraw_,
bool wantsPaused_
) internal returns (bool actedSupply_, bool actedWithdraw_, uint256 skippedUserClass_);_setProtocolBorrowPauseState ​
Applies borrow-side Liquidity pause state for any protocol represented as a Liquidity user.
function _setProtocolBorrowPauseState(
address user_,
address[] memory tokens_,
bool pauseBorrow_,
bool pausePayback_,
bool wantsPaused_
) internal returns (bool actedBorrow_, bool actedPayback_, uint256 skippedUserClass_);_filterDefinedTokens ​
Returns the subset of tokens_ for which user_ has a Liquidity row at mappingSlot_. Liquidity reverts AdminModule__UserNotDefined on an undefined (user, token) pair, which would take down an entire emergency batch over one protocol that was never configured at Liquidity.
function _filterDefinedTokens(address user_, address[] memory tokens_, uint256 mappingSlot_)
internal
view
returns (address[] memory filtered_);_getSkippedUserClass ​
Returns the adjusted secondary flag and user class that requires auth-level handling for pause calls.
function _getSkippedUserClass(address user_, bool secondary_)
internal
view
returns (bool adjustedSecondary_, uint256 skippedUserClass_);_any ​
function _any(bool[] memory values_) internal pure returns (bool);_isVaultT1 ​
Returns whether vault_ is a T1 vault. Falls back to true on revert (older vaults without TYPE()).
function _isVaultT1(address vault_) internal view returns (bool);_getVaultTokens ​
Resolves a vault to its LL-facing token arrays. DEX-backed sides return empty arrays.
function _getVaultTokens(address vault_)
internal
view
returns (address[] memory supplyTokens_, address[] memory borrowTokens_);_getDexTokens ​
Resolves a DEX to its LL-facing token arrays. Reverts if unresolvable.
function _getDexTokens(address dex_)
internal
view
returns (address[] memory supplyTokens_, address[] memory borrowTokens_);_buildTokenArray ​
Builds a one-token or two-token array from the provided token addresses.
function _buildTokenArray(address token0_, address token1_) internal pure returns (address[] memory tokens_);Parameters
| Name | Type | Description |
|---|---|---|
token0_ | address | first token address, always included. |
token1_ | address | optional second token address, included when non-zero. |
Returns
| Name | Type | Description |
|---|---|---|
tokens_ | address[] | resulting token array. |