Skip to content

Commit

Permalink
fix: move up require
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Valeri committed Dec 22, 2021
1 parent 832abf1 commit d47afa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/protocol/pool/PoolConfigurator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator {
uint256 liquidationThreshold,
uint256 liquidationBonus
) external override onlyRiskOrPoolAdmins {
DataTypes.ReserveConfigurationMap memory currentConfig = _pool.getConfiguration(asset);

//validation of the parameters: the LTV can
//only be lower or equal than the liquidation threshold
//(otherwise a loan against the asset would cause instantaneous liquidation)
require(ltv <= liquidationThreshold, Errors.PC_INVALID_CONFIGURATION);

DataTypes.ReserveConfigurationMap memory currentConfig = _pool.getConfiguration(asset);

if (liquidationThreshold != 0) {
//liquidation bonus must be bigger than 100.00%, otherwise the liquidator would receive less
//collateral than needed to cover the debt
Expand Down

0 comments on commit d47afa2

Please sign in to comment.