Ethers.js provider
Approve specified amount of xToken by contract before minting
Symbol of the token to be approved
Amount of the token to be approved, MAX_UINT will be used by default
Token0/Token1
Spender address to be approved for the specified ERC20 token
A promise of the transaction response
Approve specified amount of USDC by lending liquidity pool contract
Amount of the token to be approved, MAX_UINT will be used by default
A promise of the transaction response
Approve specified amount of XTK by staking contract
Amount of the token to be approved, MAX_UINT will be used by default
A promise of the transaction response
Sell specified amount of xToken, either for ETH or Token
Symbol of the xToken to be sold
Sell for ETH/Token or Token0/Token1 outputAsset
in boolean value
Amount of xTokens to be sold, cannot exceed max redeemable for xAAVEa/xAAVEb/xSNXa tokens
A promise of the transaction response
Sell specified amount of xAssetCLR tokens
Symbol of the xAssetCLR to be sold
Amount of xAssetCLR tokens to be sold, cannot exceed max redeemable tokens
A promise of the transaction response
Name of the market
Amount of xAsset to add/remove
Supply/Withdraw action to be performed on the provided collateral
A promise of the transaction response
Symbol of the xToken to burn
True, if selling the xToken for ETH
Quantity of the xToken to be traded
Buy/sell type of the trade
Estimated quantities from available sources for trading the given xToken
Get Borrow rate per block of Liquidity Pool contract
Get Borrowing Capacity for an address
Symbol of the xToken to burn
True, if selling the xToken for ETH or Token0/Token1 outputAsset
in boolean value
Quantity of the xToken to be traded
Expected quantity for selling the given xToken / underlying assets in case of xAssetCLR
Symbol of the xToken to be minted
True, if buying the xToken with ETH or Token0/Token1 inputAsset
in boolean value
Quantity of the token to be traded
Expected quantity of xToken upon minting
Get Lending reserveFee and xtkFee factors
Get Health Ratio for an address
Get liquidity pool token base value
Get liquidity pool token value
Get all Lending Markets info along with xAsset symbol, collateral and total value in USD
Get xAsset Lending Price
Returns available liquidity pools for xTokens along with their balances
Symbol of the xToken
Sell for Token0/Token1
Maximum redeemable tokens for the given xToken
Get xAssetCLR pool deposit ratio
Symbol of xAssetCLR
Returns ratio of liquidity deposited in the pool
Returns balances along with prices for all the xTokens owned by an address
Array of each xToken in the portfolio with their corresponding balance and price
Get token allowance for an address on ERC20 token or xAssets
Get token balance for an address of ERC20 token or xAssets
Get token supply of ERC20 token or xAssets
Symbol of the xToken to burn
True, if selling the xToken for ETH
Quantity of the xToken to be traded
Buy/sell type of the trade
Estimated quantity for trading the given xAssetCLR
Get updated borrow for an address
Get liquidity pool token utilization and optimal utilization rates
Symbol of the xToken to fetch prices of
A promise of the xAsset prices in ETH/USD along with AUM
Returns list of all the xTokens along with their asset details: AUM, Mandate & USD price
Returns list of all the xU3LP tokens along with their asset details, AUM & USD price
Returns list of all the xAssetLev tokens along with their asset details, AUM & USD price
Get Stake/Unstake history of XTK
Get Stake/Unstake history of XTK
Returns list of all Stake/Unstake history of XTK
Mint xToken for specified amount of ETH/Token
Symbol of the xAsset to be minted
Mint with ETH/Token or Token0/Token1 inputAsset
in boolean value
Quantity of token to be minted, tokens need to be approved before minting using approve method
Affiliate address to whom the affiliate fees should be sent to
A promise of the transaction response
Mint xAssetCLR token for specified amount of Token0/Token1
Symbol of the xAssetCLR to be minted
Mint with Token0/Token1 inputAsset
Quantity of xAssetCLR token to be minted, tokens need to be approved before minting using approve method
A promise of the transaction response
Stake XTK
Quantity of token to be staked, tokens need to be approved before staking using approve method
A promise of the transaction response
Unstake xXTKa to get back XTK
Quantity of token to be unstaked
A promise of the transaction response
Helper class providing the wrapper around the methods to interact with the xToken contracts. Depends on ethers.js v5