chore: use accrued index, natspec, consistency#989
Merged
DhairyaSethi merged 4 commits intomainfrom Nov 6, 2025
Merged
Conversation
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, μ: 444409, ~: 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 493.39ms (476.08ms 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, μ: 25652, ~: 25690)
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18944)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19178, ~: 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 933.24ms (927.20ms 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 855.51ms (855.33ms CPU time)
Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17646)
[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: 65413)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 76717)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 76878)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 331.94ms (315.88ms CPU time)
Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 954521)
[PASS] test_repayNative() (gas: 1174486)
[PASS] test_supplyAndCollateralNative() (gas: 330361)
[PASS] test_supplyNative() (gas: 288679)
[PASS] test_withdrawNative() (gas: 510664)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 37.43ms (4.99ms CPU time)
Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 785367)
[PASS] test_repayWithSig() (gas: 1127477)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 201556)
[PASS] test_setUsingAsCollateralWithSig() (gas: 327784)
[PASS] test_supplyWithSig() (gas: 462907)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 137791)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 135530)
[PASS] test_withdrawWithSig() (gas: 410630)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 31.92ms (8.93ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2312210)
[PASS] test_change_role_responsibility() (gas: 102590)
[PASS] test_hub_access_manager_exposure() (gas: 12684)
[PASS] test_hub_admin_access() (gas: 1155460)
[PASS] test_migrate_role_responsibility() (gas: 398872)
[PASS] test_setInterestRateData_access() (gas: 103513)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 20.47ms (3.50ms CPU time)
Ran 21 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 631603)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 158798, ~: 158764)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 316365, ~: 316498)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 78822, ~: 78788)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 271062, ~: 271128)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 206907, ~: 207091)
[PASS] test_add_fuzz_revertsWith_TransferFromFailed(uint256) (runs: 5000, μ: 83039, ~: 82766)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 340153, ~: 340073)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 743368, ~: 743458)
[PASS] test_add_multi_add_minimal_shares() (gas: 317740)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 201665)
[PASS] test_add_revertsWith_InvalidAddress() (gas: 15807)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 15852)
[PASS] test_add_revertsWith_InvalidShares() (gas: 206093)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 38130)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 59848)
[PASS] test_add_revertsWith_SpokePaused() (gas: 59965)
[PASS] test_add_revertsWith_TransferFromFailed() (gas: 79340)
[PASS] test_add_single_asset() (gas: 328062)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 301019)
[PASS] test_add_with_increased_index_with_premium() (gas: 655358)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 43.40s (43.38s CPU time)
Ran 35 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 867159, ~: 867192)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 46699, ~: 47004)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 46730, ~: 47035)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 37656, ~: 37656)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 47198, ~: 47015)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 47479, ~: 47714)
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 40002, ~: 41818)
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 81198)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 78127)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 125822, ~: 125878)
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 34699, ~: 34687)
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33287, ~: 33343)
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 38880)
[PASS] test_hub_deploy_revertsWith_InvalidAddress() (gas: 47281)
[PASS] test_hub_max_riskPremium() (gas: 8503)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 699707)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 612793)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 72287)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 268948, ~: 269163)
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 788006, ~: 787890)
[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 693245, ~: 693168)
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 790850, ~: 790959)
[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 1171161, ~: 1171270)
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 842075, ~: 842184)
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 680921, ~: 680975)
[PASS] test_updateAssetConfig_fuzz_UseExistingSpokeAsFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 71885, ~: 71885)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 59946, ~: 60000)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 41027, ~: 40885)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 500775)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 202311, ~: 202526)
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 65165, ~: 65023)
[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 842921)
Logs:
Bound result 1
Bound result 500
Bound result 3
Bound result 1000
Bound result 5
Bound result 500
Bound result 3
Bound result 1000
[PASS] test_updateSpokeConfig_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 58408, ~: 58475)
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40378, ~: 40442)
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29290)
Suite result: ok. 35 passed; 0 failed; 0 skipped; finished in 91.25s (91.23s CPU time)
Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 361164)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 666453, ~: 666368)
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 291029, ~: 290893)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5000, μ: 81233, ~: 81199)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 295079, ~: 295184)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 33864, ~: 33665)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 184896, ~: 184625)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 130297, ~: 130104)
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 15735, ~: 15735)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 261188)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 27943)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 181201)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 127414)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 15855)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 59672)
[PASS] test_draw_revertsWith_SpokePaused() (gas: 59745)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 21.38s (21.36s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 489807, ~: 489807)
[PASS] test_eliminateDeficit_allowSpokePaused() (gas: 335977)
[PASS] test_eliminateDeficit_fuzz_revertsWith_InvalidAmount_Excess(uint256) (runs: 5000, μ: 246785, ~: 246785)
[PASS] test_eliminateDeficit_fuzz_revertsWith_callerSpokeNotActive(address) (runs: 5000, μ: 29141, ~: 29141)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 20068)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 247907)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 11.88s (11.85s CPU time)
Ran 5 tests for tests/unit/Hub/Hub.MintFeeShares.t.sol:HubMintFeeSharesTest
[PASS] test_mintFeeShares() (gas: 318604)
[PASS] test_mintFeeShares_noFees() (gas: 376022)
[PASS] test_mintFeeShares_noShares() (gas: 312395)
[PASS] test_mintFeeShares_revertsWith_AccessManagedUnauthorized() (gas: 25025)
[PASS] test_mintFeeShares_revertsWith_SpokeNotActive() (gas: 254595)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 19.55ms (3.63ms CPU time)
Ran 8 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 133353)
[PASS] test_deficit() (gas: 1084384)
[PASS] test_draw() (gas: 379629)
[PASS] test_mintFeeShares() (gas: 460643)
[PASS] test_payFee_transferShares() (gas: 943715)
[PASS] test_refreshPremium() (gas: 649729)
[PASS] test_remove() (gas: 285083)
[PASS] test_restore() (gas: 707451)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 28.10ms (5.65ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 656930, ~: 657122)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 657348, ~: 657630)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20182)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 59705)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 136612)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 615627)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 22.22s (22.20s CPU time)
Ran 10 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 683295)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 663963)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 684824, ~: 684295)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 791531)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 12461)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 93051)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93916, ~: 93916)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40297)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept() (gas: 98515)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 471677)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 13.94s (13.93s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 134089)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 646414, ~: 646254)
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 255589, ~: 255617)
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 593843, ~: 594265)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 554195, ~: 554195)
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 4063039, ~: 4082850)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 4133320, ~: 4150884)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 209.11s (209.08s 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, μ: 547596, ~: 547756)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 807801, ~: 807796)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 741911494)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 286077601)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 548075)
Logs:
Bound result 500000000000000000000
Bound result 5000
Bound result 34560000
Bound result 2
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 20.14s (20.12s CPU time)
Ran 11 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 255169)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256,int256,bool) (runs: 5000, μ: 476540, ~: 480142)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 545233, ~: 551105)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 894640)
[PASS] test_refreshPremium_negativeDeltas(int256,int256) (runs: 5000, μ: 472999, ~: 473379)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256,uint256) (runs: 5000, μ: 532096, ~: 541455)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 111981)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 868302)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 57695)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 916519)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 735246)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 23.26s (23.24s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 840353)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 92535)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 236041, ~: 236016)
[PASS] test_accrueLiquidityFee_exact() (gas: 841163)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 947003, ~: 971670)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 545753)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 918893)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.12s (21.10s CPU time)
Ran 15 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 197470)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 357621)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 196034, ~: 195839)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 402474, ~: 403185)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 273562, ~: 273715)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 406692, ~: 407672)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 170057)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 141063)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 20745)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 15718)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 17819)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 59784)
[PASS] test_remove_revertsWith_SpokePaused() (gas: 59890)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 174003)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 363307)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 27.97s (27.95s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDeficitReported(uint256,uint256,uint256,uint256) (runs: 5000, μ: 161017, ~: 161033)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 678546, ~: 679358)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 18212)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 26657, ~: 26657)
[PASS] test_reportDeficit_surplus_drawn_revertsWith_SurplusDeficitReported() (gas: 196169)
[PASS] test_reportDeficit_with_premium() (gas: 677955)
Logs:
Bound result 10000000000
Bound result 31536000
Bound result 5000000000
Bound result 0
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 14.24s (14.22s CPU time)
Ran 21 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 370249)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 672354)
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, μ: 371399, ~: 371582)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 665302, ~: 673713)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 249065, ~: 250042)
[PASS] test_restore_fuzz_revertsWith_SurplusAmountRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 650375, ~: 651279)
[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 244164)
[PASS] test_restore_partial_drawn() (gas: 322004)
[PASS] test_restore_partial_same_block() (gas: 317286)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 241762)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 46871)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 200540)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 200538)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 159273)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 86847)
[PASS] test_restore_revertsWith_SurplusAmountRestored() (gas: 350335)
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest() (gas: 248731)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 15768000
[PASS] test_restore_revertsWith_SurplusAmountRestored_with_interest_and_premium() (gas: 649482)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 200548)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusAmountRestored() (gas: 230731)
[PASS] test_restore_when_asset_frozen() (gas: 420920)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 18.96s (18.94s CPU time)
Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 674520363)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.10s (3.08s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 489336)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 654317, ~: 655658)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 489848, ~: 489860)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12362)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 236132)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 104308)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 94572, ~: 94572)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 40244)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 16.90s (16.87s 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, μ: 1090438, ~: 1090586)
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1470274, ~: 1470413)
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1125960, ~: 1125728)
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1176076)
[PASS] test_borrow_rounding_effect_shares() (gas: 1124943)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 65.23s (65.21s CPU time)
Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 173342)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 176771, ~: 176927)
[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 144904, ~: 144630)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 188440)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 169736)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 172095)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22464)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 6.28s (6.26s CPU time)
Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 43933)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 369505, ~: 369420)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 193285, ~: 193233)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 274503, ~: 274153)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 385674, ~: 385511)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 273257, ~: 273172)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 22.66s (22.64s CPU time)
Ran 60 tests for tests/unit/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint256,uint16,uint32,uint32,uint32) (runs: 5000, μ: 919439, ~: 919971)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 57688, ~: 57669)
[PASS] test_addAsset_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 31175, ~: 31175)
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 50957)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 50856)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 823020)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 44715)
[PASS] test_addSpoke() (gas: 126303)
[PASS] test_addSpokeToAssets() (gas: 222751)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 24758)
[PASS] test_addSpokeToAssets_revertsWith_OwnableUnauthorizedAccount() (gas: 17149)
[PASS] test_addSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 16882)
[PASS] test_deactivateAsset() (gas: 158692)
[PASS] test_deactivateAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17966)
[PASS] test_deactivateSpoke() (gas: 156015)
[PASS] test_deactivateSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18016)
[PASS] test_freezeAsset() (gas: 233347)
[PASS] test_freezeAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 18029)
[PASS] test_freezeSpoke() (gas: 249254)
[PASS] test_freezeSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18105)
[PASS] test_pauseAsset() (gas: 158702)
[PASS] test_pauseAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17986)
[PASS] test_pauseSpoke() (gas: 156006)
[PASS] test_pauseSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18037)
[PASS] test_updateFeeConfig_Scenario() (gas: 335698)
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, μ: 185948, ~: 186204)
[PASS] test_updateFeeConfig_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17683, ~: 17683)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 50125)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 52222)
[PASS] test_updateFeeReceiver_Scenario() (gas: 214425)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 983771)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 1018524)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 179912, ~: 179912)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17314, ~: 17314)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 54794)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 86334)
[PASS] test_updateInterestRateData() (gas: 71870)
[PASS] test_updateInterestRateData_revertsWith_OwnableUnauthorizedAccount() (gas: 19216)
[PASS] test_updateInterestRateStrategy() (gas: 93719)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 28677, ~: 28677)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 76714)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 66375)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 66921)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 86516, ~: 86766)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 54755)
[PASS] test_updateLiquidityFee_revertsWith_OwnableUnauthorizedAccount() (gas: 16611)
[PASS] test_updateReinvestmentController() (gas: 101621)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17205, ~: 17205)
[PASS] test_updateSpokeActive() (gas: 84294)
[PASS] test_updateSpokeActive_revertsWith_OwnableUnauthorizedAccount() (gas: 20241)
[PASS] test_updateSpokeCaps() (gas: 64465)
[PASS] test_updateSpokeCaps_revertsWith_OwnableUnauthorizedAccount() (gas: 20216)
[PASS] test_updateSpokeDrawCap() (gas: 64185)
[PASS] test_updateSpokeDrawCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20201)
[PASS] test_updateSpokePaused() (gas: 87274)
[PASS] test_updateSpokePaused_revertsWith_OwnableUnauthorizedAccount() (gas: 20308)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 64238)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_OwnableUnauthorizedAccount() (gas: 20268)
[PASS] test_updateSpokeSupplyCap() (gas: 64242)
[PASS] test_updateSpokeSupplyCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20235)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 9.92s (9.90s 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 8.73ms (649.40µ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, μ: 200005, ~: 201361)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 234651, ~: 235413)
[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, μ: 205051, ~: 185502)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 463399, ~: 453986)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 199965, ~: 195846)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 547926, ~: 538524)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 67.83s (67.83s 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, μ: 30530, ~: 30457)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 32269, ~: 32370)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 34423, ~: 34386)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.16s (3.14s 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, μ: 22969, ~: 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, μ: 20027, ~: 20085)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22726, ~: 22784)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22809, ~: 22867)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.62s (2.61s CPU time)
Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 9025)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8993)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 9014)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8981)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 9007)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 9074)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 9039)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 9027)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 9027)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 9016)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8950)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8983)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8960)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 9017)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8968)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 9046)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 18.42ms (981.27µs CPU time)
Ran 5 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 292891, ~: 293446)
[PASS] test_liquidateCollateral_fuzz_CollateralToLiquidatorIsZero(uint256) (runs: 5000, μ: 132544, ~: 132711)
[PASS] test_liquidateCollateral_fuzz_receiveShares_sharesToLiquidator(uint256,uint256) (runs: 5000, μ: 770176, ~: 770930)
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 100778, ~: 100578)
[PASS] test_liquidateCollateral_receiveShares_sharesToLiquidatorIsZero() (gas: 754719)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 12.67s (12.65s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 187789, ~: 187789)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 152234)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 158486)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 203101)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.24s (2.23s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 357276)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 75086)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 111112)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 120675)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 22.32ms (1.32ms 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, μ: 894361, ~: 894425)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 882032, ~: 882656)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 915585, ~: 916036)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1096630, ~: 1096752)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1133796, ~: 1133810)
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 679051, ~: 678762)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 648571)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 888507)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 876256)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1125215)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1125259)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 911325)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1089795)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1126330)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 674034)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1129495, ~: 1129972)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1129517, ~: 1129994)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 127.06s (127.04s 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, μ: 57453, ~: 56941)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 56332, ~: 56414)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 74865, ~: 74805)
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 60334, ~: 60135)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 56756, ~: 56719)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 70299, ~: 70244)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.60s (17.58s 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, μ: 17241, ~: 17178)
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19579, ~: 19506)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 905.95ms (888.58ms CPU time)
Ran 11 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 33193)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 150488)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_NotUsingAsCollateral() (gas: 37546)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated_ZeroCollateralFactor() (gas: 31870)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 36621)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 31638)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 31745)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 31734)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 36496)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 36512)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 38594)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 17.82ms (1.11ms CPU time)
Ran 26 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4854)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9388, ~: 9626)
[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 4013, ~: 4010)
[PASS] test_calculateLinearInterest() (gas: 4467)
[PASS] test_calculateLinearInterest_add_edge() (gas: 5043)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16815)
Logs:
Bound result 0
Bound result 1
Bound result 864000000
Bound result 864000000
[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint40) (runs: 5000, μ: 7702, ~: 7550)
[PASS] test_constants() (gas: 3167)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8694, ~: 8996)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3580, ~: 3634)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3666, ~: 3781)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3338, ~: 3338)
[PASS] test_mulDivDown_NoRemainder() (gas: 3302)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3147)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3181)
[PASS] test_mulDivDown_WithRemainder() (gas: 3236)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3768)
[PASS] test_mulDivUp_NoRemainder() (gas: 3306)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3102)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3160)
[PASS] test_mulDivUp_WithRemainder() (gas: 3305)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3884)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8707, ~: 8661)
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3416, ~: 3408)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 11451, ~: 7324)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3434, ~: 3352)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 1.42s (1.42s CPU time)
Ran 32 tests for tests/unit/misc/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 675842)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 676040, ~: 675871)
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32830)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32905)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25298)
[PASS] test_constructor() (gas: 1059102)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 65422)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17431)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17216)
[PASS] test_repayNative() (gas: 796050)
Logs:
Bound result 5000000000000000000
[PASS] test_repayNative_excessAmount() (gas: 669588)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 795496, ~: 796685)
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 680202, ~: 674406)
[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 33193)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30659)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39882)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 39286)
[PASS] test_supplyAndCollateralNative() (gas: 354431)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 354708, ~: 354437)
[PASS] test_supplyNative() (gas: 301998)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 302341, ~: 302070)
[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 33158)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 30390)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39845)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 39197)
[PASS] test_withdrawNative() (gas: 330767)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 330651, ~: 330817)
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 268626, ~: 268432)
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 634371, ~: 634367)
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32916)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32860)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25408)
Suite result: ok. 32 passed; 0 failed; 0 skipped; finished in 64.03s (64.02s 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.47s (4.47s 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, μ: 15279, ~: 15509)
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15669, ~: 15662)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12885, ~: 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, μ: 15282, ~: 15512)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11768, ~: 12247)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.37s (1.37s 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, μ: 2177582, ~: 2187385)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2390537, ~: 2398911)
[PASS] test_borrow_fuzz_single_spoke_multi_reserves_multi_user(uint256,uint256,uint256,uint256) (runs: 5000, μ: 2768304, ~: 2776311)
[PASS] test_borrow_fuzz_skip_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1080607, ~: 1080413)
[PASS] test_borrow_skip_borrow() (gas: 1079598)
Logs:
Bound result 10000000000000000000
Bound result 20000000000000000000
Bound result 31536000
[PASS] test_userAccountData_does_not_include_zero_cf_collateral() (gas: 1200853)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 170.29s (170.27s 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, μ: 2082873, ~: 1902126)
[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: 109180)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 44203)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 162282, ~: 162282)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 154625, ~: 154481)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 162044, ~: 162044)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 154604, ~: 154460)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 143618, ~: 143615)
[PASS] test_next(uint256) (runs: 5000, μ: 20466, ~: 20328)
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18221, ~: 18289)
[PASS] test_nextBorrowing_continuous() (gas: 63845326)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18158, ~: 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 96.88s (96.88s CPU time)
Ran 14 tests for tests/unit/Spoke/Spoke.Borrow.Validation.t.sol:SpokeBorrowValidationTest
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded(uint256,uint40) (runs: 5000, μ: 108053, ~: 108075)
[PASS] test_borrow_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint256) (runs: 5000, μ: 691018, ~: 691308)
[PASS] test_borrow_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 295441, ~: 295220)
[PASS] test_borrow_fuzz_revertsWith_InvalidAmount(uint256) (runs: 5000, μ: 32659, ~: 32716)
[PASS] test_borrow_fuzz_revertsWith_ReserveFrozen(uint256,uint256) (runs: 5000, μ: 69443, ~: 69241)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotBorrowable(uint256,uint256) (runs: 5000, μ: 69656, ~: 69454)
[PASS] test_borrow_fuzz_revertsWith_ReserveNotListed(uint256,uint256) (runs: 5000, μ: 26105, ~: 25850)
[PASS] test_borrow_fuzz_revertsWith_ReservePaused(uint256,uint256) (runs: 5000, μ: 69278, ~: 69076)
[PASS] test_borrow_revertsWith_InsufficientLiquidity() (gas: 295087)
Logs:
Bound result 10000000000000000000
[PASS] test_borrow_revertsWith_InvalidAmount() (gas: 34349)
Logs:
Bound result 2
[PASS] test_borrow_revertsWith_ReserveFrozen() (gas: 70847)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotBorrowable() (gas: 71036)
Logs:
Bound result 2
Bound result 1
[PASS] test_borrow_revertsWith_ReserveNotListed() (gas: 27156)
Logs:
Bound result 1
[PASS] test_borrow_revertsWith_ReservePaused() (gas: 70724)
Logs:
Bound result 2
Bound result 1
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 14.42s (14.40s CPU time)
Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12654)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33694, ~: 33370)
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11400)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 209620, ~: 209387)
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 183212)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.26s (3.24s CPU time)
Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2102520)
[PASS] test_borrow_typeHash() (gas: 9874)
[PASS] test_constructor() (gas: 53857)
[PASS] test_eip712Domain() (gas: 2108085)
[PASS] test_repay_typeHash() (gas: 9975)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9943)
[PASS] test_supply_typeHash() (gas: 9945)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 10045)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9876)
[PASS] test_withdraw_typeHash() (gas: 9919)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 18.70ms (1.71ms CPU time)
Ran 5 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 105078)
[PASS] test_permitReserve_forwards_correct_call() (gas: 52213)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 41093)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30956)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29495)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 18.19ms (1.34ms CPU time)
Ran 2 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_TransferFromFailed_on_InsufficientAllowance() (gas: 462541)
[PASS] test_supplyWithSig_revertsWith_TransferFromFailed_on_InsufficientAllowance() (gas: 84691)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 18.01ms (1.79ms CPU time)
Ran 2 tests for tests/unit/Spoke/Spoke.Borrow.t.sol:SpokeBorrowTest
[PASS] test_borrow() (gas: 1042427)
[PASS] test_borrow_fuzz_amounts(uint256,uint256) (runs: 5000, μ: 1039230, ~: 1039282)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 24.60s (24.59s CPU time)
Ran 24 tests for tests/unit/Spoke/Spoke.Config.t.sol:SpokeConfigTest
[PASS] test_addReserve() (gas: 390268)
[PASS] test_addReserve_fuzz_revertsWith_AssetNotListed() (gas: 245664)
[PASS] test_addReserve_revertsWith_InvalidAddress_hub() (gas: 6024639)
[PASS] test_addReserve_revertsWith_InvalidAddress_oracle() (gas: 6061729)
[PASS] test_addReserve_revertsWith_InvalidAssetId() (gas: 33215)
[PASS] test_addReserve_revertsWith_ReserveExists() (gas: 374811)
[PASS] test_spoke_deploy() (gas: 4957675)
[PASS] test_spoke_deploy_revertsWith_InvalidOracleDecimals() (gas: 46480)
[PASS] test_spoke_deploy_reverts_on_InvalidConstructorInput() (gas: 43881)
[PASS] test_updateLiquidationConfig_fuzz_liqBonusConfig((uint128,uint64,uint16)) (runs: 5000, μ: 52170, ~: 52161)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus((uint128,uint64,uint16)) (runs: 5000, μ: 37826, ~: 37967)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor((uint128,uint64,uint16)) (runs: 5000, μ: 37397, ~: 37177)
[PASS] test_updateLiquidationConfig_fuzz_targetHealthFactor(uint128) (runs: 5000, μ: 46918, ~: 47177)
[PASS] test_updateLiquidationConfig_liqBonusConfig() (gas: 51120)
Logs:
Bound result 900000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus() (gas: 36480)
Logs:
Bound result 1000000000000000000
Bound result 1000
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor() (gas: 36274)
Logs:
Bound result 900000000000000000
Bound result 10001
Bound result 1000000000000000000
[PASS] test_updateLiquidationConfig_targetHealthFactor() (gas: 46460)
Logs:
Bound result 1000000000000000001
[PASS] test_updateReserveConfig() (gas: 53863)
[PASS] test_updateReserveConfig_fuzz((bool,bool,bool,uint24)) (runs: 5000, μ: 55274, ~: 55108)
[PASS] test_updateReserveConfig_revertsWith_InvalidCollateralRisk() (gas: 39632)
[PASS] test_updateReserveConfig_revertsWith_ReserveNotListed() (gas: 36285)
[PASS] test_updateReservePriceSource() (gas: 240136)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 31147, ~: 31147)
[PASS] test_updateReservePriceSource_revertsWith_ReserveNotListed() (gas: 34365)
Suite result: ok. 24 passed; 0 failed; 0 skipped; finished in 3.69s (3.68s CPU time)
Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190157, ~: 190157)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38560)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37002)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190113, ~: 190113)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38493)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37068)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 233736, ~: 233736)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38521)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37117)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190176, ~: 190176)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38538)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37033)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 67897, ~: 67897)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25626)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27058)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 67940, ~: 67940)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25631)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27146)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190110, ~: 190110)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38580)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37066)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 42.68s (42.66s 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, μ: 13902, ~: 13902)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13902, ~: 13902)
[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, μ: 13900, ~: 13900)
[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, μ: 13967, ~: 13967)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.15s (7.12s 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: 80540)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 113129)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 73090)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 140969)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 82620)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 82605)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 80663)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.09ms (4.13ms 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: 78339)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 110928)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 70889)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 138768)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 80419)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 80404)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 78462)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 20.68ms (4.04ms CPU time)
Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 804817)
[PASS] test_renouncePositionManagerRole() (gas: 26829)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18352)
[PASS] test_repayWithSig() (gas: 796512)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 294928)
[PASS] test_setUsingAsCollateralWithSig() (gas: 636696)
[PASS] test_supplyWithSig() (gas: 588776)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 307498)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 886214)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 16886, ~: 16886)
[PASS] test_withdrawWithSig() (gas: 586115)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 430.28ms (413.41ms CPU time)
Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 2612806)
[PASS] testAccess_hub_functions_callable_b...*[Comment body truncated]* |
♻️ Forge Gas Snapshots
🔕 Unchanged
|
yan-man
approved these changes
Nov 6, 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.
Uh oh!
There was an error while loading. Please reload this page.