Skip to content

Commit

Permalink
fix: requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyenneAtapour committed Aug 21, 2024
1 parent a229cc1 commit 7440451
Show file tree
Hide file tree
Showing 19 changed files with 382 additions and 1,084 deletions.
4 changes: 1 addition & 3 deletions src/contracts/misc/GhoAaveSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import {IPoolAddressesProvider} from '@aave/core-v3/contracts/interfaces/IPoolAd
import {IPool} from '@aave/core-v3/contracts/interfaces/IPool.sol';
import {DataTypes} from '@aave/core-v3/contracts/protocol/libraries/types/DataTypes.sol';
import {ReserveConfiguration} from '@aave/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {IPoolConfigurator} from './deps/IPoolConfigurator.sol';
import {IDefaultInterestRateStrategyV2} from './deps/Dependencies.sol';
import {DefaultReserveInterestRateStrategyV2} from './deps/Dependencies.sol';
import {IPoolConfigurator, IDefaultInterestRateStrategyV2, DefaultReserveInterestRateStrategyV2} from './dependencies/AaveV3-1.sol';
import {IGhoAaveSteward} from './interfaces/IGhoAaveSteward.sol';
import {RiskCouncilControlled} from './RiskCouncilControlled.sol';

Expand Down
4 changes: 2 additions & 2 deletions src/contracts/misc/GhoCcipSteward.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import {IUpgradeableLockReleaseTokenPool} from './deps/IUpgradeableLockReleaseTokenPool.sol';
import {RateLimiter} from './deps/RateLimiter.sol';
import {IUpgradeableLockReleaseTokenPool} from './dependencies/Ccip.sol';
import {RateLimiter} from './dependencies/Ccip.sol';
import {IGhoCcipSteward} from './interfaces/IGhoCcipSteward.sol';
import {RiskCouncilControlled} from './RiskCouncilControlled.sol';

Expand Down
26 changes: 13 additions & 13 deletions src/contracts/misc/GhoGsmSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,20 @@ contract GhoGsmSteward is RiskCouncilControlled, IGhoGsmSteward {
uint256 sellFee
) external onlyRiskCouncil notTimelocked(_gsmTimelocksByAddress[gsm].gsmFeeStrategyLastUpdated) {
address currentFeeStrategy = IGsm(gsm).getFeeStrategy();
require(currentFeeStrategy != address(0), 'FIXED_FEE_STRATEGY_NOT_FOUND');

if (currentFeeStrategy != address(0)) {
uint256 currentBuyFee = IGsmFeeStrategy(currentFeeStrategy).getBuyFee(1e4);
uint256 currentSellFee = IGsmFeeStrategy(currentFeeStrategy).getSellFee(1e4);
require(buyFee != currentBuyFee || sellFee != currentSellFee, 'NO_CHANGE_IN_FEES');
require(
_isDifferenceLowerThanMax(currentBuyFee, buyFee, GSM_FEE_RATE_CHANGE_MAX),
'INVALID_BUY_FEE_UPDATE'
);
require(
_isDifferenceLowerThanMax(currentSellFee, sellFee, GSM_FEE_RATE_CHANGE_MAX),
'INVALID_SELL_FEE_UPDATE'
);
}
uint256 currentBuyFee = IGsmFeeStrategy(currentFeeStrategy).getBuyFee(1e4);
uint256 currentSellFee = IGsmFeeStrategy(currentFeeStrategy).getSellFee(1e4);
require(currentBuyFee != 0 || currentSellFee != 0, 'CANNOT_UPDATE_ZERO_FEES');
require(buyFee != currentBuyFee || sellFee != currentSellFee, 'NO_CHANGE_IN_FEES');
require(
_isDifferenceLowerThanMax(currentBuyFee, buyFee, GSM_FEE_RATE_CHANGE_MAX),
'INVALID_BUY_FEE_UPDATE'
);
require(
_isDifferenceLowerThanMax(currentSellFee, sellFee, GSM_FEE_RATE_CHANGE_MAX),
'INVALID_SELL_FEE_UPDATE'
);

IFixedFeeStrategyFactory strategyFactory = IFixedFeeStrategyFactory(FIXED_FEE_STRATEGY_FACTORY);
uint256[] memory buyFeeList = new uint256[](1);
Expand Down
193 changes: 0 additions & 193 deletions src/contracts/misc/GhoSteward.sol

This file was deleted.

Loading

0 comments on commit 7440451

Please sign in to comment.