Skip to content

test: liq with large amounts#1284

Draft
yan-man wants to merge 1 commit into
mainfrom
test/liq-scenario
Draft

test: liq with large amounts#1284
yan-man wants to merge 1 commit into
mainfrom
test/liq-scenario

Conversation

@yan-man

@yan-man yan-man commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown

Forge Build Sizes

🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle 2,396 2,529 22,180 46,623
AccessManager 12,985 14,210 11,591 34,942
AccessManagerEnumerable 21,008 22,847 3,568 26,305
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,626 2,811 21,950 46,341
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
ConfigPermissionsMap 44 94 24,532 49,058
ConfigPermissionsWrapper 1,001 1,029 23,575 48,123
ConfigPositionManager 13,330 13,884 11,246 35,268
Constants 499 551 24,077 48,601
Create2Utils 134 184 24,442 48,968
DeployUtils 44 94 24,532 49,058
DeployWrapper 3,478 3,506 21,098 45,646
ECDSA 44 94 24,532 49,058
ECDSA.spoke 16 44 24,560 49,108
EIP712Hash (src/position-manager/libraries/EIP712Hash.sol) 771 823 23,805 48,329
EIP712Hash (src/spoke/libraries/EIP712Hash.sol) 441 493 24,135 48,659
EIP712Hash.spoke 491 521 24,085 48,631
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
GiverPositionManager 6,924 7,199 17,652 41,953
Hashes 44 94 24,532 49,058
HubConfigurator 13,833 14,067 10,743 35,085
HubInstance 24,353 24,560 223 24,592
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,519 12,571 12,057 36,581
LiquidationLogic.spoke 9,835 9,867 14,741 39,285
LiquidationLogicWrapper 18,611 18,785 5,965 30,367
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
MockNoncesKeyed 858 886 23,718 48,266
MockPriceFeed 538 1,187 24,038 47,965
MockReentrantCaller 882 1,083 23,694 48,069
MockSkimSpoke 1,116 1,275 23,460 47,877
NativeTokenGateway 8,787 9,204 15,789 39,948
NoncesKeyed 644 672 23,932 48,480
NoncesKeyed.spoke 387 413 24,189 48,739
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
PositionManagerBaseWrapper 5,100 5,375 19,476 43,777
PositionManagerNoMulticall 5,036 5,311 19,540 43,841
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
SignatureGateway 12,208 12,749 12,368 36,403
SlotDerivation 44 94 24,532 49,058
SlotDerivation.hub 16 44 24,560 49,108
SlotDerivation.spoke 16 44 24,560 49,108
SpokeConfigurator 11,825 12,059 12,751 37,093
SpokeInstance 24,291 25,098 285 24,054
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
TakerPositionManager 12,157 12,711 12,419 36,441
TestnetERC20 3,649 4,525 20,927 44,627
Time 44 94 24,532 49,058
TokenizationSpokeInstance 13,627 14,953 10,949 34,199
TransientSlot 44 94 24,532 49,058
TransientSlot.spoke 16 44 24,560 49,108
TransparentUpgradeableProxy 1,419 4,078 23,157 45,074
TreasurySpokeInstance 4,004 4,218 20,572 44,934
UserPositionUtils 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
Copy Markdown
🌈 Test Results
No files changed, compilation skipped

Ran 5 tests for tests/gas/Spoke.Getters.gas.t.sol:SpokeGetters_Gas_Tests
[PASS] test_getUserAccountData() (gas: 23594)
[PASS] test_getUserAccountData_oneSupplies() (gas: 295149)
[PASS] test_getUserAccountData_twoSupplies() (gas: 537038)
[PASS] test_getUserAccountData_twoSupplies_oneBorrows() (gas: 1078922)
[PASS] test_getUserAccountData_twoSupplies_twoBorrows() (gas: 1661219)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 62.96ms (4.60ms CPU time)

Ran 19 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 15306)
[PASS] test_decimals() (gas: 8313)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 16713, ~: 17038)
Logs:
  Bound result 1

[PASS] test_getReservePrice() (gas: 46772)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 44558)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10876)
[PASS] test_getReservePrices() (gas: 76731)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 48897)
[PASS] test_getReserveSource() (gas: 47161)
[PASS] test_setReserveSource() (gas: 44226)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97405)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17138)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 16953)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 12996)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5029298)
[PASS] test_setSpoke() (gas: 5057662)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10914)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13485, ~: 13485)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15102)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 1.32s (1.29s CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.Getters.t.sol:SpokeGettersTest
[PASS] test_getLiquidationBonus_configured() (gas: 100838)
Logs:
  Bound result 2
  Bound result 1000000000000000000
  Bound result 4000
  Bound result 900000000000000000

[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 99665, ~: 100012)
Logs:
  Bound result 1
  Bound result 19919
  Bound result 300
  Bound result 715913659187738250

[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 77602, ~: 77823)
Logs:
  Bound result 4
  Bound result 100

[PASS] test_getLiquidationBonus_notConfigured() (gas: 78811)
Logs:
  Bound result 2
  Bound result 1000000000000000000

[PASS] test_premiumRayGetters() (gas: 1563435)
[PASS] test_protocol_getters() (gas: 303359)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 3.00s (2.97s CPU time)

Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 17780056)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 17768461)
[PASS] test_dustColl_allowed() (gas: 17627459)
[PASS] test_dustDebt_allowed() (gas: 17758850)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 73.05ms (22.37ms CPU time)

Ran 15 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Scenarios.t.sol:SpokeLiquidationCallScenariosTest
[PASS] test_liquidationCall_largeAmounts_noOverflow() (gas: 2833695)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 25973290)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 25842900)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubReportDeficit() (gas: 25955820)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 25919189)
[PASS] test_liquidationCall_scenario1() (gas: 3940945)
[PASS] test_liquidationCall_scenario2() (gas: 3949337)
[PASS] test_liquidationCall_scenario3() (gas: 3335802)
[PASS] test_liquidationCall_scenario4() (gas: 27566375)
[PASS] test_liquidationCall_scenario5() (gas: 3475793)
[PASS] test_liquidationCall_scenario6() (gas: 2258456)
[PASS] test_liquidationCall_scenario7() (gas: 3010562)
[PASS] test_liquidationCall_scenario8() (gas: 2240567)
[PASS] test_scenario_halted_asset() (gas: 26605106)
[PASS] test_scenario_halted_asset_with_deficit() (gas: 26448026)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 262.89ms (231.44ms CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 236435, ~: 226637)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 111883)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 121317)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 181775)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 3.53s (3.49s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 384009)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 78723)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 149775)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 153950)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 35.47ms (1.73ms CPU time)

