diff --git a/src/SparkLendFreezerMom.sol b/src/SparkLendFreezerMom.sol index f9b03bc..21b676b 100644 --- a/src/SparkLendFreezerMom.sol +++ b/src/SparkLendFreezerMom.sol @@ -72,8 +72,9 @@ contract SparkLendFreezerMom is ISparkLendFreezerMom { address[] memory reserves = PoolLike(pool).getReservesList(); for (uint256 i = 0; i < reserves.length; i++) { - PoolConfiguratorLike(poolConfigurator).setReserveFreeze(reserves[i], true); - emit FreezeMarket(reserves[i]); + address reserve = reserves[i]; + PoolConfiguratorLike(poolConfigurator).setReserveFreeze(reserve, true); + emit FreezeMarket(reserve); } } diff --git a/src/interfaces/ISparkLendFreezerMom.sol b/src/interfaces/ISparkLendFreezerMom.sol index 6aaeb99..5270fb1 100644 --- a/src/interfaces/ISparkLendFreezerMom.sol +++ b/src/interfaces/ISparkLendFreezerMom.sol @@ -9,6 +9,7 @@ interface ISparkLendFreezerMom { /** * @dev Event to log the freezing of a given market in SparkLend. + * @dev NOTE: This event will fire even if the market is already frozen. * @param reserve The address of the market reserve. */ event FreezeMarket(address indexed reserve); @@ -78,7 +79,8 @@ interface ISparkLendFreezerMom { /** * @dev Function to freeze a specified market. Permissioned using the isAuthorized function * which allows the owner, the freezer contract itself, or the `hat` in the Chief - * to call the function. + * to call the function. Note that the `authority` in this contract is assumed to be + * the Chief in the MakerDAO protocol. * @param reserve The address of the market to freeze. */ function freezeMarket(address reserve) external;