Skip to content

rft: resize nonce & key#1144

Open
DhairyaSethi wants to merge 4 commits intodevfrom
chore/nonce-key-size
Open

rft: resize nonce & key#1144
DhairyaSethi wants to merge 4 commits intodevfrom
chore/nonce-key-size

Conversation

@DhairyaSethi
Copy link
Member

update nonce-key sizes from 192, 64 bits to 160, 96 bits

Field Before After
Key 192 bits, ≈ 6.26e57 160 bits, ≈ 1.46e48
Nonce 64 bits, ≈ 1.84e18 96 bits, ≈ 7.922e28

this is done in an effort to improve resilience on fixed namespace usage patterns (for ex permit is restricted to one namespace (key) in #1029 in order to have a simpler implementation)

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

🌈 Test Results
No files changed, compilation skipped

Ran 1 test for tests/unit/Spoke/Spoke.UpdateUserDynamicConfig.t.sol:SpokeUpdateUserDynamicConfigTest
[PASS] test_updateUserDynamicConfig_revertsWith_ReentrancyGuardReentrantCall() (gas: 631882)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 35.39ms (844.73µs CPU time)

Ran 1 test for tests/unit/Spoke/Spoke.UpdateUserRiskPremium.t.sol:SpokeUpdateUserRiskPremiumTest
[PASS] test_updateUserRiskPremium_revertsWith_ReentrancyGuardReentrantCall() (gas: 630884)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 23.61ms (796.38µs CPU time)

Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1325594)
[PASS] test_liquidation_full() (gas: 10856190)
[PASS] test_liquidation_partial() (gas: 10855607)
[PASS] test_liquidation_receiveShares_full() (gas: 10838613)
[PASS] test_liquidation_receiveShares_partial() (gas: 10838032)
[PASS] test_liquidation_reportDeficit_full() (gas: 10834373)
[PASS] test_multicall_ops() (gas: 1404352)
[PASS] test_repay() (gas: 868472)
[PASS] test_setUserPositionManagersWithSig() (gas: 307055)
[PASS] test_supply() (gas: 539086)
[PASS] test_updateRiskPremium() (gas: 1315379)
[PASS] test_updateUserDynamicConfig() (gas: 587622)
[PASS] test_usingAsCollateral() (gas: 1470485)
[PASS] test_withdraw() (gas: 1947111)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 78.01ms (34.25ms CPU time)

Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 1092108)
[PASS] test_liquidation_full() (gas: 10721484)
[PASS] test_liquidation_partial() (gas: 10720901)
[PASS] test_liquidation_receiveShares_full() (gas: 10703907)
[PASS] test_liquidation_receiveShares_partial() (gas: 10703326)
[PASS] test_liquidation_reportDeficit_full() (gas: 10758711)
[PASS] test_multicall_ops() (gas: 1321781)
[PASS] test_repay() (gas: 777633)
[PASS] test_setUserPositionManagersWithSig() (gas: 311509)
[PASS] test_supply() (gas: 541767)
[PASS] test_updateRiskPremium() (gas: 943227)
[PASS] test_updateUserDynamicConfig() (gas: 592076)
[PASS] test_usingAsCollateral() (gas: 1089020)
[PASS] test_withdraw() (gas: 1587613)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 76.81ms (31.69ms CPU time)

Ran 4 tests for tests/unit/Spoke/Spoke.PermitReserve.t.sol:SpokePermitReserveTest
[PASS] test_permitReserve() (gas: 88227)
[PASS] test_permitReserve_forwards_correct_call() (gas: 35554)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 24390)
[PASS] test_permitReserve_revertsWith_ReserveNotListedIn() (gas: 22949)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 24.17ms (1.01ms CPU time)

Ran 10 tests for tests/unit/Spoke/Spoke.PositionManager.t.sol:SpokePositionManagerTest
[PASS] test_onlyPositionManager_on_borrow() (gas: 538599)
[PASS] test_onlyPositionManager_on_repay() (gas: 563910)
[PASS] test_onlyPositionManager_on_supply() (gas: 291778)
[PASS] test_onlyPositionManager_on_updateUserDynamicConfig() (gas: 1287977)
[PASS] test_onlyPositionManager_on_updateUserRiskPremium() (gas: 1525800)
[PASS] test_onlyPositionManager_on_usingAsCollateral() (gas: 144395)
[PASS] test_onlyPositionManager_on_withdraw() (gas: 320770)
[PASS] test_renouncePositionManagerRole() (gas: 20268)
[PASS] test_renouncePositionManagerRole_noop_from_disabled() (gas: 21904)
[PASS] test_setApprovalForPositionManager(bytes32) (runs: 5000, μ: 18111, ~: 18111)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 436.29ms (412.69ms CPU time)

Ran 20 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_DECIMALS() (gas: 8326)
[PASS] test_constructor() (gas: 18428)
[PASS] test_description() (gas: 12039)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 19886, ~: 20214)
Logs:
  Bound result 1

[PASS] test_getReservePrice() (gas: 48776)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 48047)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10898)
[PASS] test_getReservePrices() (gas: 80715)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 50930)
[PASS] test_getReserveSource() (gas: 48946)
[PASS] test_setReserveSource() (gas: 45988)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 102779)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17228)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 17065)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 13021)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5041254)
[PASS] test_setSpoke() (gas: 5069155)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10870)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13397, ~: 13397)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15080)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 1.11s (1.09s CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.Repay.EdgeCases.t.sol:SpokeRepayEdgeCaseTest
[PASS] test_fuzz_repay_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 701269, ~: 701186)
Logs:
  Bound result 89642752138258873444021258907
  Bound result 836777954
  Bound result 253384129597791067653144043672

[PASS] test_repay_less_than_share() (gas: 600138)
[PASS] test_repay_only_base_debt_interest() (gas: 766358)
[PASS] test_repay_only_base_debt_no_premium() (gas: 644404)
[PASS] test_repay_supply_ex_rate_decr() (gas: 1466959)
[PASS] test_repay_supply_ex_rate_decr_skip_time() (gas: 1463575)
[PASS] test_repay_zero_shares_nonzero_premium_debt() (gas: 764248)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 15.44s (15.41s CPU time)

Ran 17 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1981460, ~: 1980367)
Logs:
  Bound result 9
  Bound result 10

[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1528820, ~: 1527966)
Logs:
  Bound result 9
  Bound result 10

[PASS] test_grantRole() (gas: 315886)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 916110, ~: 919753)
Logs:
  Bound result 8

[PASS] test_revokeRole() (gas: 323138)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2159661, ~: 2257477)
Logs:
  Bound result 12

[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5000, μ: 1974061, ~: 2114661)
Logs:
  Bound result 12

[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606131)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577217)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602311)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378311)
[PASS] test_setRoleGuardian_trackRoles() (gas: 263932)
[PASS] test_setTargetFunctionRole() (gas: 414440)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1103911)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 894967)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 30940)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 549104)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 22.30s (22.29s CPU time)

Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24326)
Logs:
  Bound result 2000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
  Bound result 10000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24192, ~: 24330)
Logs:
  Bound result 137
  Bound result 252173843969976304268974536488

[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25302, ~: 25351)
Logs:
  Bound result 8137
  Bound result 252173843969976304268974536488

[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18771)
Logs:
  Bound result 0

[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19068, ~: 18822)
Logs:
  Bound result 3124043968137

[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11225)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3746)
[PASS] test_getBaseVariableBorrowRate() (gas: 14812)
[PASS] test_getInterestRateData() (gas: 19290)
[PASS] test_getMaxVariableBorrowRate() (gas: 15258)
[PASS] test_getOptimalUsageRatio() (gas: 14705)
[PASS] test_getVariableRateSlope1() (gas: 14791)
[PASS] test_getVariableRateSlope2() (gas: 14746)
[PASS] test_maxBorrowRate() (gas: 8312)
[PASS] test_maxOptimalRatio() (gas: 8312)
[PASS] test_minOptimalRatio() (gas: 8321)
[PASS] test_setInterestRateData() (gas: 68999)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 41819)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42380)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35269)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23502)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 37658)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 1.14s (1.13s CPU time)

