Skip to content

Commit

Permalink
Add AIP for V4 AL Service Provider Proposal (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyenneAtapour authored Jun 26, 2024
1 parent ee5f182 commit e8167f7
Show file tree
Hide file tree
Showing 6 changed files with 543 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

/**
* @title V4 AL Service Provider Proposal
* @author Aave Labs
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x70dfd865b78c4c391e2b0729b907d152e6e8a0da683416d617d8f84782036349
* - Discussion: https://governance.aave.com/t/arfc-al-service-provider-proposal/17974
*/
contract AaveV3Ethereum_V4ALServiceProviderProposal_20240614 is IProposalGenericExecutor {
address public constant AAVE_LABS = 0x1c037b3C22240048807cC9d7111be5d455F640bd;

// 3 million GHO upfront
uint256 public constant GHO_UPFRONT_AMOUNT = 3_000_000 ether;

// 9 million GHO streamed over the year
uint256 public constant GHO_STREAM_AMOUNT = 9_000_000 ether;
uint256 public constant GHO_STREAM_DURATION = 365 days;

uint256 public constant ACTUAL_STREAM =
(GHO_STREAM_AMOUNT / GHO_STREAM_DURATION) * GHO_STREAM_DURATION;

function execute() external {
AaveV3Ethereum.COLLECTOR.createStream(
AAVE_LABS,
ACTUAL_STREAM,
AaveV3EthereumAssets.GHO_UNDERLYING,
block.timestamp,
block.timestamp + GHO_STREAM_DURATION
);

AaveV3Ethereum.COLLECTOR.transfer(
AaveV3EthereumAssets.GHO_UNDERLYING,
AAVE_LABS,
GHO_UPFRONT_AMOUNT
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,311 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

import 'forge-std/Test.sol';
import 'forge-std/StdUtils.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_V4ALServiceProviderProposal_20240614} from './AaveV3Ethereum_V4ALServiceProviderProposal_20240614.sol';
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol';

/**
* @dev Test for AaveV3Ethereum_V4ALServiceProviderProposal_20240614
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20240614_AaveV3Ethereum_V4ALServiceProviderProposal/AaveV3Ethereum_V4ALServiceProviderProposal_20240614.t.sol -vv
*/
contract AaveV3Ethereum_V4ALServiceProviderProposal_20240614_Test is ProtocolV3TestBase {
AaveV3Ethereum_V4ALServiceProviderProposal_20240614 internal proposal;

address public constant AAVE_LABS = 0x1c037b3C22240048807cC9d7111be5d455F640bd;
uint256 public constant GHO_UPFRONT_AMOUNT = 3_000_000 ether;
uint256 public constant GHO_STREAM_AMOUNT = 9_000_000 ether;
uint256 public constant GHO_STREAM_DURATION = 365 days;
uint256 public constant ACTUAL_STREAM_AMOUNT_GHO =
(GHO_STREAM_AMOUNT / GHO_STREAM_DURATION) * GHO_STREAM_DURATION;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 20092863);
proposal = new AaveV3Ethereum_V4ALServiceProviderProposal_20240614();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_V4ALServiceProviderProposal_20240614',
AaveV3Ethereum.POOL,
address(proposal)
);
}

function testProposalExecution() public {
uint256 nextCollectorStreamID = AaveV3Ethereum.COLLECTOR.getNextStreamId();
uint256 ALGHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);
uint256 CollectorV3GHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

executePayload(vm, address(proposal));

// Check balances directly after proposal execution (upfront payment distributed to Aave Labs)
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS),
ALGHOBalanceBefore + GHO_UPFRONT_AMOUNT
);
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
CollectorV3GHOBalanceBefore - GHO_UPFRONT_AMOUNT
);

// Checking if the streams have been created properly
// Scoping to avoid "stack too deep" error
{
(
address senderGHO,
address recipientGHO,
uint256 depositGHO,
address tokenAddressGHO,
uint256 startTimeGHO,
uint256 stopTimeGHO,
uint256 remainingBalanceGHO,

) = AaveV3Ethereum.COLLECTOR.getStream(nextCollectorStreamID);

assertEq(senderGHO, address(AaveV3Ethereum.COLLECTOR));
assertEq(recipientGHO, AAVE_LABS);
assertEq(depositGHO, ACTUAL_STREAM_AMOUNT_GHO);
assertEq(tokenAddressGHO, AaveV3EthereumAssets.GHO_UNDERLYING);
assertEq(stopTimeGHO - startTimeGHO, GHO_STREAM_DURATION);
assertEq(remainingBalanceGHO, ACTUAL_STREAM_AMOUNT_GHO);
}

// Checking if Aave Labs can withdraw from the stream
vm.startPrank(AAVE_LABS);
vm.warp(block.timestamp + GHO_STREAM_DURATION);

// Currently Collector has less funds than stream amount
assertLe(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
ACTUAL_STREAM_AMOUNT_GHO
);

// Partial withdrawal of Collector's remaining balance
AaveV3Ethereum.COLLECTOR.withdrawFromStream(
nextCollectorStreamID,
CollectorV3GHOBalanceBefore - GHO_UPFRONT_AMOUNT
);
uint256 nextALGHOBalance = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);

