Borrow and Repay
Borrow & Repay tokens on InitCore's position.
Borrow
Users can borrow tokens into their positions. Only the position owner or approved party to modify can call this function. The function returns a user's debt shares from the total borrows of the lending pool. Users can specify the receiver address to receive the tokens.
The position must be in a mode that allows the borrow token to be used.
Repay
Users can repay their positions to increase the position's health factor.
Users must have underlying tokens in their wallet and pre-approve the token to InitCore.
For best practice, it is recommended that the caller approves the contract with an amount slightly higher than the pre-calculated debt amount, since the interest may accrue over time between the transaction submission to the network and the actual execution and inclusion onto the blockchain.
Last updated