Merged
Conversation
avniculae
reviewed
Oct 9, 2025
avniculae
reviewed
Oct 9, 2025
avniculae
reviewed
Oct 9, 2025
avniculae
reviewed
Oct 9, 2025
|
The author of this PR, Kogaroshi, is not an activated member of this organization on Codecov. |
♻️ Forge Gas Snapshots
🔕 Unchanged
|
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 504.12ms (491.57ms 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, μ: 24539, ~: 24690)
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25654, ~: 25690)
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18944)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19168, ~: 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 993.90ms (987.72ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2314465)
[PASS] test_change_role_responsibility() (gas: 101979)
[PASS] test_hub_access_manager_exposure() (gas: 12706)
[PASS] test_hub_admin_access() (gas: 1134214)
[PASS] test_migrate_role_responsibility() (gas: 397250)
[PASS] test_setInterestRateData_access() (gas: 101156)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 20.80ms (3.93ms CPU time)
Ran 21 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 646962)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint56) (runs: 5000, μ: 156724, ~: 156572)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 310065, ~: 310201)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint56) (runs: 5000, μ: 78631, ~: 78479)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint56,uint256,uint256) (runs: 5000, μ: 283082, ~: 285500)
[PASS] test_add_fuzz_revertsWith_ERC20InsufficientAllowance(uint256) (runs: 5000, μ: 78896, ~: 78622)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 216894, ~: 217071)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 337076, ~: 336995)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 819596, ~: 821790)
[PASS] test_add_multi_add_minimal_shares() (gas: 344693)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 206362)
[PASS] test_add_revertsWith_ERC20InsufficientAllowance() (gas: 75159)
[PASS] test_add_revertsWith_InvalidAddress() (gas: 15722)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 15789)
[PASS] test_add_revertsWith_InvalidShares() (gas: 220762)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 36540)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 58210)
[PASS] test_add_revertsWith_SpokePaused() (gas: 58355)
[PASS] test_add_single_asset() (gas: 325001)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 324294)
[PASS] test_add_with_increased_index_with_premium() (gas: 670220)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 49.40s (49.38s 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, μ: 1062207, ~: 1062355)
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1446458, ~: 1446601)
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1112159, ~: 1111928)
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1170472)
[PASS] test_borrow_rounding_effect_shares() (gas: 1111143)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 67.61s (67.59s CPU time)
Ran 31 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 841730, ~: 841763)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 46646, ~: 46948)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 46722, ~: 47024)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 37755, ~: 37755)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 47186, ~: 47004)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 47448, ~: 47681)
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 39899, ~: 36252)
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 81092)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 78065)
[PASS] test_addSpoke_fuzz(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 123698, ~: 123767)
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 34534, ~: 34522)
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 33121, ~: 33178)
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 38659)
[PASS] test_hub_deploy_revertsWith_InvalidAddress() (gas: 47100)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 60191)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 242525, ~: 242410)
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 756225, ~: 756145)
[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 654193, ~: 654115)
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 724352, ~: 724409)
[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 1127790, ~: 1127896)
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 764022, ~: 764079)
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 605895, ~: 605949)
[PASS] test_updateAssetConfig_fuzz_UseExistingSpokeAsFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 59774, ~: 59774)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 57832, ~: 57886)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 41094, ~: 40943)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 495376)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 191560, ~: 191409)
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 65208, ~: 65057)
[PASS] test_updateSpokeConfig_fuzz(uint256,(bool,bool,uint56,uint56)) (runs: 5000, μ: 56489, ~: 56559)
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(bool,bool,uint56,uint56)) (runs: 5000, μ: 40403, ~: 40469)
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29297)
Suite result: ok. 31 passed; 0 failed; 0 skipped; finished in 99.39s (99.38s CPU time)
Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 362695)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 681256, ~: 681326)
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 285593, ~: 285456)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint56) (runs: 5000, μ: 79866, ~: 79715)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint56,uint256,uint256) (runs: 5000, μ: 298751, ~: 299033)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 33919, ~: 33721)
[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, μ: 129547, ~: 129352)
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 15782, ~: 15782)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 253903)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28022)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 179301)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 126662)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 15902)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 58166)
[PASS] test_draw_revertsWith_SpokePaused() (gas: 58311)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 26.14s (26.11s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 501302, ~: 501302)
[PASS] test_eliminateDeficit_allowSpokePaused() (gas: 336850)
[PASS] test_eliminateDeficit_fuzz_revertsWith_InvalidAmount_Excess(uint256) (runs: 5000, μ: 250786, ~: 250786)
[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: 251908)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 13.03s (13.01s CPU time)
Ran 7 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 128872)
[PASS] test_deficit() (gas: 1046518)
[PASS] test_draw() (gas: 372111)
[PASS] test_payFee_transferShares() (gas: 923092)
[PASS] test_refreshPremium() (gas: 124914)
[PASS] test_remove() (gas: 278055)
[PASS] test_restore() (gas: 724573)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 27.11ms (4.52ms 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, μ: 895830, ~: 895898)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 856015, ~: 856954)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 902400, ~: 899592)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1115684, ~: 1115806)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1178664, ~: 1180164)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 690988, ~: 691633)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 646987)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 889980)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 850554)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1104307)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1104351)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 902915)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1108850)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1172939)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 686905)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1108006, ~: 1109085)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1108632, ~: 1109107)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 134.65s (134.63s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 665242, ~: 665219)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 665510, ~: 665666)
[PASS] test_payFee_revertsWith_AddedSharesExceeded() (gas: 132719)
[PASS] test_payFee_revertsWith_AddedSharesExceeded_with_interest() (gas: 631536)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20168)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 58192)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 23.92s (23.91s CPU time)
Ran 10 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 678856)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 659584)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 680312, ~: 679858)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 787580)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 12402)
[PASS] test_reclaim_revertsWith_InvalidAmount_exceedsSwept() (gas: 92247)
[PASS] test_reclaim_revertsWith_InvalidAmount_exceedsSwept_afterSweep() (gas: 466316)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 90579)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 91557, ~: 91557)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 37982)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 14.73s (14.72s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 169682)
[PASS] test_refreshPremium_fuzz_positiveDeltas(int256,int256,int256) (runs: 5000, μ: 58062, ~: 58316)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 561376, ~: 561547)
[PASS] test_refreshPremium_negativeDeltas(int256,int256) (runs: 5000, μ: 472760, ~: 473244)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256,uint256) (runs: 5000, μ: 543632, ~: 552386)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 107841)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 56015)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 737258)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 20.33s (20.31s CPU time)
Ran 13 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 199825)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 398317)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 198367, ~: 198171)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 436115, ~: 438634)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 279946, ~: 280098)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 449789, ~: 452927)
[PASS] test_remove_revertsWith_AddedAmountExceeded() (gas: 142218)
[PASS] test_remove_revertsWith_AddedAmountExceeded_zero_added() (gas: 29990)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 171562)
[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 32.17s (32.15s 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, μ: 160350, ~: 160368)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 332995, ~: 334922)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 18170)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 26412, ~: 26412)
[PASS] test_reportDeficit_with_premium() (gas: 333389)
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.71s (9.69s CPU time)
Ran 20 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 356168)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 661761)
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, μ: 354849, ~: 357385)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 645283, ~: 663187)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 248957, ~: 252765)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 630360, ~: 634039)
[PASS] test_restore_partial_drawn() (gas: 331621)
[PASS] test_restore_partial_same_block() (gas: 310391)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 251394)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 44804)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 193852)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 193872)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 155215)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 85357)
[PASS] test_restore_revertsWith_SurplusAmountRestored() (gas: 338814)
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest() (gas: 251692)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 15768000
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest_and_premium() (gas: 632699)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 193861)
[PASS] test_restore_two_wei_shares_delta_increase() (gas: 246063)
[PASS] test_restore_when_asset_frozen() (gas: 412879)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 19.27s (19.25s CPU time)
Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 702202707)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.65s (3.63s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 484704)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 648253, ~: 649417)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 485218, ~: 485228)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12317)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 234857)
[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.99s (17.97s 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, μ: 174301, ~: 174456)
[PASS] test_transferShares_fuzz_revertsWith_AddedSharesExceeded(uint256) (runs: 5000, μ: 140805, ~: 140532)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 184283)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 164956)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 167327)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22530)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 6.69s (6.67s CPU time)
Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 41386)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint32) (runs: 5000, μ: 330497, ~: 330422)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint32) (runs: 5000, μ: 187407, ~: 187332)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint32) (runs: 5000, μ: 262820, ~: 265179)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint32) (runs: 5000, μ: 363209, ~: 366765)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint32) (runs: 5000, μ: 264210, ~: 264135)
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, μ: 852254, ~: 852544)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,address) (runs: 5000, μ: 56331, ~: 56767)
[PASS] test_addAsset_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 34798, ~: 34798)
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 50445)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 50343)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 44350)
[PASS] test_addSpoke() (gas: 124687)
[PASS] test_addSpokeToAssets() (gas: 219685)
[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: 155449)
[PASS] test_deactivateAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 18008)
[PASS] test_deactivateSpoke() (gas: 152305)
[PASS] test_deactivateSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 17950)
[PASS] test_freezeAsset() (gas: 158120)
[PASS] test_freezeAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17941)
[PASS] test_freezeSpoke() (gas: 155030)
[PASS] test_freezeSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18060)
[PASS] test_pauseAsset() (gas: 155446)
[PASS] test_pauseAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17898)
[PASS] test_pauseSpoke() (gas: 152434)
[PASS] test_pauseSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18017)
[PASS] test_updateFeeConfig_Scenario() (gas: 322726)
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, μ: 174448, ~: 174326)
[PASS] test_updateFeeConfig_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17683, ~: 17683)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 48138)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 50083)
[PASS] test_updateFeeReceiver_Scenario() (gas: 204758)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 967743)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 995353)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 170882, ~: 170901)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17269, ~: 17269)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 52675)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 74330)
[PASS] test_updateInterestRateData() (gas: 71575)
[PASS] test_updateInterestRateData_revertsWith_OwnableUnauthorizedAccount() (gas: 19152)
[PASS] test_updateInterestRateStrategy() (gas: 91080)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 28659, ~: 28659)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 74619)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 64366)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 64861)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 84312, ~: 84169)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 52600)
[PASS] test_updateLiquidityFee_revertsWith_OwnableUnauthorizedAccount() (gas: 16633)
[PASS] test_updateReinvestmentController() (gas: 99106)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17271, ~: 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.41s (9.39s 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 3.73ms (639.77µs 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, μ: 2195808, ~: 2205969)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2361276, ~: 2370287)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves_multi_user(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2748826, ~: 2757153)
[PASS] test_borrow_fuzz_skip_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1078263, ~: 1080637)
[PASS] test_borrow_skip_borrow() (gas: 1079822)
Logs:
Bound result 10000000000000000000
Bound result 20000000000000000000
Bound result 31536000
[PASS] test_userAccountData_does_not_include_zero_cf_collateral() (gas: 1158817)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 184.84s (184.82s 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, μ: 106373, ~: 106282)
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint256) (runs: 5000, μ: 697167, ~: 697458)
[PASS] test_borrow_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256,uint256) (runs: 5000, μ: 280771, ~: 280576)
[PASS] test_borrow_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 32675, ~: 32731)
[PASS] test_borrow_fuzz_revertsWith_ReserveFrozen(uint256,uint256) (runs: 5000, μ: 69489, ~: 69288)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotBorrowable(uint256,uint256) (runs: 5000, μ: 69724, ~: 69523)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotListed(uint256,uint256) (runs: 5000, μ: 26073, ~: 25818)
[PASS] test_borrow_fuzz_revertsWith_ReservePaused(uint256,uint256) (runs: 5000, μ: 69346, ~: 69145)
[PASS] test_borrow_revertsWith_InsufficientLiquidity() (gas: 280490)
Logs:
Bound result 10000000000000000000
[PASS] test_borrow_revertsWith_InvalidAmount() (gas: 34342)
Logs:
Bound result 2
[PASS] test_borrow_revertsWith_ReserveFrozen() (gas: 70894)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotBorrowable() (gas: 71083)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotListed() (gas: 27102)
Logs:
Bound result 1
[PASS] test_borrow_revertsWith_ReservePaused() (gas: 70771)
Logs:
Bound result 2
Bound result 1
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 14.85s (14.83s CPU time)
Ran 2 tests for tests/unit/Spoke/Spoke.Borrow.t.sol:SpokeBorrowTest
[PASS] test_borrow() (gas: 1074184)
[PASS] test_borrow_fuzz_amounts(uint256,uint256) (runs: 5000, μ: 1066248, ~: 1066299)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 26.67s (26.66s CPU time)
Ran 24 tests for tests/unit/Spoke/Spoke.Config.t.sol:SpokeConfigTest
[PASS] test_addReserve() (gas: 390303)
[PASS] test_addReserve_fuzz_revertsWith_AssetNotListed() (gas: 245676)
[PASS] test_addReserve_revertsWith_InvalidAddress_hub() (gas: 5959166)
[PASS] test_addReserve_revertsWith_InvalidAddress_oracle() (gas: 5996291)
[PASS] test_addReserve_revertsWith_InvalidAssetId() (gas: 33193)
[PASS] test_addReserve_revertsWith_ReserveExists() (gas: 374834)
[PASS] test_spoke_deploy() (gas: 4893259)
[PASS] test_spoke_deploy_revertsWith_InvalidOracleDecimals() (gas: 46369)
[PASS] test_spoke_deploy_reverts_on_InvalidConstructorInput() (gas: 43770)
[PASS] test_updateLiquidationConfig_fuzz_liqBonusConfig((uint128,uint64,uint16)) (runs: 5000, μ: 52176, ~: 52165)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus((uint128,uint64,uint16)) (runs: 5000, μ: 37832, ~: 37971)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor((uint128,uint64,uint16)) (runs: 5000, μ: 37405, ~: 37181)
[PASS] test_updateLiquidationConfig_fuzz_targetHealthFactor(uint128) (runs: 5000, μ: 46885, ~: 47181)
[PASS] test_updateLiquidationConfig_liqBonusConfig() (gas: 51124)
Logs:
Bound result 900000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus() (gas: 36484)
Logs:
Bound result 1000000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor() (gas: 36278)
Logs:
Bound result 900000000000000000
Bound result 10001
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_targetHealthFactor() (gas: 46464)
Logs:
Bound result 1000000000000000001
[PASS] test_updateReserveConfig() (gas: 53904)
[PASS] test_updateReserveConfig_fuzz((bool,bool,bool,uint24)) (runs: 5000, μ: 55321, ~: 55149)
[PASS] test_updateReserveConfig_revertsWith_InvalidCollateralRisk() (gas: 39647)
[PASS] test_updateReserveConfig_revertsWith_ReserveNotListed() (gas: 36296)
[PASS] test_updateReservePriceSource() (gas: 240136)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 31125, ~: 31125)
[PASS] test_updateReservePriceSource_revertsWith_ReserveNotListed() (gas: 34321)
Suite result: ok. 24 passed; 0 failed; 0 skipped; finished in 3.81s (3.80s CPU time)
Ran 6 tests for tests/unit/KeyValueList.t.sol:KeyValueListTest
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 413993, ~: 412016)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 263659, ~: 253236)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 205023, ~: 185578)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 464767, ~: 455219)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 204212, ~: 209396)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 548888, ~: 539474)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 65.65s (65.65s 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, μ: 30555, ~: 30489)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 32293, ~: 32398)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 34447, ~: 34417)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.39s (3.37s 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, μ: 22990, ~: 23049)
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 25367)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 15341)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 25300)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20048, ~: 20107)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22747, ~: 22806)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22830, ~: 22889)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.80s (2.78s CPU time)
Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 9003)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8971)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8992)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8959)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8985)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 9052)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 9017)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 9005)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 9005)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8994)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8928)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8961)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8938)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8995)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8946)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 9024)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 18.11ms (1.05ms CPU time)
Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 238475, ~: 238953)
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 92446, ~: 92251)
[PASS] test_liquidateCollateral_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 74794, ~: 74720)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 4.01s (3.99s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 177750, ~: 177750)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 142904)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 146818)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 195598)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.29s (2.27s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 350226)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 69084)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 100615)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 109593)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 23.16ms (1.49ms CPU time)
Ran 10 tests for tests/unit/Spoke/Spoke.DynamicConfig.Triggers.t.sol:SpokeDynamicConfigTriggersTest
[PASS] test_borrow_triggers_dynamicConfigUpdate() (gas: 1328464)
[PASS] test_liquidate_does_not_trigger_dynamicConfigUpdate() (gas: 1617516)
[PASS] test_repay_does_not_trigger_dynamicConfigUpdate() (gas: 911604)
[PASS] test_supply_does_not_trigger_dynamicConfigUpdate() (gas: 1069107)
[PASS] test_updateUserDynamicConfig_doesHFCheck() (gas: 801827)
[PASS] test_updateUserDynamicConfig_reverts_when_not_authorized(address) (runs: 5000, μ: 1194250, ~: 1194252)
[PASS] test_updateUserDynamicConfig_triggers_dynamicConfigUpdate() (gas: 676726)
[PASS] test_updateUserDynamicConfig_updatesRP() (gas: 1297612)
[PASS] test_usingAsCollateral_triggers_dynamicConfigUpdate() (gas: 1342958)
[PASS] test_withdraw_triggers_dynamicConfigUpdate() (gas: 1365475)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 27.94s (27.92s CPU time)
Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 15155)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 15402)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 53891, ~: 53773)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 52998, ~: 52995)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 69658, ~: 69467)
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 56969, ~: 56757)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 52792, ~: 52683)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 65109, ~: 65010)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 18.30s (18.29s 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, μ: 17242, ~: 17178)
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19580, ~: 19506)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 980.29ms (963.12ms CPU time)
Ran 12 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 28553)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_NotUsingAsCollateral() (gas: 29608)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_ZeroCollateralFactor() (gas: 29657)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 34372)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 29343)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 29742)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_ZeroCollateralHub() (gas: 29440)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotListed_ZeroDebtHub() (gas: 29497)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 29644)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 34376)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 34392)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 36299)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 18.74ms (967.86µs 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, μ: 9323, ~: 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, μ: 7586, ~: 7508)
[PASS] test_constants() (gas: 3211)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint32,uint256) (runs: 5000, μ: 8700, ~: 8997)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3491, ~: 3545)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3666, ~: 3781)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3338, ~: 3339)
[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, μ: 8639, ~: 8594)
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3460, ~: 3452)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 11469, ~: 7295)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3457, ~: 3540)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 1.50s (1.49s CPU time)
Ran 20 tests for tests/unit/Spoke/Spoke.DynamicConfig.t.sol:SpokeDynamicConfigTest
[PASS] test_addDynamicReserveConfig() (gas: 85033)
[PASS] test_addDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_incompatible(uint16,uint32) (runs: 5000, μ: 47747, ~: 47918)
[PASS] test_addDynamicReserveConfig_once() (gas: 542097)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 52383, ~: 52383)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 59450)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 41863)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 42337)
[PASS] test_addDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 34306)
[PASS] test_fuzz_addDynamicReserveConfig_spaced_dup_updates(bytes32) (runs: 5000, μ: 154147, ~: 154147)
[PASS] test_fuzz_addDynamicReserveConfig_trailing_order(bytes32) (runs: 5000, μ: 150812, ~: 150812)
[PASS] test_offboardReserve_existing_borrows_remain_unaffected() (gas: 1160877)
[PASS] test_updateDynamicReserveConfig() (gas: 1716730)
[PASS] test_updateDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus(uint16,uint32) (runs: 5000, μ: 63318, ~: 63489)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 52362, ~: 52362)
[PASS] test_updateDynamicReserveConfig_revertsWith_ConfigKeyUninitialized() (gas: 54243)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactor() (gas: 56433)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 57219)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 57367)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 57905)
[PASS] test_updateDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 34614)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 10.18s (10.16s CPU time)
Ran 5 tests for tests/gas/Spoke.Getters.gas.t.sol:SpokeGetters_Gas_Tests
[PASS] test_getUserAccountData() (gas: 22798)
[PASS] test_getUserAccountData_oneSupplies() (gas: 274182)
[PASS] test_getUserAccountData_twoSupplies() (gas: 499925)
[PASS] test_getUserAccountData_twoSupplies_oneBorrows() (gas: 1029569)
[PASS] test_getUserAccountData_twoSupplies_twoBorrows() (gas: 1595686)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 28.75ms (4.71ms CPU time)
Ran 5 tests for tests/unit/Spoke/Spoke.Getters.t.sol:SpokeGettersTest
[PASS] test_getLiquidationBonus_configured() (gas: 89525)
Logs:
Bound result 2
Bound result 1000000000000000000
Bound result 4000
Bound result 900000000000000000
[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 88214, ~: 88636)
[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 65848, ~: 65600)
[PASS] test_getLiquidationBonus_notConfigured() (gas: 67107)
Logs:
Bound result 2
Bound result 1000000000000000000
[PASS] test_protocol_getters() (gas: 278375)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 1.95s (1.93s CPU time)
Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 7393059)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 7386556)
[PASS] test_dustColl_allowed() (gas: 7234295)
[PASS] test_dustDebt_allowed() (gas: 7381466)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 47.15ms (23.21ms CPU time)
Ran 34 tests for tests/unit/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 622383)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 622610, ~: 622412)
[PASS] test_borrowNative_fuzz_otherReceiver(uint256) (runs: 5000, μ: 648567, ~: 648369)
[PASS] test_borrowNative_otherReceiver() (gas: 648234)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_revertsWith_InvalidAddress() (gas: 30629)
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 30671)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 30754)
[PASS] test_constructor() (gas: 1050731)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 130011)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17453)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17216)
[PASS] test_renouncePositionManagerRole() (gas: 44812)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 50961)
[PASS] test_repayNative() (gas: 747461)
Logs:
Bound result 5000000000000000000
[PASS] test_repayNative_excessAmount() (gas: 639229)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 747014, ~: 748118)
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 649515, ~: 643913)
[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 30645)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 54864)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 37450)
[PASS] test_supplyNative() (gas: 234475)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 234818, ~: 234547)
[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 30647)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 54697)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 37363)
[PASS] test_withdrawNative() (gas: 280647)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 280625, ~: 280697)
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 234783, ~: 234590)
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 614856, ~: 615992)
[PASS] test_withdrawNative_fuzz_otherReceiver(uint256) (runs: 5000, μ: 264403, ~: 264210)
[PASS] test_withdrawNative_otherReceiver() (gas: 264217)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_revertsWith_InvalidAddress() (gas: 30540)
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 30591)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 30623)
Suite result: ok. 34 passed; 0 failed; 0 skipped; finished in 74.22s (74.20s 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.76s 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, μ: 15286, ~: 15509)
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15669, ~: 15662)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12881, ~: 13012)
[PASS] test_percentMul() (gas: 15116)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15652, ~: 15645)
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15289, ~: 15512)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11763, ~: 12247)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.46s (1.46s 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, μ: 2080037, ~: 1886431)
[PASS] test_collateralCount_ignoresInvalidBits() (gas: 124482)
[PASS] test_constants() (gas: 44966)
[PASS] test_fls() (gas: 545261)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14110, ~: 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, μ: 154859, ~: 154843)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 162044, ~: 162044)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 154838, ~: 154822)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 143623, ~: 143623)
[PASS] test_next(uint256) (runs: 5000, μ: 20427, ~: 20328)
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18226, ~: 18289)
[PASS] test_nextBorrowing_continuous() (gas: 63845326)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18118, ~: 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 102.43s (102.43s CPU time)
Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12654)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33693, ~: 33370)
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11400)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 209619, ~: 209387)
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 183212)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.41s (3.39s CPU time)
Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2038827)
[PASS] test_borrow_typeHash() (gas: 9902)
[PASS] test_constructor() (gas: 2186349)
[PASS] test_eip712Domain() (gas: 2044411)
[PASS] test_repay_typeHash() (gas: 9959)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9971)
[PASS] test_supply_typeHash() (gas: 9907)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 9941)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9904)
[PASS] test_withdraw_typeHash() (gas: 10037)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 19.54ms (1.96ms CPU time)
Ran 4 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 102481)
[PASS] test_permitReserve_forwards_correct_call() (gas: 49584)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 38479)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 28403)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 18.66ms (1.73ms CPU time)
Ran 2 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 467213)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 84290)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 19.68ms (2.48ms CPU time)
Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186150, ~: 186150)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36133)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34575)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186129, ~: 186129)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36089)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34664)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 229417, ~: 229417)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36146)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34742)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186214, ~: 186214)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36156)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34651)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 64831, ~: 64831)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 23288)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 24720)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 64842, ~: 64842)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 23272)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 24787)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 186082, ~: 186082)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 36132)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 34618)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 43.60s (43.58s 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: 77382)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 113914)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 69609)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 138366)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 79232)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 79152)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 99026)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 23.09ms (4.37ms 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: 75181)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 111713)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 67408)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 136165)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 77031)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 76951)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 96825)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.87ms (4.25ms CPU time)
Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 815420)
[PASS] test_renouncePositionManagerRole() (gas: 26616)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 16173)
[PASS] test_repayWithSig() (gas: 793934)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 309096)
[PASS] test_setUsingAsCollateralWithSig() (gas: 618128)
[PASS] test_supplyWithSig() (gas: 591462)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 321409)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 908865)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 16888, ~: 16888)
[PASS] test_withdrawWithSig() (gas: 600155)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 450.86ms (433.11ms CPU time)
Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 2612833)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 603472)
[PASS] testAccess_spoke_admin_config_access() (gas: 490581)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 25.07ms (3.27ms 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.18ms (4.65ms CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 138289)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint32) (runs: 5000, μ: 661992, ~: 661907)
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint32) (runs: 5000, μ: 258174, ~: 258476)
[PASS] test_accrueInterest_TenPercentRp(uint256,uint32) (runs: 5000, μ: 596272, ~: 597290)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint32) (runs: 5000, μ: 556564, ~: 557157)
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint32) (runs: 5000, μ: 3940476, ~: 3955323)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint32) (runs: 5000, μ: 4001216, ~: 4013751)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 214.62s (214.61s 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, μ: 558823, ~: 558985)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 801791, ~: 801793)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 588640848)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 249903293)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 559304)
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.03s (21.01s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 849350)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 97951)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint32) (runs: 5000, μ: 235970, ~: 236129)
[PASS] test_accrueLiquidityFee_exact() (gas: 838376)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint32) (runs: 5000, μ: 833219, ~: 862573)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 553944)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 883869)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 19.31s (19.29s CPU time)
Ran 10 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1166314)
[PASS] test_liquidation() (gas: 8331651)
[PASS] test_multicall_ops() (gas: 1601436)
[PASS] test_repay() (gas: 960150)
[PASS] test_setUserPositionManagerWithSig() (gas: 294022)
[PASS] test_supply() (gas: 948478)
[PASS] test_updateRiskPremium() (gas: 1432491)
[PASS] test_updateUserDynamicConfig() (gas: 513636)
[PASS] test_usingAsCollateral() (gas: 1613285)
[PASS] test_withdraw() (gas: 2100716)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 48.03ms (23.98ms CPU time)
Ran 10 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() ...*[Comment body truncated]* |
Co-authored-by: miguelmtzinf <miguelmtz.mail@gmail.com>
miguelmtzinf
approved these changes
Oct 14, 2025
yan-man
approved these changes
Oct 14, 2025
yan-man
requested changes
Oct 15, 2025
Contributor
yan-man
left a comment
There was a problem hiding this comment.
also for liquidationCall
Member
|
think we can avoid for |
DhairyaSethi
approved these changes
Oct 16, 2025
miguelmtzinf
approved these changes
Oct 16, 2025
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.
Return the shares amounts in user actions on the Spoke (supply, withdraw, borrow, repay)