Ran 50 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getLabelOfRole_revertsForAdminRole() (gas: 15937)
[PASS] test_getLabelOfRole_revertsForPublicRole() (gas: 15996)
[PASS] test_getLabelOfRole_revertsForUnlabeledRole() (gas: 15965)
[PASS] test_getLabelRole_revertsWithUnregisteredLabel() (gas: 11859)
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 2096827, ~: 2095721)
Logs:
  Bound result 9
  Bound result 10

[PASS] test_getRoleOfTargetSelector() (gas: 505164)
[PASS] test_getRoleOfTargetSelector_afterReassignment() (gas: 364143)
[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1743631, ~: 1742778)
Logs:
  Bound result 9
  Bound result 10

[PASS] test_grantRole() (gas: 435571)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 1031065, ~: 1034661)
Logs:
  Bound result 9

[PASS] test_isAdminRole() (gas: 245794)
[PASS] test_isAdminRole_excludesAdminRole() (gas: 89137)
[PASS] test_isAdminRole_multipleRoles() (gas: 441098)
[PASS] test_isLabelAssigned() (gas: 206189)
[PASS] test_isLabelAssigned_afterRelabel() (gas: 257137)
[PASS] test_isLabelAssigned_afterRemoval() (gas: 164483)
[PASS] test_isRole() (gas: 245831)
[PASS] test_isRoleLabeled() (gas: 204928)
[PASS] test_isRoleLabeled_afterRelabel() (gas: 256147)
[PASS] test_isRoleLabeled_afterRemoval() (gas: 163819)
[PASS] test_isRole_afterLabel() (gas: 201007)
[PASS] test_isRole_excludesAdminAndPublicRole() (gas: 218195)
[PASS] test_labelRole_onlyAuthorized_revertsWithUnauthorizedAccount() (gas: 13327)
[PASS] test_labelRole_relabel() (gas: 268258)
[PASS] test_labelRole_relabelTrackedRole_noDuplicate() (gas: 264781)
[PASS] test_labelRole_removeLabel() (gas: 175413)
[PASS] test_labelRole_removeLabelOnUnlabeledRole_revertsWithUnlabeledRole() (gas: 20083)
[PASS] test_labelRole_revertsWithAlreadyLabeledRole() (gas: 204993)
[PASS] test_labelRole_revertsWithAlreadyLabeledRole_evenIfLabelAlsoUsed() (gas: 347242)
[PASS] test_labelRole_revertsWithDuplicateLabel() (gas: 208101)
[PASS] test_labelRole_trackLabels() (gas: 368802)
[PASS] test_labelRole_tracksAlreadyTrackedRole_noDuplicate() (gas: 214156)
[PASS] test_labelRole_tracksUntrackedRole() (gas: 206424)
[PASS] test_renounceRole() (gas: 435727)
[PASS] test_renounceRole_shouldNotTrack() (gas: 24687)
[PASS] test_revokeRole() (gas: 437941)
[PASS] test_revokeRole_shouldNotTrack() (gas: 33311)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2141717, ~: 2197017)
Logs:
  Bound result 12

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

[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606296)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577396)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 609417)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 386651)
[PASS] test_setRoleGuardian_trackRoles() (gas: 266703)
[PASS] test_setTargetFunctionRole() (gas: 611297)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1198461)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 1029312)
[PASS] test_setTargetFunctionRole_skipAddPublicRole() (gas: 211675)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 39629)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 884760)
Suite result: ok. 50 passed; 0 failed; 0 skipped; finished in 24.12s (24.11s CPU time)

Ran 22 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
  Bound result 10000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_AtOptimalPoint() (gas: 24281)
Logs:
  Bound result 2000
  Bound result 778565440757296803935461404101

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

[PASS] test_calculateInterestRate_RightToOptimalPoint(uint256) (runs: 5000, μ: 25299, ~: 25349)
Logs:
  Bound result 8137
  Bound result 252173843969976304268974536488

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

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

[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11207)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3728)
[PASS] test_getBaseDrawnRate() (gas: 14746)
[PASS] test_getInterestRateData() (gas: 19268)
[PASS] test_getMaxDrawnRate() (gas: 15234)
[PASS] test_getOptimalUsageRatio() (gas: 14727)
[PASS] test_getRateGrowthAfterOptimal() (gas: 14791)
[PASS] test_getRateGrowthBeforeOptimal() (gas: 14791)
[PASS] test_maxDrawnRate() (gas: 8314)
[PASS] test_maxOptimalRatio() (gas: 8357)
[PASS] test_minOptimalRatio() (gas: 8299)
[PASS] test_setInterestRateData() (gas: 68942)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxDrawnRate() (gas: 41762)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42403)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35291)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23510)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 1.18s (1.16s CPU time)

Ran 6 tests for tests/unit/position-manager/libraries/ConfigPermissions.t.sol:ConfigPermissionsTests
[PASS] test_constants() (gas: 12031)
[PASS] test_getConfigPermissionValues(uint8) (runs: 5000, μ: 13703, ~: 13703)
[PASS] test_setCanSetUsingAsCollateral_fuzz(uint8,bool) (runs: 5000, μ: 10578, ~: 10566)
[PASS] test_setCanUpdateUserDynamicConfig_fuzz(uint8,bool) (runs: 5000, μ: 10602, ~: 10590)
[PASS] test_setCanUpdateUserRiskPremium_fuzz(uint8,bool) (runs: 5000, μ: 10634, ~: 10622)
[PASS] test_setGlobalPermissions_fuzz(bool) (runs: 5000, μ: 13145, ~: 13155)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 1.04s (1.04s CPU time)

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

[PASS] test_remove_all_with_interest() (gas: 381195)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 216992, ~: 217047)
Logs:
  Bound result 4
  Bound result 100

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

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

[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 432966, ~: 433415)
Logs:
  Bound result 120
  Bound result 18782
  Bound result 8680
  Bound result 24669

[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 162065)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 151210)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 26348)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 21440)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 23597)
[PASS] test_remove_revertsWith_SpokeHalted() (gas: 68358)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 68267)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 186894)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 367412)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 32.08s (32.03s CPU time)

Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 175239)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 175945)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 298053, ~: 286494)
Logs:
  Bound result 3
  Bound result 2767
  Bound result 443124196721905572
  Bound result 14843
  Bound result 8
  Bound result 18
  Bound result 13290
  Bound result 5661
  Bound result 1999999999999999997
  Bound result 443124196721905572
  Bound result 9304570613870847
  Bound result 9
  Bound result 999999999999999999999999999997
  Bound result 1000000000000000000000000000
  Bound result 28591
  Bound result 54527
  Bound result 6504484831365108
  Bound result 7
  Bound result 1109
  Bound result 18850239771387979476210927906
  Bound result 0
  Bound result 6504484831365108
  Bound result 26
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935

