Add and Remove Collateral
Adding & Removing collaterals to/from an existing position.
Add Collateral
// Example add collateral function
function addCollateral(uint256 posId, address lendingPool, uint256 shares) external {
// 0. .. pull in lending pool tokens from the caller ..
// 1. transfer inToken to PosManager
IERC20(lendingPool).safeTransfer(POS_MANAGER, shares);
// 2. add collateral to position
IInfinitCore(INFINIT_CORE).collateralize(posId, lendingPool);
}Remove Collateral
Last updated