FluidStETHResolver

Git Source

Inherits:IFluidStETHResolver

Fluid StETH protocol resolver Implements various view-only methods to give easy access to StETH protocol data.

State Variables

STETH_QUEUE

address of the stETHQueue contract

IFluidStETHQueue public immutable STETH_QUEUE;

LIDO_WITHDRAWAL_QUEUE

address of the Lido Withdrawal Queue contract (0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1)

ILidoWithdrawalQueue public immutable LIDO_WITHDRAWAL_QUEUE;

LIQUIDITY_RESOLVER

address of the LiquidityResolver

IFluidLiquidityResolver public immutable LIQUIDITY_RESOLVER;

NATIVE_TOKEN_ADDRESS

address that is mapped to the chain native token at Liquidity

address internal constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

Functions

constructor

constructor(
    IFluidStETHQueue stEthQueue_,
    IFluidLiquidityResolver liquidityResolver_,
    ILidoWithdrawalQueue lidoWithdrawalQueue_
);

isClaimable

checks if a linked claim for claimTo_ and claimTo_ is ready to be processed at Lido Withdrawal Queue

function isClaimable(address claimTo_, uint256 requestIdFrom_) public view returns (bool);

Parameters

NameTypeDescription
claimTo_addressclaimTo receiver to process the claim for
requestIdFrom_uint256Lido requestId from (start), as emitted at time of queuing via LogQueue

config

returns all constants and config values

function config()
    public
    view
    returns (
        IFluidLiquidity liquidity_,
        ILidoWithdrawalQueue lidoWithdrawalQueue_,
        IERC20 stETH_,
        address owner_,
        uint16 maxLTV_,
        bool allowListActive_,
        bool isPaused_,
        LiquidityStructs.UserBorrowData memory userBorrowData_,
        LiquidityStructs.OverallTokenData memory overallTokenData_
    );

isAuth

reads if a certain auth_ address is an allowed auth or not

function isAuth(address auth_) public view returns (bool);

isGuardian

reads if a certain guardian_ address is an allowed guardian or not

function isGuardian(address guardian_) public view returns (bool);

isUserAllowed

reads if a certain user_ address is an allowed user or not

function isUserAllowed(address user_) public view returns (bool);

isPaused

reads if the protocol is paused or not

function isPaused() public view returns (bool);

claim

reads a Claim struct containing necessary information for executing the claim process from the mapping claimTo and requestIdFrom -> claims and the claimable status.

function claim(address claimTo_, uint256 requestIdFrom_)
    public
    view
    returns (StETHQueueStructs.Claim memory claim_, bool isClaimable_);

getUserBorrowData

returns borrow data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for native token

function getUserBorrowData()
    public
    view
    returns (
        LiquidityStructs.UserBorrowData memory userBorrowData_,
        LiquidityStructs.OverallTokenData memory overallTokenData_
    );

Errors

FluidStETHResolver__AddressZero

thrown if an input param address is zero

error FluidStETHResolver__AddressZero();

FluidStETHResolver__NoClaimQueued

thrown if there is no Claim queued for the given input data

error FluidStETHResolver__NoClaimQueued();