From 17f32f018e6b5d8cba81e1c37485e7636c25be86 Mon Sep 17 00:00:00 2001 From: Ian Flexa <85500650+ianflexa@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:54:21 -0400 Subject: [PATCH] fix: chaos renew correct asset (#492) * fix: correct asset * fix: commit hash --- ...aveRiskManagementServiceRenewal_20241012.sol | 4 ++-- ...eRiskManagementServiceRenewal_20241012.t.sol | 17 +++++++---------- ...ChaosLabsAaveRiskManagementServiceRenewal.md | 4 ++-- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.sol b/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.sol index 8efa8ddcd..4b1602da6 100644 --- a/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.sol +++ b/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.sol @@ -32,9 +32,9 @@ contract AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012 is CollectorUtils.stream( AaveV3Ethereum.COLLECTOR, CollectorUtils.CreateStreamInput({ - underlying: AaveV3EthereumAssets.USDC_A_TOKEN, + underlying: AaveV3EthereumAssets.USDT_A_TOKEN, receiver: CHAOS_LABS_RECEIVER, - amount: 1_000_000 * 10 ** IERC20Metadata(AaveV3EthereumAssets.USDC_A_TOKEN).decimals(), + amount: 1_000_000 * 10 ** IERC20Metadata(AaveV3EthereumAssets.USDT_A_TOKEN).decimals(), start: 1731405180, duration: 365 days }) diff --git a/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.t.sol b/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.t.sol index 99aef7479..16bb7563e 100644 --- a/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.t.sol +++ b/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.t.sol @@ -23,15 +23,12 @@ contract AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012_Test proposal = new AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012(); } - /** - * @dev executes the generic test suite including e2e and config snapshots - */ function test_defaultProposalExecution() public { address receiverAddress = proposal.CHAOS_LABS_RECEIVER(); uint256 ghoBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf( receiverAddress ); - uint256 aUsdcBalanceBefore = IERC20(AaveV3EthereumAssets.USDC_A_TOKEN).balanceOf( + uint256 aUsdtBalanceBefore = IERC20(AaveV3EthereumAssets.USDT_A_TOKEN).balanceOf( receiverAddress ); @@ -52,8 +49,8 @@ contract AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012_Test AaveV3Ethereum.COLLECTOR.withdrawFromStream(nextStreamId + 1, 1); assertEq( - IERC20(AaveV3EthereumAssets.USDC_A_TOKEN).balanceOf(receiverAddress), - aUsdcBalanceBefore + 1 + IERC20(AaveV3EthereumAssets.USDT_A_TOKEN).balanceOf(receiverAddress), + aUsdtBalanceBefore + 1 ); vm.warp(block.timestamp + 400 days); // November 13 2025 is in a long time @@ -75,11 +72,11 @@ contract AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012_Test AaveV3Ethereum.COLLECTOR.balanceOf(nextStreamId + 1, receiverAddress) ); assertApproxEqAbs( - IERC20(AaveV3EthereumAssets.USDC_A_TOKEN).balanceOf(receiverAddress), - aUsdcBalanceBefore + + IERC20(AaveV3EthereumAssets.USDT_A_TOKEN).balanceOf(receiverAddress), + aUsdtBalanceBefore + 1_000_000 * - 10 ** IERC20Metadata(AaveV3EthereumAssets.USDC_A_TOKEN).decimals(), - 25 * 10 ** IERC20Metadata(AaveV3EthereumAssets.USDC_A_TOKEN).decimals() //due to rounding and low decimals error is of ~25 $ + 10 ** IERC20Metadata(AaveV3EthereumAssets.USDT_A_TOKEN).decimals(), + 25 * 10 ** IERC20Metadata(AaveV3EthereumAssets.USDT_A_TOKEN).decimals() //due to rounding and low decimals error is of ~25 $ ); } } diff --git a/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/ChaosLabsAaveRiskManagementServiceRenewal.md b/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/ChaosLabsAaveRiskManagementServiceRenewal.md index 31c7b0ba3..296db17fc 100644 --- a/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/ChaosLabsAaveRiskManagementServiceRenewal.md +++ b/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/ChaosLabsAaveRiskManagementServiceRenewal.md @@ -143,8 +143,8 @@ Regarding technical implementation, the AIP will call the `createStream()` metho ## References -- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/1a4ae0ce293c667c62786d69813688813e9801fc/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.sol) -- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/1a4ae0ce293c667c62786d69813688813e9801fc/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.t.sol) +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241012_AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal/AaveV3Ethereum_ChaosLabsAaveRiskManagementServiceRenewal_20241012.t.sol) - [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xa8ec5cf2568691144861b38af1b2cef4f95d33d0912fea28438132cabf4b6c28) - [Discussion](https://governance.aave.com/t/arfc-chaos-labs-aave-risk-management-service-renewal/19306)