diff --git a/.assets/4422a290bbbd57f615385e22c6be99ae91417cb5.svg b/.assets/4422a290bbbd57f615385e22c6be99ae91417cb5.svg
new file mode 100644
index 00000000..3e0e783b
--- /dev/null
+++ b/.assets/4422a290bbbd57f615385e22c6be99ae91417cb5.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.assets/ea5b7a01297938e46e8a311bf8a452b147d325a3.svg b/.assets/ea5b7a01297938e46e8a311bf8a452b147d325a3.svg
new file mode 100644
index 00000000..e90e04d8
--- /dev/null
+++ b/.assets/ea5b7a01297938e46e8a311bf8a452b147d325a3.svg
@@ -0,0 +1 @@
+ Borrow APR, variableBorrow APR, stableUtilization Rate0%25%50%75%100%0%200%Optimal 45%Optimal 45%
\ No newline at end of file
diff --git a/diffs/preTestArbitrumUpdate20231024mai_postTestArbitrumUpdate20231024mai.md b/diffs/preTestArbitrumUpdate20231024mai_postTestArbitrumUpdate20231024mai.md
new file mode 100644
index 00000000..c4acfbf6
--- /dev/null
+++ b/diffs/preTestArbitrumUpdate20231024mai_postTestArbitrumUpdate20231024mai.md
@@ -0,0 +1,50 @@
+## Reserve changes
+
+### Reserves altered
+
+#### MAI ([0x3F56e0c36d275367b8C502090EDF38289b3dEa0d](https://arbiscan.io/address/0x3F56e0c36d275367b8C502090EDF38289b3dEa0d))
+
+| description | value before | value after |
+| --- | --- | --- |
+| reserveFactor | 20 % | 95 % |
+| interestRateStrategy | [0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E](https://arbiscan.io/address/0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E) | [0xb02381b1d27aA9845e5012083CA288c1818884f0](https://arbiscan.io/address/0xb02381b1d27aA9845e5012083CA288c1818884f0) |
+| optimalUsageRatio | 80 % | 45 % |
+| maxExcessUsageRatio | 20 % | 55 % |
+| variableRateSlope2 | 75 % | 300 % |
+| interestRate |  |  |
+
+## Raw diff
+
+```json
+{
+ "reserves": {
+ "0x3F56e0c36d275367b8C502090EDF38289b3dEa0d": {
+ "interestRateStrategy": {
+ "from": "0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E",
+ "to": "0xb02381b1d27aA9845e5012083CA288c1818884f0"
+ },
+ "reserveFactor": {
+ "from": 2000,
+ "to": 9500
+ }
+ }
+ },
+ "strategies": {
+ "0xb02381b1d27aA9845e5012083CA288c1818884f0": {
+ "from": null,
+ "to": {
+ "baseStableBorrowRate": "50000000000000000000000000",
+ "baseVariableBorrowRate": 0,
+ "maxExcessStableToTotalDebtRatio": "800000000000000000000000000",
+ "maxExcessUsageRatio": "550000000000000000000000000",
+ "optimalStableToTotalDebtRatio": "200000000000000000000000000",
+ "optimalUsageRatio": "450000000000000000000000000",
+ "stableRateSlope1": "40000000000000000000000000",
+ "stableRateSlope2": "750000000000000000000000000",
+ "variableRateSlope1": "40000000000000000000000000",
+ "variableRateSlope2": "3000000000000000000000000000"
+ }
+ }
+ }
+}
+```
\ No newline at end of file
diff --git a/diffs/preTestAvalancheUpdate20231024mai_postTestAvalancheUpdate20231024mai.md b/diffs/preTestAvalancheUpdate20231024mai_postTestAvalancheUpdate20231024mai.md
new file mode 100644
index 00000000..2403f1e6
--- /dev/null
+++ b/diffs/preTestAvalancheUpdate20231024mai_postTestAvalancheUpdate20231024mai.md
@@ -0,0 +1,50 @@
+## Reserve changes
+
+### Reserves altered
+
+#### MAI ([0x5c49b268c9841AFF1Cc3B0a418ff5c3442eE3F3b](https://snowtrace.io/address/0x5c49b268c9841AFF1Cc3B0a418ff5c3442eE3F3b))
+
+| description | value before | value after |
+| --- | --- | --- |
+| reserveFactor | 20 % | 95 % |
+| interestRateStrategy | [0xfab05a6aF585da2F96e21452F91E812452996BD3](https://snowtrace.io/address/0xfab05a6aF585da2F96e21452F91E812452996BD3) | [0x04daBC3C1c052AB94AA2ca80140f2b978d2F6E17](https://snowtrace.io/address/0x04daBC3C1c052AB94AA2ca80140f2b978d2F6E17) |
+| optimalUsageRatio | 80 % | 45 % |
+| maxExcessUsageRatio | 20 % | 55 % |
+| variableRateSlope2 | 75 % | 300 % |
+| interestRate |  |  |
+
+## Raw diff
+
+```json
+{
+ "reserves": {
+ "0x5c49b268c9841AFF1Cc3B0a418ff5c3442eE3F3b": {
+ "interestRateStrategy": {
+ "from": "0xfab05a6aF585da2F96e21452F91E812452996BD3",
+ "to": "0x04daBC3C1c052AB94AA2ca80140f2b978d2F6E17"
+ },
+ "reserveFactor": {
+ "from": 2000,
+ "to": 9500
+ }
+ }
+ },
+ "strategies": {
+ "0x04daBC3C1c052AB94AA2ca80140f2b978d2F6E17": {
+ "from": null,
+ "to": {
+ "baseStableBorrowRate": "50000000000000000000000000",
+ "baseVariableBorrowRate": 0,
+ "maxExcessStableToTotalDebtRatio": "800000000000000000000000000",
+ "maxExcessUsageRatio": "550000000000000000000000000",
+ "optimalStableToTotalDebtRatio": "200000000000000000000000000",
+ "optimalUsageRatio": "450000000000000000000000000",
+ "stableRateSlope1": "5000000000000000000000000",
+ "stableRateSlope2": "750000000000000000000000000",
+ "variableRateSlope1": "40000000000000000000000000",
+ "variableRateSlope2": "3000000000000000000000000000"
+ }
+ }
+ }
+}
+```
\ No newline at end of file
diff --git a/diffs/preTestOptimismUpdate20231024mai_postTestOptimismUpdate20231024mai.md b/diffs/preTestOptimismUpdate20231024mai_postTestOptimismUpdate20231024mai.md
new file mode 100644
index 00000000..1f6109bb
--- /dev/null
+++ b/diffs/preTestOptimismUpdate20231024mai_postTestOptimismUpdate20231024mai.md
@@ -0,0 +1,55 @@
+## Reserve changes
+
+### Reserves altered
+
+#### MAI ([0xdFA46478F9e5EA86d57387849598dbFB2e964b02](https://optimistic.etherscan.io/address/0xdFA46478F9e5EA86d57387849598dbFB2e964b02))
+
+| description | value before | value after |
+| --- | --- | --- |
+| liquidationThreshold | 80 % | 65 % |
+| reserveFactor | 20 % | 95 % |
+| interestRateStrategy | [0xD624AFA34614B4fe7FEe7e1751a2E5E04fb47398](https://optimistic.etherscan.io/address/0xD624AFA34614B4fe7FEe7e1751a2E5E04fb47398) | [0x6D6D3b7FC50999bf20dE5CC8e0F63AFD18B95f0e](https://optimistic.etherscan.io/address/0x6D6D3b7FC50999bf20dE5CC8e0F63AFD18B95f0e) |
+| optimalUsageRatio | 80 % | 45 % |
+| maxExcessUsageRatio | 20 % | 55 % |
+| variableRateSlope2 | 75 % | 300 % |
+| interestRate |  |  |
+
+## Raw diff
+
+```json
+{
+ "reserves": {
+ "0xdFA46478F9e5EA86d57387849598dbFB2e964b02": {
+ "interestRateStrategy": {
+ "from": "0xD624AFA34614B4fe7FEe7e1751a2E5E04fb47398",
+ "to": "0x6D6D3b7FC50999bf20dE5CC8e0F63AFD18B95f0e"
+ },
+ "liquidationThreshold": {
+ "from": 8000,
+ "to": 6500
+ },
+ "reserveFactor": {
+ "from": 2000,
+ "to": 9500
+ }
+ }
+ },
+ "strategies": {
+ "0x6D6D3b7FC50999bf20dE5CC8e0F63AFD18B95f0e": {
+ "from": null,
+ "to": {
+ "baseStableBorrowRate": "50000000000000000000000000",
+ "baseVariableBorrowRate": 0,
+ "maxExcessStableToTotalDebtRatio": "800000000000000000000000000",
+ "maxExcessUsageRatio": "550000000000000000000000000",
+ "optimalStableToTotalDebtRatio": "200000000000000000000000000",
+ "optimalUsageRatio": "450000000000000000000000000",
+ "stableRateSlope1": "40000000000000000000000000",
+ "stableRateSlope2": "750000000000000000000000000",
+ "variableRateSlope1": "40000000000000000000000000",
+ "variableRateSlope2": "3000000000000000000000000000"
+ }
+ }
+ }
+}
+```
\ No newline at end of file
diff --git a/diffs/preTestPolygonUpdate20231024mai_postTestPolygonUpdate20231024mai.md b/diffs/preTestPolygonUpdate20231024mai_postTestPolygonUpdate20231024mai.md
new file mode 100644
index 00000000..dfd3c7d9
--- /dev/null
+++ b/diffs/preTestPolygonUpdate20231024mai_postTestPolygonUpdate20231024mai.md
@@ -0,0 +1,50 @@
+## Reserve changes
+
+### Reserves altered
+
+#### miMATIC ([0xa3Fa99A148fA48D14Ed51d610c367C61876997F1](https://polygonscan.com/address/0xa3Fa99A148fA48D14Ed51d610c367C61876997F1))
+
+| description | value before | value after |
+| --- | --- | --- |
+| reserveFactor | 20 % | 95 % |
+| interestRateStrategy | [0xA9F3C3caE095527061e6d270DBE163693e6fda9D](https://polygonscan.com/address/0xA9F3C3caE095527061e6d270DBE163693e6fda9D) | [0xD87974E8ED49AB16d5053ba793F4e17078Be0426](https://polygonscan.com/address/0xD87974E8ED49AB16d5053ba793F4e17078Be0426) |
+| optimalUsageRatio | 80 % | 45 % |
+| maxExcessUsageRatio | 20 % | 55 % |
+| variableRateSlope2 | 75 % | 300 % |
+| interestRate |  |  |
+
+## Raw diff
+
+```json
+{
+ "reserves": {
+ "0xa3Fa99A148fA48D14Ed51d610c367C61876997F1": {
+ "interestRateStrategy": {
+ "from": "0xA9F3C3caE095527061e6d270DBE163693e6fda9D",
+ "to": "0xD87974E8ED49AB16d5053ba793F4e17078Be0426"
+ },
+ "reserveFactor": {
+ "from": 2000,
+ "to": 9500
+ }
+ }
+ },
+ "strategies": {
+ "0xD87974E8ED49AB16d5053ba793F4e17078Be0426": {
+ "from": null,
+ "to": {
+ "baseStableBorrowRate": "50000000000000000000000000",
+ "baseVariableBorrowRate": 0,
+ "maxExcessStableToTotalDebtRatio": "800000000000000000000000000",
+ "maxExcessUsageRatio": "550000000000000000000000000",
+ "optimalStableToTotalDebtRatio": "200000000000000000000000000",
+ "optimalUsageRatio": "450000000000000000000000000",
+ "stableRateSlope1": "5000000000000000000000000",
+ "stableRateSlope2": "750000000000000000000000000",
+ "variableRateSlope1": "40000000000000000000000000",
+ "variableRateSlope2": "3000000000000000000000000000"
+ }
+ }
+ }
+}
+```
\ No newline at end of file
diff --git a/src/AaveV3Update_20231024mai/AaveV3Arbitrum_20231024mai.sol b/src/AaveV3Update_20231024mai/AaveV3Arbitrum_20231024mai.sol
new file mode 100644
index 00000000..2e5e3776
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/AaveV3Arbitrum_20231024mai.sol
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import {IEngine, EngineFlags, Rates} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol';
+import {AaveV3PayloadArbitrum, AaveV3ArbitrumAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadArbitrum.sol';
+
+/**
+ * @title MAI/MIMATIC deprecation, 2023.10.23
+ * @author Gauntlet
+ * - Discussion: https://governance.aave.com/t/arfc-gauntlet-recommendation-for-mai-mimatic-deprecation/15119
+ */
+contract AaveV3ArbitrumUpdate20231024maiPayload is AaveV3PayloadArbitrum {
+ function collateralsUpdates() public pure override returns (IEngine.CollateralUpdate[] memory) {
+ IEngine.CollateralUpdate[] memory collateralUpdates = new IEngine.CollateralUpdate[](1);
+
+ collateralUpdates[0] = IEngine.CollateralUpdate({
+ asset: AaveV3ArbitrumAssets.MAI_UNDERLYING,
+ ltv: EngineFlags.KEEP_CURRENT,
+ liqThreshold: 0,
+ liqBonus: EngineFlags.KEEP_CURRENT,
+ debtCeiling: EngineFlags.KEEP_CURRENT,
+ liqProtocolFee: EngineFlags.KEEP_CURRENT,
+ eModeCategory: EngineFlags.KEEP_CURRENT
+ });
+
+ return collateralUpdates;
+ }
+
+ function borrowsUpdates() public pure override returns (IEngine.BorrowUpdate[] memory) {
+ IEngine.BorrowUpdate[] memory borrowUpdates = new IEngine.BorrowUpdate[](1);
+
+ borrowUpdates[0] = IEngine.BorrowUpdate({
+ asset: AaveV3ArbitrumAssets.MAI_UNDERLYING,
+ enabledToBorrow: EngineFlags.KEEP_CURRENT,
+ flashloanable: EngineFlags.KEEP_CURRENT,
+ stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
+ borrowableInIsolation: EngineFlags.KEEP_CURRENT,
+ withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
+ reserveFactor: 9500
+ });
+
+ return borrowUpdates;
+ }
+
+ function rateStrategiesUpdates()
+ public
+ pure
+ override
+ returns (IEngine.RateStrategyUpdate[] memory)
+ {
+ IEngine.RateStrategyUpdate[] memory rateStrategyUpdates = new IEngine.RateStrategyUpdate[](1);
+
+ Rates.RateStrategyParams memory paramsMAI_UNDERLYING = Rates.RateStrategyParams({
+ optimalUsageRatio: _bpsToRay(4500),
+ baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
+ variableRateSlope1: EngineFlags.KEEP_CURRENT,
+ variableRateSlope2: _bpsToRay(30000),
+ stableRateSlope1: EngineFlags.KEEP_CURRENT,
+ stableRateSlope2: EngineFlags.KEEP_CURRENT,
+ baseStableRateOffset: EngineFlags.KEEP_CURRENT,
+ stableRateExcessOffset: EngineFlags.KEEP_CURRENT,
+ optimalStableToTotalDebtRatio: EngineFlags.KEEP_CURRENT
+ });
+
+ rateStrategyUpdates[0] = IEngine.RateStrategyUpdate({
+ asset: AaveV3ArbitrumAssets.MAI_UNDERLYING,
+ params: paramsMAI_UNDERLYING
+ });
+
+ return rateStrategyUpdates;
+ }
+}
diff --git a/src/AaveV3Update_20231024mai/AaveV3Avalanche_20231024mai.sol b/src/AaveV3Update_20231024mai/AaveV3Avalanche_20231024mai.sol
new file mode 100644
index 00000000..15e8b77b
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/AaveV3Avalanche_20231024mai.sol
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import {IEngine, EngineFlags, Rates} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol';
+import {AaveV3PayloadAvalanche, AaveV3AvalancheAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadAvalanche.sol';
+
+/**
+ * @title MAI/MIMATIC deprecation, 2023.10.23
+ * @author Gauntlet
+ * - Discussion: https://governance.aave.com/t/arfc-gauntlet-recommendation-for-mai-mimatic-deprecation/15119
+ */
+contract AaveV3AvalancheUpdate20231024maiPayload is AaveV3PayloadAvalanche {
+ function collateralsUpdates() public pure override returns (IEngine.CollateralUpdate[] memory) {
+ IEngine.CollateralUpdate[] memory collateralUpdates = new IEngine.CollateralUpdate[](1);
+
+ collateralUpdates[0] = IEngine.CollateralUpdate({
+ asset: AaveV3AvalancheAssets.MAI_UNDERLYING,
+ ltv: EngineFlags.KEEP_CURRENT,
+ liqThreshold: 0,
+ liqBonus: EngineFlags.KEEP_CURRENT,
+ debtCeiling: EngineFlags.KEEP_CURRENT,
+ liqProtocolFee: EngineFlags.KEEP_CURRENT,
+ eModeCategory: EngineFlags.KEEP_CURRENT
+ });
+
+ return collateralUpdates;
+ }
+
+ function borrowsUpdates() public pure override returns (IEngine.BorrowUpdate[] memory) {
+ IEngine.BorrowUpdate[] memory borrowUpdates = new IEngine.BorrowUpdate[](1);
+
+ borrowUpdates[0] = IEngine.BorrowUpdate({
+ asset: AaveV3AvalancheAssets.MAI_UNDERLYING,
+ enabledToBorrow: EngineFlags.KEEP_CURRENT,
+ flashloanable: EngineFlags.KEEP_CURRENT,
+ stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
+ borrowableInIsolation: EngineFlags.KEEP_CURRENT,
+ withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
+ reserveFactor: 9500
+ });
+
+ return borrowUpdates;
+ }
+
+ function rateStrategiesUpdates()
+ public
+ pure
+ override
+ returns (IEngine.RateStrategyUpdate[] memory)
+ {
+ IEngine.RateStrategyUpdate[] memory rateStrategyUpdates = new IEngine.RateStrategyUpdate[](1);
+
+ Rates.RateStrategyParams memory paramsMAI_UNDERLYING = Rates.RateStrategyParams({
+ optimalUsageRatio: _bpsToRay(4500),
+ baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
+ variableRateSlope1: EngineFlags.KEEP_CURRENT,
+ variableRateSlope2: _bpsToRay(30000),
+ stableRateSlope1: EngineFlags.KEEP_CURRENT,
+ stableRateSlope2: EngineFlags.KEEP_CURRENT,
+ baseStableRateOffset: EngineFlags.KEEP_CURRENT,
+ stableRateExcessOffset: EngineFlags.KEEP_CURRENT,
+ optimalStableToTotalDebtRatio: EngineFlags.KEEP_CURRENT
+ });
+
+ rateStrategyUpdates[0] = IEngine.RateStrategyUpdate({
+ asset: AaveV3AvalancheAssets.MAI_UNDERLYING,
+ params: paramsMAI_UNDERLYING
+ });
+
+ return rateStrategyUpdates;
+ }
+}
diff --git a/src/AaveV3Update_20231024mai/AaveV3Optimism_20231024mai.sol b/src/AaveV3Update_20231024mai/AaveV3Optimism_20231024mai.sol
new file mode 100644
index 00000000..9d0c98aa
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/AaveV3Optimism_20231024mai.sol
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import {IEngine, EngineFlags, Rates} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol';
+import {AaveV3PayloadOptimism, AaveV3OptimismAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadOptimism.sol';
+
+/**
+ * @title MAI/MIMATIC deprecation, 2023.10.23
+ * @author Gauntlet
+ * - Discussion: https://governance.aave.com/t/arfc-gauntlet-recommendation-for-mai-mimatic-deprecation/15119
+ */
+contract AaveV3OptimismUpdate20231024maiPayload is AaveV3PayloadOptimism {
+ function collateralsUpdates() public pure override returns (IEngine.CollateralUpdate[] memory) {
+ IEngine.CollateralUpdate[] memory collateralUpdates = new IEngine.CollateralUpdate[](1);
+
+ collateralUpdates[0] = IEngine.CollateralUpdate({
+ asset: AaveV3OptimismAssets.MAI_UNDERLYING,
+ ltv: EngineFlags.KEEP_CURRENT,
+ liqThreshold: 6500,
+ liqBonus: EngineFlags.KEEP_CURRENT,
+ debtCeiling: EngineFlags.KEEP_CURRENT,
+ liqProtocolFee: EngineFlags.KEEP_CURRENT,
+ eModeCategory: EngineFlags.KEEP_CURRENT
+ });
+
+ return collateralUpdates;
+ }
+
+ function borrowsUpdates() public pure override returns (IEngine.BorrowUpdate[] memory) {
+ IEngine.BorrowUpdate[] memory borrowUpdates = new IEngine.BorrowUpdate[](1);
+
+ borrowUpdates[0] = IEngine.BorrowUpdate({
+ asset: AaveV3OptimismAssets.MAI_UNDERLYING,
+ enabledToBorrow: EngineFlags.KEEP_CURRENT,
+ flashloanable: EngineFlags.KEEP_CURRENT,
+ stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
+ borrowableInIsolation: EngineFlags.KEEP_CURRENT,
+ withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
+ reserveFactor: 9500
+ });
+
+ return borrowUpdates;
+ }
+
+ function rateStrategiesUpdates()
+ public
+ pure
+ override
+ returns (IEngine.RateStrategyUpdate[] memory)
+ {
+ IEngine.RateStrategyUpdate[] memory rateStrategyUpdates = new IEngine.RateStrategyUpdate[](1);
+
+ Rates.RateStrategyParams memory paramsMAI_UNDERLYING = Rates.RateStrategyParams({
+ optimalUsageRatio: _bpsToRay(4500),
+ baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
+ variableRateSlope1: EngineFlags.KEEP_CURRENT,
+ variableRateSlope2: _bpsToRay(30000),
+ stableRateSlope1: EngineFlags.KEEP_CURRENT,
+ stableRateSlope2: EngineFlags.KEEP_CURRENT,
+ baseStableRateOffset: EngineFlags.KEEP_CURRENT,
+ stableRateExcessOffset: EngineFlags.KEEP_CURRENT,
+ optimalStableToTotalDebtRatio: EngineFlags.KEEP_CURRENT
+ });
+
+ rateStrategyUpdates[0] = IEngine.RateStrategyUpdate({
+ asset: AaveV3OptimismAssets.MAI_UNDERLYING,
+ params: paramsMAI_UNDERLYING
+ });
+
+ return rateStrategyUpdates;
+ }
+}
diff --git a/src/AaveV3Update_20231024mai/AaveV3Polygon_20231024mai.sol b/src/AaveV3Update_20231024mai/AaveV3Polygon_20231024mai.sol
new file mode 100644
index 00000000..88455c58
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/AaveV3Polygon_20231024mai.sol
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import {IEngine, EngineFlags, Rates} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol';
+import {AaveV3PayloadPolygon, AaveV3PolygonAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.sol';
+
+/**
+ * @title MAI/MIMATIC deprecation, 2023.10.23
+ * @author Gauntlet
+ * - Discussion: https://governance.aave.com/t/arfc-gauntlet-recommendation-for-mai-mimatic-deprecation/15119
+ */
+contract AaveV3PolygonUpdate20231024maiPayload is AaveV3PayloadPolygon {
+ function collateralsUpdates() public pure override returns (IEngine.CollateralUpdate[] memory) {
+ IEngine.CollateralUpdate[] memory collateralUpdates = new IEngine.CollateralUpdate[](1);
+
+ collateralUpdates[0] = IEngine.CollateralUpdate({
+ asset: AaveV3PolygonAssets.miMATIC_UNDERLYING,
+ ltv: EngineFlags.KEEP_CURRENT,
+ liqThreshold: 0,
+ liqBonus: EngineFlags.KEEP_CURRENT,
+ debtCeiling: EngineFlags.KEEP_CURRENT,
+ liqProtocolFee: EngineFlags.KEEP_CURRENT,
+ eModeCategory: EngineFlags.KEEP_CURRENT
+ });
+
+ return collateralUpdates;
+ }
+
+ function borrowsUpdates() public pure override returns (IEngine.BorrowUpdate[] memory) {
+ IEngine.BorrowUpdate[] memory borrowUpdates = new IEngine.BorrowUpdate[](1);
+
+ borrowUpdates[0] = IEngine.BorrowUpdate({
+ asset: AaveV3PolygonAssets.miMATIC_UNDERLYING,
+ enabledToBorrow: EngineFlags.KEEP_CURRENT,
+ flashloanable: EngineFlags.KEEP_CURRENT,
+ stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
+ borrowableInIsolation: EngineFlags.KEEP_CURRENT,
+ withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
+ reserveFactor: 9500
+ });
+
+ return borrowUpdates;
+ }
+
+ function rateStrategiesUpdates()
+ public
+ pure
+ override
+ returns (IEngine.RateStrategyUpdate[] memory)
+ {
+ IEngine.RateStrategyUpdate[] memory rateStrategyUpdates = new IEngine.RateStrategyUpdate[](1);
+
+ Rates.RateStrategyParams memory paramsmiMATIC_UNDERLYING = Rates.RateStrategyParams({
+ optimalUsageRatio: _bpsToRay(4500),
+ baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
+ variableRateSlope1: EngineFlags.KEEP_CURRENT,
+ variableRateSlope2: _bpsToRay(30000),
+ stableRateSlope1: EngineFlags.KEEP_CURRENT,
+ stableRateSlope2: EngineFlags.KEEP_CURRENT,
+ baseStableRateOffset: EngineFlags.KEEP_CURRENT,
+ stableRateExcessOffset: EngineFlags.KEEP_CURRENT,
+ optimalStableToTotalDebtRatio: EngineFlags.KEEP_CURRENT
+ });
+
+ rateStrategyUpdates[0] = IEngine.RateStrategyUpdate({
+ asset: AaveV3PolygonAssets.miMATIC_UNDERLYING,
+ params: paramsmiMATIC_UNDERLYING
+ });
+
+ return rateStrategyUpdates;
+ }
+}
diff --git a/src/AaveV3Update_20231024mai/AaveV3Update_20231024mai.md b/src/AaveV3Update_20231024mai/AaveV3Update_20231024mai.md
new file mode 100644
index 00000000..170f6419
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/AaveV3Update_20231024mai.md
@@ -0,0 +1,59 @@
+---
+title: Gauntlet Recommendation for MAI/MIMATIC deprecation, 2023.10.23
+author: Gauntlet
+discussions: https://governance.aave.com/t/arfc-gauntlet-recommendation-for-mai-mimatic-deprecation/15119
+---
+
+## Summary
+
+Given MAI/MIMATIC price drop to ~$0.72 and its inability to regain peg for the past few months, Gauntlet recommends to begin deprecation of MAI/MIMATIC. We aim to do so by reducing LT and increasing borrow rates to incentivize repayment.
+
+## Specification
+
+#### LT reductions
+
+| Chain | Asset | Current LT | Recommended LT |
+| ------------ | ----------- | ---------- | -------------- |
+| avalanche v3 | MAI/MIMATIC | 0.8 | 0 |
+| arbitrum v3 | MAI/MIMATIC | 0.8 | 0 |
+| polygon v3 | MAI/MIMATIC | 0.8 | 0 |
+| optimism v3 | MAI/MIMATIC | 0.8 | 0.65 |
+
+#### IR recommendations
+
+Adjust Uopt to 0.45, Slope 2 to 300%, RF to 95%
+
+| Chain | Asset | Current Uopt | Current Slope2 | Current RF | Recommended Uopt | Recommended Slope2 | Recommended RF |
+| ------------ | ------- | ------------ | -------------- | ---------- | ---------------- | ------------------ | -------------- |
+| arbitrum v3 | MAI | 0.8 | 0.75 | 0.2 | 0.45 | 3 | 0.95 |
+| avalanche v3 | MAI | 0.8 | 0.75 | 0.2 | 0.45 | 3 | 0.95 |
+| optimism v3 | MAI | 0.8 | 0.75 | 0.2 | 0.45 | 3 | 0.95 |
+| polygon v3 | miMATIC | 0.8 | 0.75 | 0.2 | 0.45 | 3 | 0.95 |
+
+## Implementation
+
+The proposal implements changes using the following payloads:
+
+- [Arbitrum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV3Update_20231024mai/AaveV3Arbitrum_20231024mai.sol)
+- [Optimism](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV3Update_20231024mai/AaveV3Optimism_20231024mai.sol)
+- [Polygon](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV3Update_20231024mai/AaveV3Polygon_20231024mai.sol)
+
+The changes on avalanche can be implemented using the following steward:
+
+- [Avalanche](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV3Update_20231024mai/AaveV3Avalanche_20231024mai.sol)
+
+## References
+
+- **Discussion**: https://governance.aave.com/t/arfc-gauntlet-recommendation-for-mai-mimatic-deprecation/15119
+
+## Disclaimer
+
+Gauntlet has not received any compensation from any third-party in exchange for recommending any of the actions contained in this proposal.
+
+By approving this proposal, you agree that any services provided by Gauntlet shall be governed by the terms of service available at gauntlet.network/tos.
+
+## Copyright
+
+Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
+
+_By approving this proposal, you agree that any services provided by Gauntlet shall be governed by the terms of service available at gauntlet.network/tos._
diff --git a/src/AaveV3Update_20231024mai/AaveV3Update_20231024mai_Test.t.sol b/src/AaveV3Update_20231024mai/AaveV3Update_20231024mai_Test.t.sol
new file mode 100644
index 00000000..05a11df3
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/AaveV3Update_20231024mai_Test.t.sol
@@ -0,0 +1,207 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import 'forge-std/Test.sol';
+import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol';
+import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
+import {GovHelpers} from 'aave-helpers/GovHelpers.sol';
+import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadArbitrum.sol';
+import {AaveV3Optimism, AaveV3OptimismAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadOptimism.sol';
+import {AaveV3Polygon, AaveV3PolygonAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.sol';
+import {AaveV3Avalanche, AaveV3AvalancheAssets} from 'aave-helpers/v3-config-engine/AaveV3PayloadAvalanche.sol';
+import {AaveV3ArbitrumUpdate20231024maiPayload} from './AaveV3Arbitrum_20231024mai.sol';
+import {AaveV3OptimismUpdate20231024maiPayload} from './AaveV3Optimism_20231024mai.sol';
+import {AaveV3PolygonUpdate20231024maiPayload} from './AaveV3Polygon_20231024mai.sol';
+import {AaveV3AvalancheUpdate20231024maiPayload} from './AaveV3Avalanche_20231024mai.sol';
+
+contract AaveV3ArbitrumUpdate_20231024mai_Test is ProtocolV3TestBase {
+ function setUp() public {
+ vm.createSelectFork(vm.rpcUrl('arbitrum'), 144607981);
+ }
+
+ function testArbitrum20231024maiUpdatePayload() public {
+ ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
+ 'preTestArbitrumUpdate20231024mai',
+ AaveV3Arbitrum.POOL
+ );
+
+ ReserveConfig memory MAI_UNDERLYINGBefore = _findReserveConfig(
+ allConfigsBefore,
+ AaveV3ArbitrumAssets.MAI_UNDERLYING
+ );
+
+ GovHelpers.executePayload(
+ vm,
+ address(new AaveV3ArbitrumUpdate20231024maiPayload()),
+ AaveGovernanceV2.ARBITRUM_BRIDGE_EXECUTOR
+ );
+
+ ReserveConfig[] memory allConfigsAfter = createConfigurationSnapshot(
+ 'postTestArbitrumUpdate20231024mai',
+ AaveV3Arbitrum.POOL
+ );
+
+ diffReports('preTestArbitrumUpdate20231024mai', 'postTestArbitrumUpdate20231024mai');
+
+ address[] memory assetsChanged = new address[](1);
+ assetsChanged[0] = AaveV3ArbitrumAssets.MAI_UNDERLYING;
+
+ _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged);
+
+ {
+ ReserveConfig memory MAI_UNDERLYINGAfter = _findReserveConfig(
+ allConfigsAfter,
+ AaveV3ArbitrumAssets.MAI_UNDERLYING
+ );
+ MAI_UNDERLYINGBefore.liquidationThreshold = 0;
+ MAI_UNDERLYINGBefore.reserveFactor = 9500;
+ MAI_UNDERLYINGBefore.interestRateStrategy = MAI_UNDERLYINGAfter.interestRateStrategy;
+ _validateReserveConfig(MAI_UNDERLYINGBefore, allConfigsAfter);
+ }
+ e2eTest(AaveV3Arbitrum.POOL);
+ }
+}
+
+contract AaveV3OptimismUpdate_20231024mai_Test is ProtocolV3TestBase {
+ function setUp() public {
+ vm.createSelectFork(vm.rpcUrl('optimism'), 111419500);
+ }
+
+ function testOptimism20231024maiUpdatePayload() public {
+ ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
+ 'preTestOptimismUpdate20231024mai',
+ AaveV3Optimism.POOL
+ );
+
+ ReserveConfig memory MAI_UNDERLYINGBefore = _findReserveConfig(
+ allConfigsBefore,
+ AaveV3OptimismAssets.MAI_UNDERLYING
+ );
+
+ GovHelpers.executePayload(
+ vm,
+ address(new AaveV3OptimismUpdate20231024maiPayload()),
+ AaveGovernanceV2.OPTIMISM_BRIDGE_EXECUTOR
+ );
+
+ ReserveConfig[] memory allConfigsAfter = createConfigurationSnapshot(
+ 'postTestOptimismUpdate20231024mai',
+ AaveV3Optimism.POOL
+ );
+
+ diffReports('preTestOptimismUpdate20231024mai', 'postTestOptimismUpdate20231024mai');
+
+ address[] memory assetsChanged = new address[](1);
+ assetsChanged[0] = AaveV3OptimismAssets.MAI_UNDERLYING;
+
+ _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged);
+
+ {
+ ReserveConfig memory MAI_UNDERLYINGAfter = _findReserveConfig(
+ allConfigsAfter,
+ AaveV3OptimismAssets.MAI_UNDERLYING
+ );
+ MAI_UNDERLYINGBefore.liquidationThreshold = 6500;
+ MAI_UNDERLYINGBefore.reserveFactor = 9500;
+ MAI_UNDERLYINGBefore.interestRateStrategy = MAI_UNDERLYINGAfter.interestRateStrategy;
+ _validateReserveConfig(MAI_UNDERLYINGBefore, allConfigsAfter);
+ }
+ e2eTest(AaveV3Optimism.POOL);
+ }
+}
+
+contract AaveV3PolygonUpdate_20231024mai_Test is ProtocolV3TestBase {
+ function setUp() public {
+ vm.createSelectFork(vm.rpcUrl('polygon'), 49227175);
+ }
+
+ function testPolygon20231024maiUpdatePayload() public {
+ ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
+ 'preTestPolygonUpdate20231024mai',
+ AaveV3Polygon.POOL
+ );
+
+ ReserveConfig memory miMATIC_UNDERLYINGBefore = _findReserveConfig(
+ allConfigsBefore,
+ AaveV3PolygonAssets.miMATIC_UNDERLYING
+ );
+
+ GovHelpers.executePayload(
+ vm,
+ address(new AaveV3PolygonUpdate20231024maiPayload()),
+ AaveGovernanceV2.POLYGON_BRIDGE_EXECUTOR
+ );
+
+ ReserveConfig[] memory allConfigsAfter = createConfigurationSnapshot(
+ 'postTestPolygonUpdate20231024mai',
+ AaveV3Polygon.POOL
+ );
+
+ diffReports('preTestPolygonUpdate20231024mai', 'postTestPolygonUpdate20231024mai');
+
+ address[] memory assetsChanged = new address[](1);
+ assetsChanged[0] = AaveV3PolygonAssets.miMATIC_UNDERLYING;
+
+ _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged);
+
+ {
+ ReserveConfig memory miMATIC_UNDERLYINGAfter = _findReserveConfig(
+ allConfigsAfter,
+ AaveV3PolygonAssets.miMATIC_UNDERLYING
+ );
+ miMATIC_UNDERLYINGBefore.liquidationThreshold = 0;
+ miMATIC_UNDERLYINGBefore.reserveFactor = 9500;
+ miMATIC_UNDERLYINGBefore.interestRateStrategy = miMATIC_UNDERLYINGAfter.interestRateStrategy;
+ _validateReserveConfig(miMATIC_UNDERLYINGBefore, allConfigsAfter);
+ }
+ e2eTest(AaveV3Polygon.POOL);
+ }
+}
+
+contract AaveV3AvalancheUpdate_20231024mai_Test is ProtocolV3TestBase {
+ function setUp() public {
+ vm.createSelectFork(vm.rpcUrl('avalanche'), 37000776);
+ }
+
+ function testAvalanche20231024maiUpdatePayload() public {
+ ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
+ 'preTestAvalancheUpdate20231024mai',
+ AaveV3Avalanche.POOL
+ );
+
+ ReserveConfig memory MAI_UNDERLYINGBefore = _findReserveConfig(
+ allConfigsBefore,
+ AaveV3AvalancheAssets.MAI_UNDERLYING
+ );
+
+ GovHelpers.executePayload(
+ vm,
+ address(new AaveV3AvalancheUpdate20231024maiPayload()),
+ 0xa35b76E4935449E33C56aB24b23fcd3246f13470
+ );
+
+ ReserveConfig[] memory allConfigsAfter = createConfigurationSnapshot(
+ 'postTestAvalancheUpdate20231024mai',
+ AaveV3Avalanche.POOL
+ );
+
+ diffReports('preTestAvalancheUpdate20231024mai', 'postTestAvalancheUpdate20231024mai');
+
+ address[] memory assetsChanged = new address[](1);
+ assetsChanged[0] = AaveV3AvalancheAssets.MAI_UNDERLYING;
+
+ _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged);
+
+ {
+ ReserveConfig memory MAI_UNDERLYINGAfter = _findReserveConfig(
+ allConfigsAfter,
+ AaveV3AvalancheAssets.MAI_UNDERLYING
+ );
+ MAI_UNDERLYINGBefore.liquidationThreshold = 0;
+ MAI_UNDERLYINGBefore.reserveFactor = 9500;
+ MAI_UNDERLYINGBefore.interestRateStrategy = MAI_UNDERLYINGAfter.interestRateStrategy;
+ _validateReserveConfig(MAI_UNDERLYINGBefore, allConfigsAfter);
+ }
+ e2eTest(AaveV3Avalanche.POOL);
+ }
+}
diff --git a/src/AaveV3Update_20231024mai/DeployAaveV3Update_20231024mai.s.sol b/src/AaveV3Update_20231024mai/DeployAaveV3Update_20231024mai.s.sol
new file mode 100644
index 00000000..c69d85e0
--- /dev/null
+++ b/src/AaveV3Update_20231024mai/DeployAaveV3Update_20231024mai.s.sol
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import {GovHelpers} from 'aave-helpers/GovHelpers.sol';
+import {EthereumScript, ArbitrumScript, OptimismScript, PolygonScript, AvalancheScript} from 'aave-helpers/ScriptUtils.sol';
+import {AaveV3ArbitrumUpdate20231024maiPayload} from './AaveV3Arbitrum_20231024mai.sol';
+import {AaveV3OptimismUpdate20231024maiPayload} from './AaveV3Optimism_20231024mai.sol';
+import {AaveV3PolygonUpdate20231024maiPayload} from './AaveV3Polygon_20231024mai.sol';
+import {AaveV3AvalancheUpdate20231024maiPayload} from './AaveV3Avalanche_20231024mai.sol';
+
+contract CreateProposal is EthereumScript {
+ function run() external broadcast {
+ GovHelpers.Payload[] memory payloads = new GovHelpers.Payload[](3);
+ payloads[0] = GovHelpers.buildArbitrum(address(0));
+ payloads[1] = GovHelpers.buildOptimism(address(0));
+ payloads[2] = GovHelpers.buildPolygon(address(0));
+ GovHelpers.createProposal(
+ payloads,
+ GovHelpers.ipfsHashFile(vm, 'src/AaveV3Update_20231024mai/AaveV3Update_20231024mai.md')
+ );
+ }
+}
+
+contract Deploy20231024maiPayloadArbitrum is ArbitrumScript {
+ function run() external broadcast {
+ new AaveV3ArbitrumUpdate20231024maiPayload();
+ }
+}
+
+contract Deploy20231024maiPayloadOptimism is OptimismScript {
+ function run() external broadcast {
+ new AaveV3OptimismUpdate20231024maiPayload();
+ }
+}
+
+contract Deploy20231024maiPayloadPolygon is PolygonScript {
+ function run() external broadcast {
+ new AaveV3PolygonUpdate20231024maiPayload();
+ }
+}
+
+contract Deploy20231024maiPayloadAvalanche is AvalancheScript {
+ function run() external broadcast {
+ new AaveV3AvalancheUpdate20231024maiPayload();
+ }
+}