Ran 8 tests for tests/unit/Spoke/Spoke.Upgradeable.t.sol:SpokeUpgradeableTest
[PASS] test_implementation_constructor_fuzz(uint64) (runs: 5000, μ: 6779352, ~: 6779352)
[PASS] test_proxy_constructor_fuzz(uint64) (runs: 5000, μ: 6802516, ~: 6802508)
Logs:
  Bound result 649

[PASS] test_proxy_constructor_fuzz_revertsWith_InvalidInitialization(uint64) (runs: 5000, μ: 13549617, ~: 13549609)
Logs:
  Bound result 649

[PASS] test_proxy_constructor_revertsWith_InvalidAddress() (gas: 5040068)
[PASS] test_proxy_constructor_revertsWith_InvalidInitialization_ZeroRevision() (gas: 6776715)
[PASS] test_proxy_reinitialization_fuzz(uint64) (runs: 5000, μ: 15129246, ~: 15129228)
Logs:
  Bound result 649

[PASS] test_proxy_reinitialization_revertsWith_CallerNotProxyAdmin() (gas: 11813193)
[PASS] test_proxy_reinitialization_revertsWith_InvalidAddress() (gas: 11813950)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 26.67s (26.65s CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.UserAccountData.t.sol:SpokeUserAccountDataTest
[PASS] test_userAccountData_scenario1() (gas: 501755)
[PASS] test_userAccountData_scenario2() (gas: 562605)
[PASS] test_userAccountData_scenario3() (gas: 562851)
[PASS] test_userAccountData_scenario4() (gas: 837933)
[PASS] test_userAccountData_scenario5() (gas: 720363)
[PASS] test_userAccountData_scenario6() (gas: 690382)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 30.07ms (4.26ms CPU time)

Ran 10 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 13531)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6805, ~: 6805)
[PASS] test_hash_positionManagerUpdate_fuzz((address,bool)) (runs: 5000, μ: 6193, ~: 6193)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6806, ~: 6806)
[PASS] test_hash_setUserPositionManagers_fuzz((address,(address,bool)[],uint256,uint256)) (runs: 5000, μ: 453554, ~: 449260)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7305, ~: 7305)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6849, ~: 6849)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6450, ~: 6450)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6471, ~: 6471)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6805, ~: 6805)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 21.67s (21.67s CPU time)

Ran 3 tests for tests/unit/misc/ExtSload.t.sol:ExtSloadTest
[PASS] test_extSload(bytes32) (runs: 5000, μ: 9767, ~: 9767)
[PASS] test_extSloads(uint256) (runs: 5000, μ: 950474, ~: 926350)
Logs:
  Bound result 812

[PASS] test_extSloads(uint256,bytes) (runs: 5000, μ: 1008291, ~: 970986)
Logs:
  Bound result 362

Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 59.96s (59.96s CPU time)

Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17151)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 41629, ~: 41629)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13119)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 13791)
[PASS] test_registerSpoke_unregister() (gas: 36076)
[PASS] test_renouncePositionManagerRole() (gas: 65293)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 74220)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74439)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 388.50ms (365.18ms CPU time)

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 918161)
[PASS] test_repayNative() (gas: 989531)
[PASS] test_supplyAndCollateralNative() (gas: 305199)
[PASS] test_supplyNative() (gas: 286678)
[PASS] test_withdrawNative() (gas: 508784)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 47.89ms (4.09ms CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 745414)
[PASS] test_repayWithSig() (gas: 980290)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209431)
[PASS] test_setUsingAsCollateralWithSig() (gas: 289351)
[PASS] test_supplyWithSig() (gas: 460951)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145237)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143168)
[PASS] test_withdrawWithSig() (gas: 409918)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 50.16ms (7.55ms CPU time)

Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 206690)
[PASS] test_change_role_responsibility() (gas: 121258)
[PASS] test_hub_access_manager_exposure() (gas: 13439)
[PASS] test_hub_admin_access() (gas: 1350388)
[PASS] test_migrate_role_responsibility() (gas: 708988)
[PASS] test_setInterestRateData_access() (gas: 102667)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 26.95ms (3.67ms CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 133168)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 632588, ~: 632417)
Logs:
  Bound result 9

[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 250254, ~: 250261)
Logs:
  Bound result 9

[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 579354, ~: 579801)
Logs:
  Bound result 68691281934999
  Bound result 0

[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 538715, ~: 539094)
Logs:
  Bound result 68691281934999
  Bound result 0

[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, μ: 4051831, ~: 4067908)
Logs:
  Bound result 262803947816958635071541867761
  Bound result 300000000000000000000000000
  Bound result 15613
  Bound result 24285
  Bound result 23039
  Bound result 1712
  Bound result 13000
  Bound result 1487224951
  Bound result 6218
  Bound result 56463
  Bound result 22639
  Bound result 81433
  Bound result 5664
  Bound result 23039
  Bound result 1712
  Bound result 13000
  Bound result 1487224951

Suite result: ok. 6 passed; 0 failed; 1 skipped; finished in 112.42s (112.38s CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.EdgeCases.t.sol:SpokeAccrueLiquidityFeeEdgeCasesTest
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 544682, ~: 544734)
Logs:
  Bound result 17422
  Bound result 480000000
  Bound result 4
  Bound result 21457

[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 803325, ~: 803430)
Logs:
  Bound result 15990
  Bound result 480000000
  Bound result 0
  Bound result 613
  Bound result 3671

[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 645577582)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 263734902)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 544796)
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.48s (18.46s CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 862413)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 122186)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 245279, ~: 245236)
Logs:
  Bound result 9

[PASS] test_accrueLiquidityFee_exact() (gas: 868321)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 938838, ~: 961094)
Logs:
  Bound result 68691281934999
  Bound result 0

[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 545965)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 894605)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 18.85s (18.83s CPU time)

Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 667246)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 157893, ~: 157848)
Logs:
  Bound result 9

[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 332482, ~: 332613)
Logs:
  Bound result 3
  Bound result 218470873395738003579119570309
  Bound result 446067553769140138733721804

[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112438, ~: 112393)
Logs:
  Bound result 9

[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 267084, ~: 266951)
Logs:
  Bound result 1291
  Bound result 1071208440522043736492
  Bound result 173721804

[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 223921, ~: 224119)
Logs:
  Bound result 888155841543549236576985341915
  Bound result 1883605286
  Bound result 8

[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 342385, ~: 342406)
Logs:
  Bound result 3
  Bound result 24801959478194250780329

[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 805220, ~: 805253)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_add_multi_add_minimal_shares() (gas: 322520)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 360306)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64504)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13631)
[PASS] test_add_revertsWith_InvalidShares() (gas: 223458)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224358)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 99705)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99741)
[PASS] test_add_single_asset() (gas: 330255)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_add_with_increased_index() (gas: 301312)
[PASS] test_add_with_increased_index_with_premium() (gas: 680739)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 43.19s (43.17s CPU time)

Ran 21 tests for tests/unit/Spoke/Spoke.Withdraw.HealthFactor.t.sol:SpokeWithdrawHealthFactorTest
[PASS] test_unsetCollateral_fuzz_revertsWith_HealthFactorBelowThreshold(uint256) (runs: 5000, μ: 761276, ~: 760886)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_interest_increase(uint256,uint256) (runs: 5000, μ: 655816, ~: 656179)
Logs:
  Bound result 7587928
  Bound result 203900810

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 883577, ~: 883738)
Logs:
  Bound result 3271193707
  Bound result 300

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1168442, ~: 1168896)
Logs:
  Bound result 79129208
  Bound result 25272735914
  Bound result 301572377798591197

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1168983, ~: 1168913)
Logs:
  Bound result 82225627230
  Bound result 25272735914
  Bound result 301572377798591197

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256) (runs: 5000, μ: 937422, ~: 938143)
Logs:
  Bound result 3271193707
  Bound result 300

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1004844, ~: 1004294)
Logs:
  Bound result 137535554651781825039287233215
  Bound result 1

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_price_drop(uint256,uint256,uint256) (runs: 5000, μ: 1276998, ~: 1276711)
Logs:
  Bound result 105016127116
  Bound result 999999999999999999999999999998
  Bound result 51995399966272464

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1042159, ~: 1041773)
Logs:
  Bound result 284661261
  Bound result 999999999999999999999999999998
  Bound result 51995399966272464

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_price_drop(uint256,uint256) (runs: 5000, μ: 891361, ~: 891694)
Logs:
  Bound result 116813867990
  Bound result 300000000000000000

