Collateral Management
The user may add or remove collateral to / from an open position.
Adding collateral
Increase the margin of a position by depositing additional collateral.
Arguments
Name
Type
Description
loanId
bytes32
A unique ID representing the loan.
depositAmount
uint256
The amount to be deposited in collateral tokens.
Removing collateral
Withdraw from the collateral. This reduces the margin of a position. Note that it is not possible to reduce the margin below the maintenance margin. If attempted, as much collateral as possible will be removed, leaving the position at the maintenance margin level.
Arguments
Name
Type
Description
loanId
bytes32
A unique ID representing the loan.
receiver
address
The account getting the withdrawal.
withdrawAmount
uint256
The amount to be withdrawn in collateral tokens.
Returns
The amount withdrawn
Last updated