Deposit and Withdraw
Deposits to & Withdraws from the specified lending pool. When you deposit to the lending pool, the corresponding "inToken" will be minted as a receipt token that represents your shares of the pool.
Deposit
To deposit to a lending pool, users must perform 2 steps:
transfer underlying token to the pool
call
mintTo
on InitCore
The action returns shares
of the lending pool.
The above 2 steps must be performed in a single transaction (atomically) to avoid potential front-run attack.
Withdraw
To withdraw from a lending pool, users must perform 2 steps:
transfer inToken to the pool
call
burnTo
on InitCore
The action returns amount
of underlying token to be received.
The above 2 steps must be performed in a single transaction (atomically) to avoid potential front-run attack.
Last updated