[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 250763, ~: 238446)
Logs:
  Bound result 3
  Bound result 2767
  Bound result 443124196721905572
  Bound result 14843
  Bound result 8
  Bound result 18
  Bound result 13290
  Bound result 5661
  Bound result 1999999999999999997
  Bound result 443124196721905572
  Bound result 9304570613870847
  Bound result 9
  Bound result 999999999999999999999999999997
  Bound result 1000000000000000000000000000
  Bound result 28591
  Bound result 54527
  Bound result 6504484831365108
  Bound result 7
  Bound result 1109
  Bound result 18850239771387979476210927906
  Bound result 0
  Bound result 18850239771387979476210927906
  Bound result 999999999999999999999999999997

[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 269394, ~: 257032)
Logs:
  Bound result 246905132871953471
  Bound result 2028
  Bound result 0
  Bound result 10008
  Bound result 10
  Bound result 362902507454157297736832118868343942642399513960811609542965143241
  Bound result 10008
  Bound result 4779
  Bound result 1999999500000000002
  Bound result 0
  Bound result 2508165906222592
  Bound result 16
  Bound result 3470
  Bound result 99000000000000000003084225061
  Bound result 2445753682684
  Bound result 343
  Bound result 432000
  Bound result 6
  Bound result 0
  Bound result 120000000
  Bound result 2
  Bound result 362902507454157297736832118868343942642399513960811609542965143241
  Bound result 10008
  Bound result 4779
  Bound result 1999999500000000002
  Bound result 0
  Bound result 2508165906222592
  Bound result 16
  Bound result 3470
  Bound result 99000000000000000003084225061
  Bound result 2445753682684
  Bound result 343
  Bound result 2508165906222592
  Bound result 2008766877
  Bound result 1000000000000000000000120000001
  Bound result 115792089237316195423570985008687907853269984665640564039457584007688912083982

[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 255681, ~: 243608)
Logs:
  Bound result 851194946390616337
  Bound result 1305
  Bound result 43202593957704687
  Bound result 14510
  Bound result 12
  Bound result 167764027474053380880774150060
  Bound result 14510
  Bound result 3821
  Bound result 1000361548920633841
  Bound result 43202593957704687
  Bound result 45
  Bound result 14
  Bound result 649548325040419609361170722585
  Bound result 30907237023119405092024662307
  Bound result 18944084525
  Bound result 644526977313108453624736
  Bound result 63
  Bound result 16
  Bound result 8049
  Bound result 588074874589309419542345990974
  Bound result 1
  Bound result 1231530513644828
  Bound result 649548325040419609361170722585

[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 280494, ~: 268423)
Logs:
  Bound result 3886412
  Bound result 2
  Bound result 147
  Bound result 12468
  Bound result 6
  Bound result 28951245481117846533722652
  Bound result 12468
  Bound result 3739
  Bound result 1000109044247905327
  Bound result 147
  Bound result 1766670143596910
  Bound result 14
  Bound result 885000589634409638603543244567
  Bound result 45625495039344622427514351693
  Bound result 1
  Bound result 45089934476
  Bound result 9035404749081580
  Bound result 15
  Bound result 274
  Bound result 471071379138868438154450132077
  Bound result 5
  Bound result 9035404749081580
  Bound result 3252684925
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935

[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 260769, ~: 248352)
Logs:
  Bound result 246905132871953471
  Bound result 2028
  Bound result 0
  Bound result 10008
  Bound result 10
  Bound result 362902507454157297736832118868343942642399513960811609542965143241
  Bound result 10008
  Bound result 4779
  Bound result 1999999500000000002
  Bound result 0
  Bound result 2508165906222592
  Bound result 16
  Bound result 3470
  Bound result 99000000000000000003084225061
  Bound result 2445753682684
  Bound result 343
  Bound result 432000
  Bound result 6
  Bound result 0
  Bound result 120000000
  Bound result 2
  Bound result 362902507454157297736832118868343942642399513960811609542965143241
  Bound result 10008
  Bound result 4779
  Bound result 1999999500000000002
  Bound result 0
  Bound result 2508165906222592
  Bound result 16
  Bound result 3470
  Bound result 99000000000000000003084225061
  Bound result 2445753682684
  Bound result 343
  Bound result 2508165906222592
  Bound result 2008766877

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

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 12488)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 12509)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 20353, ~: 20128)
Logs:
  Bound result 20022
  Bound result 2893
  Bound result 20044800
  Bound result 11234

[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 23297, ~: 23072)
Logs:
  Bound result 20022
  Bound result 2893
  Bound result 20044800
  Bound result 11234
  Bound result 1777

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 1.21s (1.18s CPU time)

Ran 11 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26036)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259738)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31769)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26861)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26980)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27033)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27018)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26947)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33724)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 27.31ms (1.44ms CPU time)

Ran 29 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4679)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9049, ~: 8812)
Logs:
  Bound result -57896044618658097711785492504343953926634992332820282013197946218740589849150

[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 3920, ~: 3916)
[PASS] test_calculateLinearInterest() (gas: 4368)
[PASS] test_calculateLinearInterest_add_edge() (gas: 4890)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16246)
Logs:
  Bound result 0
  Bound result 1
  Bound result 864000000
  Bound result 864000000

[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint40) (runs: 5000, μ: 7542, ~: 7381)
Logs:
  Bound result 9

[PASS] test_constants() (gas: 3133)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8587, ~: 8824)
Logs:
  Bound result 10765498

[PASS] test_fuzz_divUp(uint256,uint256) (runs: 5000, μ: 3540, ~: 3544)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3513, ~: 3577)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3591, ~: 3724)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3281, ~: 3281)
[PASS] test_mulDivDown_NoRemainder() (gas: 3223)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3107)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3183)
[PASS] test_mulDivDown_WithRemainder() (gas: 3268)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3721)
[PASS] test_mulDivUp_NoRemainder() (gas: 3272)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3084)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3184)
[PASS] test_mulDivUp_WithRemainder() (gas: 3293)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3792)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8599, ~: 8530)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_signedSub_revertsWith_SafeCastOverflowedUintToInt(uint256) (runs: 5000, μ: 7651, ~: 7702)
Logs:
  Bound result 57896044618658097711785492504343953926634992332820282019728792007080608788105

[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3447, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12538, ~: 9800)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3443, ~: 3362)
[PASS] test_zeroFloorSub(uint256,uint256) (runs: 5000, μ: 3290, ~: 3326)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 2.84s (2.82s CPU time)

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

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

[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 696018, ~: 696788)
Logs:
  Bound result 1409
  Bound result 284444672
  Bound result 1487
  Bound result 20044800

[PASS] test_reportDeficit_halted() (gas: 274589)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 27764)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 39989, ~: 39989)
[PASS] test_reportDeficit_with_premium() (gas: 695148)
Logs:
  Bound result 10000000000
  Bound result 31536000
  Bound result 5000000000
  Bound result 0

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

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

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

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

