-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MixBytes audit for Aave v3.1.0 #14
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eboadom
reviewed
May 2, 2024
Co-authored-by: Ernesto Boado <[email protected]>
eboadom
approved these changes
May 2, 2024
Foundry report forge 0.2.0 (cafc260 2024-05-02T00:18:55.934780579Z) Build logCompiling 335 files with 0.8.19
Solc 0.8.19 finished in 80.65s
Compiler run successful with warnings:
Warning (5740): Unreachable code.
--> src/periphery/contracts/dependencies/openzeppelin/ReentrancyGuard.sol:61:5:
|
61 | _status = _NOT_ENTERED;
| ^^^^^^^^^^^^^^^^^^^^^^ Test success 🌈No files changed, compilation skipped
Ran 20 tests for tests/core/ACLManager.t.sol:ACLManagerTest
[PASS] testDefaultAdminRoleAfterDeploy() (gas: 20708)
[PASS] test_defaultAdmin_grantAdminRole_FlashBorrowAdmin() (gas: 65556)
[PASS] test_defaultAdmin_grants_AssetsListingRole() (gas: 37606)
[PASS] test_defaultAdmin_grants_BridgeRole() (gas: 37672)
[PASS] test_defaultAdmin_grants_EmergencyAdminRole() (gas: 37619)
[PASS] test_defaultAdmin_grants_PoolAdminRole() (gas: 37739)
[PASS] test_defaultAdmin_grants_RiskRole() (gas: 37736)
[PASS] test_defaultAdmin_remove_AssetsListingRole() (gas: 29480)
[PASS] test_defaultAdmin_remove_BridgeRole() (gas: 29552)
[PASS] test_defaultAdmin_remove_EmergencyAdminRole() (gas: 29464)
[PASS] test_defaultAdmin_remove_PoolAdminRole() (gas: 29499)
[PASS] test_defaultAdmin_remove_RiskRole() (gas: 29453)
[PASS] test_flashBorrowAdmin_grantRole_FlashBorrowRole() (gas: 91952)
[PASS] test_flashBorrowAdmin_removeRole_FlashBorrowRole() (gas: 76510)
[PASS] test_remove_riskAdmin() (gas: 29480)
[PASS] test_revert_anyUser_grantAdminRole_FlashBorrowAdmin() (gas: 73230)
[PASS] test_revert_deploy_ACLADMIN_zeroAddress() (gas: 1501515)
[PASS] test_reverts_defaultAdmin_notRoleAdmin_addRole_FlashBorrowRole() (gas: 99205)
[PASS] test_reverts_defaultAdmin_notRoleAdmin_revokeRole_FlashBorrowRole() (gas: 125600)
[PASS] test_reverts_notAdmin_grantRole_FlashBorrow() (gas: 115771)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 9.65ms (3.92ms CPU time)
Ran 3 tests for tests/core/ATokenRescueTokens.sol:ATokenRescueTokensTests
[PASS] test_rescueTokens() (gas: 78031)
[PASS] test_reverts_rescueTokens_CALLER_NOT_POOL_ADMIN() (gas: 70952)
[PASS] test_reverts_rescueTokens_UNDERLYING_CANNOT_BE_RESCUED() (gas: 71677)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 37.86ms (700.83µs CPU time)
Ran 7 tests for tests/core/AddressesProviderRegistry.t.sol:PoolAddressesProviderRegistryTest
[PASS] testAddAddressesProvider() (gas: 120634)
[PASS] testRemoveAddressesProvider() (gas: 97184)
[PASS] testRemoveMultipleAddressesProvider() (gas: 243012)
[PASS] test_addressesProviderAddedToRegistry() (gas: 16326)
[PASS] test_removesLastProvider() (gas: 32680)
[PASS] test_revert_registry_0() (gas: 15614)
[PASS] test_revert_removeNonExistingAddressesProvider() (gas: 27575)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 39.45ms (1.97ms CPU time)
Ran 17 tests for tests/core/ATokenEdgeCases.t.sol:ATokenEdgeCasesTests
[PASS] testApprove() (gas: 45139)
[PASS] testApproveMax() (gas: 45244)
[PASS] testApproveWithZeroAddressSpender() (gas: 42177)
[PASS] testCheckGetters() (gas: 272011)
[PASS] testDecreaseAllowance() (gas: 53103)
[PASS] testIncreaseAllowance() (gas: 53147)
[PASS] testIncreaseAllowanceFromZero() (gas: 48450)
[PASS] testMintToTreasury_amount_zero() (gas: 15809)
[PASS] testTransferFromZeroAmount() (gas: 129551)
[PASS] test_burn_zeroAddress() (gas: 266604)
[PASS] test_mintToZeroAddress() (gas: 82322)
[PASS] test_poolAdmin_setIncentivesController() (gas: 35873)
[PASS] test_revert_notAdmin_setIncentivesController() (gas: 40453)
[PASS] test_reverts_burnAmountScaledZero() (gas: 19463)
[PASS] test_reverts_mintAmountScaledZero() (gas: 19608)
[PASS] test_transferFrom_zeroAddress_origin() (gas: 129385)
[PASS] test_transfer_amount_MAX_UINT_128() (gas: 16482)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 42.62ms (4.31ms CPU time)
Ran 12 tests for tests/core/BridgeLogic.t.sol:BridgeLogicTests
[PASS] test_backUnbacked_but_unbacked_is_zero_with_fee() (gas: 202394)
[PASS] test_backUnbacked_but_unbacked_is_zero_with_only_fee() (gas: 202497)
[PASS] test_backUnbacked_but_unbacked_is_zero_without_fee() (gas: 167843)
[PASS] test_backUnbacked_onlyFee() (gas: 373129)
[PASS] test_backUnbacked_withFee() (gas: 373243)
[PASS] test_backUnbacked_withoutFee() (gas: 350607)
[PASS] test_multiple_backUnbacked() (gas: 659140)
[PASS] test_multiple_unbackedMint_with_cap() (gas: 500676)
[PASS] test_revert_multiple_unbackedMint_with_cap() (gas: 441248)
[PASS] test_revert_unathorized_unbackedMint() (gas: 30680)
[PASS] test_revert_unbackedMint_zero_cap() (gas: 99181)
[PASS] test_unbackedMint_with_cap() (gas: 279518)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 52.22ms (15.01ms CPU time)
Ran 10 tests for tests/DeploymentsGasLimits.t.sol:DeploymentsGasLimits
[PASS] test0AaveV3SetupDeployment() (gas: 4687826)
[PASS] test1AaveV3GettersBatch1Deployment() (gas: 7540811)
[PASS] test2AaveV3GettersBatch2Deployment() (gas: 1419098)
[PASS] test3AaveV3PoolDeployment() (gas: 9049489)
[PASS] test4AaveV3L2PoolDeployment() (gas: 9340799)
[PASS] test5PeripheralsRelease() (gas: 7919225)
[PASS] test6ParaswapDeployment() (gas: 5983767)
[PASS] test7SetupMarket() (gas: 2752550)
[PASS] test8TokensMarket() (gas: 5138810)
[PASS] testCheckInitCodeSizeBatchs() (gas: 679585)
Logs:
AaveV3SetupBatch 25557
AaveV3L2PoolBatch 46103
AaveV3PoolBatch 44653
AaveV3PeripheryBatch 42943
AaveV3ParaswapBatch 32983
AaveV3GettersBatchOne 37558
AaveV3GettersBatchTwo 12045
AaveV3TokensBatch 27018
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 24.89ms (5.41ms CPU time)
Ran 8 tests for tests/core/ATokenEvents.t.sol:ATokenEventsTests
[PASS] test_atoken_burnEvents_fullBalance() (gas: 588424)
[PASS] test_atoken_burnEvents_multipleWithdrawals_withInterests() (gas: 681872)
[PASS] test_atoken_burnEvents_singleWithdraw_WithInterests() (gas: 599106)
[PASS] test_atoken_burnEvents_singleWithdraw_noInterests() (gas: 266939)
[PASS] test_atoken_burnEvents_withdrawAmountLessThanInterests() (gas: 601910)
[PASS] test_atoken_mintEvents_firstSupply() (gas: 259742)
[PASS] test_atoken_mintEvents_supplyAfterBorrow() (gas: 657714)
[PASS] test_mintToTreasury_events() (gas: 90235)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 53.19ms (11.86ms CPU time)
Ran 11 tests for tests/core/ATokenTransfers.t.sol:ATokenTransferTests
[PASS] test_atoken_alice_transfer_all_to_bob() (gas: 162110)
[PASS] test_atoken_alice_transfer_to_bob() (gas: 250607)
[PASS] test_atoken_alice_transfer_to_bob_zero() (gas: 172888)
[PASS] test_atoken_alice_transfer_to_carol_accrues_interests() (gas: 248634)
[PASS] test_atoken_alice_transfer_to_herself() (gas: 81603)
[PASS] test_atoken_alice_transfer_to_herself_zero() (gas: 81646)
[PASS] test_atoken_multiple_transfers() (gas: 201449)
[PASS] test_atoken_transfer_sets_enabled_as_collateral(uint64,uint256) (runs: 1000, μ: 404337, ~: 408111)
[PASS] test_atoken_transfer_some_collateral_from_bob_borrower_to_alice() (gas: 565515)
[PASS] test_atoken_transfer_to_bob_them_bob_borrows() (gas: 419711)
[PASS] test_reverts_atoken_transfer_all_collateral_from_bob_borrower_to_alice() (gas: 420541)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 1.38s (1.35s CPU time)
Ran 9 tests for tests/periphery/EmissionsManager.t.sol:EmissionManagerTest
[PASS] test_configureAssets() (gas: 602178)
[PASS] test_new_EmissionManager() (gas: 776194)
[PASS] test_setClaimer() (gas: 51492)
[PASS] test_setDistributionEnd() (gas: 609447)
[PASS] test_setEmissionAdmin() (gas: 43028)
[PASS] test_setEmissionPerSecond() (gas: 616040)
[PASS] test_setRewardOracle() (gas: 692162)
[PASS] test_setRewardsController() (gas: 19144)
[PASS] test_setTransferStrategy() (gas: 896417)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 50.54ms (2.45ms CPU time)
Ran 4 tests for tests/core/ATokenModifiers.t.sol:ATokenModifiersTests
[PASS] test_revert_notAdmin_burn() (gas: 17111)
[PASS] test_revert_notAdmin_mint() (gas: 17206)
[PASS] test_revert_notAdmin_transferOnLiquidation() (gas: 17237)
[PASS] test_revert_notAdmin_transferUnderlyingTo() (gas: 17041)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 37.87ms (378.41µs CPU time)
Ran 6 tests for tests/core/InitializableImmutableAdminUpgradeabilityProxy.t.sol:InitializableImmutableAdminUpgradeabilityProxyTests
[PASS] test_proxy_fallback() (gas: 609072)
[PASS] test_proxy_upgradeTo() (gas: 631037)
[PASS] test_proxy_upgradeToAndCall() (gas: 636947)
[PASS] test_proxy_upgradeToAndCall_initialize() (gas: 606146)
[PASS] test_reverts_upgradeToAndCall_notAdmin() (gas: 611973)
[PASS] test_reverts_upgradeTo_notAdmin() (gas: 609855)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 2.71ms (2.15ms CPU time)
Ran 12 tests for tests/core/AaveOracle.t.sol:AaveOracleTest
[PASS] testAddSingleSource() (gas: 949417)
[PASS] testAssetZeroPriceAndZeroFallbackPrice() (gas: 1091050)
[PASS] testAssetZeroPriceNonZeroFallback() (gas: 1111001)
[PASS] testAssetZeroPriceWithoutFallback() (gas: 933561)
[PASS] testEmptySource() (gas: 837947)
[PASS] testGetBaseCurrencyPrice() (gas: 12326)
[PASS] testGetPriceViaFallbackOracle() (gas: 1014098)
[PASS] testUpdateFallbackOracle() (gas: 181042)
[PASS] testUpdateSingleSource() (gas: 128160)
[PASS] testUpdateSourceBaseCurrency() (gas: 139684)
[PASS] test_revert_setAssetSources_inconsistentParams() (gas: 834379)
[PASS] test_revert_setAssetSources_wrongCaller() (gas: 24595)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 40.68ms (2.93ms CPU time)
Ran 9 tests for tests/core/ATokenPermit.t.sol:ATokenPermitTests
[PASS] testCheckDomainSeparator() (gas: 26218)
[PASS] test_cancelPermit() (gas: 100921)
[PASS] test_chain_fork_calculateDomainSeparator() (gas: 33005)
[PASS] test_revert_submitPermit_0_expiration() (gas: 46835)
[PASS] test_revert_submitPermit_invalid_expiration_previosCurrentBlock() (gas: 47317)
[PASS] test_revert_submitPermit_invalid_nonce() (gas: 55246)
[PASS] test_revert_submitPermit_invalid_owner() (gas: 46596)
[PASS] test_revert_submitPermit_invalid_signature() (gas: 55002)
[PASS] test_submitPermit() (gas: 94399)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 47.13ms (8.61ms CPU time)
Ran 3 tests for tests/AaveV3BatchDeployment.t.sol:AaveV3BatchDeployment
[PASS] testAaveV3BatchDeploy() (gas: 44950558)
[PASS] testAaveV3BatchDeploymentCheck() (gas: 62343222)
[PASS] testAaveV3L2BatchDeploymentCheck() (gas: 63551742)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 83.50ms (78.37ms CPU time)
Ran 3 tests for tests/core/ATokenRepay.t.sol:ATokenRepayTests
[PASS] test_repay_allDebt() (gas: 290908)
[PASS] test_repay_partialDebt() (gas: 290911)
[PASS] test_revert_repay_withoutFunds() (gas: 196771)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 38.16ms (2.22ms CPU time)
Ran 9 tests for tests/AaveV3BatchTests.t.sol:AaveV3BatchTests
[PASS] test0AaveV3SetupDeployment() (gas: 4687736)
[PASS] test1AaveV3GettersDeployment() (gas: 8958317)
[PASS] test2AaveV3L2PoolDeployment() (gas: 9340821)
[PASS] test2AaveV3PoolDeployment() (gas: 9049534)
[PASS] test4PeripheralsRelease() (gas: 7919224)
[PASS] test5PeripheralsRelease() (gas: 5983768)
[PASS] test6SetupMarket() (gas: 2752462)
[PASS] test7TokensMarket() (gas: 5138722)
[PASS] testAaveV3FullBatchOrchestration() (gas: 44946097)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 19.99ms (9.09ms CPU time)
Ran 1 test for tests/AaveV3PermissionsTest.t.sol:AaveV3PermissionsTest
[PASS] testCheckPermissions() (gas: 43950873)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 23.65ms (19.91ms CPU time)
Ran 6 tests for tests/core/PoolConfigurator.upgradeabilty.t.sol:PoolConfiguratorUpgradeabilityTests
[PASS] test_getConfiguratorLogic() (gas: 13626)
[PASS] test_interestRateStrategy_update() (gas: 1965276)
[PASS] test_setReserveInterestRateStrategyAddress() (gas: 1081867)
[PASS] test_updateAToken() (gas: 2346693)
[PASS] test_updateStableDebtToken() (gas: 1244589)
[PASS] test_updateVariableDebtToken() (gas: 1733200)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 85.41ms (4.91ms CPU time)
Ran 15 tests for tests/core/PoolConfigurator.eMode.sol:PoolConfiguratorEModeConfigTests
[PASS] test_configureEmodeCategory() (gas: 137384)
[PASS] test_removeEModeCategoryFromAsset() (gas: 177961)
[PASS] test_reverts_configureEmodeCategory_bad_lq() (gas: 170174)
[PASS] test_reverts_configureEmodeCategory_bad_ltv() (gas: 170034)
[PASS] test_reverts_configureEmodeCategory_input_lt_lt_reserve_emode_lt() (gas: 167516)
[PASS] test_reverts_configureEmodeCategory_input_ltv_lt_reserve_emode_ltv() (gas: 175267)
[PASS] test_reverts_setAssetEModeCategory_invalid() (gas: 139421)
[PASS] test_reverts_setEmodeCategory_lb_lte_percentageFactor() (gas: 60037)
[PASS] test_reverts_setEmodeCategory_liquidation_threshold_doesnt_match_bonus() (gas: 36025)
[PASS] test_reverts_setEmodeCategory_ltv_gt_liqThreshold() (gas: 34600)
[PASS] test_reverts_setEmodeCategory_zero_liqThreshold() (gas: 34495)
[PASS] test_reverts_setEmodeCategory_zero_ltv() (gas: 34408)
[PASS] test_setAssetEModeCategory() (gas: 164765)
[PASS] test_updateAssetEModeCategory() (gas: 257630)
[PASS] test_updateEModeCategory() (gas: 179197)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 107.60ms (19.48ms CPU time)
Ran 3 tests for tests/core/PoolLogic.initReserves.edge.t.sol:PoolLogicInitReservesTests
[PASS] test_initReserves_return_false_after_dropped_reserve() (gas: 755282)
[PASS] test_reverts_initReserves_max() (gas: 222618)
[PASS] test_reverts_initReserves_reserveAlreadyAdded() (gas: 246207)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 38.29ms (814.58µs CPU time)
Ran 11 tests for tests/core/PriceOracleSentinel.t.sol:PriceOracleSentinelTest
[PASS] test_isBorrowAllowed_network_down() (gas: 27232)
[PASS] test_isBorrowAllowed_network_up_not_grace_period() (gas: 46960)
[PASS] test_isBorrowAllowed_true_network_up_grace_period_pass() (gas: 47013)
[PASS] test_isLiquidationAllowed_network_down() (gas: 27165)
[PASS] test_isLiquidationAllowed_network_up_not_grace_period() (gas: 46937)
[PASS] test_isLiquidationAllowed_true_network_up_grace_period_pass() (gas: 47012)
[PASS] test_new_PriceOracleSentinel() (gas: 432463)
[PASS] test_reverts_setGracePeriod_not_poolAdmin() (gas: 25930)
[PASS] test_reverts_setSequencerOracle_not_poolAdmin() (gas: 22767)
[PASS] test_setGracePeriod() (gas: 32524)
[PASS] test_setSequencerOracle() (gas: 24656)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 39.12ms (1.35ms CPU time)
Ran 13 tests for tests/core/Pool.Supply.t.sol:PoolSupplyTests
[PASS] test_deprecated_deposit() (gas: 253040)
[PASS] test_first_supply() (gas: 253041)
[PASS] test_first_supply_on_behalf() (gas: 255088)
[PASS] test_reverts_supply_cap() (gas: 116474)
[PASS] test_reverts_supply_invalidAmount() (gas: 58771)
[PASS] test_reverts_supply_reserveFrozen() (gas: 148681)
[PASS] test_reverts_supply_reserveInactive() (gas: 140088)
[PASS] test_reverts_supply_reservePaused() (gas: 99478)
[PASS] test_reverts_supply_to_aToken() (gas: 61373)
[PASS] test_supplyWithPermit(uint128,uint128,uint128) (runs: 1000, μ: 435083, ~: 435131)
[PASS] test_supplyWithPermit_not_failing_if_permit_was_used(uint128,uint128,uint128) (runs: 1000, μ: 435336, ~: 435360)
[PASS] test_supplyWithPermit_should_revert_if_permit_is_less_then_supply_amount(uint128,uint128) (runs: 1000, μ: 298321, ~: 298321)
[PASS] test_supply_after_collateral_enabled() (gas: 302917)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 7.85s (7.78s CPU time)
Ran 11 tests for tests/core/Pool.Withdraw.t.sol:PoolWithdrawTests
[PASS] test_Reverts_withdraw_transferred_funds() (gas: 578305)
[PASS] test_full_withdraw() (gas: 248488)
[PASS] test_full_withdraw_to() (gas: 254032)
[PASS] test_partial_withdraw() (gas: 245010)
[PASS] test_reverts_withdraw_hf_lt_lqt() (gas: 711703)
[PASS] test_reverts_withdraw_invalidAmount() (gas: 261419)
[PASS] test_reverts_withdraw_invalidBalance() (gas: 263488)
[PASS] test_reverts_withdraw_reserveInactive() (gas: 219952)
[PASS] test_reverts_withdraw_reservePaused() (gas: 301069)
[PASS] test_reverts_withdraw_to_atoken() (gas: 261238)
[PASS] test_withdraw_not_enabled_as_collateral() (gas: 261883)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 46.89ms (9.46ms CPU time)
Ran 5 tests for tests/core/PoolConfigurator.initReserves.t.sol:PoolConfiguratorInitReservesTest
[PASS] test_initReserves_multipleAssets() (gas: 12364493)
[PASS] test_initReserves_notEnoughDecimal(uint8) (runs: 1000, μ: 994099, ~: 994099)
[PASS] test_initReserves_singleAsset(bool) (runs: 1000, μ: 3169228, ~: 3169233)
[PASS] test_initReserves_zeroAssets() (gas: 62604)
[PASS] test_reverts_initReserves_maxAssets() (gas: 386196567)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 2.35s (2.32s CPU time)
Ran 4 tests for tests/core/PoolConfigurator.liquidationFee.t.sol:PoolConfiguratorLiquidationFeeTests
[PASS] test_revert_setLiquidationFee_gt_100() (gas: 59125)
[PASS] test_revert_setLiquidationFee_unauthorized() (gas: 58993)
[PASS] test_setLiquidationFee() (gas: 78554)
[PASS] test_setLiquidationFee_100() (gas: 78510)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 39.24ms (1.04ms CPU time)
Ran 37 tests for tests/core/Pool.t.sol:PoolTests
[PASS] test_dropReserve() (gas: 114537)
[PASS] test_getBorrowLogic() (gas: 13657)
[PASS] test_getBridgeLogic() (gas: 13699)
[PASS] test_getEModeLogic() (gas: 13634)
[PASS] test_getFlashLoanLogic() (gas: 13613)
[PASS] test_getLiquidationLogic() (gas: 13680)
[PASS] test_getPoolLogic() (gas: 13744)
[PASS] test_getSupplyLogic() (gas: 13634)
[PASS] test_getVirtualUnderlyingBalance() (gas: 260739)
[PASS] test_getters_getUserAccountData() (gas: 626530)
[PASS] test_mintToTreasury() (gas: 728042)
[PASS] test_mintToTreasury_skip_invalid_addresses() (gas: 732752)
[PASS] test_noop_setUserUseReserveAsCollateral_true_when_already_is_activated() (gas: 306918)
[PASS] test_pool_defaultValues() (gas: 4645956)
[PASS] test_rescueTokens(uint256) (runs: 1000, μ: 81903, ~: 82196)
[PASS] test_resetIsolationModeTotalDebt() (gas: 755335)
[PASS] test_reverts_initReserve_not_poolConfigurator(address) (runs: 1000, μ: 25654, ~: 25654)
[PASS] test_reverts_modifiers_not_poolConfigurator(address) (runs: 1000, μ: 128247, ~: 128247)
[PASS] test_reverts_new_Pool_invalidAddressesProvider() (gas: 4634770)
[PASS] test_reverts_setReserveInterestRateStrategyAddress_AssetNotListed(address,address) (runs: 1000, μ: 40900, ~: 40900)
[PASS] test_reverts_setReserveInterestRateStrategyAddress_ZeroAssetAddress(address) (runs: 1000, μ: 22786, ~: 22786)
[PASS] test_reverts_setUserEmode_0_bad_hf() (gas: 978201)
[PASS] test_reverts_setUserUseReserveAsCollateral_false_hf_lower_lqt() (gas: 628342)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_ltv_zero() (gas: 313037)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_reserve_inactive() (gas: 232606)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_reserve_paused() (gas: 307917)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_user_balance_zero() (gas: 82802)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_user_isolation_mode() (gas: 817937)
[PASS] test_setLiquidationGracePeriod(uint40) (runs: 1000, μ: 36951, ~: 37061)
[PASS] test_setLiquidationGracePeriod_assetNotListed(uint40) (runs: 1000, μ: 27177, ~: 27177)
[PASS] test_setReserveInterestRateStrategyAddress() (gas: 960881)
[PASS] test_setUserEmode() (gas: 215704)
[PASS] test_setUserEmode_twice() (gas: 338458)
[PASS] test_setUserEmode_twice_inconsistent_category() (gas: 959107)
[PASS] test_setUserUseReserveAsCollateral_false() (gas: 252486)
[PASS] test_setUserUseReserveAsCollateral_true() (gas: 292016)
[PASS] test_updateBridgeProtocolFee() (gas: 254)
Suite result: ok. 37 passed; 0 failed; 0 skipped; finished in 1.29s (1.26s CPU time)
Ran 4 tests for tests/core/PoolConfigurator.pendingLTV.t.sol:PoolConfiguratorPendingLtvTests
[PASS] test_freezeReserve_ltvSetTo0() (gas: 128325)
[PASS] test_setLtvToFrozen_ltvSetToPending(uint256,uint256) (runs: 1000, μ: 159057, ~: 159057)
[PASS] test_setLtv_ltvSet(uint256) (runs: 1000, μ: 75668, ~: 75668)
[PASS] test_unfreezeReserve_pendingSetToLtv() (gas: 116304)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 1.20s (1.16s CPU time)
Ran 22 tests for tests/core/PoolAddressesProvider.t.sol:PoolAddressesProviderTests
[PASS] test_PoolDataProvider_changeContract() (gas: 1504494)
[PASS] test_getter_getMarketId() (gas: 1466834)
[PASS] test_new_PoolAddressesProvider() (gas: 1476113)
[PASS] test_reverts_setAddressAsProxy_notAuth() (gas: 1480306)
[PASS] test_reverts_setAddress_noAuth() (gas: 1485504)
[PASS] test_reverts_setters_notOwner() (gas: 1483152)
[PASS] test_setACLManager_changeContract() (gas: 3077524)
[PASS] test_setACLManager_setACLAdmin() (gas: 2295674)
[PASS] test_setAddress() (gas: 1494352)
[PASS] test_setAddressAsProxy_new_proxy() (gas: 2064702)
[PASS] test_setAddressAsProxy_upgrade_proxy() (gas: 2178805)
[PASS] test_setAddress_updateAddress() (gas: 1503510)
[PASS] test_setPoolConfiguratorImpl() (gas: 6241739)
[PASS] test_setPoolConfiguratorImpl_upgrade() (gas: 10919534)
[PASS] test_setPoolDataProvider() (gas: 1494897)
[PASS] test_setPoolImpl() (gas: 6570876)
[PASS] test_setPoolImpl_upgrade() (gas: 11226411)
[PASS] test_setPriceOracle() (gas: 1495032)
[PASS] test_setPriceOracleSentinel() (gas: 1494925)
[PASS] test_setPriceOracleSentinel_changeContract() (gas: 1504549)
[PASS] test_setPriceOracle_changeContract() (gas: 1504832)
[PASS] test_setter_setMarketId() (gas: 1478084)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 49.10ms (9.30ms CPU time)
Ran 49 tests for tests/core/L2Pool.t.sol:L2PoolTests
[PASS] test_dropReserve() (gas: 114572)
[PASS] test_getBorrowLogic() (gas: 13658)
[PASS] test_getBridgeLogic() (gas: 13678)
[PASS] test_getEModeLogic() (gas: 13635)
[PASS] test_getFlashLoanLogic() (gas: 13656)
[PASS] test_getLiquidationLogic() (gas: 13745)
[PASS] test_getPoolLogic() (gas: 13678)
[PASS] test_getSupplyLogic() (gas: 13657)
[PASS] test_getVirtualUnderlyingBalance() (gas: 260689)
[PASS] test_getters_getUserAccountData() (gas: 626618)
[PASS] test_l2_borrow() (gas: 447898)
[PASS] test_l2_liquidationCall() (gas: 1168902)
[PASS] test_l2_partial_withdraw() (gas: 320233)
[PASS] test_l2_rebalance_borrow() (gas: 101580)
[PASS] test_l2_repay() (gas: 481288)
[PASS] test_l2_repay_atokens() (gas: 488580)
[PASS] test_l2_repay_permit(uint128,uint128,uint128,uint128,uint128) (runs: 1000, μ: 662063, ~: 672927)
[PASS] test_l2_set_user_collateral() (gas: 276801)
[PASS] test_l2_supply() (gas: 258148)
[PASS] test_l2_supply_permit(uint128,uint128) (runs: 1000, μ: 432604, ~: 432606)
[PASS] test_l2_swap_borrow_rate() (gas: 644488)
[PASS] test_l2_withdraw() (gas: 253540)
[PASS] test_mintToTreasury() (gas: 728548)
[PASS] test_mintToTreasury_skip_invalid_addresses() (gas: 733192)
[PASS] test_noop_setUserUseReserveAsCollateral_true_when_already_is_activated() (gas: 307178)
[PASS] test_pool_defaultValues() (gas: 4645967)
[PASS] test_rescueTokens(uint256) (runs: 1000, μ: 81961, ~: 82239)
[PASS] test_resetIsolationModeTotalDebt() (gas: 756002)
[PASS] test_reverts_initReserve_not_poolConfigurator(address) (runs: 1000, μ: 25675, ~: 25675)
[PASS] test_reverts_modifiers_not_poolConfigurator(address) (runs: 1000, μ: 128514, ~: 128514)
[PASS] test_reverts_new_Pool_invalidAddressesProvider() (gas: 4634792)
[PASS] test_reverts_setReserveInterestRateStrategyAddress_AssetNotListed(address,address) (runs: 1000, μ: 40790, ~: 40790)
[PASS] test_reverts_setReserveInterestRateStrategyAddress_ZeroAssetAddress(address) (runs: 1000, μ: 22787, ~: 22787)
[PASS] test_reverts_setUserEmode_0_bad_hf() (gas: 978043)
[PASS] test_reverts_setUserUseReserveAsCollateral_false_hf_lower_lqt() (gas: 628494)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_ltv_zero() (gas: 313155)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_reserve_inactive() (gas: 232527)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_reserve_paused() (gas: 308035)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_user_balance_zero() (gas: 82911)
[PASS] test_reverts_setUserUseReserveAsCollateral_true_user_isolation_mode() (gas: 818084)
[PASS] test_setLiquidationGracePeriod(uint40) (runs: 1000, μ: 36927, ~: 36995)
[PASS] test_setLiquidationGracePeriod_assetNotListed(uint40) (runs: 1000, μ: 27155, ~: 27155)
[PASS] test_setReserveInterestRateStrategyAddress() (gas: 960880)
[PASS] test_setUserEmode() (gas: 215592)
[PASS] test_setUserEmode_twice() (gas: 338078)
[PASS] test_setUserEmode_twice_inconsistent_category() (gas: 958901)
[PASS] test_setUserUseReserveAsCollateral_false() (gas: 252529)
[PASS] test_setUserUseReserveAsCollateral_true() (gas: 292167)
[PASS] test_updateBridgeProtocolFee() (gas: 188)
Suite result: ok. 49 passed; 0 failed; 0 skipped; finished in 8.51s (8.47s CPU time)
Ran 5 tests for tests/core/MathUtils.t.sol:MathUtilsTests
[PASS] test_calculateCompoundInterest_1() (gas: 10358)
[PASS] test_calculateCompoundInterest_2() (gas: 10355)
[PASS] test_calculateCompoundInterest_edge() (gas: 9177)
[PASS] test_calculateLinearInterest() (gas: 9220)
[PASS] test_constants() (gas: 8338)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 609.00µs (355.04µs CPU time)
Ran 22 tests for tests/periphery/ParaswapAdapters.t.sol:ParaswapAdaptersTest
[PASS] test_batchClaimToCollector() (gas: 90020)
[PASS] test_batchGetClaimable() (gas: 49436)
[PASS] test_claimToCollector() (gas: 90760)
[PASS] test_getClaimable() (gas: 46540)
[PASS] test_getters() (gas: 13875)
[PASS] test_rescueTokens() (gas: 203756)
[PASS] test_reverts_offset_out_of_range_swap_liquidity_permit_flashloan() (gas: 775711)
[PASS] test_reverts_swapAndDeposit_offset() (gas: 849979)
[PASS] test_reverts_swapAndRepay_offset_out_of_range() (gas: 961322)
[PASS] test_reverts_withdrawAndSwap_offset_out_of_range() (gas: 829870)
[PASS] test_swapAndDeposit() (gas: 934908)
[PASS] test_swapAndDeposit_permit() (gas: 982033)
[PASS] test_swapAndRepay() (gas: 1042211)
[PASS] test_swapAndRepay_flashloan() (gas: 1134736)
[PASS] test_swapAndRepay_flashloan_permit() (gas: 1177382)
[PASS] test_swapAndRepay_no_collateral_leftovers() (gas: 1114843)
[PASS] test_swapAndRepay_permit() (gas: 1089268)
[PASS] test_swap_liquidity_flashloan() (gas: 1048918)
[PASS] test_swap_liquidity_permit_flashloan() (gas: 1091521)
[PASS] test_withdrawAndSwap() (gas: 848882)
[PASS] test_withdrawAndSwap_permit() (gas: 892088)
[PASS] test_withdrawSwapAdapter_reverts_flashloan() (gas: 557739)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 84.77ms (46.05ms CPU time)
Ran 5 tests for tests/core/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 10180)
[PASS] test_percentDiv() (gas: 11166)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 1000, μ: 10621, ~: 10717)
[PASS] test_percentMul() (gas: 11173)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 1000, μ: 10673, ~: 11227)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 150.89ms (150.64ms CPU time)
Ran 33 tests for tests/core/Pool.Borrow.t.sol:PoolBorrowTests
[PASS] test_borrow_variable_in_isolation() (gas: 592498)
[PASS] test_rebalance_borrow_rate() (gas: 84398)
[PASS] test_reverts_borrow_cap() (gas: 318090)
[PASS] test_reverts_borrow_collateral_balance_zero() (gas: 92890)
[PASS] test_reverts_borrow_collateral_can_not_cover() (gas: 336333)
[PASS] test_reverts_borrow_debt_ceiling() (gas: 688457)
[PASS] test_reverts_borrow_debt_ceiling_exceeded() (gas: 418910)
[PASS] test_reverts_borrow_hf_lt_1() (gas: 591262)
[PASS] test_reverts_borrow_inconsistent_emode_category() (gas: 462875)
[PASS] test_reverts_borrow_invalidAmount() (gas: 76127)
[PASS] test_reverts_borrow_invalid_rate() (gas: 317967)
[PASS] test_reverts_borrow_not_borrowable_isolation() (gas: 400922)
[PASS] test_reverts_borrow_reserveFrozen() (gas: 164260)
[PASS] test_reverts_borrow_reserveInactive() (gas: 155578)
[PASS] test_reverts_borrow_reservePaused() (gas: 115038)
[PASS] test_reverts_borrow_sentinel_oracle_down() (gas: 330239)
[PASS] test_reverts_borrow_sioled_borrowing_violation() (gas: 748357)
[PASS] test_reverts_borrow_stable_amount_gt_max_loan_size_stable() (gas: 334687)
[PASS] test_reverts_borrow_stable_borrow_not_enabled() (gas: 379854)
[PASS] test_reverts_borrow_stable_collateral_same_borrow() (gas: 249484)
[PASS] test_reverts_rebalance_borrow_rate_conditions_not_met() (gas: 464513)
[PASS] test_reverts_rebalance_borrow_rate_reserve_inactive() (gas: 139215)
[PASS] test_reverts_rebalance_borrow_rate_reserve_paused() (gas: 98620)
[PASS] test_reverts_swap_borrow_rate_reserve_inactive() (gas: 144598)
[PASS] test_reverts_swap_borrow_rate_reserve_invalid_rate_mode() (gas: 63724)
[PASS] test_reverts_swap_borrow_rate_reserve_paused() (gas: 106135)
[PASS] test_reverts_swap_borrow_rate_reserve_stable_no_debt() (gas: 63625)
[PASS] test_reverts_swap_borrow_rate_reserve_variable_no_debt() (gas: 63675)
[PASS] test_reverts_variable_borrow_transferred_funds() (gas: 405185)
[PASS] test_stable_borrow() (gas: 341630)
[PASS] test_swap_borrow_rate_from_variable_to_stable() (gas: 467307)
[PASS] test_swap_borrow_rate_reserve_frozen() (gas: 557006)
[PASS] test_variable_borrow() (gas: 362645)
Suite result: ok. 33 passed; 0 failed; 0 skipped; finished in 63.94ms (25.33ms CPU time)
Ran 43 tests for tests/core/PoolConfigurator.reserveRiskConfig.t.sol:PoolConfiguratorReserveRiskConfigs
[PASS] test_EmergencyAdminSetReserveFreeze_true() (gas: 157117)
[PASS] test_PoolAdminSetReserveFreeze_true() (gas: 121364)
[PASS] test_RiskAdminSetReserveFreeze_true() (gas: 150772)
[PASS] test_bridgeProtocolFee() (gas: 73016)
[PASS] test_dropReserve() (gas: 152362)
[PASS] test_enableBorrowing() (gas: 3159480)
[PASS] test_enableFlashBorrow() (gas: 3150380)
[PASS] test_enableStableBorrowing() (gas: 3172273)
[PASS] test_reverts_bridgeProtocolFee() (gas: 30211)
[PASS] test_reverts_dropReserve_notListed() (gas: 53487)
[PASS] test_reverts_dropReserve_supplyNotZero() (gas: 320380)
[PASS] test_reverts_dropReserve_variableDebtNotZero() (gas: 484167)
[PASS] test_reverts_dropReserve_zeroAddress() (gas: 47282)
[PASS] test_reverts_enableStableBorrowing_borrowNotEnabled() (gas: 3129452)
[PASS] test_reverts_setCollateralConfig_invalidParams() (gas: 3405066)
[PASS] test_reverts_setDebtCeiling_suppliers() (gas: 302885)
[PASS] test_reverts_setLiquidationProtocolFee_amount_gt_percentageFactor() (gas: 35720)
[PASS] test_reverts_setReserveActive_false_if_suppliers() (gas: 297670)
[PASS] test_reverts_setReserveFactor_gt_percentageFactor() (gas: 35650)
[PASS] test_reverts_setSiloedBorrowing_borrowers() (gas: 430561)
[PASS] test_reverts_updateFlashloanPremiumToProtocol() (gas: 30370)
[PASS] test_reverts_updateFlashloanPremiumTotal() (gas: 30369)
[PASS] test_setBorrowableInIsolation_false() (gas: 65033)
[PASS] test_setBorrowableInIsolation_true() (gas: 67890)
[PASS] test_setCollateralConfig() (gas: 3136958)
[PASS] test_setDebtCeiling() (gas: 121175)
[PASS] test_setDebtCeiling_suppliers_ltZero() (gas: 306064)
[PASS] test_setDebtCeiling_to_zero() (gas: 146169)
[PASS] test_setLiquidationGracePeriodAboveCap(uint40) (runs: 1000, μ: 34863, ~: 34863)
[PASS] test_setLiquidationGracePeriodPool(uint40) (runs: 1000, μ: 137326, ~: 140081)
[PASS] test_setLiquidationGracePeriodReserve(uint40) (runs: 1000, μ: 135312, ~: 135312)
[PASS] test_setLiquidationProtocolFee_amount_gt_percentageFactor() (gas: 74817)
[PASS] test_setPoolPause() (gas: 136648)
[PASS] test_setPoolPause_unpause() (gas: 192335)
[PASS] test_setReserveActive_false() (gas: 118364)
[PASS] test_setReserveActive_true() (gas: 69293)
[PASS] test_setReserveFactor() (gas: 1047332)
[PASS] test_setReserveFreeze_false() (gas: 74704)
[PASS] test_setReservePause_false() (gas: 68533)
[PASS] test_setReservePause_true() (gas: 71285)
[PASS] test_setSiloedBorrowing() (gas: 125856)
[PASS] test_updateFlashloanPremiumToProtocol() (gas: 58382)
[PASS] test_updateFlashloanPremiumTotal() (gas: 58319)
Suite result: ok. 43 passed; 0 failed; 0 skipped; finished in 1.72s (1.68s CPU time)
Ran 15 tests for tests/core/Pool.FlashLoans.t.sol:PoolFlashLoansTests
[PASS] test_flashloan() (gas: 228502)
[PASS] test_flashloan_borrow() (gas: 553684)
[PASS] test_flashloan_multiple() (gas: 350954)
[PASS] test_flashloan_simple() (gas: 192192)
[PASS] test_flashloan_simple_2() (gas: 192214)
[PASS] test_reverts_flashLoan_invalid_return() (gas: 173388)
[PASS] test_reverts_flashLoan_reserve_inactive() (gas: 142158)
[PASS] test_reverts_flashLoan_reserve_not_flash_loan_enabled() (gas: 94660)
[PASS] test_reverts_flashLoan_reserve_paused() (gas: 91339)
[PASS] test_reverts_flashLoan_simple_invalid_return() (gas: 144743)
[PASS] test_reverts_flashloan_simple_transferred_funds() (gas: 185276)
[PASS] test_reverts_flashloan_transferred_funds() (gas: 203148)
[PASS] test_reverts_flashloans_eoa() (gas: 98433)
[PASS] test_reverts_supply_flashloan_simple_transfer_withdraw() (gas: 881768)
[PASS] test_reverts_supply_flashloan_transfer_withdraw() (gas: 902053)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 53.08ms (10.84ms CPU time)
Ran 11 tests for tests/core/PoolConfigurator.supplyCaps.t.sol:PoolConfiguratorSupplyCapTests
[PASS] test_default_supplyCap_zero() (gas: 27532)
[PASS] test_multiple_setSupplyCap() (gas: 383991)
[PASS] test_reverts_interests_gt_cap_and_supply() (gas: 498440)
[PASS] test_reverts_setSupplyCap_gt_max_cap() (gas: 48724)
[PASS] test_reverts_supply_gt_cap() (gas: 135930)
[PASS] test_reverts_unauthorized_setSupplyCap() (gas: 35542)
[PASS] test_setSupplyCap() (gas: 78924)
[PASS] test_setSupplyCap_them_setBorrowCap_zero() (gas: 331238)
[PASS] test_supply_eq_cap() (gas: 312388)
[PASS] test_supply_interests_reach_cap() (gas: 455792)
[PASS] test_supply_lt_cap() (gas: 312389)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 47.42ms (7.33ms CPU time)
Ran 1 test for tests/core/ScaledBalanceTokenBase.t.sol:ScaledBalanceTokenBaseEdgeTests
[PASS] test_scaled_balance_token_base_alice_transfer_to_bob_accrues_interests() (gas: 98875)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 34.90ms (289.63µs CPU time)
Ran 22 tests for tests/core/StableDebtToken.t.sol:StableDebtTokenEventsTests
[PASS] test_balanceOf() (gas: 15757)
[PASS] test_cancel_delegationWithSig() (gas: 106800)
[PASS] test_default_revision() (gas: 1098437)
[PASS] test_delegationWithSig() (gas: 99784)
[PASS] test_getAverageStableRate() (gas: 13453)
[PASS] test_getSupplyData() (gas: 15090)
[PASS] test_getTotalSupplyAndAvgRate() (gas: 14071)
[PASS] test_getTotalSupplyLastUpdated() (gas: 13592)
[PASS] test_getUserLastUpdated() (gas: 15904)
[PASS] test_getUserStableRate() (gas: 15830)
[PASS] test_initialize_StableDebtToken() (gas: 2240615)
[PASS] test_mint_stableDebt_caller_alice() (gas: 2245586)
[PASS] test_mint_stableDebt_caller_bob_onBehalf_alice() (gas: 2278457)
[PASS] test_new_StableDebtToken_implementation() (gas: 1112374)
[PASS] test_principalBalanceOf() (gas: 15788)
[PASS] test_reverts_bad_expiration_delegationWithSig() (gas: 38817)
[PASS] test_reverts_bad_nonce_delegationWithSig() (gas: 116128)
[PASS] test_reverts_initialize_pool_do_not_match() (gas: 2173423)
[PASS] test_reverts_initialize_twice() (gas: 3201981)
[PASS] test_reverts_operation_not_supported() (gas: 1141444)
[PASS] test_reverts_zero_address_delegationWithSig() (gas: 38080)
[PASS] test_totalSupply() (gas: 13564)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 53.20ms (13.71ms CPU time)
Ran 5 tests for tests/periphery/StakedTokenTransferStrategy.t.sol:StakedTokenTransferStrategyTest
[PASS] test_dropApproval() (gas: 19000)
[PASS] test_emergencyTransfer() (gas: 219101)
[PASS] test_getters() (gas: 18748)
[PASS] test_performTransfer() (gas: 22050)
[PASS] test_renewApproval() (gas: 23130)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 36.01ms (1.31ms CPU time)
Ran 32 tests for tests/core/RateStrategy.t.sol:RateStrategyTests
[PASS] test_calculate_rates_100_percent_usage() (gas: 63800)
[PASS] test_calculate_rates_100_percent_usage_50_percent_stable_debt_50_percent_variable_debt_10_percent_avg_stable_rate() (gas: 63919)
[PASS] test_calculate_rates_80_bps_usage() (gas: 63932)
[PASS] test_calculate_rates_80_percent_usage() (gas: 108885)
[PASS] test_calculate_rates_80_percent_usage_and_50_percent_supply_usage_due_minted_tokens() (gas: 62185)
[PASS] test_calculate_rates_80_percent_usage_and_80_bps_supply_usage_due_minted_tokens() (gas: 62229)
[PASS] test_calculate_rates_above_op_usage(uint16,uint256,uint256,uint32,uint32,uint32,uint256) (runs: 1000, μ: 143275, ~: 143403)
[PASS] test_calculate_rates_below_op_usage(uint16,uint256,uint256,uint32,uint32,uint32,uint256) (runs: 1000, μ: 135757, ~: 135777)
[PASS] test_calculate_rates_below_op_usage_when_no_debt(uint16,uint256,uint32,uint32,uint32,uint256) (runs: 1000, μ: 91848, ~: 92147)
[PASS] test_calculate_rates_empty_reserve(uint16,uint32,uint32,uint32) (runs: 1000, μ: 57741, ~: 57741)
[PASS] test_calculate_rates_when_not_using_virtual_valance(uint16,uint256,uint32,uint32,uint32,uint256) (runs: 1000, μ: 84578, ~: 84976)
[PASS] test_calculate_rates_when_total_debt_0(uint16,uint256,uint32,uint32,uint32,uint256) (runs: 1000, μ: 84832, ~: 85350)
[PASS] test_fuzz_calculate_rates_80_percent_usage_added_and_virtual_equal(uint256) (runs: 1000, μ: 33870, ~: 33870)
[PASS] test_getInterestRateDataBps(uint16,uint32,uint32,uint32) (runs: 1000, μ: 53168, ~: 53168)
[PASS] test_getInterestRateDataRay(uint16,uint32,uint32,uint32) (runs: 1000, μ: 54037, ~: 54037)
[PASS] test_getMaxVariableBorrowRate(uint16,uint32,uint32,uint32) (runs: 1000, μ: 51641, ~: 51641)
[PASS] test_initialization() (gas: 14078)
[PASS] test_new_DefaultReserveInterestRateStrategy_wrong_provider() (gas: 42185)
[PASS] test_new_SetReserveInterestRateParams(uint16,uint32,uint32,uint32) (runs: 1000, μ: 65208, ~: 65208)
[PASS] test_new_SetReserveInterestRateParams_override_method(uint16,uint32,uint32,uint32) (runs: 1000, μ: 64604, ~: 64604)
[PASS] test_new_SetReserveInterestRateParams_override_method_when_not_configurator(uint16,uint32,uint32,uint32) (runs: 1000, μ: 21252, ~: 21252)
[PASS] test_new_SetReserveInterestRateParams_when_not_configurator(uint16,uint32,uint32,uint32) (runs: 1000, μ: 21917, ~: 21917)
[PASS] test_reverts_SetReserveInterestRateParams_when_gt_maxRate(uint16,uint32,uint32,uint32) (runs: 1000, μ: 25588, ~: 25588)
[PASS] test_reverts_SetReserveInterestRateParams_when_gt_maxRate_override_method(uint16,uint32,uint32,uint32) (runs: 1000, μ: 24911, ~: 24911)
[PASS] test_reverts_SetReserveInterestRateParams_when_gt_max_op(uint16,uint32,uint32,uint32) (runs: 1000, μ: 22631, ~: 22631)
[PASS] test_reverts_SetReserveInterestRateParams_when_gt_max_op_override_method(uint16,uint32,uint32,uint32) (runs: 1000, μ: 21931, ~: 21931)
[PASS] test_reverts_SetReserveInterestRateParams_when_lt_min_op(uint16,uint32,uint32,uint32) (runs: 1000, μ: 22658, ~: 22658)
[PASS] test_reverts_SetReserveInterestRateParams_when_lt_min_op_override_method(uint16,uint32,uint32,uint32) (runs: 1000, μ: 22001, ~: 22001)
[PASS] test_reverts_SetReserveInterestRateParams_when_reserve_0(uint16,uint32,uint32,uint32) (runs: 1000, μ: 19289, ~: 19289)
[PASS] test_reverts_SetReserveInterestRateParams_when_reserve_0_override_method(uint16,uint32,uint32,uint32) (runs: 1000, μ: 18585, ~: 18585)
[PASS] test_reverts_SetReserveInterestRateParams_when_slope1_gt_slope2(uint16,uint32,uint32,uint32) (runs: 1000, μ: 23928, ~: 23928)
[PASS] test_reverts_SetReserveInterestRateParams_when_slope1_gt_slope2_override_method(uint16,uint32,uint32,uint32) (runs: 1000, μ: 23927, ~: 23927)
Suite result: ok. 32 passed; 0 failed; 0 skipped; finished in 19.13s (19.09s CPU time)
Ran 14 tests for tests/core/Pool.Repay.t.sol:PoolRepayTests
[PASS] test_full_repay_borrow_variable_in_isolation() (gas: 611466)
[PASS] test_partial_repay_borrow_variable_in_isolation() (gas: 664534)
[PASS] test_repayWithATokens_full_collateral_variable_borrow() (gas: 648179)
[PASS] test_repayWithATokens_full_variable_borrow() (gas: 436196)
[PASS] test_repayWithATokens_fuzz_collateral_variable_borrow(uint256,uint32) (runs: 1000, μ: 634916, ~: 636197)
[PASS] test_repayWithPermit(uint128,uint120,uint120,uint120,uint120) (runs: 1000, μ: 605825, ~: 598167)
[PASS] test_repayWithPermit_not_failing_if_permit_was_used(uint128,uint120,uint120,uint120,uint120) (runs: 1000, μ: 611530, ~: 603664)
[PASS] test_repayWithPermit_should_revert_if_permit_is_less_then_repay_amount(uint128,uint120,uint120,uint120,uint120) (runs: 1000, μ: 559817, ~: 551553)
[PASS] test_repay_full_variable_borrow() (gas: 423195)
[PASS] test_reverts_borrow_invalidAmount() (gas: 64118)
[PASS] test_reverts_borrow_reserveInactive() (gas: 145501)
[PASS] test_reverts_borrow_reservePaused() (gas: 104914)
[PASS] test_reverts_no_explicit_repay_on_behalf() (gas: 347457)
[PASS] test_reverts_repay_no_debt() (gas: 64673)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 11.35s (15.66s CPU time)
Ran 25 tests for tests/core/PoolConfigurator.ACLModifiers.t.sol:PoolConfiguratorACLModifiersTest
[PASS] test_reverts_notAdmin_dropReserve(address) (runs: 1000, μ: 36183, ~: 36183)
[PASS] test_reverts_notAdmin_initReserves(address) (runs: 1000, μ: 39020, ~: 39023)
[PASS] test_reverts_notAdmin_setReserveActive(address) (runs: 1000, μ: 36333, ~: 36333)
[PASS] test_reverts_notAdmin_updateAToken(address) (runs: 1000, μ: 35290, ~: 35290)
[PASS] test_reverts_notAdmin_updateFlashLoanPremiumProtocol(address) (runs: 1000, μ: 34101, ~: 34101)
[PASS] test_reverts_notAdmin_updateFlashLoanPremiumTotal(address) (runs: 1000, μ: 34054, ~: 34054)
[PASS] test_reverts_notAdmin_updateStableDebtToken(address) (runs: 1000, μ: 35183, ~: 35183)
[PASS] test_reverts_notAdmin_updateVariableDebtToken(address) (runs: 1000, μ: 35182, ~: 35182)
[PASS] test_reverts_notRiskAdmin_configureReserveAsCollateral(address) (runs: 1000, μ: 38717, ~: 38717)
[PASS] test_reverts_notRiskAdmin_setAssetEModeCategory(address) (runs: 1000, μ: 38725, ~: 38725)
[PASS] test_reverts_notRiskAdmin_setBorrowCap(address) (runs: 1000, μ: 38708, ~: 38708)
[PASS] test_reverts_notRiskAdmin_setEModeCategory(address) (runs: 1000, μ: 39351, ~: 39351)
[PASS] test_reverts_notRiskAdmin_setReserveBorrowing(address) (runs: 1000, μ: 38682, ~: 38682)
[PASS] test_reverts_notRiskAdmin_setReserveFactor(address) (runs: 1000, μ: 38643, ~: 38643)
[PASS] test_reverts_notRiskAdmin_setReserveInterestRateData(address,address) (runs: 1000, μ: 39321, ~: 39321)
[PASS] test_reverts_notRiskAdmin_setReserveInterestRateStrategyAddress(address) (runs: 1000, μ: 39408, ~: 39408)
[PASS] test_reverts_notRiskAdmin_setReserveStableRateBorrowing(address) (runs: 1000, μ: 38770, ~: 38770)
[PASS] test_reverts_notRiskAdmin_setSupplyCap(address) (runs: 1000, μ: 38665, ~: 38665)
[PASS] test_reverts_notRiskOrPoolOrEmergencyAdmin_setReserveFreeze(address) (runs: 1000, μ: 43200, ~: 43200)
[PASS] test_reverts_setDebtCeiling(address) (runs: 1000, μ: 38687, ~: 38687)
[PASS] test_reverts_setPoolPause_noGracePeriod_unauth(address,bool) (runs: 1000, μ: 38702, ~: 38702)
[PASS] test_reverts_setPoolPause_unauth(address,bool,uint40) (runs: 1000, μ: 56390, ~: 56390)
[PASS] test_reverts_setReservePause_noGracePeriod_off_unauth(address,address,bool) (runs: 1000, μ: 38976, ~: 38976)
[PASS] test_reverts_setReservePause_off_unauth(address,address,bool,uint40) (runs: 1000, μ: 38987, ~: 38987)
[PASS] test_reverts_setReservePause_on_unauth(address,address,bool,uint40) (runs: 1000, μ: 39053, ~: 39053)
Suite result: ok. 25 passed; 0 failed; 0 skipped; finished in 14.89s (4.12s CPU time)
Ran 19 tests for tests/core/VariableDebtToken.t.sol:VariableDebtTokenEventsTests
[PASS] test_balanceOf() (gas: 255664)
[PASS] test_cancel_delegationWithSig() (gas: 106867)
[PASS] test_default_revision() (gas: 1587041)
[PASS] test_delegationWithSig() (gas: 99791)
[PASS] test_initialize_VariableDebtToken() (gas: 2727883)
[PASS] test_mint_variableDebt_caller_alice() (gas: 2800053)
[PASS] test_mint_variableDebt_caller_bob_onBehalf_alice() (gas: 2814286)
[PASS] test_new_VariableDebtToken_implementation() (gas: 1599970)
[PASS] test_partial_burn_variableDebt() (gas: 2814457)
[PASS] test_reverts_bad_expiration_delegationWithSig() (gas: 38750)
[PASS] test_reverts_bad_nonce_delegationWithSig() (gas: 116112)
[PASS] test_reverts_initialize_pool_do_not_match() (gas: 2660715)
[PASS] test_reverts_initialize_twice() (gas: 3689301)
[PASS] test_reverts_operation_not_supported() (gas: 1618567)
[PASS] test_reverts_zero_address_delegationWithSig() (gas: 38013)
[PASS] test_scaledBalanceOf() (gas: 343361)
[PASS] test_totalScaledSupply() (gas: 380428)
[PASS] test_totalSupply() (gas: 380401)
[PASS] test_total_burn_variableDebt() (gas: 2814369)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 57.43ms (19.17ms CPU time)
Ran 2 tests for tests/core/RatesOverflow.t.sol:RatesOverflowCheckTests
[PASS] test_overflow_liquidity_rates() (gas: 97862)
[PASS] test_overflow_variable_rates() (gas: 432928)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 39.51ms (1.04ms CPU time)
Ran 10 tests for tests/core/PoolConfigurator.borrowCaps.t.sol:PoolConfiguratorBorrowCapTests
[PASS] test_borrow_eq_cap() (gas: 332019)
[PASS] test_borrow_interests_reach_cap() (gas: 334081)
[PASS] test_borrow_lt_cap() (gas: 312975)
[PASS] test_default_borrowCap_zero() (gas: 27532)
[PASS] test_reverts_borrow_after_borrow_interests_reach_cap() (gas: 384861)
[PASS] test_reverts_borrow_gt_cap() (gas: 154077)
[PASS] test_reverts_setBorrowCap_gt_max_cap() (gas: 48723)
[PASS] test_reverts_unauthorized_setBorrowCap() (gas: 35560)
[PASS] test_setBorrowCap() (gas: 78866)
[PASS] test_setBorrowCap_them_setBorrowCap_zero() (gas: 333578)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 48.10ms (6.67ms CPU time)
Ran 14 tests for tests/periphery/WrappedTokenGateway.t.sol:WrappedTokenGatewayTests
[PASS] test_borrowDelegateApprove_repay() (gas: 496588)
[PASS] test_borrowVariableDebtWeth_repayWithEth() (gas: 851638)
[PASS] test_borrowVariableDebtWeth_repayWithEth_mismatchedValues() (gas: 845287)
[PASS] test_depositNativeEthInPool() (gas: 267677)
[PASS] test_fallback_revert() (gas: 10071)
[PASS] test_getWETHAddress() (gas: 10618)
[PASS] test_ownerCanRescueEth() (gas: 25214)
[PASS] test_ownerCanRescueTokens() (gas: 96947)
[PASS] test_sendEthFallback_revert() (gas: 16736)
[PASS] test_sendEth_revert() (gas: 16590)
[PASS] test_withdrawEth_full() (gas: 399490)
[PASS] test_withdrawEth_partial() (gas: 423186)
[PASS] test_withdrawEth_permit() (gas: 457653)
[PASS] test_withdrawEth_permit_full() (gas: 430276)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 58.19ms (22.04ms CPU time)
Ran 12 tests for tests/core/WadRayMath.t.sol:WadRayMathTests
[PASS] test_constants() (gas: 13263)
[PASS] test_rayDiv() (gas: 12777)
[PASS] test_rayMul() (gas: 11416)
[PASS] test_rayToWad() (gas: 11075)
[PASS] test_rayToWad_fuzz(uint256) (runs: 1000, μ: 13350, ~: 13301)
[PASS] test_wadDiv() (gas: 12898)
[PASS] test_wadDiv_fuzzing(uint256,uint256) (runs: 1000, μ: 10539, ~: 10740)
[PASS] test_wadMul() (gas: 11164)
[PASS] test_wadMul_edge() (gas: 11234)
[PASS] test_wadMul_fuzzing(uint256,uint256) (runs: 1000, μ: 10734, ~: 11314)
[PASS] test_wadToRay() (gas: 10885)
[PASS] test_wadToRay_fuzz(uint256) (runs: 1000, μ: 12187, ~: 12368)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 314.75ms (335.52ms CPU time)
Ran 19 tests for tests/periphery/RewardsController.t.sol:RewardsControllerTest
[PASS] test_accrueRewards() (gas: 952759)
[PASS] test_claimAllRewards() (gas: 903465)
[PASS] test_claimAllRewardsOnBehalf() (gas: 937169)
[PASS] test_claimAllRewardsToSelf() (gas: 903091)
[PASS] test_claimRewards() (gas: 900228)
[PASS] test_claimRewardsOnBehalf() (gas: 938784)
[PASS] test_claimRewardsToSelf() (gas: 899909)
[PASS] test_claimRewards_partial() (gas: 900479)
[PASS] test_claimRewards_zero() (gas: 640629)
[PASS] test_claimRewards_zero_with_rewards() (gas: 647481)
[PASS] test_configureAssets() (gas: 621611)
[PASS] test_initialize_no_op() (gas: 3736168)
[PASS] test_new_RewardsController() (gas: 3712512)
[PASS] test_reverts_initialize_twice() (gas: 3737756)
[PASS] test_setClaimer() (gas: 58290)
[PASS] test_setDistributionEnd() (gas: 637521)
[PASS] test_setEmissionPerSecond() (gas: 641688)
[PASS] test_setRewardOracle() (gas: 716258)
[PASS] test_setTransferStrategy_PullRewardsTransferStrategy() (gas: 921459)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 38.15ms (14.66ms CPU time)
Ran 2 tests for tests/core/ZeroInteresRateStrategy.t.sol:ZeroReserveInterestRateStrategyTests
[PASS] test_calculate_rates() (gas: 939801)
[PASS] test_new_ZeroReserveInterestRateStrategy() (gas: 912026)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 26.87ms (557.78µs CPU time)
Ran 20 tests for tests/core/Pool.Liquidations.t.sol:PoolLiquidationTests
[PASS] test_full_liquidate_atokens_multiple_variable_borrows() (gas: 1434471)
[PASS] test_full_liquidate_multiple_supplies_and_variable_borrows() (gas: 1639210)
[PASS] test_full_liquidate_multiple_variable_borrows() (gas: 1492110)
[PASS] test_liquidate_emode_position_with_emode_oracle() (gas: 1505652)
[PASS] test_liquidate_emode_position_without_emode_oracle() (gas: 1475720)
[PASS] test_liquidate_isolated_position() (gas: 1408041)
[PASS] test_liquidate_variable_borrow() (gas: 1532935)
[PASS] test_liquidate_variable_borrow_no_fee() (gas: 1241373)
[PASS] test_liquidate_variable_borrow_same_collateral_and_borrow() (gas: 1177062)
[PASS] test_liquidation_with_liquidation_grace_period_collateral_active(uint40) (runs: 1000, μ: 1566169, ~: 1575538)
[PASS] test_liquidation_with_liquidation_grace_period_debt_active(uint40) (runs: 1000, μ: 1563187, ~: 1573413)
[PASS] test_liquidation_with_liquidation_grace_period_debt_collateral_active(uint40) (runs: 1000, μ: 1580698, ~: 1590422)
[PASS] test_partial_liquidate_atokens_variable_borrow() (gas: 1350896)
[PASS] test_partial_liquidate_variable_borrow() (gas: 1302564)
[PASS] test_reverts_liquidation_collateral_not_active() (gas: 653781)
[PASS] test_reverts_liquidation_hf_gt_liquidation_threshold() (gas: 488300)
[PASS] test_reverts_liquidation_invalid_borrow() (gas: 634781)
[PASS] test_reverts_liquidation_oracle_sentinel_on() (gas: 335491)
[PASS] test_reverts_liquidation_reserveInactive() (gas: 167280)
[PASS] test_reverts_liquidation_reservePaused() (gas: 126847)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 13.61s (16.83s CPU time)
Ran 50 test suites in 28.64s (85.40s CPU time): 655 tests passed, 0 failed, 0 skipped (655 total tests) |
MichaelMorami
pushed a commit
to Certora/aave-v3-origin
that referenced
this pull request
Sep 8, 2024
* fix: address certora feedback * fix: leftover * fix: one more leftover
sakulstra
added a commit
that referenced
this pull request
Sep 11, 2024
* feat: Add rescuable to static a token (#29) * feat: Add rescuable to static a token * Update src/periphery/contracts/static-a-token/StaticATokenLM.sol --------- Co-authored-by: Lukas <[email protected]> * fix: combine interface (#33) * Update METADEPOSIT_TYPEHASH (#44) * Update METADEPOSIT_TYPEHASH * cleanup of MetaDepositParams * feat: pausability (#45) * feat: expose latest answer on static a token (#3) * fix: add readme * docs: note on upgrade * fix: move around tests * feat: use openzeppelin & remove meta txns (for now) (#5) * fix: remove deprecation gap * fix: migrate to oz * oz: use erc20pausableupgradable * fix: move 4626 to oz as well * fix: cleanup * feat: add failing rewards test * fix: use oz * fix: cleanup tests * fix: remove deprecated interfaces * fix: lint * fix: remove unused revision * fix: address comments * fix: alter function ordering a bit * feat: move logic to oz and rework all tests (#7) * fix: remove deprecation gap * fix: migrate to oz * oz: use erc20pausableupgradable * fix: move 4626 to oz as well * fix: cleanup * feat: add failing rewards test * fix: use oz * fix: cleanup tests * fix: remove deprecated interfaces * fix: lint * fix: remove unused revision * fix: address comments * fix: alter function ordering a bit * More OZ logic on stata * add missing virtual * Separate Stata4626 (#8) * Separate Stata4626 * change to erc7201 * regenerated storage location * change latestAnswer calculation logic * DRAFT: Refactoring in extensions style * add initializer * remove unused params at __Stata4626_init * remove RayMathExplicitRounding * regenerated ERC20AaveLMStorageLocation * add RAY constant * remove IInitializableStata4626LM * depositWithPermit * disclamer on _update overload * some descriptions cleanup * change require to revert * add comment to latestAnswer calc * add comment to latestAnswer calc -1 * make ERC20AaveLMUpgradable abstract * update license * rename merger and 4626 contracts * change Upgradable to Upgradeable * move _disableInitializers into StataTokenV2 * rename IStata4626 to IERC4626StataToken * rename init on ERC4626StataToken * Changes on stata initializations, to follow more strict guidelines * Changes to make stata more consistent with using ERC20 extensions * Fix on function called on initialize of stata * feat: improved tests * fix: update test * feat: add erc4626 tests * fix: migrate some more tests * fix: improve tests * refactor: move to dedicated files * feat: improve tests * fix typo * feat: add permit tests * fix: linting * feat: improved docs * fix: typos * fix: use internal function --------- Co-authored-by: eboado <[email protected]> Co-authored-by: sakulstra <[email protected]> --------- Co-authored-by: sakulstra <[email protected]> Co-authored-by: eboado <[email protected]> * fix: cleanup imports refactor: cleanup some things (cherry picked from commit dd7166d0640e1a5bb9ad7afa03d9a21c6eb938ee) * test: prevent mint to address(0) * docs: add a bit more docs * fix: lint on save * docs: add comment about libraries * Update tests/periphery/static-a-token/ERC20AaveLMUpgradable.t.sol Co-authored-by: Ernesto Boado <[email protected]> * Update tests/periphery/static-a-token/ERC4626StataTokenUpgradeable.t.sol Co-authored-by: Ernesto Boado <[email protected]> * refactor: rename factory + add inheritance graph (#13) * docs: add inheritance image * refactor: rename factory * docs: add some more docs on readm * fix: address certora feedback (#14) * fix: address certora feedback * fix: leftover * fix: one more leftover * fix: properly resolve conflict * fix: total assets (#17) * fix: calculate totalAssets * test: add test to ensure doesn't revert on zero * feat: use permissionless rescuable (#20) * refactor: interface inheritance (#21) * refactor: interface inheritance * refactor: inherit permit * fix: add inheritdoc * Certora adaptation to stata (#18) * fix: calculate totalAssets * Certora adaptation to stata --------- Co-authored-by: sakulstra <[email protected]> * fix: lint certora files * Update README.md --------- Co-authored-by: sendra <[email protected]> Co-authored-by: Andrey <[email protected]> Co-authored-by: eboado <[email protected]> Co-authored-by: Michael Morami <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.