Mint
Users may provide funds to the lending pool in exchange for iTokens, which represent shares in the pool.
Mint with ERC20
In order to provide funds to the pool, call mint
on the respective iToken contract. This will take your deposit and give you iTokens in return. The function retrieves the tokens from the message sender, so make sure to first approve the loan token contract to access your funds.
Arguments
receiver
address
the receiver of the tokens
depositAmount
uint256
the amount of underlying tokens provided on the loan. (Not the number of loan tokens to mint).
useLM
bool
if true -> deposit the pool tokens into the Liquidity Mining contract
Returns
The amount of loan tokens minted
Mint with RBTC
In order to provide funds to the RBTC lending pool, call mintWithBTC
on the iWRBTC contract. This will take your deposit and give you iWRBTC in return.
Arguments
receiver
address
the receiver of the tokens
useLM
bool
if true -> deposit the pool tokens into the Liquidity Mining contract
Last updated