[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_singleBorrow(uint256) (runs: 5000, μ: 621178, ~: 621139)
Logs:
  Bound result 19582

[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_interest_increase() (gas: 650909)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 879189)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_dai() (gas: 1162745)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_weth() (gas: 1162747)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 933165)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 999392)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts_price_drop() (gas: 1270154)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1035509)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_price_drop() (gas: 886186)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_singleBorrow() (gas: 622180)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 155.23s (155.21s CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.Borrow.EdgeCases.t.sol:SpokeBorrowEdgeCasesTest
[PASS] test_borrow_fuzz_rounding_effect(uint256,uint256) (runs: 5000, μ: 1043455, ~: 1043558)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1416708, ~: 1416786)
Logs:
  Bound result 15261874710857
  Bound result 288620948374029982748857
  Bound result 529787515

[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1085899, ~: 1085648)
Logs:
  Bound result 68691281934999
  Bound result 832464101

[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1146295)
[PASS] test_borrow_rounding_effect_shares() (gas: 1084910)
Logs:
  Bound result 5000000000000000000
  Bound result 94608000

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

Ran 5 tests for tests/unit/Spoke/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, μ: 943215, ~: 963229)
Logs:
  Bound result 2
  Bound result 2
  Bound result 568980905976779404499165382074
  Bound result 217186987
  Bound result 586019951
  Bound result 65091097812321506108314351343
  Bound result 50480

[PASS] test_withdraw_fuzz_partial_full_with_interest(uint256,uint256,uint256,uint40) (runs: 5000, μ: 713043, ~: 713071)
Logs:
  Bound result 17095
  Bound result 1603
  Bound result 9010
  Bound result 15181

[PASS] test_withdraw_round_trip_deposit_withdraw(uint256,uint256,address,uint256) (runs: 5000, μ: 412898, ~: 412876)
Logs:
  Bound result 0
  Bound result 1
  Bound result 292444651076564202344860280473

[PASS] test_withdraw_round_trip_withdraw_deposit(uint256,uint256,uint256,address,uint256) (runs: 5000, μ: 433700, ~: 432996)
Logs:
  Bound result 0
  Bound result 826074470
  Bound result 65865152
  Bound result 999999999999999999999108060962

[PASS] test_withdraw_underwater_reserve_not_collateral() (gas: 816719)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 57.49s (57.47s CPU time)

Ran 38 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 390345, ~: 390384)
Logs:
  Bound result 18

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 45291, ~: 44992)
Logs:
  Bound result 12

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 45334, ~: 45035)
Logs:
  Bound result 12

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 36719, ~: 36719)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 45943, ~: 45986)
Logs:
  Bound result 241

[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 46020, ~: 46308)
Logs:
  Bound result 4

[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 80332734925, ~: 34963)
Logs:
  Bound result 4

[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 956634)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 953770)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 48980)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 126677, ~: 126726)
Logs:
  Bound result 1

[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 35246, ~: 35235)
Logs:
  Bound result 18637

[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33930, ~: 33979)
Logs:
  Bound result 1

[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 39773)
[PASS] test_getAssetId() (gas: 73160)
[PASS] test_getAssetId_fuzz_revertsWith_AssetNotListed(address) (runs: 5000, μ: 18561, ~: 18561)
[PASS] test_hub_deploy_reverts_on_InvalidConstructorInput() (gas: 828595)
[PASS] test_hub_max_riskPremium() (gas: 8610)
[PASS] test_isUnderlyingListed() (gas: 1178402)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 719381)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 618740)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 70708)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 269272, ~: 269609)
Logs:
  Bound result 3
  Bound result 104

[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 822256, ~: 822117)
Logs:
  Bound result 3
  Bound result 1
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 1

[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 724649, ~: 724510)
Logs:
  Bound result 3
  Bound result 1
  Bound result 3
  Bound result 1

[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 823647, ~: 823680)
Logs:
  Bound result 3
  Bound result 3
  Bound result 1000

[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 698247, ~: 698280)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 875248, ~: 875281)
Logs:
  Bound result 3
  Bound result 3
  Bound result 3
  Bound result 1000

[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 700552, ~: 700605)
Logs:
  Bound result 3
  Bound result 3
  Bound result 1000
  Bound result 3
  Bound result 1000
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 61083, ~: 61136)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 40145, ~: 40042)
Logs:
  Bound result 3
  Bound result 104

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 485646)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 198798, ~: 199256)
Logs:
  Bound result 4
  Bound result 15

[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 95892, ~: 96293)
Logs:
  Bound result 0
  Bound result 7144

[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 880156)
Logs:
  Bound result 1
  Bound result 500
  Bound result 3
  Bound result 1000
  Bound result 5
  Bound result 500
  Bound result 3
  Bound result 1000

[PASS] test_updateSpokeConfig_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 59224, ~: 59284)
Logs:
  Bound result 1

[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40525, ~: 40592)
Logs:
  Bound result 2

[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29639)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 93.44s (93.41s CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.Withdraw.Validation.t.sol:SpokeWithdrawValidationTest
[PASS] test_withdraw_fuzz_revertsWith_InsufficientLiquidity_with_debt(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 430470, ~: 430569)
Logs:
  Bound result 0
  Bound result 245515041076167316952872089222
  Bound result 1724057170591012121321284
  Bound result 73212
  Bound result 644798503

[PASS] test_withdraw_fuzz_revertsWith_InsufficientSupply_zero_supplied(uint256) (runs: 5000, μ: 55099, ~: 54812)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_revertsWith_InsufficientLiquidity_with_debt() (gas: 426987)
[PASS] test_withdraw_revertsWith_InvalidAmount_zero_supplied() (gas: 51432)
[PASS] test_withdraw_revertsWith_ReserveNotListed() (gas: 22408)
[PASS] test_withdraw_revertsWith_ReservePaused() (gas: 62929)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 5.82s (5.79s CPU time)

Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 355531)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 696686, ~: 696813)
Logs:
  Bound result 3
  Bound result 100

[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 289108, ~: 289127)
Logs:
  Bound result 3
  Bound result 100

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5000, μ: 82329, ~: 82284)
Logs:
  Bound result 9

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 287070, ~: 287313)
Logs:
  Bound result 1291
  Bound result 70309
  Bound result 173721804

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 34738, ~: 34512)
Logs:
  Bound result 3
  Bound result 100

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 172780, ~: 172492)
Logs:
  Bound result 3124043968137

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 134499, ~: 134296)
Logs:
  Bound result 3124043968137

[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 16138, ~: 16138)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 270488)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28289)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 169103)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 131632)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 16269)
[PASS] test_draw_revertsWith_SpokeHalted() (gas: 61452)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 61391)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 22.67s (22.65s CPU time)