// Aave Labs received the entirety of Collector's balance
assertEq(ALGHOBalanceBefore, nextALGHOBalance - CollectorV3GHOBalanceBefore);

// Check Collector balance after stream withdrawal
uint256 CollectorV3GHOBalanceAfter = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

assertEq(CollectorV3GHOBalanceAfter, 0);

vm.stopPrank();
}

// Test giving V2 Collector more funds and full withdrawing
function testProposalExecutionPrankFunds() public {
uint256 nextCollectorStreamID = AaveV3Ethereum.COLLECTOR.getNextStreamId();
uint256 ALGHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);

// Giving the Collector enough funds to cover the stream
deal(
AaveV3EthereumAssets.GHO_UNDERLYING,
address(AaveV3Ethereum.COLLECTOR),
GHO_UPFRONT_AMOUNT + GHO_STREAM_AMOUNT
);

uint256 CollectorV3GHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

executePayload(vm, address(proposal));

// Check balances directly after proposal execution (upfront payment distributed to Aave Labs)
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS),
ALGHOBalanceBefore + GHO_UPFRONT_AMOUNT
);
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
CollectorV3GHOBalanceBefore - GHO_UPFRONT_AMOUNT
);

// Checking if the streams have been created properly
// Scoping to avoid "stack too deep" error
{
(
address senderGHO,
address recipientGHO,
uint256 depositGHO,
address tokenAddressGHO,
uint256 startTimeGHO,
uint256 stopTimeGHO,
uint256 remainingBalanceGHO,

) = AaveV3Ethereum.COLLECTOR.getStream(nextCollectorStreamID);

assertEq(senderGHO, address(AaveV3Ethereum.COLLECTOR));
assertEq(recipientGHO, AAVE_LABS);
assertEq(depositGHO, ACTUAL_STREAM_AMOUNT_GHO);
assertEq(tokenAddressGHO, AaveV3EthereumAssets.GHO_UNDERLYING);
assertEq(stopTimeGHO - startTimeGHO, GHO_STREAM_DURATION);
assertEq(remainingBalanceGHO, ACTUAL_STREAM_AMOUNT_GHO);
}

// Checking if Aave Labs can withdraw from the stream
vm.startPrank(AAVE_LABS);
vm.warp(block.timestamp + GHO_STREAM_DURATION);

assertGe(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
ACTUAL_STREAM_AMOUNT_GHO
);

AaveV3Ethereum.COLLECTOR.withdrawFromStream(nextCollectorStreamID, ACTUAL_STREAM_AMOUNT_GHO);
uint256 nextALGHOBalance = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);

assertEq(
ALGHOBalanceBefore,
nextALGHOBalance - (ACTUAL_STREAM_AMOUNT_GHO + GHO_UPFRONT_AMOUNT)
);

// Check Collector balance after stream withdrawal
uint256 CollectorV3GHOBalanceAfter = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

assertEq(
CollectorV3GHOBalanceAfter,
CollectorV3GHOBalanceBefore - (ACTUAL_STREAM_AMOUNT_GHO + GHO_UPFRONT_AMOUNT)
);

vm.stopPrank();
}

// Test showing V2 Collector currently doesn't have enough funds
function testProposalExecutionFailureFunding() public {
uint256 nextCollectorStreamID = AaveV3Ethereum.COLLECTOR.getNextStreamId();
uint256 ALGHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);

uint256 CollectorV3GHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

executePayload(vm, address(proposal));

// Check balances directly after proposal execution (upfront payment distributed to Aave Labs)
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS),
ALGHOBalanceBefore + GHO_UPFRONT_AMOUNT
);
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
CollectorV3GHOBalanceBefore - GHO_UPFRONT_AMOUNT
);

// Checking if the streams have been created properly
// Scoping to avoid "stack too deep" error
{
(
address senderGHO,
address recipientGHO,
uint256 depositGHO,
address tokenAddressGHO,
uint256 startTimeGHO,
uint256 stopTimeGHO,
uint256 remainingBalanceGHO,

) = AaveV3Ethereum.COLLECTOR.getStream(nextCollectorStreamID);

assertEq(senderGHO, address(AaveV3Ethereum.COLLECTOR));
assertEq(recipientGHO, AAVE_LABS);
assertEq(depositGHO, ACTUAL_STREAM_AMOUNT_GHO);
assertEq(tokenAddressGHO, AaveV3EthereumAssets.GHO_UNDERLYING);
assertEq(stopTimeGHO - startTimeGHO, GHO_STREAM_DURATION);
assertEq(remainingBalanceGHO, ACTUAL_STREAM_AMOUNT_GHO);
}

// Checking if Aave Labs can withdraw from the stream
vm.startPrank(AAVE_LABS);
vm.warp(block.timestamp + GHO_STREAM_DURATION);

assertLe(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
ACTUAL_STREAM_AMOUNT_GHO
);

vm.expectRevert(stdError.arithmeticError);
AaveV3Ethereum.COLLECTOR.withdrawFromStream(nextCollectorStreamID, ACTUAL_STREAM_AMOUNT_GHO);

vm.stopPrank();
}

