Deposit and Withdraw
Deposits to & Withdraws from the specified lending pool. When you deposit to the lending pool, the corresponding "infToken" will be minted as a receipt token that represents your shares of the pool.
Deposit
// Example deposit function
function deposit(address lendingPool, uint256 amount, address receiver) external returns (uint256 shares) {
// .. transfer in the tokens to this address ..
// 1. transfer tokens to the lending pool
IERC20(underlyingToken).safeTransfer(lendingPool, amount);
// 2. call mintTo
shares = IInfinitCore(INFINIT_CORE).mintTo(lendingPool, receiver);
}Withdraw
Last updated