Ran 26 tests for tests/unit/position-manager/ConfigPositionManager/ConfigPositionManager.Permit.t.sol:ConfigPositionManagerPermitTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5688)
[PASS] test_eip712Domain() (gas: 10941)
[PASS] test_setCanSetUsingAsCollateralPermissionPermit_typeHash() (gas: 9951)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 158568, ~: 158959)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144916, ~: 142519)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28199)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32591)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61515)
[PASS] test_setCanUpdateUserDynamicConfigPermissionPermit_typeHash() (gas: 9863)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 158574, ~: 158965)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144938, ~: 142541)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28190)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32571)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61528)
[PASS] test_setCanUpdateUserRiskPremiumPermissionPermit_typeHash() (gas: 9949)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 158551, ~: 158942)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144873, ~: 142476)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28189)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32560)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61460)
[PASS] test_setGlobalPermissionPermit_typeHash() (gas: 9957)
[PASS] test_setGlobalPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 163012, ~: 163450)
[PASS] test_setGlobalPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144899, ~: 142502)
[PASS] test_setGlobalPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28176)
[PASS] test_setGlobalPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32532)
[PASS] test_setGlobalPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61468)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 48.84s (48.81s CPU time)

Ran 39 tests for tests/unit/position-manager/ConfigPositionManager/ConfigPositionManager.t.sol:ConfigPositionManagerTest
[PASS] test_multicall() (gas: 85120)
[PASS] test_renounceCanUpdateUserDynamicConfigPermission() (gas: 43783)
[PASS] test_renounceCanUpdateUserDynamicConfigPermission_revertsWith_SpokeNotRegistered() (gas: 17489)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission() (gas: 43695)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission_revertsWith_SpokeNotRegistered() (gas: 17380)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission() (gas: 43712)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission_revertsWith_SpokeNotRegistered() (gas: 17402)
[PASS] test_renounceGlobalPermission() (gas: 43007)
[PASS] test_renounceGlobalPermission_revertsWith_SpokeNotRegistered() (gas: 17423)
[PASS] test_setCanSetUsingAsCollateralPermission() (gas: 54687)
[PASS] test_setCanSetUsingAsCollateralPermission_remove() (gas: 43800)
[PASS] test_setCanSetUsingAsCollateralPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17885)
[PASS] test_setCanSetUsingAsCollateralPermission_revertsWith_SpokeNotRegistered() (gas: 17497)
[PASS] test_setCanUpdateUserDynamicConfigPermission() (gas: 54710)
[PASS] test_setCanUpdateUserDynamicConfigPermission_remove() (gas: 43856)
[PASS] test_setCanUpdateUserDynamicConfigPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17937)
[PASS] test_setCanUpdateUserDynamicConfigPermission_revertsWith_SpokeNotRegistered() (gas: 17561)
[PASS] test_setCanUpdateUserRiskPremiumPermission() (gas: 54711)
[PASS] test_setCanUpdateUserRiskPremiumPermission_remove() (gas: 43838)
[PASS] test_setCanUpdateUserRiskPremiumPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17916)
[PASS] test_setCanUpdateUserRiskPremiumPermission_revertsWith_SpokeNotRegistered() (gas: 17542)
[PASS] test_setGlobalPermission() (gas: 56290)
[PASS] test_setGlobalPermission_removeAllPermissions() (gas: 43148)
[PASS] test_setGlobalPermission_removePreviousPermissions() (gas: 49384)
[PASS] test_setGlobalPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17869)
[PASS] test_setGlobalPermission_revertsWith_SpokeNotRegistered() (gas: 17540)
[PASS] test_setGlobalPermission_setThenRemove() (gas: 50988)
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withGlobalPermission(uint256,bool) (runs: 5000, μ: 111718, ~: 116557)
Logs:
  Bound result 2

[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withPermission(uint256,bool) (runs: 5000, μ: 111778, ~: 116617)
Logs:
  Bound result 2

[PASS] test_setUsingAsCollateralOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 22151)
[PASS] test_setUsingAsCollateralOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17584)
[PASS] test_updateUserDynamicConfigOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 19908)
[PASS] test_updateUserDynamicConfigOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17422)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withGlobalPermission() (gas: 74616)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withPermission() (gas: 74718)
[PASS] test_updateUserRiskPremiumOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 19909)
[PASS] test_updateUserRiskPremiumOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17469)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withGlobalPermission() (gas: 828252)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withPermission() (gas: 828265)
Suite result: ok. 39 passed; 0 failed; 0 skipped; finished in 10.04s (10.01s CPU time)

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

[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 691990)
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, μ: 377793, ~: 377878)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 173721804

[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 682814, ~: 694051)
Logs:
  Bound result 3060
  Bound result 351
  Bound result 20044800
  Bound result 1

[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 252098, ~: 253236)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 173721804

[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 651730, ~: 651975)
Logs:
  Bound result 3060
  Bound result 351
  Bound result 20044800
  Bound result 1

[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 242927)
[PASS] test_restore_partial_drawn() (gas: 338033)
[PASS] test_restore_partial_same_block() (gas: 337067)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 241354)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 260740)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 64338)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 249890)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 249890)
[PASS] test_restore_revertsWith_SpokeHalted() (gas: 106945)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 193516)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 368300)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 251861)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 15768000

[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest_and_premium() (gas: 649937)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 31536000
  Bound result 1

[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 518650)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 258750)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 222067)
[PASS] test_restore_when_asset_caps_reset() (gas: 455596)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 19.82s (19.79s CPU time)

Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 681672921)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.13s (3.11s CPU time)

Ran 41 tests for tests/unit/position-manager/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 676305)
Logs:
  Bound result 5000000000000000000

[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 675655, ~: 677038)
Logs:
  Bound result 3124043968137

[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32444)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32519)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 283143)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271222)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25378)
[PASS] test_constructor() (gas: 12675)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 5958)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17595)
[PASS] test_multicall_revertsWith_UnsupportedAction() (gas: 11265)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 773094)
Logs:
  Bound result 5000000000000000000

[PASS] test_repayNative_excessAmount() (gas: 681647)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 768339, ~: 773727)
Logs:
  Bound result 3124043968137

[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 692513, ~: 687726)
Logs:
  Bound result 90000068691281935000
  Bound result 25920101

[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 32481)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30002)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39249)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 331639)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 308258)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38722)
[PASS] test_supplyAndCollateralNative() (gas: 340286)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 340608, ~: 340314)
Logs:
  Bound result 3124043968137

[PASS] test_supplyNative() (gas: 311980)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 312301, ~: 312007)
Logs:
  Bound result 3124043968137

