feat: Add FeeSharesMinter contract#1216
Conversation
Forge Build Sizes🔕 Unchanged
|
🌈 Test ResultsNo files changed, compilation skipped
Ran 5 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 101530)
[PASS] test_permitReserve_forwards_correct_call() (gas: 51018)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40088)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 31030)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29373)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 49.54ms (1.94ms CPU time)
Ran 2 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 463594)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 87496)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 33.30ms (3.76ms CPU time)
Ran 19 tests for tests/contracts/spoke/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 15250)
[PASS] test_decimals() (gas: 8358)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 16691, ~: 17009)
Logs:
Bound result 18
[PASS] test_getReservePrice() (gas: 46794)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 44558)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10899)
[PASS] test_getReservePrices() (gas: 76746)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 48933)
[PASS] test_getReserveSource() (gas: 47184)
[PASS] test_setReserveSource() (gas: 44204)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97493)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17205)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 16954)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 12996)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5010870)
[PASS] test_setSpoke() (gas: 5039232)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10892)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13465, ~: 13465)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15102)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 1.45s (1.41s CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/spoke/AaveV4AaveOracleDeployProcedure.t.sol:AaveV4AaveOracleDeployProcedureTest
[PASS] test_deployAaveOracle() (gas: 524367)
[PASS] test_deployAaveOracle_reverts_inputValidation() (gas: 8466)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 5.25ms (103.33µs CPU time)
Ran 2 tests for tests/deployments/procedures/deploy/AaveV4AccessManagerEnumerableDeployProcedure.t.sol:AaveV4AccessManagerEnumerableDeployProcedureTest
[PASS] test_deployAccessManagerEnumerable() (gas: 4403059)
[PASS] test_deployAccessManagerEnumerable_reverts() (gas: 10562)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 5.89ms (607.37µs CPU time)
Ran 6 tests for tests/deployments/procedures/deploy/roles/AaveV4AccessManagerRolesProcedure.t.sol:AaveV4AccessManagerRolesProcedureTest
[PASS] test_grantAccessManagerAdminRole() (gas: 177653)
[PASS] test_grantAccessManagerAdminRole_reverts() (gas: 14087)
[PASS] test_labelAllRoles() (gas: 1713955)
[PASS] test_labelAllRoles_reverts_zeroAddress() (gas: 8466)
[PASS] test_replaceDefaultAdminRole() (gas: 144664)
[PASS] test_replaceDefaultAdminRole_reverts() (gas: 178594)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 7.02ms (1.94ms CPU time)
Ran 5 tests for tests/deployments/batches/AaveV4AuthorityBatch.t.sol:AaveV4AuthorityBatchTest
[PASS] test_adminRoleMemberTracking() (gas: 21955)
[PASS] test_differentSaltProducesDifferentAddress() (gas: 14349)
[PASS] test_getReport() (gas: 19926)
[PASS] test_noOtherRolesInitialized() (gas: 15847)
[PASS] test_revert_zeroAdmin() (gas: 3765)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 6.42ms (1.02ms CPU time)
Ran 21 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154394, ~: 153972)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39263)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37609)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154350, ~: 153928)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39284)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37588)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155455, ~: 155631)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39358)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37680)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154412, ~: 153990)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39329)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37620)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 142703, ~: 143557)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25576)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27259)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 142696, ~: 143550)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25486)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27230)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154391, ~: 153969)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39370)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37609)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 44.89s (44.86s CPU time)
Ran 7 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13433, ~: 13433)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13411, ~: 13411)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13446, ~: 13446)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13476, ~: 13476)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13709, ~: 13709)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13665, ~: 13665)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13476, ~: 13476)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 16.99s (16.96s CPU time)
Ran 7 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 80669)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 118700)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 73255)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 140299)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 81545)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 81655)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 79681)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 34.69ms (4.59ms CPU time)
Ran 7 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 78461)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 116492)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 71047)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 138091)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 79337)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 79447)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 77473)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 37.09ms (4.50ms CPU time)
Ran 4 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.SetSelfAsUserPositionManagerWithSig.t.sol:SignatureGatewaySetSelfAsUserPositionManagerTest
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 140247)
[PASS] test_setSelfAsUserPositionManagerWithSig_forwards_correct_call() (gas: 32698)
[PASS] test_setSelfAsUserPositionManagerWithSig_ignores_underlying_spoke_reverts() (gas: 29754)
[PASS] test_setSelfAsUserPositionManagerWithSig_revertsWith_SpokeNotRegistered() (gas: 16553)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 30.73ms (1.20ms CPU time)
Ran 14 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 843431)
[PASS] test_multicall() (gas: 681960)
[PASS] test_multicall_atomicity_on_revert() (gas: 551378)
[PASS] test_multicall_no_atomicity_with_trycatch() (gas: 653662)
[PASS] test_renouncePositionManagerRole() (gas: 29776)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18135)
[PASS] test_repayWithSig() (gas: 856488)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 336990)
[PASS] test_setUsingAsCollateralWithSig() (gas: 543151)
[PASS] test_supplyWithSig() (gas: 629653)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 361979)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 1068979)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13346, ~: 13346)
[PASS] test_withdrawWithSig() (gas: 633591)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 566.38ms (536.12ms CPU time)
Ran 3 tests for tests/contracts/spoke/misc/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 519305)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 603850)
[PASS] testAccess_spoke_admin_config_access() (gas: 496807)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 32.03ms (2.97ms CPU time)
Ran 4 tests for tests/contracts/spoke/risk-premium/Spoke.RiskPremium.Scenario.t.sol:SpokeRiskPremiumScenarioTest
[PASS] test_getUserRiskPremium_applyInterest_two_users_two_reserves_borrowed() (gas: 3356158)
[PASS] test_getUserRiskPremium_fuzz_inflight_calcs((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint40) (runs: 5000, μ: 2512364, ~: 2569162)
Logs:
Bound result 522
Bound result 185551432108064505982748574397
Bound result 4981
Bound result 15823
Bound result 500
Bound result 10024
Bound result 1301
Bound result 3812
Bound result 86
[PASS] test_getUserRiskPremium_fuzz_two_users_two_reserves_borrowed((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint16,uint16,uint40[3]) (runs: 5000, μ: 2987189, ~: 2894809)
Logs:
Bound result 182500751821453536646882478646
Bound result 24809955476816696626515410629
Bound result 13394
Bound result 5563
Bound result 981616545747
Bound result 464682903010
Bound result 385556597065836411
Bound result 58342784517169884
Bound result 0
Bound result 0
Bound result 73
Bound result 76577018
Bound result 662928562
[PASS] test_riskPremiumPropagatesCorrectly_singleBorrow() (gas: 2028196)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 110.80s (110.76s CPU time)
Ran 1 test for tests/contracts/spoke/accrual/Spoke.AccrueInterest.Scenario.t.sol:SpokeAccrueInterestScenarioTest
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime_twoActions((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 6658805, ~: 6506258)
Logs:
Bound result 17569
Bound result 10579
Bound result 3008
Bound result 12675
Bound result 1797
Bound result 18877802918286177661031754899
Bound result 500
Bound result 18155
Bound result 531
Bound result 1797
Bound result 196100383480628
Bound result 500
Bound result 1487
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 163.49s (163.46s CPU time)
Ran 20 tests for tests/contracts/spoke/risk-premium/Spoke.RiskPremium.t.sol:SpokeRiskPremiumTest
[PASS] test_getUserRiskPremium_fuzz_applyInterest_two_reserves_borrowed(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2359512, ~: 2410922)
Logs:
Bound result 399689378631262050030180083907
Bound result 91213558025843298110010426369
Bound result 137194839325814207
Bound result 22060124320603096060
Bound result 17638653339653610861
[PASS] test_getUserRiskPremium_fuzz_applyingInterest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 1673492, ~: 1730549)
Logs:
Bound result 4475075785254438
Bound result 346803276684397183850384383239
Bound result 145253857480925558
Bound result 28168306973900195421
[PASS] test_getUserRiskPremium_fuzz_four_reserves_change_cr(uint256,uint256,uint256,uint256,uint256,uint24) (runs: 5000, μ: 2091213, ~: 2072980)
Logs:
Bound result 677
Bound result 189
Bound result 2989705018929936598
Bound result 0
Bound result 99389463372627470674
Bound result 952516542933738469136203552
[PASS] test_getUserRiskPremium_fuzz_four_reserves_change_one_price(uint256,uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2269325, ~: 2252681)
Logs:
Bound result 2667053080410069
Bound result 189
Bound result 2989705018929936598
Bound result 0
Bound result 99389463372627470674
Bound result 952516542933738469136203552
[PASS] test_getUserRiskPremium_fuzz_four_reserves_prices_supply_debt((uint256,uint256,uint256,uint256,uint24,uint256),(uint256,uint256,uint256,uint256,uint24,uint256),(uint256,uint256,uint256,uint256,uint24,uint256),(uint256,uint256,uint256,uint256,uint24,uint256)) (runs: 5000, μ: 1988887, ~: 1996296)
Logs:
Bound result 70006022918798378189966856792
Bound result 901018266152708193598544684144
Bound result 902969290083964198
Bound result 83159955706027700944
Bound result 33566875178389079413546562466
Bound result 7608894978778660570134
Bound result 32363240632
Bound result 6640243827817040824
Bound result 4359969152963444
Bound result 2692493314516069
Bound result 7251249900896057
Bound result 10142
Bound result 81000
Bound result 728
Bound result 77047
Bound result 77046
[PASS] test_getUserRiskPremium_fuzz_four_reserves_supply_and_borrow(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 1582579, ~: 1579543)
Logs:
Bound result 399689378631262050030180083907
Bound result 487079309328974541148217920208
Bound result 12850229434672365
Bound result 22060124320603096060
Bound result 17638653339653610861
[PASS] test_getUserRiskPremium_fuzz_single_reserve_collateral_borrowed_amount(uint256) (runs: 5000, μ: 427672, ~: 427177)
Logs:
Bound result 1040000000000000000
[PASS] test_getUserRiskPremium_fuzz_supply_does_not_impact(uint256,uint256) (runs: 5000, μ: 607027, ~: 606905)
Logs:
Bound result 1560000000000000000000000000
Bound result 1000000000000000000
[PASS] test_getUserRiskPremium_fuzz_three_reserves_supply_and_borrow(uint256,uint256,uint256,uint256) (runs: 5000, μ: 1254641, ~: 1295105)
Logs:
Bound result 4475075785254438
Bound result 149854217388389874189986683847
Bound result 42830599330452951
Bound result 28168306973900195421
[PASS] test_getUserRiskPremium_fuzz_two_reserves_supply_and_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1048770, ~: 1082497)
Logs:
Bound result 0
Bound result 409652
Bound result 161864027721225736371419722135
[PASS] test_getUserRiskPremium_multi_reserve_collateral() (gas: 969150)
[PASS] test_getUserRiskPremium_multi_reserve_collateral_lower_rp_than_highest_cr() (gas: 1735618)
[PASS] test_getUserRiskPremium_multi_reserve_collateral_weth_partial_cover() (gas: 1309006)
[PASS] test_getUserRiskPremium_no_collateral() (gas: 98052)
[PASS] test_getUserRiskPremium_no_collateral_set() (gas: 200717)
[PASS] test_getUserRiskPremium_single_reserve_collateral() (gas: 211079)
[PASS] test_getUserRiskPremium_single_reserve_collateral_borrowed() (gas: 421913)
[PASS] test_getUserRiskPremium_two_reserves_equal_parts() (gas: 1122489)
[PASS] test_riskPremium_collateral_insufficient_to_cover_debt() (gas: 2469247)
[PASS] test_riskPremium_postActions() (gas: 1342164)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 250.52s (250.49s CPU time)
Ran 7 tests for tests/contracts/spoke/accrual/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 155586)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 711047, ~: 710886)
Logs:
Bound result 4499
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 273097, ~: 273088)
Logs:
Bound result 4499
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 613292, ~: 613715)
Logs:
Bound result 1560000000000000000000000000
Bound result 349190671
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 572561, ~: 572913)
Logs:
Bound result 1560000000000000000000000000
Bound result 349190671
[SKIP: pending rft] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 0, μ: 0, ~: 0)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 4872057, ~: 4892338)
Logs:
Bound result 305375510110605085784250
Bound result 838324472593858632247811151037
Bound result 479838552462878223
Bound result 78332134910116782229
Bound result 320722892869241549999882771013
Bound result 208534014331542203242891652683
Bound result 601072247187333131
Bound result 38467602528369177241
Bound result 185
Bound result 53845
Bound result 30746
Bound result 61159
Bound result 198027
Bound result 320722892869241549999882771013
Bound result 208534014331542203242891652683
Bound result 601072247187333131
Bound result 38467602528369177241
Suite result: ok. 6 passed; 0 failed; 1 skipped; finished in 143.53s (143.50s CPU time)
Ran 5 tests for tests/contracts/spoke/accrual/Spoke.AccrueLiquidityFee.EdgeCases.t.sol:SpokeAccrueLiquidityFeeEdgeCasesTest
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 558027, ~: 558105)
Logs:
Bound result 75908
Bound result 73429313
Bound result 3
Bound result 360452665066617555
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 819035, ~: 819122)
Logs:
Bound result 10861
Bound result 91588948
Bound result 2
Bound result 237267049552026281710378789740
Bound result 95530386142700665705760270418
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 281470908)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 197683658)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 558123)
Logs:
Bound result 5000
Bound result 34560000
Bound result 2
Bound result 500000000000000000000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 18.51s (18.48s CPU time)
Ran 7 tests for tests/contracts/spoke/accrual/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 923020)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 138320)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 261793, ~: 261744)
Logs:
Bound result 4462
[PASS] test_accrueLiquidityFee_exact() (gas: 929328)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 1007735, ~: 1031646)
Logs:
Bound result 1560000000000000000000000000
Bound result 214295263
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 563962)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 922952)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.12s (21.09s CPU time)
Ran 15 tests for tests/contracts/spoke/position-manager/Spoke.SetUserPositionManagerWithSig.t.sol:SpokeSetUserPositionManagersWithSigTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5039341)
[PASS] test_eip712Domain() (gas: 5044742)
[PASS] test_positionManagerUpdate_typeHash() (gas: 3903)
[PASS] test_setUserPositionManager_typeHash() (gas: 15642)
[PASS] test_setUserPositionManagersWithSig() (gas: 287767)
[PASS] test_setUserPositionManagersWithSig_ERC1271() (gas: 374521)
[PASS] test_setUserPositionManagersWithSig_ERC1271_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 460278, ~: 461824)
[PASS] test_setUserPositionManagersWithSig_ERC1271_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 277122)
[PASS] test_setUserPositionManagersWithSig_ERC1271_revertsWith_InvalidSignature_dueTo_InvalidHash() (gas: 328428)
[PASS] test_setUserPositionManagersWithSig_multiple_updates((address,bool)[]) (runs: 5000, μ: 2443596, ~: 2416421)
[PASS] test_setUserPositionManagersWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 258300, ~: 257501)
[PASS] test_setUserPositionManagersWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 33302)
[PASS] test_setUserPositionManagersWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 33695)
[PASS] test_setUserPositionManagersWithSig_zero_updates() (gas: 256432)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 19474, ~: 19474)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 59.42s (59.39s CPU time)
Ran 9 tests for tests/contracts/spoke/misc/Spoke.SetUsingAsCollateral.t.sol:SpokeSetUsingAsCollateralTest
[PASS] test_setUsingAsCollateral() (gas: 314916)
[PASS] test_setUsingAsCollateral_collateralStatusUnchanged() (gas: 474354)
[PASS] test_setUsingAsCollateral_revertsWith_MaximumUserReservesExceeded() (gas: 5706493)
[PASS] test_setUsingAsCollateral_revertsWith_ReentrancyGuardReentrantCall() (gas: 777432)
[PASS] test_setUsingAsCollateral_revertsWith_ReserveFrozen() (gas: 106635)
[PASS] test_setUsingAsCollateral_revertsWith_ReserveNotListed() (gas: 28527)
[PASS] test_setUsingAsCollateral_revertsWith_ReservePaused() (gas: 65885)
[PASS] test_setUsingAsCollateral_to_limit_disable_enable_again() (gas: 5963016)
[PASS] test_setUsingAsCollateral_unlimited_whenLimitIsMax() (gas: 826611)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 40.99ms (11.39ms CPU time)
Ran 15 tests for tests/contracts/spoke/supply/Spoke.Supply.t.sol:SpokeSupplyTest
[PASS] test_fuzz_supply_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 716831, ~: 717825)
Logs:
Bound result 512000000
Bound result 1560000000000000000000000000
[PASS] test_supply() (gas: 379017)
[PASS] test_supply_does_not_update_risk_premium() (gas: 2096070)
[PASS] test_supply_fuzz_amounts(uint256) (runs: 5000, μ: 503449, ~: 503121)
Logs:
Bound result 1040000000000000000
[PASS] test_supply_fuzz_index_increase_no_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 1263811, ~: 1271668)
Logs:
Bound result 359774711821980424021844486420
Bound result 75944
Bound result 2
Bound result 846890068
[PASS] test_supply_fuzz_index_increase_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 1456150, ~: 1464045)
Logs:
Bound result 359774711821980424021844486420
Bound result 75944
Bound result 2
Bound result 846890068
[PASS] test_supply_fuzz_revertsWith_ERC20InsufficientBalance(uint256) (runs: 5000, μ: 62085, ~: 61801)
Logs:
Bound result 1040000000000000000
[PASS] test_supply_index_increase_no_premium() (gas: 1347847)
[PASS] test_supply_index_increase_with_premium() (gas: 1406237)
[PASS] test_supply_revertsWith_ERC20InsufficientAllowance() (gas: 39662)
[PASS] test_supply_revertsWith_InvalidSupplyAmount() (gas: 47318)
[PASS] test_supply_revertsWith_ReentrancyGuardReentrantCall() (gas: 278566)
[PASS] test_supply_revertsWith_ReserveFrozen() (gas: 63609)
[PASS] test_supply_revertsWith_ReserveNotListed() (gas: 22912)
[PASS] test_supply_revertsWith_ReservePaused() (gas: 63538)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 90.07s (90.04s CPU time)
Ran 1 test for tests/contracts/spoke/configuration/Spoke.UpdateUserDynamicConfig.t.sol:SpokeUpdateUserDynamicConfigTest
[PASS] test_updateUserDynamicConfig_revertsWith_ReentrancyGuardReentrantCall() (gas: 641500)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 29.67ms (814.64µs CPU time)
Ran 1 test for tests/contracts/spoke/risk-premium/Spoke.UpdateUserRiskPremium.t.sol:SpokeUpdateUserRiskPremiumTest
[PASS] test_updateUserRiskPremium_revertsWith_ReentrancyGuardReentrantCall() (gas: 640502)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 29.59ms (810.90µs CPU time)
Ran 10 tests for tests/contracts/spoke/misc/Spoke.Upgradeable.t.sol:SpokeUpgradeableTest
[PASS] test_implementation_constructor_fuzz(uint64) (runs: 5000, μ: 6787198, ~: 6787198)
[PASS] test_proxy_constructor_fuzz(uint64) (runs: 5000, μ: 6815819, ~: 6815812)
Logs:
Bound result 1000000000
[PASS] test_proxy_constructor_fuzz_revertsWith_InvalidInitialization(uint64) (runs: 5000, μ: 13565312, ~: 13565305)
Logs:
Bound result 1000000000
[PASS] test_proxy_constructor_revertsWith_InvalidAddress() (gas: 5010664)
[PASS] test_proxy_constructor_revertsWith_InvalidInitialization_ZeroRevision() (gas: 6784571)
[PASS] test_proxy_reinitialization_fuzz(uint64) (runs: 5000, μ: 14842006, ~: 14841990)
Logs:
Bound result 1000000000
[PASS] test_proxy_reinitialization_revertsWith_CallerNotProxyAdmin() (gas: 11790763)
[PASS] test_proxy_reinitialization_revertsWith_InvalidAddress() (gas: 11791497)
[PASS] test_proxy_storage_persists_across_upgrade() (gas: 14830499)
[PASS] test_spoke_revision_accessible() (gas: 5015138)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 25.00s (24.97s CPU time)
Ran 6 tests for tests/contracts/spoke/misc/Spoke.UserAccountData.t.sol:SpokeUserAccountDataTest
[PASS] test_userAccountData_scenario1() (gas: 512094)
[PASS] test_userAccountData_scenario2() (gas: 573068)
[PASS] test_userAccountData_scenario3() (gas: 573272)
[PASS] test_userAccountData_scenario4() (gas: 851340)
[PASS] test_userAccountData_scenario5() (gas: 734661)
[PASS] test_userAccountData_scenario6() (gas: 703086)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 35.01ms (4.21ms CPU time)
Ran 5 tests for tests/contracts/spoke/borrow/Spoke.Borrow.EdgeCases.t.sol:SpokeBorrowEdgeCasesTest
[PASS] test_borrow_fuzz_rounding_effect(uint256,uint256) (runs: 5000, μ: 1630625, ~: 1630742)
Logs:
Bound result 1560000000000000000000000000
Bound result 12500000000000000000000000000
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 2402411, ~: 2402494)
Logs:
Bound result 999900000000000000
Bound result 1269100823
Bound result 452499082
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1779846, ~: 1779600)
Logs:
Bound result 1560000000000000000000000000
Bound result 621504501
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1975581)
[PASS] test_borrow_rounding_effect_shares() (gas: 1778817)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 145.94s (145.91s CPU time)
Ran 17 tests for tests/contracts/spoke/borrow/Spoke.Borrow.HealthFactor.t.sol:SpokeBorrowHealthFactorTest
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_collateral_price_drop(uint256,uint256) (runs: 5000, μ: 898563, ~: 898540)
Logs:
Bound result 312500
Bound result 1560000000000000000000000000
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 870488, ~: 870824)
Logs:
Bound result 1650000000000000000
Bound result 8097
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 909781, ~: 909776)
Logs:
Bound result 42
Bound result 17
Bound result 832000000
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1114237, ~: 1114477)
Logs:
Bound result 60000000014999999999999985
Bound result 124999999999999875
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1153987, ~: 1154086)
Logs:
Bound result 1
Bound result 200968282599974421585879032153
Bound result 6564699
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 683833, ~: 684012)
Logs:
Bound result 1
Bound result 863999998
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 651179)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 892821)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 864648)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1116105)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1116104)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 902326)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1106709)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1145633)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 678719)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1120064, ~: 1120264)
Logs:
Bound result 309
Bound result 19538
Bound result 1660
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1120414, ~: 1120263)
Logs:
Bound result 309
Bound result 19538
Bound result 1660
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 120.38s (120.35s CPU time)
Ran 21 tests for tests/contracts/spoke/withdraw/Spoke.Withdraw.HealthFactor.t.sol:SpokeWithdrawHealthFactorTest
[PASS] test_unsetCollateral_fuzz_revertsWith_HealthFactorBelowThreshold(uint256) (runs: 5000, μ: 917782, ~: 917399)
Logs:
Bound result 1040000000000000000
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_interest_increase(uint256,uint256) (runs: 5000, μ: 666472, ~: 666865)
Logs:
Bound result 12901
Bound result 111
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 897514, ~: 897598)
Logs:
Bound result 383
Bound result 86400
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1161042, ~: 1161321)
Logs:
Bound result 5
Bound result 1178
Bound result 12400
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1161469, ~: 1161337)
Logs:
Bound result 5
Bound result 1178
Bound result 12400
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256) (runs: 5000, μ: 952539, ~: 953065)
Logs:
Bound result 383
Bound result 86400
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1020855, ~: 1020301)
Logs:
Bound result 735824724894115644300522264332
Bound result 143145503216395
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_price_drop(uint256,uint256,uint256) (runs: 5000, μ: 1270800, ~: 1270525)
Logs:
Bound result 193412988428
Bound result 4555908032475111494398810503
Bound result 1375947360108811877589
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1058502, ~: 1058134)
Logs:
Bound result 404250000
Bound result 20
Bound result 19503
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_price_drop(uint256,uint256) (runs: 5000, μ: 879497, ~: 879738)
Logs:
Bound result 20000
Bound result 12939
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_singleBorrow(uint256) (runs: 5000, μ: 631168, ~: 631136)
Logs:
Bound result 368510493873435290063731977781
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_interest_increase() (gas: 661596)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 892973)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_dai() (gas: 1155174)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_weth() (gas: 1155177)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 948087)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1015421)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts_price_drop() (gas: 1264002)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1051871)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_price_drop() (gas: 874342)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_singleBorrow() (gas: 632654)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 159.82s (159.79s CPU time)
Ran 5 tests for tests/contracts/spoke/withdraw/Spoke.Withdraw.Scenario.t.sol:SpokeWithdrawScenarioTest
[PASS] test_withdraw_fuzz_all_liquidity_with_interest_multi_user((uint256,uint256,uint256,uint256,uint256[2],uint256)) (runs: 5000, μ: 1127585, ~: 1152984)
Logs:
Bound result 2
Bound result 200902744488615485563853445687
Bound result 624041697395228360214345241761
Bound result 482983055
Bound result 772545854
Bound result 24314406854305506677799761754
Bound result 57506
[PASS] test_withdraw_fuzz_partial_full_with_interest(uint256,uint256,uint256,uint40) (runs: 5000, μ: 964511, ~: 964496)
Logs:
Bound result 191
Bound result 62
Bound result 121
Bound result 9596
[PASS] test_withdraw_round_trip_deposit_withdraw(uint256,uint256,address,uint256) (runs: 5000, μ: 417554, ~: 417514)
Logs:
Bound result 1
Bound result 319829091424396667859266318327
Bound result 668726161906561532484799759753
[PASS] test_withdraw_round_trip_withdraw_deposit(uint256,uint256,uint256,address,uint256) (runs: 5000, μ: 438643, ~: 437928)
Logs:
Bound result 1
Bound result 122862403107863263695065050720
Bound result 3
Bound result 313604722588776602425173406753
[PASS] test_withdraw_underwater_reserve_not_collateral() (gas: 974201)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 77.83s (77.80s CPU time)
Ran 6 tests for tests/contracts/spoke/withdraw/Spoke.Withdraw.Validation.t.sol:SpokeWithdrawValidationTest
[PASS] test_withdraw_fuzz_revertsWith_InsufficientLiquidity_with_debt(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 445308, ~: 445389)
Logs:
Bound result 1
Bound result 26691208744668863690
Bound result 3351199950063476652
Bound result 790
Bound result 739555556
[PASS] test_withdraw_fuzz_revertsWith_InsufficientSupply_zero_supplied(uint256) (runs: 5000, μ: 60946, ~: 60661)
Logs:
Bound result 1040000000000000000
[PASS] test_withdraw_revertsWith_InsufficientLiquidity_with_debt() (gas: 437887)
[PASS] test_withdraw_revertsWith_InvalidAmount_zero_supplied() (gas: 57304)
[PASS] test_withdraw_revertsWith_ReserveNotListed() (gas: 22475)
[PASS] test_withdraw_revertsWith_ReservePaused() (gas: 63021)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 6.35s (6.32s CPU time)
Ran 6 tests for tests/contracts/spoke/borrow/Spoke.Borrow.Scenario.t.sol:SpokeBorrowScenarioTest
[PASS] test_borrow_fuzz_multi_spoke_multi_reserves(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2051098, ~: 2061310)
Logs:
Bound result 156802868392190784012825412502
Bound result 236891569105922800586057050675
Bound result 86896729908985930514260582320
Bound result 24644422060124320603588948
Bound result 326502853
[PASS] test_borrow_fuzz_single_spoke_multi_reserves(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2025918, ~: 2035319)
Logs:
Bound result 4475075785254438
Bound result 38612772606433915036020331208
Bound result 149787562848283846
Bound result 3168301173658414933
[PASS] test_borrow_fuzz_single_spoke_multi_reserves_multi_user(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2875621, ~: 2884973)
Logs:
Bound result 4475075785254438
Bound result 239611292952151141
Bound result 149854217388389028224475938381
Bound result 167152725785878396
[PASS] test_borrow_fuzz_skip_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1202353, ~: 1202521)
Logs:
Bound result 1
Bound result 409652
Bound result 331140237
[PASS] test_borrow_skip_borrow() (gas: 1201331)
Logs:
Bound result 10000000000000000000
Bound result 20000000000000000000
Bound result 31536000
[PASS] test_userAccountData_does_not_include_zero_cf_collateral() (gas: 1456971)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 153.06s (153.03s CPU time)
Ran 17 tests for tests/contracts/spoke/borrow/Spoke.Borrow.Validation.t.sol:SpokeBorrowValidationTest
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded(uint256,uint40) (runs: 5000, μ: 117648, ~: 117664)
Logs:
Bound result 0
Bound result 281645011304
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint256) (runs: 5000, μ: 698162, ~: 698395)
Logs:
Bound result 608000000
[PASS] test_borrow_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 301134, ~: 300891)
Logs:
Bound result 12500000000000000000000000000
[PASS] test_borrow_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 39350, ~: 39404)
Logs:
Bound result 0
[PASS] test_borrow_fuzz_revertsWith_ReserveFrozen(uint256,uint256) (runs: 5000, μ: 71108, ~: 70883)
Logs:
Bound result 0
Bound result 12500000000000000000000000000
[PASS] test_borrow_fuzz_revertsWith_ReserveNotBorrowable(uint256,uint256) (runs: 5000, μ: 71186, ~: 70961)
Logs:
Bound result 0
Bound result 12500000000000000000000000000
[PASS] test_borrow_fuzz_revertsWith_ReserveNotListed(uint256,uint256) (runs: 5000, μ: 27461, ~: 27183)
Logs:
Bound result 526797691438725524841983
[PASS] test_borrow_fuzz_revertsWith_ReservePaused(uint256,uint256) (runs: 5000, μ: 71027, ~: 70802)
Logs:
Bound result 0
Bound result 12500000000000000000000000000
[PASS] test_borrow_revertsWith_InsufficientLiquidity() (gas: 300846)
Logs:
Bound result 10000000000000000000
[PASS] test_borrow_revertsWith_InvalidAmount() (gas: 40979)
Logs:
Bound result 2
[PASS] test_borrow_revertsWith_MaximumUserReservesExceeded() (gas: 6874786)
[PASS] test_borrow_revertsWith_ReserveFrozen() (gas: 72399)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotBorrowable() (gas: 72476)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotListed() (gas: 28963)
Logs:
Bound result 1
[PASS] test_borrow_revertsWith_ReservePaused() (gas: 72360)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_to_limit_repay_borrow_again() (gas: 7150365)
[PASS] test_borrow_unlimited_whenLimitIsMax() (gas: 2130717)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 14.84s (14.81s CPU time)
Ran 4 tests for tests/contracts/spoke/borrow/Spoke.Borrow.t.sol:SpokeBorrowTest
[PASS] test_borrow() (gas: 1114253)
[PASS] test_borrow_fuzz_amounts(uint256,uint256) (runs: 5000, μ: 1123627, ~: 1123475)
Logs:
Bound result 1560000000000000000000000000
Bound result 20000000000000000000000000
[PASS] test_borrow_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 405220)
[PASS] test_borrow_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 535003)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 27.11s (27.08s CPU time)
Ran 14 tests for tests/contracts/spoke/withdraw/Spoke.Withdraw.t.sol:SpokeWithdrawTest
[PASS] test_fuzz_withdraw_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 748433, ~: 750424)
Logs:
Bound result 512000000
Bound result 1560000000000000000000000000
[PASS] test_withdraw_all_liquidity() (gas: 407013)
[PASS] test_withdraw_all_liquidity_with_interest_no_premium() (gas: 1203912)
[PASS] test_withdraw_all_liquidity_with_interest_with_premium() (gas: 1211938)
[PASS] test_withdraw_fuzz_all_elapsed_with_interest(uint256,uint256,uint40) (runs: 5000, μ: 790154, ~: 790076)
Logs:
Bound result 7200
Bound result 294
Bound result 477107634
[PASS] test_withdraw_fuzz_all_greater_than_supplied(uint256) (runs: 5000, μ: 410909, ~: 410625)
Logs:
Bound result 1040000000000000000
[PASS] test_withdraw_fuzz_all_liquidity_with_interest_no_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 1323621, ~: 1336665)
Logs:
Bound result 3
Bound result 10723
Bound result 878
Bound result 100000
Bound result 19762
[PASS] test_withdraw_fuzz_all_liquidity_with_interest_with_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 1323289, ~: 1336188)
Logs:
Bound result 3
Bound result 10723
Bound result 878
Bound result 100000
Bound result 19762
[PASS] test_withdraw_fuzz_all_with_interest(uint256,uint256) (runs: 5000, μ: 804180, ~: 804126)
Logs:
Bound result 1560000000000000000000000000
Bound result 20000000000000000000000000
[PASS] test_withdraw_fuzz_suppliedAmount(uint256) (runs: 5000, μ: 412857, ~: 412573)
Logs:
Bound result 1040000000000000000
[PASS] test_withdraw_max_greater_than_supplied() (gas: 381530)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 665334)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 407513)
[PASS] test_withdraw_same_block() (gas: 322837)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 120.86s (120.84s CPU time)
Ran 16 tests for tests/contracts/spoke/configurator/SpokeConfigurator.GranularAccessControl.t.sol:SpokeConfiguratorGranularAccessControlTest
[PASS] test_fuzz_unauthorized_cannotCall_liquidationConfigManagerMethods(address) (runs: 5000, μ: 119635, ~: 119635)
[PASS] test_fuzz_unauthorized_cannotCall_positionManagerAdminMethods(address) (runs: 5000, μ: 42270, ~: 42270)
[PASS] test_fuzz_unauthorized_cannotCall_reserveManagerMethods(address) (runs: 5000, μ: 461123, ~: 461123)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationConfig() (gas: 62598)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationTargetHealthFactor() (gas: 62173)
[PASS] test_liquidationConfigManager_cannotCall_anyPositionManagerAdminMethod() (gas: 39043)
[PASS] test_liquidationConfigManager_cannotCall_anyReserveMethod() (gas: 461075)
[PASS] test_positionManagerAdmin_canCall_updatePositionManager() (gas: 75207)
[PASS] test_positionManagerAdmin_cannotCall_anyLiquidationConfigMethod() (gas: 117087)
[PASS] test_positionManagerAdmin_cannotCall_anyReserveMethod() (gas: 460879)
[PASS] test_reserveManager_canCall_freezeAllReserves() (gas: 157066)
[PASS] test_reserveManager_canCall_pauseAllReserves() (gas: 157029)
[PASS] test_reserveManager_canCall_updateFrozen() (gas: 65260)
[PASS] test_reserveManager_canCall_updatePaused() (gas: 65207)
[PASS] test_reserveManager_cannotCall_anyLiquidationConfigMethod() (gas: 117064)
[PASS] test_reserveManager_cannotCall_anyPositionManagerAdminMethod() (gas: 39020)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 6.28s (6.25s CPU time)
Ran 48 tests for tests/contracts/spoke/configurator/SpokeConfigurator.t.sol:SpokeConfiguratorTest
[PASS] test_addCollateralFactor() (gas: 125701)
[PASS] test_addCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29201)
[PASS] test_addDynamicReserveConfig() (gas: 105484)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29375)
[PASS] test_addLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29125)
[PASS] test_addLiquidationFee() (gas: 125688)
[PASS] test_addLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29081)
[PASS] test_addMaxLiquidationBonus() (gas: 125715)
[PASS] test_addReserve() (gas: 407227)
[PASS] test_addReserve_revertsWith_AccessManagedUnauthorized() (gas: 30056)
[PASS] test_freezeAllReserves() (gas: 202923)
[PASS] test_freezeAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26902)
[PASS] test_freezeReserve() (gas: 72379)
[PASS] test_freezeReserve_revertsWith_AccessManagedUnauthorized() (gas: 29026)
[PASS] test_pauseAllReserves() (gas: 202782)
[PASS] test_pauseAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26857)
[PASS] test_pauseReserve() (gas: 72328)
[PASS] test_pauseReserve_revertsWith_AccessManagedUnauthorized() (gas: 29002)
[PASS] test_updateBorrowable() (gas: 102957)
[PASS] test_updateBorrowable_revertsWith_AccessManagedUnauthorized() (gas: 29083)
[PASS] test_updateCollateralFactor() (gas: 82803)
[PASS] test_updateCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29202)
[PASS] test_updateCollateralRisk() (gas: 77023)
[PASS] test_updateCollateralRisk_revertsWith_AccessManagedUnauthorized() (gas: 29054)
[PASS] test_updateDynamicReserveConfig() (gas: 2899200)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29414)
[PASS] test_updateFrozen() (gas: 105722)
[PASS] test_updateFrozen_revertsWith_AccessManagedUnauthorized() (gas: 29082)
[PASS] test_updateHealthFactorForMaxBonus() (gas: 68276)
[PASS] test_updateHealthFactorForMaxBonus_revertsWith_AccessManagedUnauthorized() (gas: 26869)
[PASS] test_updateLiquidationBonusFactor() (gas: 71236)
[PASS] test_updateLiquidationBonusFactor_revertsWith_AccessManagedUnauthorized() (gas: 26892)
[PASS] test_updateLiquidationConfig() (gas: 65834)
[PASS] test_updateLiquidationConfig_revertsWith_AccessManagedUnauthorized() (gas: 27176)
[PASS] test_updateLiquidationFee() (gas: 82864)
[PASS] test_updateLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29199)
[PASS] test_updateLiquidationTargetHealthFactor() (gas: 71154)
[PASS] test_updateLiquidationTargetHealthFactor_revertsWith_AccessManagedUnauthorized() (gas: 26913)
[PASS] test_updateMaxLiquidationBonus() (gas: 82801)
[PASS] test_updateMaxLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29180)
[PASS] test_updatePaused() (gas: 105637)
[PASS] test_updatePaused_revertsWith_AccessManagedUnauthorized() (gas: 29103)
[PASS] test_updatePositionManager() (gas: 74403)
[PASS] test_updatePositionManager_revertsWith_AccessManagedUnauthorized() (gas: 27045)
[PASS] test_updateReceiveSharesEnabled() (gas: 103009)
[PASS] test_updateReceiveSharesEnabled_revertsWith_AccessManagedUnauthorized() (gas: 29126)
[PASS] test_updateReservePriceSource() (gas: 257998)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized() (gas: 29078)
Suite result: ok. 48 passed; 0 failed; 0 skipped; finished in 55.72ms (25.47ms CPU time)
Ran 29 tests for tests/contracts/spoke/configuration/Spoke.Config.t.sol:SpokeConfigTest
[PASS] test_addReserve() (gas: 406355)
[PASS] test_addReserve_fuzz_revertsWith_AssetNotListed() (gas: 271465)
[PASS] test_addReserve_revertsWith_InvalidAddress_hub() (gas: 5056065)
[PASS] test_addReserve_revertsWith_InvalidAddress_oracle() (gas: 5101739)
[PASS] test_addReserve_revertsWith_InvalidAssetId() (gas: 32875)
[PASS] test_addReserve_revertsWith_InvalidUnderlyingDecimals() (gas: 259381)
[PASS] test_addReserve_revertsWith_ReserveExists() (gas: 382361)
[PASS] test_getReserveId_fuzz(uint256) (runs: 5000, μ: 55234, ~: 57526)
Logs:
Bound result 0
[PASS] test_getReserveId_fuzz_multipleHubs(uint256) (runs: 5000, μ: 20595442, ~: 20598503)
Logs:
Bound result 0
[PASS] test_getReserveId_fuzz_revertsWith_ReserveNotListed(uint256) (runs: 5000, μ: 34506, ~: 34495)
Logs:
Bound result 1040000000000000000
[PASS] test_spoke_deploy() (gas: 5009443)
[PASS] test_spoke_deploy_reverts_on_InvalidConstructorInput() (gas: 747272)
[PASS] test_spoke_deploy_reverts_on_InvalidMaxUserReservesLimit() (gas: 749515)
[PASS] test_spoke_deploy_reverts_on_InvalidOracleDecimals() (gas: 749554)
[PASS] test_updateLiquidationConfig_fuzz_liqBonusConfig((uint128,uint64,uint16)) (runs: 5000, μ: 53197, ~: 53281)
Logs:
Bound result 20
Bound result 247
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus((uint128,uint64,uint16)) (runs: 5000, μ: 37040, ~: 37285)
Logs:
Bound result 17446744073709551636
Bound result 247
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor((uint128,uint64,uint16)) (runs: 5000, μ: 36790, ~: 36545)
Logs:
Bound result 20
Bound result 55782
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_fuzz_targetHealthFactor(uint128) (runs: 5000, μ: 47094, ~: 47392)
Logs:
Bound result 10000000000000000000
[PASS] test_updateLiquidationConfig_liqBonusConfig() (gas: 52256)
Logs:
Bound result 900000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus() (gas: 35581)
Logs:
Bound result 1000000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor() (gas: 35678)
Logs:
Bound result 900000000000000000
Bound result 10001
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_targetHealthFactor() (gas: 46705)
Logs:
Bound result 1000000000000000001
[PASS] test_updateReserveConfig() (gas: 54681)
[PASS] test_updateReserveConfig_fuzz((uint24,bool,bool,bool,bool)) (runs: 5000, μ: 55942, ~: 55776)
Logs:
Bound result 3070
[PASS] test_updateReserveConfig_revertsWith_InvalidCollateralRisk() (gas: 40213)
[PASS] test_updateReserveConfig_revertsWith_ReserveNotListed() (gas: 36811)
[PASS] test_updateReservePriceSource() (gas: 239202)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 35334, ~: 35334)
[PASS] test_updateReservePriceSource_revertsWith_ReserveNotListed() (gas: 34875)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 37.35s (37.32s CPU time)
Ran 31 tests for tests/config-engine/SpokeEngine.t.sol:SpokeEngineTest
[PASS] test_executeSpokeDynamicReserveConfigAdditions() (gas: 119356)
[PASS] test_executeSpokeDynamicReserveConfigAdditions_revert_invalidCollateralFactorAndMaxLiquidationBonus() (gas: 83674)
[PASS] test_executeSpokeDynamicReserveConfigUpdates_allKeepCurrent() (gas: 67929)
[PASS] test_executeSpokeDynamicReserveConfigUpdates_allUpdated() (gas: 108230)
[PASS] test_executeSpokeDynamicReserveConfigUpdates_multipleReserves() (gas: 159332)
[PASS] test_executeSpokeDynamicReserveConfigUpdates_partialUpdate() (gas: 107168)
[PASS] test_executeSpokeLiquidationConfigUpdates_allSet() (gas: 70928)
[PASS] test_executeSpokeLiquidationConfigUpdates_bonusFactorOnly() (gas: 73755)
[PASS] test_executeSpokeLiquidationConfigUpdates_maxBonusOnly() (gas: 73667)
[PASS] test_executeSpokeLiquidationConfigUpdates_multipleSpokes() (gas: 108924)
[PASS] test_executeSpokeLiquidationConfigUpdates_noneSet() (gas: 35611)
[PASS] test_executeSpokeLiquidationConfigUpdates_targetOnly() (gas: 73706)
[PASS] test_executeSpokePositionManagerUpdates() (gas: 85983)
[PASS] test_executeSpokePositionManagerUpdates_deactivate() (gas: 80001)
[PASS] test_executeSpokePositionManagerUpdates_multipleUpdates() (gas: 1200200)
[PASS] test_executeSpokeReserveConfigUpdates_allKeepCurrent() (gas: 60909)
[PASS] test_executeSpokeReserveConfigUpdates_allSet() (gas: 208350)
[PASS] test_executeSpokeReserveConfigUpdates_crossSpoke_differentFields() (gas: 176291)
[PASS] test_executeSpokeReserveConfigUpdates_multipleSpokes() (gas: 148848)
[PASS] test_executeSpokeReserveConfigUpdates_onlyCollateralRisk() (gas: 101855)
[PASS] test_executeSpokeReserveConfigUpdates_onlyPriceSource() (gas: 290565)
[PASS] test_executeSpokeReserveListings() (gas: 617607)
[PASS] test_executeSpokeReserveListings_multipleReserves() (gas: 3194288)
[PASS] test_fuzz_executeSpokeDynamicReserveConfigUpdates_collateralFactor(uint256) (runs: 5000, μ: 111150, ~: 111293)
Logs:
Bound result 1382
[PASS] test_fuzz_executeSpokeDynamicReserveConfigUpdates_liquidationFee(uint256) (runs: 5000, μ: 111015, ~: 111174)
Logs:
Bound result 104
[PASS] test_fuzz_executeSpokeDynamicReserveConfigUpdates_maxLiquidationBonus(uint256) (runs: 5000, μ: 111308, ~: 111345)
Logs:
Bound result 11630
[PASS] test_fuzz_executeSpokeLiquidationConfigUpdates_allSet(uint256,uint256,uint256) (runs: 5000, μ: 73754, ~: 73690)
Logs:
Bound result 1000000000000000000
Bound result 409652
Bound result 5152
[PASS] test_fuzz_executeSpokeLiquidationConfigUpdates_bonusFactorOnly(uint256) (runs: 5000, μ: 76661, ~: 76838)
Logs:
Bound result 104
[PASS] test_fuzz_executeSpokeLiquidationConfigUpdates_maxBonusOnly(uint256) (runs: 5000, μ: 76478, ~: 76785)
Logs:
Bound result 40000000000000001
[PASS] test_fuzz_executeSpokeLiquidationConfigUpdates_targetOnly(uint256) (runs: 5000, μ: 76708, ~: 76867)
Logs:
Bound result 1040000000000000000
[PASS] test_fuzz_executeSpokeReserveConfigUpdates_onlyCollateralRisk(uint256) (runs: 5000, μ: 104712, ~: 104921)
Logs:
Bound result 98961
Suite result: ok. 31 passed; 0 failed; 0 skipped; finished in 9.14s (9.12s CPU time)
Ran 6 tests for tests/contracts/spoke/libraries/SpokeUtils.t.sol:SpokeUtilsTest
[PASS] test_fuzz_toValue(uint256,uint256,uint256) (runs: 5000, μ: 15800, ~: 15867)
Logs:
Bound result 0
Bound result 9
Bound result 6922926967449764
[PASS] test_get() (gas: 180662)
[PASS] test_get_revertsWith_ReserveNotListed() (gas: 167206)
[PASS] test_toValue() (gas: 8851)
[PASS] test_toValue_revertsWith_ArithmeticOverflow() (gas: 8982)
[PASS] test_toValue_revertsWith_ArithmeticUnderflow() (gas: 8757)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 500.16ms (469.79ms CPU time)
Ran 10 tests for tests/contracts/spoke/configuration/Spoke.DynamicConfig.Triggers.t.sol:SpokeDynamicConfigTriggersTest
[PASS] test_borrow_triggers_dynamicConfigUpdate() (gas: 1507027)
[PASS] test_liquidate_does_not_trigger_dynamicConfigUpdate() (gas: 1791484)
[PASS] test_repay_does_not_trigger_dynamicConfigUpdate() (gas: 1059510)
[PASS] test_supply_does_not_trigger_dynamicConfigUpdate() (gas: 1278177)
[PASS] test_updateUserDynamicConfig_doesHFCheck() (gas: 946006)
[PASS] test_updateUserDynamicConfig_reverts_when_not_authorized(address) (runs: 5000, μ: 1128564, ~: 1128564)
[PASS] test_updateUserDynamicConfig_triggers_dynamicConfigUpdate() (gas: 733635)
[PASS] test_updateUserDynamicConfig_updatesRP() (gas: 1455628)
[PASS] test_usingAsCollateral_triggers_dynamicConfigUpdate() (gas: 1532949)
[PASS] test_withdraw_triggers_dynamicConfigUpdate() (gas: 1537580)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 22.08s (22.05s CPU time)
Ran 14 tests for tests/contracts/position-manager/TakerPositionManager/TakerPositionManager.Permit.t.sol:TakerPositionManagerPermitTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5674)
[PASS] test_approveBorrowWithSig_fuzz(address,uint256,uint256) (runs: 5000, μ: 191367, ~: 190726)
Logs:
Bound result 2
Bound result 17362230708122833241882581257
[PASS] test_approveBorrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154270, ~: 154036)
[PASS] test_approveBorrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39837)
[PASS] test_approveBorrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37722)
[PASS] test_approveBorrowWithSig_revertsWith_SpokeNotRegistered() (gas: 191331)
[PASS] test_approveWithdrawWithSig_fuzz(address,uint256,uint256) (runs: 5000, μ: 191312, ~: 190671)
Logs:
Bound result 2
Bound result 17362230708122833241882581257
[PASS] test_approveWithdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154246, ~: 154012)
[PASS] test_approveWithdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39811)
[PASS] test_approveWithdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37689)
[PASS] test_approveWithdrawWithSig_revertsWith_SpokeNotRegistered() (gas: 191265)
[PASS] test_borrowPermit_typeHash() (gas: 9850)
[PASS] test_eip712Domain() (gas: 11015)
[PASS] test_withdrawPermit_typeHash() (gas: 9845)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 24.93s (24.90s CPU time)
Ran 21 tests for tests/contracts/spoke/configuration/Spoke.DynamicConfig.t.sol:SpokeDynamicConfigTest
[PASS] test_addDynamicReserveConfig() (gas: 79207)
[PASS] test_addDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_incompatible(uint16,uint32) (runs: 5000, μ: 46188, ~: 46353)
Logs:
Bound result 9000
Bound result 12276
[PASS] test_addDynamicReserveConfig_once() (gas: 509156)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 47779, ~: 47779)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 57244)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 40398)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 40861)
[PASS] test_addDynamicReserveConfig_revertsWith_MaximumDynamicConfigKeyReached() (gas: 43388)
[PASS] test_addDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 28264)
[PASS] test_fuzz_addDynamicReserveConfig_spaced_dup_updates(bytes32) (runs: 5000, μ: 417505, ~: 446143)
[PASS] test_fuzz_addDynamicReserveConfig_trailing_order(bytes32) (runs: 5000, μ: 398313, ~: 430120)
[PASS] test_offboardReserve_existing_borrows_remain_unaffected() (gas: 1263471)
[PASS] test_updateDynamicReserveConfig() (gas: 1135624)
[PASS] test_updateDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus(uint16,uint32) (runs: 5000, μ: 56906, ~: 57071)
Logs:
Bound result 9000
Bound result 12276
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 47780, ~: 47780)
[PASS] test_updateDynamicReserveConfig_revertsWith_DynamicConfigKeyUninitialized() (gas: 49027)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactor() (gas: 50058)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 50837)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 51029)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 51533)
[PASS] test_updateDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 28679)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 22.23s (22.20s CPU time)
Ran 5 tests for tests/gas/Spoke.Getters.gas.t.sol:SpokeGetters_Gas_Tests
[PASS] test_getUserAccountData() (gas: 23662)
[PASS] test_getUserAccountData_oneSupplies() (gas: 295196)
[PASS] test_getUserAccountData_twoSupplies() (gas: 537085)
[PASS] test_getUserAccountData_twoSupplies_oneBorrows() (gas: 1078969)
[PASS] test_getUserAccountData_twoSupplies_twoBorrows() (gas: 1661266)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 47.84ms (4.60ms CPU time)
Ran 6 tests for tests/contracts/spoke/misc/Spoke.Getters.t.sol:SpokeGettersTest
[PASS] test_getLiquidationBonus_configured() (gas: 100942)
Logs:
Bound result 2
Bound result 1000000000000000000
Bound result 4000
Bound result 900000000000000000
[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 99712, ~: 100072)
Logs:
Bound result 3
Bound result 949721968921465119
Bound result 321
Bound result 59546980
[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 77703, ~: 77926)
Logs:
Bound result 0
Bound result 999999987500000001
[PASS] test_getLiquidationBonus_notConfigured() (gas: 78914)
Logs:
Bound result 2
Bound result 1000000000000000000
[PASS] test_premiumRayGetters() (gas: 1712901)
[PASS] test_protocol_getters() (gas: 303394)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 2.61s (2.58s CPU time)
Ran 4 tests for tests/contracts/spoke/liquidation/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 18141762)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 18130095)
[PASS] test_dustColl_allowed() (gas: 17989115)
[PASS] test_dustDebt_allowed() (gas: 18120483)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 68.59ms (29.53ms CPU time)
Ran 14 tests for tests/contracts/spoke/liquidation/Spoke.LiquidationCall.Scenarios.t.sol:SpokeLiquidationCallScenariosTest
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 26375654)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 26245287)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubReportDeficit() (gas: 26358207)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 26321642)
[PASS] test_liquidationCall_scenario1() (gas: 4734080)
[PASS] test_liquidationCall_scenario2() (gas: 4742449)
[PASS] test_liquidationCall_scenario3() (gas: 3801221)
[PASS] test_liquidationCall_scenario4() (gas: 28133182)
[PASS] test_liquidationCall_scenario5() (gas: 3946715)
[PASS] test_liquidationCall_scenario6() (gas: 2711758)
[PASS] test_liquidationCall_scenario7() (gas: 3777633)
[PASS] test_liquidationCall_scenario8() (gas: 2540440)
[PASS] test_scenario_halted_asset() (gas: 27308236)
[PASS] test_scenario_halted_asset_with_deficit() (gas: 27151134)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 217.70ms (181.34ms CPU time)
Ran 6 tests for tests/contracts/hub/fees/Hub.MintFeeShares.t.sol:HubMintFeeSharesTest
[PASS] test_mintFeeShares() (gas: 325652)
[PASS] test_mintFeeShares_noFees() (gas: 384713)
[PASS] test_mintFeeShares_noShares() (gas: 301749)
[PASS] test_mintFeeShares_revertsWith_AccessManagedUnauthorized() (gas: 29096)
[PASS] test_mintFeeShares_revertsWith_AssetNotListed() (gas: 32893)
[PASS] test_mintFeeShares_revertsWith_SpokeNotActive() (gas: 248741)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 32.88ms (3.98ms CPU time)
Ran 9 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 280037)
[PASS] test_deficit() (gas: 1392118)
[PASS] test_draw() (gas: 433406)
[PASS] test_mintFeeShares() (gas: 519703)
[PASS] test_payFee_transferShares() (gas: 971259)
[PASS] test_refreshPremium() (gas: 672333)
[PASS] test_remove() (gas: 325619)
[PASS] test_restore() (gas: 946959)
[PASS] test_restore_with_transfer() (gas: 947622)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 50.81ms (7.14ms CPU time)
Ran 6 tests for tests/contracts/hub/fees/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 712204, ~: 712380)
Logs:
Bound result 1560000000000000000000000000
Bound result 0
Bound result 20000000000000000000000000
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 712660, ~: 712929)
Logs:
Bound result 1
Bound result 331140237
Bound result 1
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 25298)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 67924)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 142707)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 646910)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.96s (27.93s CPU time)
Ran 11 tests for tests/contracts/hub/add-remove/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 642334)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 623453)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 644050, ~: 643312)
Logs:
Bound result 1
Bound result 1
Bound result 1
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 734012)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 1...*[Comment body truncated]* |
♻️ Forge Gas Snapshots🔕 Unchanged
|
| MintConfig memory config = _configs[hub][assetId]; | ||
|
|
||
| // Check mint interval | ||
| if (block.timestamp - lastMintTime[hub][assetId] < config.minTimeInterval) { |
There was a problem hiding this comment.
i dont think we should place a time based min interval, but rather amount based instead?
There was a problem hiding this comment.
I think the amount does make more sense. cc @miguelmtzinf on this
There was a problem hiding this comment.
I removed the time component now, but kept the ratio
| if (totalAddedAssets == 0) { | ||
| return false; | ||
| } | ||
| if (PercentageMath.percentDivDown(accruedFees, totalAddedAssets) < minAccruedFeesPercent) { |
There was a problem hiding this comment.
is bps enough precision here?
| function _checkUpkeep(address hub, uint256 assetId) internal view virtual returns (bool) { | ||
| uint16 minAccruedFeesPercent = _minAccruedFeesPercent[hub][assetId]; | ||
| if (minAccruedFeesPercent == 0) { | ||
| return false; |
There was a problem hiding this comment.
is this dangerous, in case we forget to configure one asset?
There was a problem hiding this comment.
why? it does not harm bc we're doing batched versions or seomthing
FeeSharesMinter contract
| /// @title FeeSharesMinter | ||
| /// @author Aave Labs | ||
| /// @notice Contract to mint fee shares on the Hub when specific conditions are met. | ||
| contract FeeSharesMinter is IFeeSharesMinter, Ownable2Step, Rescuable { |
There was a problem hiding this comment.
who will own this contract? if EXECUTOR, then what I don't like is that we have no option to disable fee minting without an AIP
wdyt?
There was a problem hiding this comment.
lets add OwnableWithGuardian ac and allow disable fee through guardian, or longer way to introduce AccessManager here
| ) external view override returns (bool, bytes memory) { | ||
| /// @dev `checkData` must be abi.encoded as (address hub, uint256 assetId). | ||
| /// @inheritdoc AutomationCompatibleInterface | ||
| function checkUpkeep(bytes memory checkData) external view override returns (bool, bytes memory) { |
There was a problem hiding this comment.
calldata above, mem here, lets be consistent. doesnt really matter bc youre lowering to memory anyway when abi.decoding (you can decode calldata directly for the tbh) and returning (question: why does checkup need to return passed call data?)
| (address hub, uint256 assetId) = abi.decode(performData, (address, uint256)); | ||
| _performUpkeep(hub, assetId); |
There was a problem hiding this comment.
should we add batched versions? probably not worth the complexity
| /// @dev checkData must be abi.encoded as (address hub, uint256 assetId). | ||
| /// @dev Returns whether upkeep is needed and the performData in bytes when conditions are met. | ||
| /// @inheritdoc AutomationCompatibleInterface | ||
| function checkUpkeep( |
There was a problem hiding this comment.
if you killed these from the interface i think its fine to inherit AutomatoinCompatibleInterface on IFeeSharesMinter as well
Adds a fee minter contract which will enforce specific conditions for calling mintFeeShares() on the hub, and allow for mintFeeShares() to be called consistently