Ran 8 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 663609, ~: 663609)
[PASS] test_eliminateDeficit_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 32580, ~: 32580)
[PASS] test_eliminateDeficit_fuzz_revertsWith_ArithmeticUnderflow_CallerSpokeNoFunds(uint256) (runs: 5000, μ: 352008, ~: 352008)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 36025)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 348183)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_on_UnregisteredCoveredSpoke() (gas: 36412)
[PASS] test_eliminateDeficit_revertsWith_SpokeNotActive_on_UnregisteredAsset() (gas: 384005)
[PASS] test_eliminateDeficit_revertsWith_callerSpokeNotActive() (gas: 159412)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 15.96s (15.93s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.MintFeeShares.t.sol:HubMintFeeSharesTest
[PASS] test_mintFeeShares() (gas: 311928)
[PASS] test_mintFeeShares_noFees() (gas: 367828)
[PASS] test_mintFeeShares_noShares() (gas: 293092)
[PASS] test_mintFeeShares_revertsWith_AccessManagedUnauthorized() (gas: 24139)
[PASS] test_mintFeeShares_revertsWith_AssetNotListed() (gas: 27553)
[PASS] test_mintFeeShares_revertsWith_SpokeNotActive() (gas: 242774)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 28.24ms (3.79ms CPU time)

Ran 9 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 270130)
[PASS] test_deficit() (gas: 1342126)
[PASS] test_draw() (gas: 418586)
[PASS] test_mintFeeShares() (gas: 499967)
[PASS] test_payFee_transferShares() (gas: 968668)
[PASS] test_refreshPremium() (gas: 634532)
[PASS] test_remove() (gas: 310697)
[PASS] test_restore() (gas: 877878)
[PASS] test_restore_with_transfer() (gas: 878543)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 49.85ms (6.85ms CPU time)

Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 703884, ~: 704052)
Logs:
  Bound result 68691281934999
  Bound result 0
  Bound result 100

[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 704341, ~: 704600)
Logs:
  Bound result 615514462186775432459
  Bound result 10765498
  Bound result 571193127101173104469

[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20356)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 61390)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 138740)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 643431)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 24.31s (24.29s CPU time)

Ran 8 tests for tests/unit/Spoke/Spoke.Repay.Scenario.t.sol:SpokeRepayScenarioTest
[PASS] test_fuzz_repay_borrow_twice_repay_twice((uint256,uint256,uint256,uint40),(uint256,uint256,uint256,uint40)) (runs: 5000, μ: 1255741, ~: 1260527)
Logs:
  Bound result 7694
  Bound result 280191750
  Bound result 650000000000000000
  Bound result 11601
  Bound result 3207
  Bound result 8106

[PASS] test_fuzz_repay_multiple_users_repay_same_reserve((uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),uint256) (runs: 5000, μ: 2025888, ~: 1998633)
Logs:
  Bound result 16414
  Bound result 750000000000000000000
  Bound result 300000000
  Bound result 572
  Bound result 12
  Bound result 1650000000000000000
  Bound result 85371137

[PASS] test_repay_fuzz_multiple_users_multiple_assets(((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),uint40) (runs: 5000, μ: 6055035, ~: 6055362)
Logs:
  Bound result 3601589827
  Bound result 1000000000000000000000000
  Bound result 16250
  Bound result 12286
  Bound result 2500000000000000000000000000
  Bound result 216
  Bound result 6857
  Bound result 184
  Bound result 18175
  Bound result 5000000000000000000000
  Bound result 3545
  Bound result 11019
  Bound result 7900
  Bound result 9500000000000000000000
  Bound result 10307
  Bound result 58343569192717505896221277329440569806406424773203170885843287748541570307990
  Bound result 25
  Bound result 78340066645871065499466465279
  Bound result 20620
  Bound result 20000
  Bound result 31536000
  Bound result 36
  Bound result 35239452241223003177623648461612651240659658868680362874500379693938513018881
  Bound result 18088
  Bound result 53531

[PASS] test_repay_fuzz_two_users_multiple_assets(((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),uint40) (runs: 5000, μ: 4288472, ~: 4288708)
Logs:
  Bound result 2144
  Bound result 19514
  Bound result 125000000000000000
  Bound result 816707615
  Bound result 75000000000000000000000
  Bound result 10600
  Bound result 865400000000000000
  Bound result 3635
  Bound result 13052238805970149254
  Bound result 255
  Bound result 14525
  Bound result 8613
  Bound result 11884
  Bound result 1500000000000000000000000000
  Bound result 3447
  Bound result 1000000000000
  Bound result 1940

[PASS] test_repay_partial_then_max() (gas: 690479)
[PASS] test_repay_round_trip_borrow_repay(uint256,uint256,uint40,address,uint256) (runs: 5000, μ: 872228, ~: 875883)
Logs:
  Bound result 1
  Bound result 15825424457171755824
  Bound result 598500474
  Bound result 27788100152337903433

[PASS] test_repay_round_trip_repay_borrow(uint256,uint256,uint256,uint40,address,uint256) (runs: 5000, μ: 953689, ~: 962900)
Logs:
  Bound result 4
  Bound result 498442923041485999192836417641
  Bound result 59930
  Bound result 78068812150638529
  Bound result 222303524690281680401

[PASS] test_repay_two_users_repay_same_reserve((uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),uint256) (runs: 5000, μ: 1464326, ~: 1494159)
Logs:
  Bound result 5401549876140600956580819487
  Bound result 65251468040295843421393
  Bound result 11263328023241632836759
  Bound result 7707153379656042561281651440489383780992440
  Bound result 681445185

Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 298.16s (298.13s CPU time)

Ran 2 tests for tests/unit/Spoke/Spoke.Repay.Validation.t.sol:SpokeRepayValidationTest
[PASS] test_repay_revertsWith_ReserveNotListed() (gas: 23250)
[PASS] test_repay_revertsWith_ReservePaused() (gas: 63770)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 24.09ms (349.84µs CPU time)

Ran 14 tests for tests/unit/Spoke/Spoke.Withdraw.t.sol:SpokeWithdrawTest
[PASS] test_fuzz_withdraw_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 730729, ~: 732741)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_withdraw_all_liquidity() (gas: 238676)
[PASS] test_withdraw_all_liquidity_with_interest_no_premium() (gas: 798449)
[PASS] test_withdraw_all_liquidity_with_interest_with_premium() (gas: 805991)
[PASS] test_withdraw_fuzz_all_elapsed_with_interest(uint256,uint256,uint40) (runs: 5000, μ: 660820, ~: 660740)
Logs:
  Bound result 55290522459190817
  Bound result 63335979805502
  Bound result 3

[PASS] test_withdraw_fuzz_all_greater_than_supplied(uint256) (runs: 5000, μ: 241696, ~: 241494)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_fuzz_all_liquidity_with_interest_no_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 871488, ~: 871967)
Logs:
  Bound result 0
  Bound result 2
  Bound result 1
  Bound result 2
  Bound result 286517826

[PASS] test_withdraw_fuzz_all_liquidity_with_interest_with_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 875906, ~: 875924)
Logs:
  Bound result 0
  Bound result 2
  Bound result 1
  Bound result 2
  Bound result 286517826

[PASS] test_withdraw_fuzz_all_with_interest(uint256,uint256) (runs: 5000, μ: 673978, ~: 673922)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_withdraw_fuzz_suppliedAmount(uint256) (runs: 5000, μ: 243289, ~: 243087)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_max_greater_than_supplied() (gas: 222103)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 654742)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 402093)
[PASS] test_withdraw_same_block() (gas: 243770)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 72.83s (72.81s CPU time)

Ran 11 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 652774)
Logs:
  Bound result 1000000000000000000000
  Bound result 500000000000000000000
  Bound result 200000000000000000000

[PASS] test_reclaim_fullAmount() (gas: 635224)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 654449, ~: 653715)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 564283877115702805413

[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 743828)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 13093)
[PASS] test_reclaim_revertsWith_InsufficientTransferred() (gas: 456516)
[PASS] test_reclaim_revertsWith_InsufficientTransferred_noSwept() (gas: 102551)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 92721)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93604, ~: 93604)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40516)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 619868)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 14.46s (14.44s CPU time)