[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 32457)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 29986)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39237)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_hubAdd() (gas: 374260)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336151)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38734)
[PASS] test_withdrawNative() (gas: 340005)
Logs:
  Bound result 100000000000000000000

[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 339536, ~: 340011)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 273432, ~: 273224)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 625024, ~: 624956)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32475)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32508)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 304946)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271196)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25345)
Suite result: ok. 41 passed; 0 failed; 0 skipped; finished in 69.59s (69.56s CPU time)

Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 12902, ~: 12902)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 95279, ~: 94374)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13570, ~: 13570)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.99s (3.99s CPU time)

Ran 10 tests for tests/unit/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 8604)
[PASS] test_fromBpsDown() (gas: 9654)
[PASS] test_percentDiv() (gas: 14993)
[PASS] test_percentDivUp_ge_value(uint256,uint256) (runs: 5000, μ: 15140, ~: 15261)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15347, ~: 15347)
Logs:
  Bound result 90101
  Bound result 68691281934999

[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12595, ~: 12760)
[PASS] test_percentMul() (gas: 14932)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15330, ~: 15330)
Logs:
  Bound result 90101
  Bound result 68691281934999

[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15143, ~: 15264)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11514, ~: 12063)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.51s (1.51s CPU time)

Ran 17 tests for tests/unit/position-manager/PositionManagerBase.t.sol:PositionManagerBaseTest
[PASS] test_constructor() (gas: 17209)
[PASS] test_getReserveUnderlying_fuzz(uint256) (runs: 5000, μ: 36891, ~: 36947)
Logs:
  Bound result 2

[PASS] test_getReserveUnderlying_revertsWith_ReserveNotListed() (gas: 25763)
[PASS] test_multicall() (gas: 73158)
[PASS] test_multicall_atomicity_on_revert() (gas: 48181)
[PASS] test_multicall_revertsWith_UnsupportedAction() (gas: 11243)
[PASS] test_permitReserveUnderlying() (gas: 128765)
[PASS] test_permitReserveUnderlying_forwards_correct_call() (gas: 78195)
[PASS] test_permitReserveUnderlying_ignores_permit_reverts() (gas: 67273)
[PASS] test_permitReserveUnderlying_revertsWith_ReserveNotListed() (gas: 58153)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 41640, ~: 41640)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13087)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 15935)
[PASS] test_registerSpoke_unregister() (gas: 36116)
[PASS] test_renouncePositionManagerRole() (gas: 65459)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74572)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 131425)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 1.03s (1.00s CPU time)

Ran 4 tests for tests/unit/Hub/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 240923, ~: 240988)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

[PASS] test_skimAdd_fuzz_donationBeforeAdd(uint256,uint256,uint256) (runs: 5000, μ: 240955, ~: 241020)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

[PASS] test_skimAdd_fuzz_wrongSpokeTransfer(uint256,uint256,uint256) (runs: 5000, μ: 230044, ~: 229984)
Logs:
  Bound result 3
  Bound result 18132171100462486213502917929
  Bound result 446067553769140138733721804

[PASS] test_skimRestore_fuzz_liquidityDonation(uint256,uint256,uint256) (runs: 5000, μ: 281325, ~: 282696)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 30.85s (30.82s CPU time)

Ran 10 tests for tests/unit/position-manager/libraries/PositionManagerEIP712Hash.t.sol:PositionManagerEIP712HashTest
[PASS] test_constants() (gas: 13441)
[PASS] test_hash_borrowPermit_fuzz((address,uint256,address,address,uint256,uint256,uint256)) (runs: 5000, μ: 4833, ~: 4833)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6689, ~: 6689)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6690, ~: 6690)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7126, ~: 7126)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6733, ~: 6733)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6349, ~: 6349)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6370, ~: 6370)
[PASS] test_hash_withdrawPermit_fuzz((address,uint256,address,address,uint256,uint256,uint256)) (runs: 5000, μ: 4832, ~: 4832)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6689, ~: 6689)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 5.69s (5.69s CPU time)

Ran 11 tests for tests/gas/PositionManagers.Operations.gas.t.sol:ConfigPositionManager_Gas_Tests
[PASS] test_renounceCanUpdateUserDynamicConfigPermission() (gas: 93933)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission() (gas: 93910)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission() (gas: 93845)
[PASS] test_renounceGlobalPermission() (gas: 93782)
[PASS] test_setCanSetUsingAsCollateralPermission() (gas: 69541)
[PASS] test_setCanUpdateUserDynamicConfigPermission() (gas: 69560)
[PASS] test_setCanUpdateUserRiskPremiumPermission() (gas: 69583)
[PASS] test_setGlobalPermission() (gas: 69474)
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withGlobalPermission() (gas: 147842)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withGlobalPermission() (gas: 122977)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withGlobalPermission() (gas: 733902)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 48.13ms (2.24ms CPU time)

Ran 2 tests for tests/gas/PositionManagers.Operations.gas.t.sol:GiverPositionManager_Gas_Tests
[PASS] test_repayOnBehalfOf() (gas: 950233)
[PASS] test_supplyOnBehalfOf() (gas: 292408)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 46.60ms (1.73ms CPU time)

Ran 1 test for tests/gas/PositionManagers.Operations.gas.t.sol:PositionManager_Gas_Tests
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 215923)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 45.22ms (728.16µs CPU time)

Ran 8 tests for tests/gas/PositionManagers.Operations.gas.t.sol:TakerPositionManager_Gas_Tests
[PASS] test_approveBorrow() (gas: 69175)
[PASS] test_approveBorrowWithSig() (gas: 155440)
[PASS] test_approveWithdraw() (gas: 69184)
[PASS] test_approveWithdrawWithSig() (gas: 155426)
[PASS] test_borrowOnBehalfOf() (gas: 794060)
[PASS] test_renounceBorrowAllowance() (gas: 93655)
[PASS] test_renounceWithdrawAllowance() (gas: 93740)
[PASS] test_withdrawOnBehalfOf() (gas: 607569)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 48.45ms (3.49ms CPU time)