function testProposalExecutionFuzzWithdrawalAmounts(
uint256 withdrawalAmount,
uint256 waitPeriod
) public {
waitPeriod = bound(waitPeriod, 1, GHO_STREAM_DURATION);
withdrawalAmount = bound(
withdrawalAmount,
1,
waitPeriod * (ACTUAL_STREAM_AMOUNT_GHO / GHO_STREAM_DURATION)
);

// Giving the Collector enough funds to cover the stream
deal(
AaveV3EthereumAssets.GHO_UNDERLYING,
address(AaveV3Ethereum.COLLECTOR),
GHO_UPFRONT_AMOUNT + GHO_STREAM_AMOUNT
);

assertGe(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
ACTUAL_STREAM_AMOUNT_GHO
);

uint256 ALGHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);
uint256 CollectorV3GHOBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

uint256 nextCollectorStreamID = AaveV3Ethereum.COLLECTOR.getNextStreamId();
executePayload(vm, address(proposal));

// Check balances directly after proposal execution (upfront payment distributed to Aave Labs)
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS),
ALGHOBalanceBefore + GHO_UPFRONT_AMOUNT
);
assertEq(
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)),
CollectorV3GHOBalanceBefore - GHO_UPFRONT_AMOUNT
);

vm.startPrank(AAVE_LABS);
vm.warp(block.timestamp + waitPeriod);

// Withdraw fuzzed amount from stream
AaveV3Ethereum.COLLECTOR.withdrawFromStream(nextCollectorStreamID, withdrawalAmount);

uint256 ALGHOBalanceAfter = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(AAVE_LABS);
uint256 CollectorV3GHOBalanceAfter = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(
address(AaveV3Ethereum.COLLECTOR)
);

assertEq(ALGHOBalanceAfter - ALGHOBalanceBefore, withdrawalAmount + GHO_UPFRONT_AMOUNT);
assertEq(
CollectorV3GHOBalanceAfter,
CollectorV3GHOBalanceBefore - (withdrawalAmount + GHO_UPFRONT_AMOUNT)
);

vm.stopPrank();
}
}
Loading

1 comment on commit e8167f7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foundry report

forge 0.2.0 (7bef9ca 2024-06-26T00:18:22.002685333Z)
Build log
Compiling 415 files with Solc 0.8.19
Solc 0.8.19 finished in 215.28s
Compiler run successful with warnings:
Warning (3628): This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
  --> src/20240502_AaveV1Ethereum_AaveV1Deprecation/AaveV1Ethereum_AaveV1Deprecation_20240502.t.sol:94:1:
   |