Ran 16 tests for tests/unit/SpokeConfigurator.GranularAccessControl.t.sol:SpokeConfiguratorGranularAccessControlTest
[PASS] test_fuzz_unauthorized_cannotCall_liquidationConfigManagerMethods(address) (runs: 5000, μ: 117054, ~: 117059)
[PASS] test_fuzz_unauthorized_cannotCall_positionManagerAdminMethods(address) (runs: 5000, μ: 39759, ~: 39761)
[PASS] test_fuzz_unauthorized_cannotCall_reserveManagerMethods(address) (runs: 5000, μ: 483428, ~: 483447)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationConfig() (gas: 62503)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationTargetHealthFactor() (gas: 62044)
[PASS] test_liquidationConfigManager_cannotCall_anyPositionManagerAdminMethod() (gas: 38976)
[PASS] test_liquidationConfigManager_cannotCall_anyReserveMethod() (gas: 486121)
[PASS] test_positionManagerAdmin_canCall_updatePositionManager() (gas: 75206)
[PASS] test_positionManagerAdmin_cannotCall_anyLiquidationConfigMethod() (gas: 117021)
[PASS] test_positionManagerAdmin_cannotCall_anyReserveMethod() (gas: 485869)
[PASS] test_reserveManager_canCall_freezeAllReserves() (gas: 156806)
[PASS] test_reserveManager_canCall_pauseAllReserves() (gas: 156791)
[PASS] test_reserveManager_canCall_updateFrozen() (gas: 65173)
[PASS] test_reserveManager_canCall_updatePaused() (gas: 65119)
[PASS] test_reserveManager_cannotCall_anyLiquidationConfigMethod() (gas: 116976)
[PASS] test_reserveManager_cannotCall_anyPositionManagerAdminMethod() (gas: 38975)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 6.27s (6.24s CPU time)

Ran 51 tests for tests/unit/SpokeConfigurator.t.sol:SpokeConfiguratorTest
[PASS] test_addCollateralFactor() (gas: 125615)
[PASS] test_addCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29173)
[PASS] test_addDynamicReserveConfig() (gas: 105429)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29344)
[PASS] test_addLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29072)
[PASS] test_addLiquidationFee() (gas: 125602)
[PASS] test_addLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29073)
[PASS] test_addMaxLiquidationBonus() (gas: 125652)
[PASS] test_addReserve() (gas: 456697)
[PASS] test_addReserve_revertsWith_AccessManagedUnauthorized() (gas: 30019)
[PASS] test_addReserve_revertsWith_MaximumReservesReached() (gas: 289234)
[PASS] test_freezeAllReserves() (gas: 202540)
[PASS] test_freezeAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26853)
[PASS] test_freezeReserve() (gas: 72273)
[PASS] test_freezeReserve_revertsWith_AccessManagedUnauthorized() (gas: 28955)
[PASS] test_pauseAllReserves() (gas: 202442)
[PASS] test_pauseAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26808)
[PASS] test_pauseReserve() (gas: 72245)
[PASS] test_pauseReserve_revertsWith_AccessManagedUnauthorized() (gas: 28976)
[PASS] test_updateBorrowable() (gas: 102767)
[PASS] test_updateBorrowable_revertsWith_AccessManagedUnauthorized() (gas: 29057)
[PASS] test_updateCollateralFactor() (gas: 82719)
[PASS] test_updateCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29198)
[PASS] test_updateCollateralRisk() (gas: 76917)
[PASS] test_updateCollateralRisk_revertsWith_AccessManagedUnauthorized() (gas: 29028)
[PASS] test_updateDynamicReserveConfig() (gas: 201323)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29433)
[PASS] test_updateFrozen() (gas: 105534)
[PASS] test_updateFrozen_revertsWith_AccessManagedUnauthorized() (gas: 29056)
[PASS] test_updateHealthFactorForMaxBonus() (gas: 68165)
[PASS] test_updateHealthFactorForMaxBonus_revertsWith_AccessManagedUnauthorized() (gas: 26799)
[PASS] test_updateLiquidationBonusFactor() (gas: 71080)
[PASS] test_updateLiquidationBonusFactor_revertsWith_AccessManagedUnauthorized() (gas: 26844)
[PASS] test_updateLiquidationConfig() (gas: 65757)
[PASS] test_updateLiquidationConfig_revertsWith_AccessManagedUnauthorized() (gas: 27193)
[PASS] test_updateLiquidationFee() (gas: 82779)
[PASS] test_updateLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29173)
[PASS] test_updateLiquidationTargetHealthFactor() (gas: 71043)
[PASS] test_updateLiquidationTargetHealthFactor_revertsWith_AccessManagedUnauthorized() (gas: 26909)
[PASS] test_updateMaxLiquidationBonus() (gas: 82715)
[PASS] test_updateMaxLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29109)
[PASS] test_updateMaxReserves() (gas: 53672)
[PASS] test_updateMaxReserves_revertsWith_AccessManagedUnauthorized() (gas: 26909)
[PASS] test_updatePaused() (gas: 105536)
[PASS] test_updatePaused_revertsWith_AccessManagedUnauthorized() (gas: 29077)
[PASS] test_updatePositionManager() (gas: 74331)
[PASS] test_updatePositionManager_revertsWith_AccessManagedUnauthorized() (gas: 26996)
[PASS] test_updateReceiveSharesEnabled() (gas: 102864)
[PASS] test_updateReceiveSharesEnabled_revertsWith_AccessManagedUnauthorized() (gas: 29121)
[PASS] test_updateReservePriceSource() (gas: 280185)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized() (gas: 29052)
Suite result: ok. 51 passed; 0 failed; 0 skipped; finished in 45.39ms (14.49ms CPU time)

Ran 6 tests for tests/unit/libraries/SpokeUtils.t.sol:SpokeUtilsTest
[PASS] test_fuzz_toValue(uint256,uint256,uint256) (runs: 5000, μ: 15778, ~: 15844)
Logs:
  Bound result 615514462186775432459
  Bound result 9
  Bound result 9140094126966428

[PASS] test_get() (gas: 180696)
[PASS] test_get_revertsWith_ReserveNotListed() (gas: 167195)
[PASS] test_toValue() (gas: 8806)
[PASS] test_toValue_revertsWith_ArithmeticOverflow() (gas: 8959)
[PASS] test_toValue_revertsWith_ArithmeticUnderflow() (gas: 8734)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 447.55ms (424.39ms CPU time)

Ran 17 tests for tests/unit/Spoke/Spoke.Borrow.HealthFactor.t.sol:SpokeBorrowHealthFactorTest
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_collateral_price_drop(uint256,uint256) (runs: 5000, μ: 910904, ~: 910880)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 857392, ~: 857850)
Logs:
  Bound result 8640000
  Bound result 120000000

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 894017, ~: 894106)
Logs:
  Bound result 15572
  Bound result 6588
  Bound result 320000000

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1098018, ~: 1098251)
Logs:
  Bound result 99999999999068691281935000
  Bound result 99999999999000000000000101

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1137321, ~: 1137438)
Logs:
  Bound result 864000
  Bound result 1280000000000000000
  Bound result 197331395

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 673637, ~: 673813)
Logs:
  Bound result 11917
  Bound result 640000000

[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 641146)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 905130)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 851631)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1125364)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1125408)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 889115)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1090491)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1129103)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 668519)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1129536, ~: 1129889)
Logs:
  Bound result 133
  Bound result 127
  Bound result 32

[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1129997, ~: 1129911)
Logs:
  Bound result 133
  Bound result 127
  Bound result 32

Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 119.85s (119.83s CPU time)

Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 254760)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 488537, ~: 493825)
Logs:
  Bound result 999999999910000000000000000001
  Bound result 1
  Bound result 5827

[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 466152, ~: 475301)
Logs:
  Bound result 531
  Bound result 67
  Bound result 7500000000000000000000000000
  Bound result 13173

[PASS] test_refreshPremium_haltedSpokesAllowed() (gas: 121441)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 898571)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 458620, ~: 459166)
Logs:
  Bound result 3124043968137

[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 528603, ~: 528823)
Logs:
  Bound result 3124043968137

[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 853979)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 875281)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 58921)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 920749)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 707796)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 19.87s (19.85s CPU time)