Ran 10 tests for tests/unit/Hub/Hub.SpokeConfig.t.sol:HubSpokeConfigTest
[PASS] test_add_active_halted_scenarios() (gas: 319065)
[PASS] test_draw_active_halted_scenarios() (gas: 321915)
[PASS] test_eliminateDeficit_active_halted_scenarios() (gas: 856798)
[PASS] test_mintFeeShares_active_halted_scenarios() (gas: 847937)
[PASS] test_payFeeShares_active_halted_scenarios() (gas: 388349)
[PASS] test_refreshPremium_active_halted_scenarios() (gas: 284640)
[PASS] test_remove_active_halted_scenarios() (gas: 335503)
[PASS] test_reportDeficit_active_halted_scenarios() (gas: 465911)
[PASS] test_restore_active_halted_scenarios() (gas: 371143)
[PASS] test_transferShares_fuzz_active_halted_scenarios(bool,bool,bool,bool) (runs: 5000, μ: 222403, ~: 222418)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 4.31s (4.28s 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, μ: 949989, ~: 909560)
Logs:
  Bound result 812

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

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

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 947960)
[PASS] test_repayNative() (gas: 1020469)
[PASS] test_supplyAndCollateralNative() (gas: 315086)
[PASS] test_supplyNative() (gas: 294559)
[PASS] test_withdrawNative() (gas: 527770)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 49.78ms (4.22ms CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 766879)
[PASS] test_repayWithSig() (gas: 982944)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209293)
[PASS] test_setUsingAsCollateralWithSig() (gas: 294271)
[PASS] test_supplyWithSig() (gas: 447193)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145250)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143115)
[PASS] test_withdrawWithSig() (gas: 423498)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 53.15ms (8.04ms CPU time)

Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 475105)
Logs:
  Bound result 1000000000000000000000
  Bound result 1000000000000000000000

[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 656755, ~: 658048)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 480308, ~: 480530)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 17911)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 227059)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 110741)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 98340, ~: 98340)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 45522)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 19.80s (19.77s CPU time)

Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 199217)
Logs:
  Bound result 1000000000000000000000
  Bound result 1000000000000000000000

[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 202611, ~: 202800)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 155551, ~: 155255)
Logs:
  Bound result 3124043968137

[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 201738)
[PASS] test_transferShares_revertsWith_SpokeHalted() (gas: 190437)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 183701)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 27520)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 8.25s (8.22s CPU time)

Ran 10 tests for tests/unit/Hub/Hub.Upgradeable.t.sol:HubUpgradeableTest
[PASS] test_hub_revision_accessible() (gas: 46568)
[PASS] test_implementation_constructor_fuzz(uint64) (runs: 5000, μ: 6332072, ~: 6332072)
[PASS] test_proxy_constructor_fuzz(uint64) (runs: 5000, μ: 6350299, ~: 6350292)
Logs:
  Bound result 649

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

[PASS] test_proxy_constructor_revertsWith_InvalidAddress() (gas: 42270)
[PASS] test_proxy_constructor_revertsWith_InvalidInitialization_ZeroRevision() (gas: 6329423)
[PASS] test_proxy_reinitialization_fuzz(uint64) (runs: 5000, μ: 14073095, ~: 14073078)
Logs:
  Bound result 649

[PASS] test_proxy_reinitialization_revertsWith_CallerNotProxyAdmin() (gas: 12650688)
[PASS] test_proxy_reinitialization_revertsWith_InvalidAddress() (gas: 12651039)
[PASS] test_proxy_storage_persists_across_upgrade() (gas: 14073051)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 18.23s (18.21s CPU time)

Ran 12 tests for tests/unit/position-manager/GiverPositionManager.t.sol:GiverPositionManagerTest
[PASS] test_multicall() (gas: 348029)
[PASS] test_repayOnBehalfOf() (gas: 662303)
Logs:
  Bound result 50000000000000000000

[PASS] test_repayOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 659051, ~: 662598)
Logs:
  Bound result 3124043968137

[PASS] test_repayOnBehalfOf_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 593782, ~: 590121)
Logs:
  Bound result 900000068691281935000
  Bound result 25920101

[PASS] test_repayOnBehalfOf_maxRepay() (gas: 583937)
[PASS] test_repayOnBehalfOf_maxRepay_revertsWith_InvalidRepayAmount() (gas: 490693)
[PASS] test_repayOnBehalfOf_revertsWith_ReserveNotListed() (gas: 32366)
[PASS] test_repayOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 28744)
[PASS] test_supplyOnBehalfOf() (gas: 315270)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 315543, ~: 315320)
Logs:
  Bound result 3124043968137

[PASS] test_supplyOnBehalfOf_revertsWith_ReserveNotListed() (gas: 32405)
[PASS] test_supplyOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 28794)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 29.71s (29.68s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 214011)
[PASS] test_change_role_responsibility() (gas: 131718)
[PASS] test_hub_access_manager_exposure() (gas: 18377)
[PASS] test_hub_admin_access() (gas: 1364048)
[PASS] test_migrate_role_responsibility() (gas: 718082)
[PASS] test_setInterestRateData_access() (gas: 113514)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 28.60ms (3.92ms CPU time)

Ran 8 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 48540)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 404322, ~: 404183)
Logs:
  Bound result 9

[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 209361, ~: 209297)
Logs:
  Bound result 9

[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 278831, ~: 278726)
Logs:
  Bound result 68691281934999
  Bound result 1

[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 396169, ~: 395916)
Logs:
  Bound result 615514462186775432459
  Bound result 27544
  Bound result 6348

[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 277578, ~: 277477)
Logs:
  Bound result 9

[PASS] test_getAssetDrawnRate_MatchesStoredAfterAction() (gas: 194511)
[PASS] test_getAssetDrawnRate_fuzz_DiffersAfterTimePasses(uint40) (runs: 5000, μ: 218822, ~: 218681)
Logs:
  Bound result 9

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

Ran 13 tests for tests/unit/HubConfigurator.GranularAccessControl.t.sol:HubConfiguratorGranularAccessControlTest
[PASS] test_assetManager_canCall_deactivateAsset() (gas: 149152)
[PASS] test_assetManager_canCall_haltAsset() (gas: 149144)
[PASS] test_assetManager_canCall_resetAssetCaps() (gas: 149584)
[PASS] test_assetManager_canCall_updateLiquidityFee() (gas: 90179)
[PASS] test_assetManager_cannotCall_anySpokeManagerMethod() (gas: 354198)
[PASS] test_fuzz_unauthorized_cannotCall_assetManagerMethods(address) (runs: 5000, μ: 278071, ~: 278071)
[PASS] test_fuzz_unauthorized_cannotCall_spokeManagerMethods(address) (runs: 5000, μ: 352742, ~: 352742)
[PASS] test_spokeManager_canCall_addSpoke() (gas: 132141)
[PASS] test_spokeManager_canCall_resetSpokeCaps() (gas: 205387)
[PASS] test_spokeManager_canCall_updateSpokeActive() (gas: 71943)
[PASS] test_spokeManager_canCall_updateSpokeCaps() (gas: 72444)
[PASS] test_spokeManager_canCall_updateSpokeHalted() (gas: 71912)
[PASS] test_spokeManager_cannotCall_anyAssetManagerMethod() (gas: 279026)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 5.75s (5.72s CPU time)

Ran 60 tests for tests/unit/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint256,uint16,uint32,uint32,uint32) (runs: 5000, μ: 457949, ~: 458502)
Logs:
  Bound result 18
  Bound result 402
  Bound result 7903
  Bound result 1001
  Bound result 792
  Bound result 794

