Skip to content

Commit

Permalink
Comment on VaultManager (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Picodes authored Nov 23, 2022
1 parent 09c4fdd commit e8ca2fb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions contracts/vaultManager/VaultManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ contract VaultManager is VaultManagerPermit, IVaultManagerFunctions {
// Makes sure not to leave a dusty amount in the vault by either not liquidating too much
// or everything
if (
(liqOpp.thresholdRepayAmount != 0 && amounts[i] > liqOpp.thresholdRepayAmount) ||
(liqOpp.thresholdRepayAmount != 0 && amounts[i] >= liqOpp.thresholdRepayAmount) ||
amounts[i] > liqOpp.maxStablecoinAmountToRepay
) amounts[i] = liqOpp.maxStablecoinAmountToRepay;

Expand Down Expand Up @@ -895,10 +895,12 @@ contract VaultManager is VaultManagerPermit, IVaultManagerFunctions {
}

/// @notice Sets the dust variables
/// @dev These variables are not taken into account in all circumstances as the actual dust variables
function setDusts(uint256 newDust, uint256 newDustCollateral) external onlyGovernor {
dust = newDust;
_dustCollateral = newDustCollateral;
/// @param _dust New minimum debt allowed
/// @param dustCollateral_ New minimum collateral allowed in a vault after a liquidation
/// @dev dustCollateral_ is in stable value
function setDusts(uint256 _dust, uint256 dustCollateral_) external onlyGovernor {
dust = _dust;
_dustCollateral = dustCollateral_;
}

/// @inheritdoc IVaultManagerFunctions
Expand Down

0 comments on commit e8ca2fb

Please sign in to comment.