Ran 15 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 208975)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_remove_all_with_interest() (gas: 368376)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 207745, ~: 207681)
Logs:
  Bound result 4
  Bound result 100

[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 419576, ~: 419810)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 289014, ~: 289118)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 422327, ~: 422842)
Logs:
  Bound result 66772882907369623285540549
  Bound result 18521
  Bound result 21437114374602192017384160
  Bound result 13716

[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 158411)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 147500)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 21376)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 16471)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 18628)
[PASS] test_remove_revertsWith_SpokeHalted() (gas: 61971)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 61880)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 185386)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 364720)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 29.66s (29.64s CPU time)

Ran 17 tests for tests/unit/Spoke/TreasurySpoke.t.sol:TreasurySpokeTest
[PASS] test_borrow_revertsWith_UnsupportedAction() (gas: 9654)
[PASS] test_deploy_reverts_on_invalid_params() (gas: 4182)
[PASS] test_getters() (gas: 743647)
[PASS] test_initial_state() (gas: 167956)
[PASS] test_liquidationCall_revertsWith_UnsupportedAction() (gas: 10474)
[PASS] test_repay_revertsWith_UnsupportedAction() (gas: 9656)
[PASS] test_supply(uint256) (runs: 5000, μ: 124861, ~: 124644)
Logs:
  Bound result 3124043968137

[PASS] test_supply_revertsWith_Unauthorized(address) (runs: 5000, μ: 16113, ~: 16113)
[PASS] test_transfer_fuzz(address,uint256,uint256) (runs: 5000, μ: 100122, ~: 101179)
Logs:
  Bound result 15440
  Bound result 12960

[PASS] test_transfer_revertsWith_ERC20InsufficientBalance(uint256) (runs: 5000, μ: 604008, ~: 604008)
[PASS] test_transfer_revertsWith_Unauthorized(address) (runs: 5000, μ: 14826, ~: 14826)
[PASS] test_withdraw_fuzz_amount_feesOnly(uint256) (runs: 5000, μ: 789447, ~: 789159)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_fuzz_amount_interestAndFees(uint256) (runs: 5000, μ: 776420, ~: 776248)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_fuzz_amount_interestOnly(uint256) (runs: 5000, μ: 809549, ~: 809256)
Logs:
  Bound result 23432

[PASS] test_withdraw_fuzz_maxLiquidityFee(uint256,uint256,uint256) (runs: 5000, μ: 854023, ~: 854146)
Logs:
  Bound result 4
  Bound result 218470873395738003579119570309
  Bound result 173721804

[PASS] test_withdraw_maxLiquidityFee() (gas: 854773)
Logs:
  Bound result 2
  Bound result 1000000000000000000000
  Bound result 29376000

[PASS] test_withdraw_revertsWith_Unauthorized(address) (runs: 5000, μ: 16476, ~: 16476)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 52.72s (52.69s CPU time)

Ran 8 tests for tests/unit/UnitPriceFeed.t.sol:UnitPriceFeedTest
[PASS] testDECIMALS() (gas: 8305)
[PASS] test_constructor_revertsWith_Uint8Overflow() (gas: 4674)
[PASS] test_description() (gas: 11865)
[PASS] test_fuzz_latestRoundData(uint80) (runs: 5000, μ: 11105, ~: 11105)
[PASS] test_fuzz_latestRoundData_DifferentDecimals(uint8) (runs: 5000, μ: 14419, ~: 14578)
Logs:
  Bound result 1

[PASS] test_getRoundData() (gas: 12402)
[PASS] test_getRoundData_futureRound() (gas: 12325)
[PASS] test_version() (gas: 8261)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 973.34ms (961.61ms CPU time)

Ran 12 tests for tests/unit/libraries/UserPositionDebt.t.sol:UserPositionUtilsTest
[PASS] test_applyPremiumDelta() (gas: 26101)
[PASS] test_calculatePremiumDelta() (gas: 17592)
[PASS] test_calculatePremiumRay() (gas: 19352)
[PASS] test_calculateRestoreAmount() (gas: 24204)
[PASS] test_fuzz_applyPremiumDelta((int256,int256,uint256)) (runs: 5000, μ: 34090, ~: 34184)
Logs:
  Bound result 215016815803108445248527167096
  Bound result 331073717946348281691194968263

[PASS] test_fuzz_calculatePremiumDelta((uint256,uint256,int256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 48831, ~: 49021)
Logs:
  Bound result 99000000050384421173548891413
  Bound result 267064735
  Bound result 15166708452425474209087810086592205507
  Bound result 310273141488122044938099248275
  Bound result 16212485736382855360724910945
  Bound result 99999
  Bound result 11272700326030427879754413608164415047

[PASS] test_fuzz_calculatePremiumRay(uint256,int256,uint256) (runs: 5000, μ: 33196, ~: 33181)
Logs:
  Bound result 99000000000000000000517440284
  Bound result 6000000000000000000000000000
  Bound result -1

[PASS] test_fuzz_calculateRestoreAmount(uint256,uint256,int256,uint256,uint256) (runs: 5000, μ: 42317, ~: 42275)
Logs:
  Bound result 59609612905231002086766766882
  Bound result 800000000000000000
  Bound result 15355
  Bound result 12245
  Bound result 1000100000000000000

[PASS] test_fuzz_getUserDebt_DrawnIndex(uint256,uint256,int256,uint256) (runs: 5000, μ: 39430, ~: 39396)
Logs:
  Bound result 99000000000000000000000007443
  Bound result 960000000000000000
  Bound result -40000000000000000000
  Bound result 518877802919256876800202355087

[PASS] test_fuzz_getUserDebt_HubAndAssetId(uint256,uint256,int256,uint256) (runs: 5000, μ: 45390, ~: 45356)
Logs:
  Bound result 99000000000000000000000007443
  Bound result 960000000000000000
  Bound result -40000000000000000000
  Bound result 518877802919256876800202355087

[PASS] test_getUserDebt_DrawnIndex() (gas: 23419)
[PASS] test_getUserDebt_HubAndAssetId() (gas: 30124)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 4.19s (4.19s CPU time)

Ran 12 tests for tests/unit/libraries/UserPositionUtils.t.sol:UserPositionUtilsTest
[PASS] test_applyPremiumDelta() (gas: 26101)
[PASS] test_calculatePremiumDelta() (gas: 17592)
[PASS] test_calculatePremiumRay() (gas: 19352)
[PASS] test_calculateRestoreAmount() (gas: 24204)
[PASS] test_fuzz_applyPremiumDelta((int256,int256,uint256)) (runs: 5000, μ: 34090, ~: 34184)
Logs:
  Bound result 215016815803108445248527167096
  Bound result 331073717946348281691194968263

[PASS] test_fuzz_calculatePremiumDelta((uint256,uint256,int256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 48831, ~: 49021)
Logs:
  Bound result 99000000050384421173548891413
  Bound result 267064735
  Bound result 15166708452425474209087810086592205507
  Bound result 310273141488122044938099248275
  Bound result 16212485736382855360724910945
  Bound result 99999
  Bound result 11272700326030427879754413608164415047

[PASS] test_fuzz_calculatePremiumRay(uint256,int256,uint256) (runs: 5000, μ: 33196, ~: 33181)
Logs:
  Bound result 99000000000000000000517440284
  Bound result 6000000000000000000000000000
  Bound result -1

[PASS] test_fuzz_calculateRestoreAmount(uint256,uint256,int256,uint256,uint256) (runs: 5000, μ: 42317, ~: 42275)
Logs:
  Bound result 59609612905231002086766766882
  Bound result 800000000000000000
  Bound result 15355
  Bound result 12245
  Bound result 1000100000000000000

[PASS] test_fuzz_getUserDebt_DrawnIndex(uint256,uint256,int256,uint256) (runs: 5000, μ: 39430, ~: 39396)
Logs:
  Bound result 99000000000000000000000007443
  Bound result 960000000000000000
  Bound result -40000000000000000000
  Bound result 518877802919256876800202355087

[PASS] test_fuzz_getUserDebt_HubAndAssetId(uint256,uint256,int256,uint256) (runs: 5000, μ: 45390, ~: 45356)
Logs:
  Bound result 99000000000000000000000007443
  Bound result 960000000000000000
  Bound result -40000000000000000000
  Bound result 518877802919256876800202355087

[PASS] test_getUserDebt_DrawnIndex() (gas: 23419)
[PASS] test_getUserDebt_HubAndAssetId() (gas: 30124)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 4.24s (4.24s CPU time)

Ran 7 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 220024, ~: 220468)
Logs:
  Bound result 3124043968137

[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 221049, ~: 221493)
Logs:
  Bound result 3124043968137

[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 674659, ~: 675407)
Logs:
  Bound result 773487950
  Bound result 12625
  Bound result 15913
  Bound result 7500000000000000000000000000

[PASS] test_reportDeficit_halted() (gas: 265152)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 24893)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 33865, ~: 33865)
[PASS] test_reportDeficit_with_premium() (gas: 673767)
Logs:
  Bound result 10000000000
  Bound result 31536000
  Bound result 5000000000
  Bound result 0

Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 17.35s (17.32s CPU time)