[PASS] test_addAsset_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 42353, ~: 42722)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 70218, ~: 70190)
Logs:
  Bound result 252
  Bound result 3890

[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 63249)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 63165)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 356267)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 81471)
[PASS] test_addSpoke() (gas: 140909)
[PASS] test_addSpokeToAssets() (gas: 239134)
[PASS] test_addSpokeToAssets_revertsWith_AccessManagedUnauthorized() (gas: 28173)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 35993)
[PASS] test_addSpoke_revertsWith_AccessManagedUnauthorized() (gas: 27839)
[PASS] test_deactivateAsset() (gas: 190711)
[PASS] test_deactivateAsset_revertsWith_AccessManagedUnauthorized() (gas: 29024)
[PASS] test_deactivateSpoke() (gas: 192043)
[PASS] test_deactivateSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29018)
[PASS] test_haltAsset() (gas: 190723)
[PASS] test_haltAsset_revertsWith_AccessManagedUnauthorized() (gas: 28981)
[PASS] test_haltSpoke() (gas: 192064)
[PASS] test_haltSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29026)
[PASS] test_resetAssetCaps() (gas: 264929)
[PASS] test_resetAssetCaps_revertsWith_AccessManagedUnauthorized() (gas: 28978)
[PASS] test_resetSpokeCaps() (gas: 285077)
[PASS] test_resetSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 29068)
[PASS] test_updateFeeConfig_Scenario() (gas: 366821)
Logs:
  Bound result 0
  Bound result 1800
  Bound result 0
  Bound result 400
  Bound result 0
  Bound result 0

[PASS] test_updateFeeConfig_fuzz(uint256,uint16,address) (runs: 5000, μ: 202958, ~: 203240)
Logs:
  Bound result 3
  Bound result 9

[PASS] test_updateFeeConfig_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28519, ~: 28519)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 65284)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 68931)
[PASS] test_updateFeeReceiver_Scenario() (gas: 237308)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 426552)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 464723)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 196156, ~: 196156)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28225, ~: 28225)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 69939)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 95245)
[PASS] test_updateInterestRateData() (gas: 86844)
[PASS] test_updateInterestRateData_revertsWith_AccessManagedUnauthorized() (gas: 30184)
[PASS] test_updateInterestRateStrategy() (gas: 109219)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 39599, ~: 39599)
[PASS] test_updateInterestRateStrategy_revertsWith_DrawnRateStrategyReverts() (gas: 91881)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 81477)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 81700)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 107283, ~: 108891)
Logs:
  Bound result 3
  Bound result 0

[PASS] test_updateLiquidityFee_revertsWith_AccessManagedUnauthorized() (gas: 27648)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 70079)
[PASS] test_updateReinvestmentController() (gas: 117304)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28226, ~: 28226)
[PASS] test_updateSpokeActive() (gas: 107173)
[PASS] test_updateSpokeActive_revertsWith_AccessManagedUnauthorized() (gas: 31303)
[PASS] test_updateSpokeAddCap() (gas: 81714)
[PASS] test_updateSpokeAddCap_revertsWith_AccessManagedUnauthorized() (gas: 31294)
[PASS] test_updateSpokeCaps() (gas: 81849)
[PASS] test_updateSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 31282)
[PASS] test_updateSpokeDrawCap() (gas: 81654)
[PASS] test_updateSpokeDrawCap_revertsWith_AccessManagedUnauthorized() (gas: 31249)
[PASS] test_updateSpokeHalted() (gas: 109906)
[PASS] test_updateSpokeHalted_revertsWith_AccessManagedUnauthorized() (gas: 31281)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 81721)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_AccessManagedUnauthorized() (gas: 31283)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 12.64s (12.61s CPU time)

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

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

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

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

[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 227958, ~: 228157)
Logs:
  Bound result 999999999900000000000000012654
  Bound result 1598413483
  Bound result 2

[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 350689, ~: 350708)
Logs:
  Bound result 0
  Bound result 931100000000000000

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

[PASS] test_add_multi_add_minimal_shares() (gas: 332332)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 363523)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 69426)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 18550)
[PASS] test_add_revertsWith_InvalidShares() (gas: 227980)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 228632)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 106042)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 106078)
[PASS] test_add_single_asset() (gas: 339265)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_add_with_increased_index() (gas: 312516)
[PASS] test_add_with_increased_index_with_premium() (gas: 692393)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 46.98s (46.95s CPU time)

Ran 32 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_borrowCount() (gas: 108134)
[PASS] test_borrowCount(uint256) (runs: 5000, μ: 1927337, ~: 1759887)
Logs:
  Bound result 812

[PASS] test_borrowCount_ignoresInvalidBits() (gas: 122795)
[PASS] test_bucketId() (gas: 8922)
[PASS] test_collateralCount() (gas: 108082)
[PASS] test_collateralCount(uint256) (runs: 5000, μ: 1943016, ~: 1776233)
Logs:
  Bound result 812

[PASS] test_collateralCount_ignoresInvalidBits() (gas: 122986)
[PASS] test_constants() (gas: 44556)
[PASS] test_fls() (gas: 509035)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14042, ~: 14336)
Logs:
  Bound result 151
  Bound result 100

[PASS] test_fuzz_setBorrowing(uint256,bool) (runs: 5000, μ: 22255, ~: 32137)
[PASS] test_fuzz_setUseAsCollateral(uint256,bool) (runs: 5000, μ: 22307, ~: 32189)
[PASS] test_getBucketWord(uint256) (runs: 5000, μ: 14179, ~: 14179)
[PASS] test_isUsingAsCollateralOrBorrowing_slot0() (gas: 108352)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 43997)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 153030, ~: 153030)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 144791, ~: 144548)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 152949, ~: 152949)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 144726, ~: 144483)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 134621, ~: 134616)
[PASS] test_next(uint256) (runs: 5000, μ: 20049, ~: 18925)
Logs:
  Bound result 649

[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 17988, ~: 16874)
Logs:
  Bound result 649

[PASS] test_nextBorrowing_continuous() (gas: 61801685)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18186, ~: 16983)
Logs:
  Bound result 649

[PASS] test_nextCollateral_continuous() (gas: 62157760)
[PASS] test_next_continuous() (gas: 89136467)
[PASS] test_popCount(bytes32) (runs: 5000, μ: 37881, ~: 38011)
[PASS] test_setBorrowing_slot0() (gas: 43906)
[PASS] test_setBorrowing_slot1() (gas: 43942)
[PASS] test_setUseAsCollateral_slot0() (gas: 44158)
[PASS] test_setUseAsCollateral_slot1() (gas: 44140)
[PASS] test_setters_use_correct_slot(uint256) (runs: 5000, μ: 36549, ~: 41309)
Suite result: ok. 32 passed; 0 failed; 0 skipped; finished in 161.41s (161.40s CPU time)

