Using lending pools via RFQ API
This page gives an overview on how to provide quotes that utilize liquidity in Liquorice lending pools
API details
Lending pools can be utilized using QuoteLevelExt type of the quote level sent in RFQQuote message
Configuration of lending token transfer and lending parameters should be done using fields in baseTokenData
and quoteTokenData
Lending Parameters Explained
Essentially, the Liquorice RFQ allows market makers to define how they would like to handle the base and quote amounts in any proportions they desire. The Liquorice smart contract will accept these parameters and execute the necessary token transfers and borrowing.
Base Token Data
toRecipient
– The amount of the base token to be transferred to the recipient's address.After settlement, this amount will be transferred directly to the recipient's address.
toRepay
– The amount of the base token to be used to repay the market maker's debt (if applicable).After settlement, this amount will reduce the maker's debt for the given token (if applicable).
toSupply
– The amount of the base token to be supplied to the lending pool as the market maker's collateral, which is used to facilitate any borrowing.After settlement, this amount will be locked as collateral in the lending pool to facilitate any borrowing.
Note: The sum of the values in toRecipient
, toRepay
, and toSupply
must equal the amount
.
Quote Token Data
toTrader
– The amount of the quote token to be transferred from the signer’s address to the trader.After settlement, this amount will be transferred to the order originator’s address directly from signer's address.
toWithdraw
– The amount of the quote token to be withdrawn from the lending pool and transferred to the trader.After settlement, the market maker will have less collateral locked in the lending pool.
toBorrow
– The amount of the quote token to be borrowed from the lending pool and transferred to the trader.After settlement, the maker will have an outstanding debt that needs to be repaid.
Note: The sum of the values in toTrader
, toWithdraw
, and toBorrow
must equal the amount
.
Last updated