Ran 17 tests for tests/unit/WadRayMath.t.sol:WadRayMathDifferentialTests
[PASS] test_bpsToRay_fuzz(uint256) (runs: 5000, μ: 11774, ~: 11826)
[PASS] test_bpsToWad_fuzz(uint256) (runs: 5000, μ: 11770, ~: 11813)
[PASS] test_constants() (gas: 12879)
[PASS] test_fromRayUp_fuzz(uint256) (runs: 5000, μ: 11046, ~: 11072)
[PASS] test_fromWadDown_fuzz(uint256) (runs: 5000, μ: 9378, ~: 9378)
[PASS] test_fuzz_rayDiv(uint256,uint256) (runs: 5000, μ: 12436, ~: 12807)
[PASS] test_fuzz_rayMul(uint256,uint256) (runs: 5000, μ: 11634, ~: 12155)
[PASS] test_fuzz_wadDiv(uint256,uint256) (runs: 5000, μ: 12617, ~: 12918)
[PASS] test_fuzz_wadMul(uint256,uint256) (runs: 5000, μ: 11593, ~: 12134)
[PASS] test_rayDiv() (gas: 39659)
[PASS] test_rayMul() (gas: 28767)
[PASS] test_roundRayUp_fuzz(uint256) (runs: 5000, μ: 12760, ~: 12909)
[PASS] test_roundRayUp_overflow() (gas: 14831)
[PASS] test_toRay_fuzz(uint256) (runs: 5000, μ: 11696, ~: 12264)
[PASS] test_toWad_fuzz(uint256) (runs: 5000, μ: 11844, ~: 12262)
[PASS] test_wadDiv() (gas: 40065)
[PASS] test_wadMul() (gas: 28408)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 2.14s (2.13s CPU time)

Ran 3 tests for tests/unit/Hub/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 274449)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 514690, ~: 514649)
Logs:
  Bound result 351500639
  Bound result 1256746

[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 454219, ~: 454013)
Logs:
  Bound result 3124043968137

Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 17.11s (17.09s CPU time)

Ran 23 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 364066)
Logs:
  Bound result 1000000000000000000000
  Bound result 500000000000000000000
  Bound result 31536000

[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 674146)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 31536000
  Bound result 1

[PASS] test_restore_fuzz_full_amount_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 365391, ~: 365484)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 173721804

[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) ...*[Comment body truncated]*

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Forge Build Sizes

Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
MockNoncesKeyed ↑7% (+63) 921 ↑7% (+63) 949 ↓0% (-63) 23,655 ↓0% (-63) 48,203
NoncesKeyed ↓13% (-82) 562 ↓12% (-82) 590 ↑0% (+82) 24,014 ↑0% (+82) 48,562
NoncesKeyed.spoke ↑1% (+3) 390 ↑1% (+3) 416 ↓0% (-3) 24,186 ↓0% (-3) 48,736
SignatureGateway ↓1% (-160) 11,325 ↓1% (-160) 11,864 ↑1% (+160) 13,251 ↑0% (+160) 37,288
SpokeInstance ↑0% (+3) 24,345 ↑0% (+3) 25,152 ↓1% (-3) 231 ↓0% (-3) 24,000
🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle 2,834 3,488 21,742 45,664
AccessManager 12,985 14,210 11,591 34,942
AccessManagerEnumerable 16,881 18,699 7,695 30,453
Address 44 94 24,532 49,058
Arrays 44 94 24,532 49,058
Arrays.hub 16 44 24,560 49,108
Arrays.spoke 16 44 24,560 49,108
AssetInterestRateStrategy 2,704 2,889 21,872 46,263
AssetLogic 44 94 24,532 49,058
AssetLogic.hub 16 44 24,560 49,108
AuthorityUtils 44 94 24,532 49,058
AuthorityUtils.hub 16 44 24,560 49,108
AuthorityUtils.spoke 16 44 24,560 49,108
Bytes 44 94 24,532 49,058
Bytes.spoke 16 44 24,560 49,108
Comparators 44 94 24,532 49,058
Comparators.hub 16 44 24,560 49,108
Comparators.spoke 16 44 24,560 49,108
Constants 499 551 24,077 48,601
Create2Utils 134 184 24,442 48,968
DeployUtils 44 94 24,532 49,058
DeployWrapper 3,330 3,358 21,246 45,794
ECDSA 44 94 24,532 49,058
ECDSA.spoke 16 44 24,560 49,108
EIP712Hash (src/position-manager/libraries/EIP712Hash.sol) 441 493 24,135 48,659
EIP712Hash (src/spoke/libraries/EIP712Hash.sol) 171 221 24,405 48,931
EIP712Hash.spoke 166 194 24,410 48,958
EIP712Types 44 94 24,532 49,058
ERC1967Proxy 135 891 24,441 48,261
ERC1967Utils 44 94 24,532 49,058
EnumerableSet 44 94 24,532 49,058
EnumerableSet.hub 16 44 24,560 49,108
Errors 44 94 24,532 49,058
ExtSloadWrapper 394 422 24,182 48,730
GatewayBaseWrapper 2,400 2,675 22,176 46,477
Hashes 44 94 24,532 49,058
Hub 23,547 23,744 1,029 25,408
HubConfigurator 13,833 14,029 10,743 35,123
JsonBindings 12,853 12,905 11,723 36,247
KeyValueList 44 94 24,532 49,058
KeyValueList.spoke 16 44 24,560 49,108
KeyValueListWrapper 957 985 23,619 48,167
LibBit 44 94 24,532 49,058
LibBit.spoke 16 44 24,560 49,108
LiquidationLogic 12,440 12,492 12,136 36,660
LiquidationLogic.spoke 9,829 9,861 14,747 39,291
LiquidationLogicWrapper 18,567 18,741 6,009 30,411
LowLevelCall 44 94 24,532 49,058
Math 44 94 24,532 49,058
Math.hub 16 44 24,560 49,108
Math.spoke 16 44 24,560 49,108
MathUtils 44 94 24,532 49,058
MathUtils.hub 16 44 24,560 49,108
MathUtils.spoke 16 44 24,560 49,108
MockERC1271Wallet 828 962 23,748 48,190
MockERC20 2,540 3,006 22,036 46,146
MockPriceFeed 737 1,395 23,839 47,757
MockReentrantCaller 882 1,083 23,694 48,069
MockSkimSpoke 1,116 1,275 23,460 47,877
NativeTokenGateway 6,187 6,604 18,389 42,548
Panic 44 94 24,532 49,058
Panic.hub 16 44 24,560 49,108
Panic.spoke 16 44 24,560 49,108
PercentageMath 44 94 24,532 49,058
PercentageMath.hub 16 44 24,560 49,108
PercentageMath.spoke 16 44 24,560 49,108
PercentageMathWrapper 632 660 23,944 48,492
PositionStatusMap 44 94 24,532 49,058
PositionStatusMap.spoke 16 44 24,560 49,108
PositionStatusMapWrapper 3,341 3,369 21,235 45,783
Premium 44 94 24,532 49,058
Premium.hub 16 44 24,560 49,108
Premium.spoke 16 44 24,560 49,108
ProxyAdmin 1,320 1,556 23,256 47,596
RescuableWrapper 908 1,042 23,668 48,110
ReserveFlagsMap 44 94 24,532 49,058
ReserveFlagsMap.spoke 16 44 24,560 49,108
ReserveFlagsMapWrapper 928 956 23,648 48,196
Roles 218 269 24,358 48,883
SafeCast 44 94 24,532 49,058
SafeCast.hub 16 44 24,560 49,108
SafeCast.spoke 16 44 24,560 49,108
SafeERC20 44 94 24,532 49,058
SafeERC20.hub 16 44 24,560 49,108
SafeERC20.spoke 16 44 24,560 49,108
SharesMath 44 94 24,532 49,058
SharesMath.hub 16 44 24,560 49,108
SignatureChecker 44 94 24,532 49,058
SignatureChecker.spoke 16 44 24,560 49,108
SlotDerivation 44 94 24,532 49,058
SlotDerivation.hub 16 44 24,560 49,108
SlotDerivation.spoke 16 44 24,560 49,108
SpokeConfigurator 12,328 12,524 12,248 36,628
SpokeUtils 96 146 24,480 49,006
SpokeUtils.spoke 71 99 24,505 49,053
SpokeUtilsWrapper 1,827 1,855 22,749 47,297
StorageSlot 44 94 24,532 49,058
StorageSlot.hub 16 44 24,560 49,108
StorageSlot.spoke 16 44 24,560 49,108
TestnetERC20 3,649 4,525 20,927 44,627
Time 44 94 24,532 49,058
TransientSlot 44 94 24,532 49,058
TransientSlot.spoke 16 44 24,560 49,108
TransparentUpgradeableProxy 1,419 4,078 23,157 45,074
TreasurySpoke 3,599 4,014 20,977 45,138
UnitPriceFeed 777 1,771 23,799 47,381
UserPositionUtils (src/spoke/libraries/UserPositionDebt.sol) 44 94 24,532 49,058
UserPositionUtils (src/spoke/libraries/UserPositionUtils.sol) 44 94 24,532 49,058
UserPositionUtils.spoke 16 44 24,560 49,108
UserPositionUtilsWrapper (tests/mocks/UserPositionDebtWrapper.sol) 3,263 3,291 21,313 45,861
UserPositionUtilsWrapper (tests/mocks/UserPositionUtilsWrapper.sol) 3,263 3,291 21,313 45,861
Utils 44 94 24,532 49,058
WETH9 2,148 2,614 22,428 46,538
WadRayMath 44 94 24,532 49,058
WadRayMath.hub 16 44 24,560 49,108
WadRayMath.spoke 16 44 24,560 49,108
WadRayMathWrapper 1,514 1,542 23,062 47,610

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