Ran 11 tests for tests/unit/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 352075)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 231252, ~: 232296)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 239860, ~: 241124)
Logs:
  Bound result 100

[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 377309, ~: 378109)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 264434, ~: 249976)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 180026, ~: 153444)
[PASS] test_fuzz_pack_unpack_roundtrip(uint256,uint256) (runs: 5000, μ: 9178, ~: 9363)
Logs:
  Bound result 1869986064
  Bound result 100

[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 435201, ~: 429336)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 199550, ~: 194777)
Logs:
  Bound result 37

[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 513094, ~: 510091)
[PASS] test_fuzz_uncheckedAt(uint256[]) (runs: 5000, μ: 150000, ~: 150694)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 7...*[Comment body truncated]*

@github-actions

Copy link
Copy Markdown

♻️ Forge Gas Snapshots

🔕 Unchanged
Path Value
snapshots/ConfigPositionManager.Operations.json
renounceCanUpdateUserDynamicConfigPermission 28,049
renounceCanUpdateUserRiskPremiumPermission 27,983
renounceCanUpdateUsingAsCollateralPermission 28,006
renounceGlobalPermission 27,964
setCanSetUsingAsCollateralPermission 50,149
setCanUpdateUserDynamicConfigPermission 50,171
setCanUpdateUserRiskPremiumPermission 50,171
setGlobalPermission 50,123
setUsingAsCollateralOnBehalfOf 74,986
updateUserDynamicConfigOnBehalfOf 52,342
updateUserRiskPremiumOnBehalfOf 140,135
snapshots/GiverPositionManager.Operations.json
repayOnBehalfOf 176,497
supplyOnBehalfOf 143,072
snapshots/Hub.Operations.json
add 91,610
add: with transfer 112,907
draw 109,072
eliminateDeficit: full 77,541
eliminateDeficit: partial 87,146
mintFeeShares 87,668
payFee 75,720
refreshPremium 75,289
remove: full 80,564
remove: partial 85,702
reportDeficit 116,908
restore: full 81,488
restore: full - with transfer 188,892
restore: partial 90,198
restore: partial - with transfer 148,178
transferShares 74,540
snapshots/NativeTokenGateway.Operations.json
borrowNative 238,707
repayNative 172,321
supplyAsCollateralNative 165,113
supplyNative 139,728
withdrawNative: full 129,898
withdrawNative: partial 142,172
snapshots/PositionManagerBase.Operations.json
setSelfAsUserPositionManagerWithSig 75,029
snapshots/SignatureGateway.Operations.json
borrowWithSig 222,132
repayWithSig 192,513
setSelfAsUserPositionManagerWithSig 75,126
setUsingAsCollateralWithSig 85,380
supplyWithSig 155,914
updateUserDynamicConfigWithSig 63,113
updateUserRiskPremiumWithSig 61,995
withdrawWithSig 135,124
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 13,014
getUserAccountData: supplies: 1, borrows: 0 56,072
getUserAccountData: supplies: 2, borrows: 0 89,894
getUserAccountData: supplies: 2, borrows: 1 112,389
getUserAccountData: supplies: 2, borrows: 2 133,792
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first 199,509
borrow: second action, same reserve 179,375
liquidationCall (receiveShares): full 314,227
liquidationCall (receiveShares): partial 313,645
liquidationCall (reportDeficit): full 380,307
liquidationCall: full 332,763
liquidationCall: partial 332,181
permitReserve + repay (multicall) 169,938
permitReserve + supply (multicall) 151,663
permitReserve + supply + enable collateral (multicall) 166,114
repay: full 129,276
repay: partial 134,234
setUserPositionManagersWithSig: disable 46,772
setUserPositionManagersWithSig: enable 68,684
supply + enable collateral (multicall) 146,316
supply: 0 borrows, collateral disabled 127,753
supply: 0 borrows, collateral enabled 110,724
supply: second action, same reserve 110,653
updateUserDynamicConfig: 1 collateral 76,251
updateUserDynamicConfig: 2 collaterals 92,825
updateUserRiskPremium: 1 borrow 104,446
updateUserRiskPremium: 2 borrows 114,563
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, disable 114,490
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, disable 138,182
usingAsCollateral: 2 borrows, enable 42,516
withdraw: 0 borrows, full 135,058
withdraw: 0 borrows, partial 140,394
withdraw: 1 borrow, partial 169,591
withdraw: 2 borrows, partial 186,292
withdraw: non collateral 111,299
snapshots/Spoke.Operations.json
borrow: first 269,297
borrow: second action, same reserve 212,163
liquidationCall (receiveShares): full 347,124
liquidationCall (receiveShares): partial 346,542
liquidationCall (reportDeficit): full 372,507
liquidationCall: full 365,660
liquidationCall: partial 365,078
permitReserve + repay (multicall) 166,334
permitReserve + supply (multicall) 151,663
permitReserve + supply + enable collateral (multicall) 166,114
repay: full 123,355
repay: partial 142,713
setUserPositionManagersWithSig: disable 46,772
setUserPositionManagersWithSig: enable 68,684
supply + enable collateral (multicall) 146,316
supply: 0 borrows, collateral disabled 127,753
supply: 0 borrows, collateral enabled 110,724
supply: second action, same reserve 110,653
updateUserDynamicConfig: 1 collateral 76,251
updateUserDynamicConfig: 2 collaterals 92,825
updateUserRiskPremium: 1 borrow 158,658
updateUserRiskPremium: 2 borrows 210,210
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, disable 168,699
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, disable 241,825
usingAsCollateral: 2 borrows, enable 42,516
withdraw: 0 borrows, full 135,058
withdraw: 0 borrows, partial 140,394
withdraw: 1 borrow, partial 221,298
withdraw: 2 borrows, partial 270,470
withdraw: non collateral 111,299
snapshots/TakerPositionManager.Operations.json
approveBorrow 49,813
approveBorrowWithSig 65,695
approveWithdraw 49,822
approveWithdrawWithSig 65,649
borrowOnBehalfOf 332,518
renounceBorrowAllowance 27,935
renounceWithdrawAllowance 27,989
withdrawOnBehalfOf: full 127,209
withdrawOnBehalfOf: partial 138,811
snapshots/TokenizationSpoke.Operations.json
deposit 118,614
depositWithSig 129,518
mint 118,251
mintWithSig 129,118
permit 62,766
redeem: on behalf, full 95,212
redeem: on behalf, partial 119,015
redeem: self, full 94,282
redeem: self, partial 113,482
redeemWithSig 128,864
withdraw: on behalf, full 95,646
withdraw: on behalf, partial 119,557
withdraw: self, full 94,824
withdraw: self, partial 114,024
withdrawWithSig 129,417

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