94 | contract AaveV1Ethereum_AaveV1Deprecation_20240502_Test is ProtocolV3TestBase {
   | ^ (Relevant source part starts here and spans across multiple lines).
Note: The payable fallback function is defined here.
   --> src/20240502_AaveV1Ethereum_AaveV1Deprecation/AaveV1Ethereum_AaveV1Deprecation_20240502.t.sol:297:3:
    |
297 |   fallback() external payable {}
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

| Contract                                                                      | Size (B) | Margin (B) |
|-------------------------------------------------------------------------------|----------|------------|
| AaveGovernanceV2                                                              |       45 |     24,531 |
| AaveSafetyModule                                                              |       45 |     24,531 |
| AaveSwapper                                                                   |    5,572 |     19,004 |
| AaveV1                                                                        |       45 |     24,531 |
| AaveV1Ethereum_AaveV1Deprecation_20240502                                     |    2,593 |     21,983 |
| AaveV2Avalanche                                                               |       45 |     24,531 |
| AaveV2AvalancheAssets                                                         |       45 |     24,531 |
| AaveV2Avalanche_LTLTVReductionsOnAaveV2Stablecoins_20240510                   |      210 |     24,366 |
| AaveV2Avalanche_MigrateRobotsToChainlinkAutomationV2_20240422                 |      518 |     24,058 |
| AaveV2Avalanche_ReserveFactorUpgrades_20240506                                |    1,022 |     23,554 |
| AaveV2Avalanche_ReserveFactorUpgrades_20240524                                |    1,022 |     23,554 |
| AaveV2Avalanche_StablecoinIRUpdates_20240424                                  |    1,858 |     22,718 |
| AaveV2Avalanche_TemporaryFreezeOfLongTailV2Assets_20240418                    |      186 |     24,390 |
| AaveV2Ethereum                                                                |       45 |     24,531 |
| AaveV2EthereumAMM                                                             |       45 |     24,531 |
| AaveV2EthereumAMMAssets                                                       |       45 |     24,531 |
| AaveV2EthereumAssets                                                          |       45 |     24,531 |
| AaveV2Ethereum_AAMPLSecondDistribution_20240429                               |    2,370 |     22,206 |
| AaveV2Ethereum_AprilFinanceUpdate_20240421                                    |    7,897 |     16,679 |
| AaveV2Ethereum_ChaosLabsEthereumV2LTReductions_20240509                       |      358 |     24,218 |
| AaveV2Ethereum_DeprecationOfSmallCapStablecoinsOnV2Ethereum_20240502          |    3,472 |     21,104 |
| AaveV2Ethereum_LTLTVReductionsOnAaveV2Stablecoins_20240510                    |      210 |     24,366 |
| AaveV2Ethereum_ReserveFactorUpgrades_20240506                                 |    1,778 |     22,798 |
| AaveV2Ethereum_ReserveFactorUpgrades_20240524                                 |    1,778 |     22,798 |
| AaveV2Ethereum_StablecoinIRUpdates_20240424                                   |    1,858 |     22,718 |
| AaveV2Ethereum_TemporaryFreezeOfLongTailV2Assets_20240418                     |      793 |     23,783 |
| AaveV2Polygon                                                                 |       45 |     24,531 |
| AaveV2PolygonAssets                                                           |       45 |     24,531 |
| AaveV2Polygon_AprilFinanceUpdate_20240421                                     |    6,129 |     18,447 |
| AaveV2Polygon_AprilFinanceUpdate_20240421_PartB                               |      451 |     24,125 |
| AaveV2Polygon_LTLTVReductionsOnAaveV2Stablecoins_20240510                     |      210 |     24,366 |
| AaveV2Polygon_MigrateRobotsToChainlinkAutomationV2_20240422                   |      518 |     24,058 |
| AaveV2Polygon_TemporaryFreezeOfLongTailV2Assets_20240418                      |      186 |     24,390 |
| AaveV3Arbitrum                                                                |       45 |     24,531 |
| AaveV3ArbitrumAssets                                                          |       45 |     24,531 |
| AaveV3ArbitrumEModes                                                          |       45 |     24,531 |
| AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603          |    3,923 |     20,653 |
| AaveV3Arbitrum_ChaosLabsRiskParameterUpdatesAaveV3_20240530                   |    3,376 |     21,200 |
| AaveV3Arbitrum_GHOCrossChainLaunch_20240528                                   |   14,274 |     10,302 |
| AaveV3Arbitrum_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425               |    3,669 |     20,907 |
| AaveV3Arbitrum_MigrateRobotsToChainlinkAutomationV2_20240422                  |    2,954 |     21,622 |
| AaveV3Arbitrum_OptimizeETHCorrelatedAssetParameters_20240612                  |    3,622 |     20,954 |
| AaveV3Arbitrum_SetACIAsEmissionManager_20240620                               |      285 |     24,291 |
| AaveV3Arbitrum_StablecoinIRUpdates_20240424                                   |    5,381 |     19,195 |
| AaveV3Avalanche                                                               |       45 |     24,531 |
| AaveV3AvalancheAssets                                                         |       45 |     24,531 |
| AaveV3AvalancheEModes                                                         |       45 |     24,531 |
| AaveV3Avalanche_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425              |    3,377 |     21,199 |
| AaveV3Avalanche_MigrateRobotsToChainlinkAutomationV2_20240422                 |    3,577 |     20,999 |
| AaveV3Avalanche_OptimizeETHCorrelatedAssetParameters_20240612                 |    3,623 |     20,953 |
| AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620 |      615 |     23,961 |
| AaveV3Avalanche_StablecoinIRUpdates_20240424                                  |    4,628 |     19,948 |
| AaveV3BNB                                                                     |       45 |     24,531 |
| AaveV3BNBAssets                                                               |       45 |     24,531 |
| AaveV3BNBEModes                                                               |       45 |     24,531 |
| AaveV3BNB_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425                    |    3,528 |     21,048 |
| AaveV3BNB_OptimizeETHCorrelatedAssetParameters_20240612                       |    3,629 |     20,947 |
| AaveV3BNB_StablecoinIRUpdates_20240424                                        |    4,132 |     20,444 |
| AaveV3Base                                                                    |       45 |     24,531 |
| AaveV3BaseAssets                                                              |       45 |     24,531 |
| AaveV3BaseEModes                                                              |       45 |     24,531 |
| AaveV3Base_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425                   |    3,517 |     21,059 |
| AaveV3Base_OptimizeETHCorrelatedAssetParameters_20240612                      |    3,605 |     20,971 |
| AaveV3Base_StablecoinIRUpdates_20240424                                       |    3,868 |     20,708 |
| AaveV3Base_WeETHAaveV3BaseOnboarding_20240527                                 |    4,997 |     19,579 |
| AaveV3Ethereum                                                                |       45 |     24,531 |
| AaveV3EthereumAssets                                                          |       45 |     24,531 |
| AaveV3EthereumEModes                                                          |       45 |     24,531 |
| AaveV3Ethereum_ACIAdAstra_20240506                                            |      835 |     23,741 |
| AaveV3Ethereum_AaveV31CantinaCompetition_20240503                             |      344 |     24,232 |
| AaveV3Ethereum_AprilFinanceUpdatePartB_20240515                               |    4,488 |     20,088 |
| AaveV3Ethereum_GHOCrossChainLaunch_20240528                                   |   18,000 |      6,576 |
| AaveV3Ethereum_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425               |    3,669 |     20,907 |
| AaveV3Ethereum_GhoStewardUpdate_20240602                                      |    2,571 |     22,005 |
| AaveV3Ethereum_LlamariskRiskProvider_20240421                                 |      641 |     23,935 |
| AaveV3Ethereum_MigrateRobotsToChainlinkAutomationV2_20240422                  |    5,800 |     18,776 |
| AaveV3Ethereum_OnboardSUSDeToAaveV3OnEthereum_20240621                        |    5,006 |     19,570 |
| AaveV3Ethereum_OnboardUSDeAaveV3Ethereum_20240528                             |    5,012 |     19,564 |
| AaveV3Ethereum_OnboardingETHxToAaveV3_20240521                                |    5,000 |     19,576 |
| AaveV3Ethereum_OptimizeETHCorrelatedAssetParameters_20240612                  |    3,622 |     20,954 |
| AaveV3Ethereum_OrbitProgramRenewal_20240513                                   |    1,670 |     22,906 |
| AaveV3Ethereum_SetACIAsEmissionManager_20240620                               |      323 |     24,253 |
| AaveV3Ethereum_StablecoinIRUpdates_20240424                                   |    5,130 |     19,446 |
| AaveV3Ethereum_StkGHOIncentives_20240424                                      |    1,476 |     23,100 |
| AaveV3Ethereum_UpdatingWeETHRiskParameters_20240426                           |    4,111 |     20,465 |
| AaveV3Ethereum_V4ALServiceProviderProposal_20240614                           |      840 |     23,736 |
| AaveV3Gnosis                                                                  |       45 |     24,531 |
| AaveV3GnosisAssets                                                            |       45 |     24,531 |
| AaveV3GnosisEModes                                                            |       45 |     24,531 |
| AaveV3Gnosis_AprilFinanceUpdate_20240421                                      |      380 |     24,196 |
| AaveV3Gnosis_ChaosLabsRiskParameterUpdatesAaveV3_20240530                     |    3,374 |     21,202 |
| AaveV3Gnosis_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425                 |    3,519 |     21,057 |
| AaveV3Gnosis_OptimizeETHCorrelatedAssetParameters_20240612                    |    3,620 |     20,956 |
| AaveV3Gnosis_StablecoinIRUpdates_20240424                                     |    4,123 |     20,453 |
| AaveV3Metis                                                                   |       45 |     24,531 |
| AaveV3MetisAssets                                                             |       45 |     24,531 |
| AaveV3MetisEModes                                                             |       45 |     24,531 |
| AaveV3Metis_OptimizeETHCorrelatedAssetParameters_20240612                     |    3,606 |     20,970 |
| AaveV3Optimism                                                                |       45 |     24,531 |
| AaveV3OptimismAssets                                                          |       45 |     24,531 |
| AaveV3OptimismEModes                                                          |       45 |     24,531 |
| AaveV3Optimism_ChaosLabsParameterRecommendationsSUSDOnV3Optimism_20240528     |    3,973 |     20,603 |
| AaveV3Optimism_ChaosLabsRiskParameterUpdatesAaveV3_20240530                   |    3,363 |     21,213 |
| AaveV3Optimism_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425               |    3,669 |     20,907 |
| AaveV3Optimism_MigrateRobotsToChainlinkAutomationV2_20240422                  |    2,844 |     21,732 |
| AaveV3Optimism_OptimizeETHCorrelatedAssetParameters_20240612                  |    3,609 |     20,967 |
| AaveV3Optimism_SUSDRiskParametersUpdate_20240517                              |    3,372 |     21,204 |
| AaveV3Optimism_StablecoinIRUpdates_20240424                                   |    5,130 |     19,446 |
| AaveV3Polygon                                                                 |       45 |     24,531 |
| AaveV3PolygonAssets                                                           |       45 |     24,531 |
| AaveV3PolygonEModes                                                           |       45 |     24,531 |
| AaveV3Polygon_ChaosLabsRiskParameterUpdatesAaveV3_20240530                    |    3,520 |     21,056 |
| AaveV3Polygon_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425                |    3,668 |     20,908 |
| AaveV3Polygon_MigrateRobotsToChainlinkAutomationV2_20240422                   |    2,773 |     21,803 |
| AaveV3Polygon_OptimizeETHCorrelatedAssetParameters_20240612                   |    3,621 |     20,955 |
| AaveV3Polygon_StablecoinIRUpdates_20240424                                    |    5,380 |     19,196 |
| AaveV3Scroll                                                                  |       45 |     24,531 |
| AaveV3ScrollAssets                                                            |       45 |     24,531 |
| AaveV3ScrollEModes                                                            |       45 |     24,531 |
| AaveV3Scroll_GeneralizedLTLTVReductionsOnAaveV3Step2_20240425                 |    3,374 |     21,202 |
| AaveV3Scroll_OptimizeETHCorrelatedAssetParameters_20240612                    |    3,607 |     20,969 |
| AaveV3Scroll_StablecoinIRUpdates_20240424                                     |    3,620 |     20,956 |
| Address                                                                       |       45 |     24,531 |
| AggregateRateLimiter                                                          |    1,931 |     22,645 |
| CallWithExactGas                                                              |       45 |     24,531 |
| ChainHelpers                                                                  |       45 |     24,531 |
| ChainIds                                                                      |       45 |     24,531 |
| Client                                                                        |      111 |     24,465 |
| ConfiguratorInputTypes                                                        |       45 |     24,531 |
| ConfirmedOwner                                                                |      552 |     24,024 |
| ConfirmedOwnerWithProposal                                                    |      552 |     24,024 |
| Create2Utils                                                                  |      123 |     24,453 |
| DataTypes                                                                     |       45 |     24,531 |
| ERC165Checker                                                                 |       45 |     24,531 |
| ERC1967Proxy                                                                  |      136 |     24,440 |
| EVM2EVMOffRamp                                                                |   19,826 |      4,750 |
| EVM2EVMOnRamp                                                                 |   20,900 |      3,676 |
| EngineFlags                                                                   |       45 |     24,531 |
| EnumerableMap                                                                 |       45 |     24,531 |
| EnumerableMapAddresses                                                        |       45 |     24,531 |
| EnumerableSet                                                                 |       45 |     24,531 |
| Errors                                                                        |    4,673 |     19,903 |
| GovV3Helpers                                                                  |    2,581 |     21,995 |
| GovV3StorageHelpers                                                           |       45 |     24,531 |
| GovernanceV3Arbitrum                                                          |       45 |     24,531 |
| GovernanceV3Avalanche                                                         |       45 |     24,531 |
| GovernanceV3BNB                                                               |       45 |     24,531 |
| GovernanceV3Base                                                              |       45 |     24,531 |
| GovernanceV3Ethereum                                                          |       45 |     24,531 |
| GovernanceV3Gnosis                                                            |       45 |     24,531 |
| GovernanceV3Metis                                                             |       45 |     24,531 |
| GovernanceV3Optimism                                                          |       45 |     24,531 |
| GovernanceV3Polygon                                                           |       45 |     24,531 |
| GovernanceV3PolygonZkEvm                                                      |       45 |     24,531 |
| GovernanceV3Scroll                                                            |       45 |     24,531 |
| Internal                                                                      |      147 |     24,429 |
| IpfsUtils                                                                     |       45 |     24,531 |
| Math                                                                          |       45 |     24,531 |
| MerkleMultiProof                                                              |       45 |     24,531 |
| MiscArbitrum                                                                  |       45 |     24,531 |
| MiscEthereum                                                                  |       45 |     24,531 |
| MiscPolygon                                                                   |       45 |     24,531 |
| OrbitProgramData                                                              |      422 |     24,154 |
| OwnerIsCreator                                                                |      552 |     24,024 |
| PayloadsControllerUtils                                                       |       45 |     24,531 |
| PriceRegistry                                                                 |    5,352 |     19,224 |
| ProxyHelpers                                                                  |       45 |     24,531 |
| RateLimiter                                                                   |       45 |     24,531 |
| ReserveConfiguration                                                          |      130 |     24,446 |
| RewardsDataTypes                                                              |       45 |     24,531 |
| Router                                                                        |    8,873 |     15,703 |
| SafeCast                                                                      |       45 |     24,531 |
| SafeERC20                                                                     |       45 |     24,531 |
| StorageHelpers                                                                |       45 |     24,531 |
| StorageSlot                                                                   |       45 |     24,531 |
| Strings                                                                       |       45 |     24,531 |
| TransparentUpgradeableProxy                                                   |    2,040 |     22,536 |
| USDPriceWith18Decimals                                                        |       45 |     24,531 |
| UpgradeableBurnMintTokenPool                                                  |    9,831 |     14,745 |
| UpgradeableGhoToken                                                           |    8,597 |     15,979 |
| UpgradeableLockReleaseTokenPool                                               |   12,076 |     12,500 |
| Utils                                                                         |   15,014 |      9,562 |
| WadRayMath                                                                    |       45 |     24,531 |
Test success 🌈
No files changed, compilation skipped

Ran 5 tests for src/20240614_AaveV3Ethereum_V4ALServiceProviderProposal/AaveV3Ethereum_V4ALServiceProviderProposal_20240614.t.sol:AaveV3Ethereum_V4ALServiceProviderProposal_20240614_Test
[PASS] testProposalExecution() (gas: 336170)
[PASS] testProposalExecutionFailureFunding() (gas: 340214)
[PASS] testProposalExecutionFuzzWithdrawalAmounts(uint256,uint256) (runs: 256, μ: 483849, ~: 483840)
[PASS] testProposalExecutionPrankFunds() (gas: 449446)
[PASS] test_defaultProposalExecution() (gas: 278140416)
Logs:
  0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
  0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0
  0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
  0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
  0x6B175474E89094C44Da98b954EedeAC495271d0F
  0x514910771AF9Ca656af840dff83E8264EcF986CA
  0xBe9895146f7AF43049ca1c1AE358B0541Ea49704
  0xdAC17F958D2ee523a2206206994597C13D831ec7
  0xae78736Cd615f374D3085123A210448E74Fc6393
  0x5f98805A4E8be255a32880FDeC7F6728C6568bA0
  0xD533a949740bb3306d119CC777fa900bA034cd52
  0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2
  0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F
  0xba100000625a3754423978a60c9317c58a424e3D
  0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
  0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32
  0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72
  0x111111111117dC0aa78b770fA6A738034120C302
  0x853d955aCEf822Db058eb8505911ED77F175b99e
  0xD33526068D116cE69F19A9ee46F0bd304F21A51f
  0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6
  0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202
  0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0
  0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E
  0x6c3ea9036406852006290770BEdFcAbA0e23A0e8
  0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee
  0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38
  0x4c9EDD5852cd905f086C759E8383e09bff1E68B3
  E2E: Collateral WETH, TestAsset WETH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: WETH, Amount: 286705901508960212
  WITHDRAW: WETH, Amount: 143352950754480106
  WITHDRAW: WETH, Amount: 143352950754480106
  BORROW: WETH, Amount 286705901508960212, Stable: false
  REPAY: WETH, Amount: 286705901508960212
  E2E: Collateral WETH, TestAsset wstETH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: wstETH, Amount: 245093528948098944
  WITHDRAW: wstETH, Amount: 122546764474049472
  WITHDRAW: wstETH, Amount: 122546764474049472
  BORROW: wstETH, Amount 245093528948098944, Stable: false
  REPAY: wstETH, Amount: 245093528948098944
  E2E: Collateral WETH, TestAsset WBTC
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: WBTC, Amount: 1513123
  WITHDRAW: WBTC, Amount: 756561
  WITHDRAW: WBTC, Amount: 756561
  BORROW: WBTC, Amount 1513123, Stable: false
  REPAY: WBTC, Amount: 1513123
  E2E: Collateral WETH, TestAsset USDC
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: USDC, Amount: 1000098299
  WITHDRAW: USDC, Amount: 500049149
  WITHDRAW: USDC, Amount: 500049149
  BORROW: USDC, Amount 1000098299, Stable: false
  REPAY: USDC, Amount: 1000098299
  E2E: Collateral WETH, TestAsset DAI
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: DAI, Amount: 1000132207476506319370
  WITHDRAW: DAI, Amount: 500066103738253159685
  WITHDRAW: DAI, Amount: 500066103738253159685
  BORROW: DAI, Amount 1000132207476506319370, Stable: false
  REPAY: DAI, Amount: 1000132207476506319370
  E2E: Collateral WETH, TestAsset LINK
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: LINK, Amount: 67204301075268817204
  WITHDRAW: LINK, Amount: 33602150537634408602
  WITHDRAW: LINK, Amount: 33602150537634408602
  BORROW: LINK, Amount 67204301075268817204, Stable: false
  REPAY: LINK, Amount: 67204301075268817204
  E2E: Collateral WETH, TestAsset AAVE
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: AAVE, Amount: 11913519801221978565
  WITHDRAW: AAVE, Amount: 5956759900610989282
  WITHDRAW: AAVE, Amount: 5956759900610989283
  E2E: Collateral WETH, TestAsset cbETH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: cbETH, Amount: 266965684888841363
  WITHDRAW: cbETH, Amount: 133482842444420681
  WITHDRAW: cbETH, Amount: 133482842444420681
  BORROW: cbETH, Amount 266965684888841363, Stable: false
  REPAY: cbETH, Amount: 266965684888841363
  E2E: Collateral WETH, TestAsset USDT
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: USDT, Amount: 1000580336
  WITHDRAW: USDT, Amount: 500290168
  WITHDRAW: USDT, Amount: 500290168
  BORROW: USDT, Amount 1000580336, Stable: false
  REPAY: USDT, Amount: 1000580336
  E2E: Collateral WETH, TestAsset rETH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: rETH, Amount: 258588008941470860
  WITHDRAW: rETH, Amount: 129294004470735430
  WITHDRAW: rETH, Amount: 129294004470735430
  BORROW: rETH, Amount 258588008941470860, Stable: false
  REPAY: rETH, Amount: 258588008941470860
  E2E: Collateral WETH, TestAsset LUSD
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: LUSD, Amount: 1000384467758649003985
  WITHDRAW: LUSD, Amount: 500192233879324501992
  WITHDRAW: LUSD, Amount: 500192233879324501993
  BORROW: LUSD, Amount 1000384467758649003985, Stable: false
  REPAY: LUSD, Amount: 1000384467758649003985
  E2E: Collateral WETH, TestAsset CRV
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: CRV, Amount: 3541703559412077209137
  WITHDRAW: CRV, Amount: 1770851779706038604568
  WITHDRAW: CRV, Amount: 1770851779706038604569
  BORROW: CRV, Amount 3541703559412077209137, Stable: false
  REPAY: CRV, Amount: 3541703559412077209137
  E2E: Collateral WETH, TestAsset MKR
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: MKR, Amount: 443332550259267171
  WITHDRAW: MKR, Amount: 221666275129633585
  WITHDRAW: MKR, Amount: 221666275129633586
  BORROW: MKR, Amount 443332550259267171, Stable: false
  REPAY: MKR, Amount: 443332550259267171
  E2E: Collateral WETH, TestAsset SNX
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: SNX, Amount: 465116279069767441860
  WITHDRAW: SNX, Amount: 232558139534883720930
  WITHDRAW: SNX, Amount: 232558139534883720931
  BORROW: SNX, Amount 465116279069767441860, Stable: false
  REPAY: SNX, Amount: 465116279069767441860
  E2E: Collateral WETH, TestAsset BAL
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: BAL, Amount: 301650025640252179421
  WITHDRAW: BAL, Amount: 150825012820126089710
  WITHDRAW: BAL, Amount: 150825012820126089711
  BORROW: BAL, Amount 301650025640252179421, Stable: false
  REPAY: BAL, Amount: 301650025640252179421
  E2E: Collateral WETH, TestAsset UNI
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: UNI, Amount: 95098345954468813923
  WITHDRAW: UNI, Amount: 47549172977234406961
  WITHDRAW: UNI, Amount: 47549172977234406961
  BORROW: UNI, Amount 95098345954468813923, Stable: false
  REPAY: UNI, Amount: 95098345954468813923
  E2E: Collateral WETH, TestAsset LDO
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: LDO, Amount: 508888516540815652824
  WITHDRAW: LDO, Amount: 254444258270407826412
  WITHDRAW: LDO, Amount: 254444258270407826413
  BORROW: LDO, Amount 508888516540815652824, Stable: false
  REPAY: LDO, Amount: 508888516540815652824
  E2E: Collateral WETH, TestAsset ENS
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: ENS, Amount: 46294153048469978241
  WITHDRAW: ENS, Amount: 23147076524234989120
  WITHDRAW: ENS, Amount: 23147076524234989121
  BORROW: ENS, Amount 46294153048469978241, Stable: false
  REPAY: ENS, Amount: 46294153048469978241
  E2E: Collateral WETH, TestAsset 1INCH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: 1INCH, Amount: 2436379373602477563930
  WITHDRAW: 1INCH, Amount: 1218189686801238781965
  WITHDRAW: 1INCH, Amount: 1218189686801238781965
  BORROW: 1INCH, Amount 2436379373602477563930, Stable: false
  REPAY: 1INCH, Amount: 2436379373602477563930
  E2E: Collateral WETH, TestAsset FRAX
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: FRAX, Amount: 1001984159091357478820
  WITHDRAW: FRAX, Amount: 500992079545678739410
  WITHDRAW: FRAX, Amount: 500992079545678739410
  BORROW: FRAX, Amount 1001984159091357478820, Stable: false
  REPAY: FRAX, Amount: 1001984159091357478820
  E2E: Collateral WETH, TestAsset GHO
  SUPPLY: WETH, Amount: 28670590150896021235
  BORROW: GHO, Amount 1000000000000000000000, Stable: false
  REPAY: GHO, Amount: 1000000000000000000000
  E2E: Collateral WETH, TestAsset RPL
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: RPL, Amount: 41671369489070355701
  WITHDRAW: RPL, Amount: 20835684744535177850
  WITHDRAW: RPL, Amount: 20835684744535177850
  BORROW: RPL, Amount 41671369489070355701, Stable: false
  REPAY: RPL, Amount: 41671369489070355701
  E2E: Collateral WETH, TestAsset sDAI
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: sDAI, Amount: 918107897141801581091
  WITHDRAW: sDAI, Amount: 459053948570900790545
  WITHDRAW: sDAI, Amount: 459053948570900790547
  E2E: TestAsset STG SKIPPED
  E2E: TestAsset KNC SKIPPED
  E2E: TestAsset FXS SKIPPED
  E2E: Collateral WETH, TestAsset crvUSD
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: crvUSD, Amount: 1000953037415514433757
  WITHDRAW: crvUSD, Amount: 500476518707757216878
  WITHDRAW: crvUSD, Amount: 500476518707757216878
  BORROW: crvUSD, Amount 1000953037415514433757, Stable: false
  REPAY: crvUSD, Amount: 1000953037415514433757
  E2E: Collateral WETH, TestAsset PYUSD
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: PYUSD, Amount: 1000728890
  WITHDRAW: PYUSD, Amount: 500364445
  WITHDRAW: PYUSD, Amount: 500364445
  BORROW: PYUSD, Amount 1000728890, Stable: false
  REPAY: PYUSD, Amount: 1000728890
  E2E: Collateral WETH, TestAsset weETH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: weETH, Amount: 275500834875356566
  WITHDRAW: weETH, Amount: 137750417437678283
  WITHDRAW: weETH, Amount: 137750417437678283
  BORROW: weETH, Amount 275500834875356566, Stable: false
  REPAY: weETH, Amount: 275500834875356566
  E2E: Collateral WETH, TestAsset osETH
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: osETH, Amount: 281379369849679247
  WITHDRAW: osETH, Amount: 140689684924839623
  WITHDRAW: osETH, Amount: 140689684924839624
  BORROW: osETH, Amount 281379369849679247, Stable: false
  REPAY: osETH, Amount: 281379369849679247
  E2E: Collateral WETH, TestAsset USDe
  SUPPLY: WETH, Amount: 28670590150896021235
  SUPPLY: USDe, Amount: 999200639488409272581
  WITHDRAW: USDe, Amount: 499600319744204636290
  WITHDRAW: USDe, Amount: 499600319744204636291
  BORROW: USDe, Amount 999200639488409272581, Stable: false
  REPAY: USDe, Amount: 999200639488409272581

Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 201.36s (212.03s CPU time)

Ran 1 test suite in 201.37s (201.36s CPU time): 5 tests passed, 0 failed, 0 skipped (5 total tests)

Please sign in to comment.