FluidLiquidityUserModule

Git Source

Inherits:CoreInternals

Fluid Liquidity public facing endpoint logic contract that implements the operate() method. operate can be used to deposit, withdraw, borrow & payback funds, given that they have the necessary user config allowance. Interacting users must be allowed via the Fluid Liquidity AdminModule first. Intended users are thus allow-listed protocols, e.g. the Lending protocol (fTokens), Vault protocol etc.

For view methods / accessing data, use the "LiquidityResolver" periphery contract.

Functions

operate

inheritdoc IFluidLiquidity

function operate(
    address token_,
    int256 supplyAmount_,
    int256 borrowAmount_,
    address withdrawTo_,
    address borrowTo_,
    bytes calldata callbackData_
) external payable reentrancy returns (uint256 memVar3_, uint256 memVar4_);

Structs

OperateMemoryVars

struct for vars used in operate() that would otherwise cause a Stack too deep error

struct OperateMemoryVars {
    bool skipTransfers;
    uint256 supplyExchangePrice;
    uint256 borrowExchangePrice;
    uint256 supplyRawInterest;
    uint256 supplyInterestFree;
    uint256 borrowRawInterest;
    uint256 borrowInterestFree;
    uint256 totalAmounts;
    uint256 exchangePricesAndConfig;
}