BorrowerOperations
function fetchBalances() public returns (SystemBalances memory balances)
Fetches collateral, debt, and price data for all active collaterals.
Return Value
Type
Description
Struct containing collateral, debt, and price arrays
function openTrove(
ITroveManager troveManager,
address account,
uint256 _maxFeePercentage,
uint256 _collateralAmount,
uint256 _debtAmount,
uint256 _upperHint,
uint256 _lowerHint,
address frontEndId,
address referrerId,
bool useNative
) external payable
Opens a new trove by depositing collateral and borrowing debt tokens.
TroveManager for the collateral
Max borrowing fee percentage (e.g., 1e18 = 100%)
Amount of collateral to deposit
Hint for trove insertion (gas optimization)
Hint for trove insertion (gas optimization)
Address of the front-end operator (optional)
Address of the referrer (optional)
Whether to use native ETH (if collateral is native)
Adds collateral to an existing trove.
TroveManager for the collateral
ID of the trove to modify
Amount of collateral to add
Hint for trove reinsertion
Hint for trove reinsertion
Whether to use native ETH
Withdraws collateral from an existing trove.
TroveManager for the collateral
Amount of collateral to withdraw
Hint for trove reinsertion
Hint for trove reinsertion
ID of the trove to modify
Whether to receive native ETH
Borrows more debt tokens from an existing trove.
TroveManager for the collateral
Max borrowing fee percentage
Hint for trove reinsertion
Hint for trove reinsertion
ID of the trove to modify
Whether to use native ETH
Repays debt tokens to an existing trove.
TroveManager for the collateral
Hint for trove reinsertion
Hint for trove reinsertion
ID of the trove to modify
Adjusts a trove's collateral and/or debt in a single transaction.
TroveManager for the collateral
Max borrowing fee percentage
Amount of collateral to add (if any)
Amount of collateral to withdraw (if any)
Amount of debt to add/repay
true to borrow, false to repay
Hint for trove reinsertion
Hint for trove reinsertion
ID of the trove to modify
Whether to use native ETH
Closes an existing trove by repaying all debt and withdrawing all collateral.
TroveManager for the collateral
Whether to receive native ETH
Returns the total priced collateral and total debt across all collaterals.
Return Value
Type
Description
Total value of all collaterals (priced in debt tokens)
Returns the global Total Collateral Ratio (TCR).
Return Value
Type
Description
globalTotalCollateralRatio
The global Total Collateral Ratio (TCR)
Checks if the system is in Recovery Mode (TCR < CCR).
Total Collateral Ratio to check
Return Value
Type
Description
true if TCR < CCR (Recovery Mode), else false
Structs and Enums
Last updated