fix: remove hub convert functions in favor of preview#925
Merged
miguelmtzinf merged 3 commits intomainfrom Oct 17, 2025
Merged
Conversation
DhairyaSethi
approved these changes
Oct 17, 2025
Kogaroshi
approved these changes
Oct 17, 2025
Forge Build Sizes
🔕 Unchanged
|
🌈 Test ResultsNo files changed, compilation skipped
Ran 17 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 440456)
[PASS] test_decimals() (gas: 8387)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 38089)
[PASS] test_description() (gas: 12094)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 444411, ~: 444703)
[PASS] test_getReservePrice() (gas: 47409)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 46669)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10976)
[PASS] test_getReservePrices() (gas: 79551)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 49352)
[PASS] test_getReserveSource() (gas: 47584)
[PASS] test_setReserveSource() (gas: 44466)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97683)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 15327)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 15149)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 11049)
[PASS] test_spoke() (gas: 10614)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 575.94ms (561.64ms CPU time)
Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24686)
Logs:
Bound result 2000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24958)
Logs:
Bound result 10000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24540, ~: 24690)
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25653, ~: 25690)
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18944)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19169, ~: 18950)
[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11361)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 36318)
[PASS] test_getBaseVariableBorrowRate() (gas: 14864)
[PASS] test_getInterestRateData() (gas: 19653)
[PASS] test_getMaxVariableBorrowRate() (gas: 15312)
[PASS] test_getOptimalUsageRatio() (gas: 14735)
[PASS] test_getVariableRateSlope1() (gas: 14810)
[PASS] test_getVariableRateSlope2() (gas: 14877)
[PASS] test_maxBorrowRate() (gas: 8431)
[PASS] test_maxOptimalRatio() (gas: 8431)
[PASS] test_minOptimalRatio() (gas: 8440)
[PASS] test_setInterestRateData() (gas: 69812)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 42072)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 43120)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35395)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23786)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 37980)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 1.35s (1.33s CPU time)
Ran 8 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 5450)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4659, ~: 4659)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4615, ~: 4615)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 4902, ~: 4902)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4703, ~: 4703)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 4441, ~: 4441)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 4462, ~: 4462)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4681, ~: 4681)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 1.43s (1.43s CPU time)
Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 430174)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 42033, ~: 42033)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13345)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 14077)
[PASS] test_registerSpoke_unregister() (gas: 36599)
[PASS] test_renouncePositionManagerRole() (gas: 65377)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 76673)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 76834)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 466.70ms (450.08ms CPU time)
Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 916671)
[PASS] test_repayNative() (gas: 1137368)
[PASS] test_supplyAndCollateralNative() (gas: 295026)
[PASS] test_supplyNative() (gas: 277225)
[PASS] test_withdrawNative() (gas: 510592)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 34.80ms (5.06ms CPU time)
Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 754249)
[PASS] test_repayWithSig() (gas: 1094917)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 201454)
[PASS] test_setUsingAsCollateralWithSig() (gas: 280798)
[PASS] test_supplyWithSig() (gas: 448686)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 138543)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 135934)
[PASS] test_withdrawWithSig() (gas: 404935)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 33.46ms (10.94ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2314399)
[PASS] test_change_role_responsibility() (gas: 101935)
[PASS] test_hub_access_manager_exposure() (gas: 12706)
[PASS] test_hub_admin_access() (gas: 1134217)
[PASS] test_migrate_role_responsibility() (gas: 396986)
[PASS] test_setInterestRateData_access() (gas: 101112)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 40.05ms (7.73ms CPU time)
Ran 21 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 646999)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint56) (runs: 5000, μ: 156767, ~: 156616)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 310151, ~: 310286)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint56) (runs: 5000, μ: 78696, ~: 78545)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint56,uint256,uint256) (runs: 5000, μ: 283293, ~: 285676)
[PASS] test_add_fuzz_revertsWith_ERC20InsufficientAllowance(uint256) (runs: 5000, μ: 78962, ~: 78688)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 217001, ~: 217181)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 337079, ~: 336998)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 819477, ~: 821640)
[PASS] test_add_multi_add_minimal_shares() (gas: 344584)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 206517)
[PASS] test_add_revertsWith_ERC20InsufficientAllowance() (gas: 75225)
[PASS] test_add_revertsWith_InvalidAddress() (gas: 15788)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 15855)
[PASS] test_add_revertsWith_InvalidShares() (gas: 220914)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 36651)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 58276)
[PASS] test_add_revertsWith_SpokePaused() (gas: 58421)
[PASS] test_add_single_asset() (gas: 325002)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 324271)
[PASS] test_add_with_increased_index_with_premium() (gas: 670202)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 47.65s (47.62s CPU time)
Ran 31 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 841820, ~: 841853)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 46620, ~: 46926)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 46696, ~: 47002)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 37733, ~: 37733)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 47163, ~: 46982)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 47424, ~: 47659)
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 39863, ~: 36230)
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 81070)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 78043)
[PASS] test_addSpoke_fuzz(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 123788, ~: 123857)
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 34624, ~: 34612)
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 33211, ~: 33268)
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 38704)
[PASS] test_hub_deploy_revertsWith_InvalidAddress() (gas: 47090)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 60147)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 242450, ~: 242389)
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 756314, ~: 756237)
[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 654300, ~: 654224)
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 724425, ~: 724481)
[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 1127836, ~: 1127943)
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 764114, ~: 764170)
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 606034, ~: 606088)
[PASS] test_updateAssetConfig_fuzz_UseExistingSpokeAsFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 59797, ~: 59797)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 57855, ~: 57909)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 41093, ~: 40944)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 495516)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 191558, ~: 191410)
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 65206, ~: 65058)
[PASS] test_updateSpokeConfig_fuzz(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 56534, ~: 56604)
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(bool,bool,uint56,uint56)) (runs: 5000, μ: 40448, ~: 40514)
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29342)
Suite result: ok. 31 passed; 0 failed; 0 skipped; finished in 99.24s (99.22s CPU time)
Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 362651)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 681321, ~: 681397)
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 285636, ~: 285500)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint56) (runs: 5000, μ: 79843, ~: 79693)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint56,uint256,uint256) (runs: 5000, μ: 298727, ~: 299011)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 33920, ~: 33722)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 183020, ~: 182748)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 129564, ~: 129370)
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 15760, ~: 15760)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 253970)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 27978)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 179301)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 126680)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 15880)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 58144)
[PASS] test_draw_revertsWith_SpokePaused() (gas: 58289)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 25.86s (25.84s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 501502, ~: 501502)
[PASS] test_eliminateDeficit_allowSpokePaused() (gas: 337005)
[PASS] test_eliminateDeficit_fuzz_revertsWith_InvalidAmount_Excess(uint256) (runs: 5000, μ: 250875, ~: 250875)
[PASS] test_eliminateDeficit_fuzz_revertsWith_callerSpokeNotActive(address) (runs: 5000, μ: 28893, ~: 28893)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 20023)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 252019)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 12.99s (12.97s CPU time)
Ran 7 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 128938)
[PASS] test_deficit() (gas: 1046669)
[PASS] test_draw() (gas: 372221)
[PASS] test_payFee_transferShares() (gas: 923086)
[PASS] test_refreshPremium() (gas: 124914)
[PASS] test_remove() (gas: 278121)
[PASS] test_restore() (gas: 724595)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 26.89ms (4.45ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 665373, ~: 665344)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 665633, ~: 665787)
[PASS] test_payFee_revertsWith_AddedSharesExceeded() (gas: 132741)
[PASS] test_payFee_revertsWith_AddedSharesExceeded_with_interest() (gas: 631591)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20146)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 58170)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 23.62s (23.60s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 137983)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint32) (runs: 5000, μ: 660874, ~: 660789)
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint32) (runs: 5000, μ: 257912, ~: 258214)
[PASS] test_accrueInterest_TenPercentRp(uint256,uint32) (runs: 5000, μ: 595761, ~: 596774)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint32) (runs: 5000, μ: 556073, ~: 556663)
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint32) (runs: 5000, μ: 3934352, ~: 3949005)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint32) (runs: 5000, μ: 3995803, ~: 4007957)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 218.68s (218.65s CPU time)
Ran 10 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 679013)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 659707)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 680472, ~: 680016)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 787824)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 12513)
[PASS] test_reclaim_revertsWith_InvalidAmount_exceedsSwept() (gas: 92378)
[PASS] test_reclaim_revertsWith_InvalidAmount_exceedsSwept_afterSweep() (gas: 466474)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 90645)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 91623, ~: 91623)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 38048)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 14.75s (14.73s 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, μ: 558551, ~: 558716)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 801347, ~: 801341)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 588157164)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 249715347)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 559035)
Logs:
Bound result 500000000000000000000
Bound result 5000
Bound result 34560000
Bound result 2
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 21.32s (21.30s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 169660)
[PASS] test_refreshPremium_fuzz_positiveDeltas(int256,int256,int256) (runs: 5000, μ: 58043, ~: 58294)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 561146, ~: 561312)
[PASS] test_refreshPremium_negativeDeltas(int256,int256) (runs: 5000, μ: 472707, ~: 473194)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256,uint256) (runs: 5000, μ: 543356, ~: 552197)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 107819)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 55993)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 737136)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 20.48s (20.46s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 849182)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 97843)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint32) (runs: 5000, μ: 235889, ~: 236043)
[PASS] test_accrueLiquidityFee_exact() (gas: 838074)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint32) (runs: 5000, μ: 833895, ~: 862536)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 553761)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 883719)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 19.69s (19.67s CPU time)
Ran 13 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 199671)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 397965)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 198212, ~: 198017)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 435734, ~: 438282)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 279837, ~: 279988)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 449504, ~: 452641)
[PASS] test_remove_revertsWith_AddedAmountExceeded() (gas: 142284)
[PASS] test_remove_revertsWith_AddedAmountExceeded_zero_added() (gas: 29990)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 171606)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 15746)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 17825)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 58225)
[PASS] test_remove_revertsWith_SpokePaused() (gas: 58359)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 31.74s (31.72s CPU time)
Ran 5 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDeficitReported(uint256,uint256,uint256,uint256) (runs: 5000, μ: 160354, ~: 160369)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 332834, ~: 334791)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 18215)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 26457, ~: 26457)
[PASS] test_reportDeficit_with_premium() (gas: 333258)
Logs:
Bound result 10000000000
Bound result 31536000
Bound result 5000000000
Bound result 0
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 9.82s (9.80s CPU time)
Ran 20 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 356081)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 661668)
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, μ: 354735, ~: 357298)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 645284, ~: 663094)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 248940, ~: 252788)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 630421, ~: 634100)
[PASS] test_restore_partial_drawn() (gas: 331358)
[PASS] test_restore_partial_same_block() (gas: 310281)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 251395)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 44805)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 193875)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 193895)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 155194)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 85358)
[PASS] test_restore_revertsWith_SurplusAmountRestored() (gas: 338903)
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest() (gas: 251715)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 15768000
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest_and_premium() (gas: 632760)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 193884)
[PASS] test_restore_two_wei_shares_delta_increase() (gas: 246086)
[PASS] test_restore_when_asset_frozen() (gas: 412725)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 19.25s (19.23s CPU time)
Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 702914742)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.72s (3.70s 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, μ: 1062098, ~: 1062249)
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1446284, ~: 1446422)
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1111946, ~: 1111717)
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1170472)
[PASS] test_borrow_rounding_effect_shares() (gas: 1110932)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 65.40s (65.38s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 484774)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 648365, ~: 649506)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 485285, ~: 485298)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12362)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 234923)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 101549)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 92083, ~: 92083)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 37943)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.94s (17.91s CPU time)
Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 170871)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 174308, ~: 174456)
[PASS] test_transferShares_fuzz_revertsWith_AddedSharesExceeded(uint256) (runs: 5000, μ: 140848, ~: 140576)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 184327)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 165000)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 167371)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22508)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 6.67s (6.66s CPU time)
Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 41342)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint32) (runs: 5000, μ: 330474, ~: 330400)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint32) (runs: 5000, μ: 187494, ~: 187420)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint32) (runs: 5000, μ: 262895, ~: 265223)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint32) (runs: 5000, μ: 363400, ~: 366919)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint32) (runs: 5000, μ: 264253, ~: 264179)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 21.28s (21.27s CPU time)
Ran 57 tests for tests/unit/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint16,uint32,uint32,uint32) (runs: 5000, μ: 852355, ~: 852635)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,address) (runs: 5000, μ: 56310, ~: 56745)
[PASS] test_addAsset_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 34797, ~: 34798)
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 50423)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 50321)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 44328)
[PASS] test_addSpoke() (gas: 124732)
[PASS] test_addSpokeToAssets() (gas: 219775)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 24613)
[PASS] test_addSpokeToAssets_revertsWith_OwnableUnauthorizedAccount() (gas: 17213)
[PASS] test_addSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 16829)
[PASS] test_deactivateAsset() (gas: 155427)
[PASS] test_deactivateAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 18008)
[PASS] test_deactivateSpoke() (gas: 152398)
[PASS] test_deactivateSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 17950)
[PASS] test_freezeAsset() (gas: 158098)
[PASS] test_freezeAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17941)
[PASS] test_freezeSpoke() (gas: 155123)
[PASS] test_freezeSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18060)
[PASS] test_pauseAsset() (gas: 155424)
[PASS] test_pauseAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17898)
[PASS] test_pauseSpoke() (gas: 152527)
[PASS] test_pauseSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18017)
[PASS] test_updateFeeConfig_Scenario() (gas: 322949)
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, μ: 174509, ~: 174393)
[PASS] test_updateFeeConfig_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17682, ~: 17683)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 48161)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 50128)
[PASS] test_updateFeeReceiver_Scenario() (gas: 204824)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 972914)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 1000568)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 170923, ~: 170923)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17268, ~: 17269)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 52698)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 74331)
[PASS] test_updateInterestRateData() (gas: 71553)
[PASS] test_updateInterestRateData_revertsWith_OwnableUnauthorizedAccount() (gas: 19152)
[PASS] test_updateInterestRateStrategy() (gas: 91102)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 28658, ~: 28659)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 74642)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 64389)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 64839)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 84378, ~: 84236)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 52623)
[PASS] test_updateLiquidityFee_revertsWith_OwnableUnauthorizedAccount() (gas: 16633)
[PASS] test_updateReinvestmentController() (gas: 99128)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17270, ~: 17271)
[PASS] test_updateSpokeActive() (gas: 81157)
[PASS] test_updateSpokeActive_revertsWith_OwnableUnauthorizedAccount() (gas: 20241)
[PASS] test_updateSpokeCaps() (gas: 62767)
[PASS] test_updateSpokeCaps_revertsWith_OwnableUnauthorizedAccount() (gas: 20172)
[PASS] test_updateSpokeDrawCap() (gas: 62574)
[PASS] test_updateSpokeDrawCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20245)
[PASS] test_updateSpokePaused() (gas: 84139)
[PASS] test_updateSpokePaused_revertsWith_OwnableUnauthorizedAccount() (gas: 20352)
[PASS] test_updateSpokeSupplyCap() (gas: 62561)
[PASS] test_updateSpokeSupplyCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20193)
Suite result: ok. 57 passed; 0 failed; 0 skipped; finished in 9.54s (9.52s CPU time)
Ran 2 tests for tests/invariant/HubInvariant.t.sol:HubInvariant
[SKIP] invariant_exchangeRateMonotonicallyIncreasing() (runs: 1, calls: 1, reverts: 1)
[SKIP] invariant_reserveTotalAssets() (runs: 1, calls: 1, reverts: 1)
Suite result: ok. 0 passed; 0 failed; 2 skipped; finished in 4.67ms (584.88µs CPU time)
Ran 9 tests for tests/unit/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 325391)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 200012, ~: 201361)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 234208, ~: 230861)
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 413030, ~: 411058)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 263153, ~: 252829)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 204958, ~: 185400)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 463709, ~: 454152)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 201044, ~: 195846)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 547951, ~: 537198)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 73.30s (73.30s CPU time)
Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToLiquidate.t.sol:LiquidationLogicDebtToLiquidateTest
[PASS] test_calculateDebtToLiquidate_fuzz((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 30510, ~: 30443)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 32245, ~: 32350)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 34400, ~: 34370)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.35s (3.33s CPU time)
Ran 7 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToTargetHealthFactor.t.sol:LiquidationLogicDebtToTargetHealthFactorTest
[PASS] test_calculateDebtToTargetHealthFactor_HealthFactorEqualsTargetHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22967, ~: 23027)
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 25301)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 15275)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 25234)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20025, ~: 20085)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22724, ~: 22784)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22807, ~: 22867)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.77s (2.75s CPU time)
Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 8970)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8938)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8959)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8926)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8952)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 9019)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 8984)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 8972)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 8972)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8961)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8895)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8928)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8905)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8962)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8913)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 8991)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 23.56ms (879.02µs CPU time)
Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 272653, ~: 273131)
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 99323, ~: 99126)
[PASS] test_liquidateCollateral_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 103932, ~: 103850)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 4.14s (4.12s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 186442, ~: 186442)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 151203)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 155103)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 202226)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.39s (2.37s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 359686)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 75568)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 109326)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 118740)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 23.29ms (1.38ms 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, μ: 895479, ~: 895544)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 855829, ~: 856742)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 902044, ~: 899280)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1114971, ~: 1115094)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1177937, ~: 1179336)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 690740, ~: 691345)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 646771)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 889626)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 850342)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1103951)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1103995)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 902625)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1108138)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1172111)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 686617)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1107672, ~: 1108707)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1108278, ~: 1108729)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 133.49s (133.48s CPU time)
Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 15278)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 15516)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 59737, ~: 59229)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 57292, ~: 57365)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 76018, ~: 75962)
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 61237, ~: 61033)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 57729, ~: 57745)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 71416, ~: 71371)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 19.45s (19.43s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 9360)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 9381)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 17239, ~: 17178)
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19577, ~: 19506)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 959.55ms (942.38ms CPU time)
Ran 13 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 31018)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares_CollateralFrozen() (gas: 63008)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_NotUsingAsCollateral() (gas: 32027)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_ZeroCollateralFactor() (gas: 32054)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 36791)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 31762)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 32074)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_ZeroCollateralHub() (gas: 31837)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_ZeroDebtHub() (gas: 31894)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 32041)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 36728)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 36811)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 38718)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 17.91ms (1.00ms CPU time)
Ran 26 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4788)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9324, ~: 9561)
[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 4013, ~: 4010)
[PASS] test_calculateLinearInterest() (gas: 4511)
[PASS] test_calculateLinearInterest_add_edge() (gas: 5087)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16870)
Logs:
Bound result 0
Bound result 1
Bound result 864000000
Bound result 864000000
[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint32) (runs: 5000, μ: 7588, ~: 7508)
[PASS] test_constants() (gas: 3211)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint32,uint256) (runs: 5000, μ: 8698, ~: 8997)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3491, ~: 3545)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3665, ~: 3781)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3338, ~: 3338)
[PASS] test_mulDivDown_NoRemainder() (gas: 3324)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3191)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3203)
[PASS] test_mulDivDown_WithRemainder() (gas: 3236)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3768)
[PASS] test_mulDivUp_NoRemainder() (gas: 3350)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3146)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3204)
[PASS] test_mulDivUp_WithRemainder() (gas: 3349)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3818)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8636, ~: 8594)
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3460, ~: 3452)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 11399, ~: 7241)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3456, ~: 3374)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 1.47s (1.46s CPU time)
Ran 32 tests for tests/unit/misc/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 624350)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 624559, ~: 624357)
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32798)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32851)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 24340)
[PASS] test_constructor() (gas: 1109655)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 65380)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17431)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17238)
[PASS] test_repayNative() (gas: 749492)
Logs:
Bound result 5000000000000000000
[PASS] test_repayNative_excessAmount() (gas: 640960)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 749089, ~: 750171)
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 651233, ~: 645644)
[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 33117)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 29701)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39828)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38328)
[PASS] test_supplyAndCollateralNative() (gas: 269664)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 269874, ~: 269603)
[PASS] test_supplyNative() (gas: 241928)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 242271, ~: 242000)
[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 33100)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 29432)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39787)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38217)
[PASS] test_withdrawNative() (gas: 282754)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 282742, ~: 282826)
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 236486, ~: 236293)
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 616373, ~: 617503)
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32862)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32806)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 24317)
Suite result: ok. 32 passed; 0 failed; 0 skipped; finished in 66.00s (65.98s CPU time)
Ran 4 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 16229, ~: 16229)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 107533, ~: 107533)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 17035, ~: 17035)
[PASS] test_useNonce_zeroKey_monotonic(bytes32) (runs: 5000, μ: 16983, ~: 16983)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 4.77s (4.77s CPU time)
Ran 10 tests for tests/unit/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 8664)
[PASS] test_fromBpsDown() (gas: 9678)
[PASS] test_percentDiv() (gas: 15222)
[PASS] test_percentDivUp_ge_value(uint256,uint256) (runs: 5000, μ: 15285, ~: 15509)
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15668, ~: 15662)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12884, ~: 13012)
[PASS] test_percentMul() (gas: 15116)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15651, ~: 15645)
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15288, ~: 15512)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11766, ~: 12247)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.47s (1.47s CPU time)
Ran 6 tests for tests/unit/Spoke/Spoke.Borrow.Scenario.t.sol:SpokeBorrowScenarioTest
[PASS] test_borrow_fuzz_multi_spoke_multi_reserves(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2194692, ~: 2204841)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2359668, ~: 2368659)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves_multi_user(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2747347, ~: 2755667)
[PASS] test_borrow_fuzz_skip_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1077971, ~: 1080326)
[PASS] test_borrow_skip_borrow() (gas: 1079511)
Logs:
Bound result 10000000000000000000
Bound result 20000000000000000000
Bound result 31536000
[PASS] test_userAccountData_does_not_include_zero_cf_collateral() (gas: 1157559)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 183.11s (183.09s CPU time)
Ran 29 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_bucketId() (gas: 8971)
[PASS] test_collateralCount() (gas: 110158)
[PASS] test_collateralCount(uint256) (runs: 5000, μ: 2084397, ~: 1899913)
[PASS] test_collateralCount_ignoresInvalidBits() (gas: 124482)
[PASS] test_constants() (gas: 44966)
[PASS] test_fls() (gas: 545261)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14108, ~: 14336)
[PASS] test_fuzz_setBorrowing(uint256,bool) (runs: 5000, μ: 22353, ~: 32140)
[PASS] test_fuzz_setUseAsCollateral(uint256,bool) (runs: 5000, μ: 22449, ~: 32236)
[PASS] test_getBucketWord(uint256) (runs: 5000, μ: 14489, ~: 14489)
[PASS] test_isUsingAsCollateralOrBorrowing_slot0() (gas: 108801)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 44065)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 162282, ~: 162282)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 154774, ~: 154662)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 162044, ~: 162044)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 154753, ~: 154641)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 143621, ~: 143619)
[PASS] test_next(uint256) (runs: 5000, μ: 20429, ~: 20328)
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18206, ~: 18289)
[PASS] test_nextBorrowing_continuous() (gas: 63845326)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18124, ~: 17716)
[PASS] test_nextCollateral_continuous() (gas: 64381718)
[PASS] test_next_continuous() (gas: 91795620)
[PASS] test_popCount(bytes32) (runs: 5000, μ: 38133, ~: 38133)
[PASS] test_setBorrowing_slot0() (gas: 44129)
[PASS] test_setBorrowing_slot1() (gas: 44166)
[PASS] test_setUseAsCollateral_slot0() (gas: 44203)
[PASS] test_setUseAsCollateral_slot1() (gas: 44185)
[PASS] test_setters_use_correct_slot(uint256) (runs: 5000, μ: 22195, ~: 22195)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 103.86s (103.86s CPU time)
Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12654)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33691, ~: 33370)
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11400)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 209617, ~: 209387)
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 183212)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.53s (3.52s CPU time)
Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2107931)
[PASS] test_borrow_typeHash() (gas: 9852)
[PASS] test_constructor() (gas: 53866)
[PASS] test_eip712Domain() (gas: 2113507)
[PASS] test_repay_typeHash() (gas: 9953)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9921)
[PASS] test_supply_typeHash() (gas: 9923)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 10023)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9854)
[PASS] test_withdraw_typeHash() (gas: 9897)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 19.10ms (1.67ms CPU time)
Ran 5 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 104990)
[PASS] test_permitReserve_forwards_correct_call() (gas: 52113)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40969)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30890)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29451)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 18.83ms (1.42ms CPU time)
Ran 2 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 470120)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 87249)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 19.69ms (2.47ms CPU time)
Ran 14 tests for tests/unit/Spoke/Spoke.Borrow.Validation.t.sol:SpokeBorrowValidationTest
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded(uint256,uint56) (runs: 5000, μ: 106309, ~: 106216)
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint256) (runs: 5000, μ: 697135, ~: 697424)
[PASS] test_borrow_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256,uint256) (runs: 5000, μ: 280838, ~: 280642)
[PASS] test_borrow_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 32630, ~: 32687)
[PASS] test_borrow_fuzz_revertsWith_ReserveFrozen(uint256,uint256) (runs: 5000, μ: 69425, ~: 69222)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotBorrowable(uint256,uint256) (runs: 5000, μ: 69660, ~: 69457)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotListed(uint256,uint256) (runs: 5000, μ: 26053, ~: 25796)
[PASS] test_borrow_fuzz_revertsWith_ReservePaused(uint256,uint256) (runs: 5000, μ: 69282, ~: 69079)
[PASS] test_borrow_revertsWith_InsufficientLiquidity() (gas: 280556)
Logs:
Bound result 10000000000000000000
[PASS] test_borrow_revertsWith_InvalidAmount() (gas: 34298)
Logs:
Bound result 2
[PASS] test_borrow_revertsWith_ReserveFrozen() (gas: 70828)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotBorrowable() (gas: 71017)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotListed() (gas: 27058)
Logs:
Bound result 1
[PASS] test_borrow_revertsWith_ReservePaused() (gas: 70705)
Logs:
Bound result 2
Bound result 1
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 15.05s (15.04s CPU time)
Ran 2 tests for tests/unit/Spoke/Spoke.Borrow.t.sol:SpokeBorrowTest
[PASS] test_borrow() (gas: 1073765)
[PASS] test_borrow_fuzz_amounts(uint256,uint256) (runs: 5000, μ: 1065834, ~: 1065880)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 26.94s (26.92s CPU time)
Ran 24 tests for tests/unit/Spoke/Spoke.Config.t.sol:SpokeConfigTest
[PASS] test_addReserve() (gas: 390148)
[PASS] test_addReserve_fuzz_revertsWith_AssetNotListed() (gas: 245610)
[PASS] test_addReserve_revertsWith_InvalidAddress_hub() (gas: 5969542)
[PASS] test_addReserve_revertsWith_InvalidAddress_oracle() (gas: 6006600)
[PASS] test_addReserve_revertsWith_InvalidAssetId() (gas: 33171)
[PASS] test_addReserve_revertsWith_ReserveExists() (gas: 374701)
[PASS] test_spoke_deploy() (gas: 4903727)
[PASS] test_spoke_deploy_revertsWith_InvalidOracleDecimals() (gas: 46386)
[PASS] test_spoke_deploy_reverts_on_InvalidConstructorInput() (gas: 43781)
[PASS] test_updateLiquidationConfig_fuzz_liqBonusConfig((uint128,uint64,uint16)) (runs: 5000, μ: 52156, ~: 52143)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus((uint128,uint64,uint16)) (runs: 5000, μ: 37811, ~: 37949)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor((uint128,uint64,uint16)) (runs: 5000, μ: 37381, ~: 37159)
[PASS] test_updateLiquidationConfig_fuzz_targetHealthFactor(uint128) (runs: 5000, μ: 46861, ~: 47159)
[PASS] test_updateLiquidationConfig_liqBonusConfig() (gas: 51102)
Logs:
Bound result 900000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus() (gas: 36462)
Logs:
Bound result 1000000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor() (gas: 36256)
Logs:
Bound result 900000000000000000
Bound result 10001
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_targetHealthFactor() (gas: 46442)
Logs:
Bound result 1000000000000000001
[PASS] test_updateReserveConfig() (gas: 53882)
[PASS] test_updateReserveConfig_fuzz((bool,bool,bool,uint24)) (runs: 5000, μ: 55297, ~: 55127)
[PASS] test_updateReserveConfig_revertsWith_InvalidCollateralRisk() (gas: 39603)
[PASS] test_updateReserveConfig_revertsWith_ReserveNotListed() (gas: 36252)
[PASS] test_updateReservePriceSource() (gas: 240092)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 31103, ~: 31103)
[PASS] test_updateReservePriceSource_revertsWith_ReserveNotListed() (gas: 34277)
Suite result: ok. 24 passed; 0 failed; 0 skipped; finished in 3.90s (3.89s CPU time)
Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 189315, ~: 189315)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38455)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36897)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 189271, ~: 189271)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38388)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36963)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 232669, ~: 232669)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38455)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37051)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 189334, ~: 189334)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38433)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36928)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 67809, ~: 67809)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25604)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27036)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 67852, ~: 67852)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25609)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27124)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 189268, ~: 189268)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38475)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36961)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 44.25s (44.24s CPU time)
Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13863, ~: 13863)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13863, ~: 13863)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13903, ~: 13903)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13861, ~: 13861)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 14114, ~: 14114)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 14114, ~: 14114)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13928, ~: 13928)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.05s (7.03s CPU time)
Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 80405)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 116938)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 73068)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 141343)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 82664)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 82539)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 102073)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 22.09ms (4.24ms CPU time)
Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 78204)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 114737)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 70867)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 139142)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 80463)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 80338)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 99872)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.70ms (4.10ms CPU time)
Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 817755)
[PASS] test_renouncePositionManagerRole() (gas: 26829)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18352)
[PASS] test_repayWithSig() (gas: 796053)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 311213)
[PASS] test_setUsingAsCollateralWithSig() (gas: 621096)
[PASS] test_supplyWithSig() (gas: 593748)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 323981)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 910362)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 16853, ~: 16853)
[PASS] test_withdrawWithSig() (gas: 602533)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 440.66ms (423.46ms CPU time)
Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 2612612)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 603455)
[PASS] testAccess_spoke_admin_config_access() (gas: 490316)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 19.82ms (3.13ms CPU time)
Ran 1 test for tests/unit/Spoke/Spoke.AccrueInterest.Scenario.t.sol:SpokeAccrueInterestScenarioTest
[SKIP: pending rft] test_accrueInterest_fuzz_RPBorrowAndSkipTime_twoActions((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint32) (runs: 0, μ: 0, ~: 0)
Suite result: ok. 0 passed; 0 failed; 1 skipped; finished in 22.00ms (4.35ms CPU time)
Ran 1 test for tests/unit/Spoke/Spoke.MultipleHub.SiloedBorrowing.t.sol:SpokeMultipleHubSiloedBorrowingTest
[PASS] test_siloed_borrowing() (gas: 655808)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 7.99ms (1.17ms CPU time)
Ran 2 tests for tests/unit/Spoke/Spoke.MultipleHub.t.sol:SpokeMultipleHubTest
[PASS] test_borrow_secondHub() (gas: 1050976)
[PASS] test_borrow_thirdHub() (gas: 747838)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 25.20ms (4.72ms CPU time)
Ran 11 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1166120)
[PASS] test_liquidation() (gas: 8343848)
[PASS] test_liquidation_receiveShares() (gas: 8305869)
[PASS] test_multicall_ops() (gas: 1601466)
[PASS] test_repay() (gas: 960076)
[PASS] test_setUserPositionManagerWithSig() (gas: 294086)
[PASS] test_supply() (gas: 948642)
[PASS] test_updateRiskPremium() (gas: 1431873)
[PASS] test_updateUserDynamicConfig() (gas: 513790)
[PASS] test_usingAsCollateral() (gas: 1613041)
[PASS] test_withdraw() (gas: 2100158)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 51.03ms (27.66ms CPU time)
Ran 11 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 961137)
[PASS] test_liquidation() (gas: 8173443)
[PASS] test_liquidation_receiveShares() (gas: 8135464)
[PASS...*[Comment body truncated]* |
♻️ Forge Gas Snapshots
🔕 Unchanged
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It removes converter functions in the Hub, because:
Integrators are recommended to use the preview functions instead, as they provide a more explicit rounding direction.