♻️ Forge Gas Snapshots

Path Value
snapshots/NativeTokenGateway.Operations.json
borrowNative ↑0% (+22) 228,678
repayNative ↑0% (+22) 166,493
snapshots/SignatureGateway.Operations.json
borrowWithSig ↑0% (+22) 213,911
repayWithSig ↑0% (+22) 186,765
supplyWithSig ↑0% (+18) 152,012
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 ↑0% (+22) 13,036
getUserAccountData: supplies: 1, borrows: 0 ↑0% (+22) 49,448
getUserAccountData: supplies: 2, borrows: 0 ↑0% (+22) 81,124
getUserAccountData: supplies: 2, borrows: 1 ↑0% (+22) 101,553
getUserAccountData: supplies: 2, borrows: 2 ↑0% (+22) 120,813
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first ↑0% (+22) 190,406
borrow: second action, same reserve ↑0% (+22) 170,272
liquidationCall (receiveShares): full ↑0% (+22) 303,279
liquidationCall (receiveShares): partial ↑0% (+22) 302,697
liquidationCall (reportDeficit): full ↑0% (+22) 367,708
liquidationCall: full ↑0% (+22) 320,915
liquidationCall: partial ↑0% (+22) 320,333
permitReserve + repay (multicall) ↑0% (+22) 164,598
repay: full ↑0% (+22) 123,936
repay: partial ↑0% (+22) 128,894
snapshots/Spoke.Operations.json
borrow: first ↑0% (+22) 259,341
borrow: second action, same reserve ↑0% (+22) 202,207
liquidationCall (receiveShares): full ↑0% (+22) 335,323
liquidationCall (receiveShares): partial ↑0% (+22) 334,741
liquidationCall (reportDeficit): full ↑0% (+22) 359,908
liquidationCall: full ↑0% (+22) 352,959
liquidationCall: partial ↑0% (+22) 352,377
permitReserve + repay (multicall) ↑0% (+18) 162,062
repay: full ↑0% (+22) 118,015
repay: partial ↑0% (+22) 137,373
🔕 Unchanged
Path Value
snapshots/Hub.Operations.json
add 86,703
add: with transfer 108,000
draw 104,159
eliminateDeficit: full 72,578
eliminateDeficit: partial 82,183
mintFeeShares 82,752
payFee 70,816
refreshPremium 70,373
remove: full 75,607
remove: partial 80,745
reportDeficit 111,893
restore: full 76,563
restore: full - with transfer 169,172
restore: partial 85,273
restore: partial - with transfer 143,253
transferShares 69,630
snapshots/NativeTokenGateway.Operations.json
supplyAsCollateralNative 160,133
supplyNative 135,762
withdrawNative: full 125,557
withdrawNative: partial 136,746
snapshots/SignatureGateway.Operations.json
setSelfAsUserPositionManagerWithSig 75,385
setUsingAsCollateralWithSig 85,387
updateUserDynamicConfigWithSig 63,120
updateUserRiskPremiumWithSig 62,090
withdrawWithSig 130,812
snapshots/Spoke.Operations.ZeroRiskPremium.json
permitReserve + supply (multicall) 146,756
permitReserve + supply + enable collateral (multicall) 161,207
setUserPositionManagersWithSig: disable 47,039
setUserPositionManagersWithSig: enable 68,951
supply + enable collateral (multicall) 141,409
supply: 0 borrows, collateral disabled 122,846
supply: 0 borrows, collateral enabled 105,817
supply: second action, same reserve 105,746
updateUserDynamicConfig: 1 collateral 74,545
updateUserDynamicConfig: 2 collaterals 89,413
updateUserRiskPremium: 1 borrow 95,734
updateUserRiskPremium: 2 borrows 105,414
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, disable 105,778
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, disable 127,327
usingAsCollateral: 2 borrows, enable 42,516
withdraw: 0 borrows, full 127,955
withdraw: 0 borrows, partial 132,851
withdraw: 1 borrow, partial 159,982
withdraw: 2 borrows, partial 174,540
withdraw: non collateral 105,902
snapshots/Spoke.Operations.json
permitReserve + supply (multicall) 146,756
permitReserve + supply + enable collateral (multicall) 161,207
setUserPositionManagersWithSig: disable 47,039
setUserPositionManagersWithSig: enable 68,951
supply + enable collateral (multicall) 141,409
supply: 0 borrows, collateral disabled 122,846
supply: 0 borrows, collateral enabled 105,817
supply: second action, same reserve 105,746
updateUserDynamicConfig: 1 collateral 74,545
updateUserDynamicConfig: 2 collaterals 89,413
updateUserRiskPremium: 1 borrow 149,093
updateUserRiskPremium: 2 borrows 199,355
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, disable 159,134
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, disable 229,264
usingAsCollateral: 2 borrows, enable 42,516
withdraw: 0 borrows, full 127,955
withdraw: 0 borrows, partial 132,851
withdraw: 1 borrow, partial 210,836
withdraw: 2 borrows, partial 257,012
withdraw: non collateral 105,902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant