Draft
Conversation
| // Since fromRayUp(a) + fromRayUp(b) >= fromRayUp(a+b), expectedFees >= accruedFees | ||
| uint256 expectedFees = hub1.getSpokeTotalOwed(assetId, address(spoke1)) - borrowAmount; | ||
| assertGe(expectedFees, accruedFees, 'spoke owed >= accrued fees'); | ||
| assertApproxEqAbs(accruedFees, expectedFees, 1, 'fees == total spoke accrued'); |
Contributor
There was a problem hiding this comment.
If they are within 1, I don't think we need the assertGe above this check. Also perhaps can reduce the comments here, and in general in this pr
| assertLe(actualFeesAccrued, feesAccrued, 'actual fees <= expected fees'); | ||
|
|
||
| // With 100% fee, actualFeesAccrued = getSpokeAddedAssets(treasury) + feesAccrued >= feesAccrued | ||
| assertGe(actualFeesAccrued, feesAccrued, 'actual fees >= expected fees'); |
Contributor
There was a problem hiding this comment.
Can we do a more precise check perhaps than assertGe?
🌈 Test ResultsNo files changed, compilation skipped
Ran 1 test for tests/unit/Spoke/Spoke.UpdateUserDynamicConfig.t.sol:SpokeUpdateUserDynamicConfigTest
[PASS] test_updateUserDynamicConfig_revertsWith_ReentrancyGuardReentrantCall() (gas: 631868)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 28.74ms (851.75µs CPU time)
Ran 1 test for tests/unit/Spoke/Spoke.UpdateUserRiskPremium.t.sol:SpokeUpdateUserRiskPremiumTest
[PASS] test_updateUserRiskPremium_revertsWith_ReentrancyGuardReentrantCall() (gas: 630870)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 24.44ms (848.64µs CPU time)
Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1325737)
[PASS] test_liquidation_full() (gas: 10890130)
[PASS] test_liquidation_partial() (gas: 10889547)
[PASS] test_liquidation_receiveShares_full() (gas: 10872559)
[PASS] test_liquidation_receiveShares_partial() (gas: 10871978)
[PASS] test_liquidation_reportDeficit_full() (gas: 10868313)
[PASS] test_multicall_ops() (gas: 1404318)
[PASS] test_repay() (gas: 868448)
[PASS] test_setUserPositionManagersWithSig() (gas: 307152)
[PASS] test_supply() (gas: 539070)
[PASS] test_updateRiskPremium() (gas: 1315663)
[PASS] test_updateUserDynamicConfig() (gas: 587622)
[PASS] test_usingAsCollateral() (gas: 1470708)
[PASS] test_withdraw() (gas: 1947184)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 94.00ms (34.93ms CPU time)
Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 1092171)
[PASS] test_liquidation_full() (gas: 10755384)
[PASS] test_liquidation_partial() (gas: 10754801)
[PASS] test_liquidation_receiveShares_full() (gas: 10737813)
[PASS] test_liquidation_receiveShares_partial() (gas: 10737232)
[PASS] test_liquidation_reportDeficit_full() (gas: 10792631)
[PASS] test_multicall_ops() (gas: 1321725)
[PASS] test_repay() (gas: 777589)
[PASS] test_setUserPositionManagersWithSig() (gas: 311606)
[PASS] test_supply() (gas: 541751)
[PASS] test_updateRiskPremium() (gas: 943212)
[PASS] test_updateUserDynamicConfig() (gas: 592076)
[PASS] test_usingAsCollateral() (gas: 1088944)
[PASS] test_withdraw() (gas: 1587503)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 79.60ms (31.16ms CPU time)
Ran 4 tests for tests/unit/Spoke/Spoke.PermitReserve.t.sol:SpokePermitReserveTest
[PASS] test_permitReserve() (gas: 88227)
[PASS] test_permitReserve_forwards_correct_call() (gas: 35554)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 24390)
[PASS] test_permitReserve_revertsWith_ReserveNotListedIn() (gas: 22949)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 24.38ms (1.03ms CPU time)
Ran 10 tests for tests/unit/Spoke/Spoke.PositionManager.t.sol:SpokePositionManagerTest
[PASS] test_onlyPositionManager_on_borrow() (gas: 538543)
[PASS] test_onlyPositionManager_on_repay() (gas: 563846)
[PASS] test_onlyPositionManager_on_supply() (gas: 291768)
[PASS] test_onlyPositionManager_on_updateUserDynamicConfig() (gas: 1287971)
[PASS] test_onlyPositionManager_on_updateUserRiskPremium() (gas: 1525682)
[PASS] test_onlyPositionManager_on_usingAsCollateral() (gas: 144395)
[PASS] test_onlyPositionManager_on_withdraw() (gas: 320754)
[PASS] test_renouncePositionManagerRole() (gas: 20268)
[PASS] test_renouncePositionManagerRole_noop_from_disabled() (gas: 21904)
[PASS] test_setApprovalForPositionManager(bytes32) (runs: 5000, μ: 18111, ~: 18111)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 434.23ms (410.48ms CPU time)
Ran 20 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_DECIMALS() (gas: 8326)
[PASS] test_constructor() (gas: 18428)
[PASS] test_description() (gas: 12039)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 19885, ~: 20214)
Logs:
Bound result 1
[PASS] test_getReservePrice() (gas: 48776)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 48047)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10898)
[PASS] test_getReservePrices() (gas: 80715)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 50930)
[PASS] test_getReserveSource() (gas: 48946)
[PASS] test_setReserveSource() (gas: 45988)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 102779)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17228)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 17065)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 13021)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5040654)
[PASS] test_setSpoke() (gas: 5068555)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10870)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13397, ~: 13397)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15080)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 1.12s (1.09s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.Repay.EdgeCases.t.sol:SpokeRepayEdgeCaseTest
[PASS] test_fuzz_repay_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 701321, ~: 701240)
Logs:
Bound result 10655200122
Bound result 561486956
Bound result 520141244
[PASS] test_repay_less_than_share() (gas: 600143)
[PASS] test_repay_only_base_debt_interest() (gas: 766385)
[PASS] test_repay_only_base_debt_no_premium() (gas: 644407)
[PASS] test_repay_supply_ex_rate_decr() (gas: 1466873)
[PASS] test_repay_supply_ex_rate_decr_skip_time() (gas: 1463491)
[PASS] test_repay_zero_shares_nonzero_premium_debt() (gas: 764271)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 15.75s (15.72s CPU time)
Ran 17 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1981460, ~: 1980367)
Logs:
Bound result 9
Bound result 10
[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1528820, ~: 1527966)
Logs:
Bound result 9
Bound result 10
[PASS] test_grantRole() (gas: 315886)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 916110, ~: 919753)
Logs:
Bound result 8
[PASS] test_revokeRole() (gas: 323138)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2159661, ~: 2257477)
Logs:
Bound result 12
[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5000, μ: 1974061, ~: 2114661)
Logs:
Bound result 12
[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606131)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577217)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602311)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378311)
[PASS] test_setRoleGuardian_trackRoles() (gas: 263932)
[PASS] test_setTargetFunctionRole() (gas: 414440)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1103911)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 894967)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 30940)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 549104)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 22.82s (22.81s CPU time)
Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24326)
Logs:
Bound result 2000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
Bound result 10000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24188, ~: 24330)
Logs:
Bound result 137
Bound result 252173843969976304268974536488
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25304, ~: 25351)
Logs:
Bound result 8137
Bound result 252173843969976304268974536488
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18771)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19070, ~: 18822)
Logs:
Bound result 3124043968137
[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11225)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3746)
[PASS] test_getBaseVariableBorrowRate() (gas: 14812)
[PASS] test_getInterestRateData() (gas: 19290)
[PASS] test_getMaxVariableBorrowRate() (gas: 15258)
[PASS] test_getOptimalUsageRatio() (gas: 14705)
[PASS] test_getVariableRateSlope1() (gas: 14791)
[PASS] test_getVariableRateSlope2() (gas: 14746)
[PASS] test_maxBorrowRate() (gas: 8312)
[PASS] test_maxOptimalRatio() (gas: 8312)
[PASS] test_minOptimalRatio() (gas: 8321)
[PASS] test_setInterestRateData() (gas: 68999)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 41819)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42380)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35269)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23502)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 37658)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 1.16s (1.15s CPU time)
Ran 8 tests for tests/unit/Spoke/Spoke.Upgradeable.t.sol:SpokeUpgradeableTest
[PASS] test_implementation_constructor_fuzz(uint64) (runs: 5000, μ: 6810642, ~: 6810642)
[PASS] test_proxy_constructor_fuzz(uint64) (runs: 5000, μ: 6833828, ~: 6833820)
Logs:
Bound result 649
[PASS] test_proxy_constructor_fuzz_revertsWith_InvalidInitialization(uint64) (runs: 5000, μ: 13612162, ~: 13612154)
Logs:
Bound result 649
[PASS] test_proxy_constructor_revertsWith_InvalidAddress() (gas: 5039468)
[PASS] test_proxy_constructor_revertsWith_InvalidInitialization_ZeroRevision() (gas: 6808027)
[PASS] test_proxy_reinitialization_fuzz(uint64) (runs: 5000, μ: 15191806, ~: 15191789)
Logs:
Bound result 649
[PASS] test_proxy_reinitialization_revertsWith_CallerNotProxyAdmin() (gas: 11843983)
[PASS] test_proxy_reinitialization_revertsWith_InvalidAddress() (gas: 11844718)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 26.00s (25.98s CPU time)
Ran 6 tests for tests/unit/Spoke/Spoke.UserAccountData.t.sol:SpokeUserAccountDataTest
[PASS] test_userAccountData_scenario1() (gas: 501749)
[PASS] test_userAccountData_scenario2() (gas: 562599)
[PASS] test_userAccountData_scenario3() (gas: 562845)
[PASS] test_userAccountData_scenario4() (gas: 837921)
[PASS] test_userAccountData_scenario5() (gas: 720353)
[PASS] test_userAccountData_scenario6() (gas: 690374)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 30.38ms (4.56ms CPU time)
Ran 10 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 13531)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6805, ~: 6805)
[PASS] test_hash_positionManagerUpdate_fuzz((address,bool)) (runs: 5000, μ: 6193, ~: 6193)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6806, ~: 6806)
[PASS] test_hash_setUserPositionManagers_fuzz((address,(address,bool)[],uint256,uint256)) (runs: 5000, μ: 453554, ~: 449260)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7305, ~: 7305)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6849, ~: 6849)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6450, ~: 6450)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6471, ~: 6471)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6805, ~: 6805)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 21.75s (21.75s CPU time)
Ran 3 tests for tests/unit/misc/ExtSload.t.sol:ExtSloadTest
[PASS] test_extSload(bytes32) (runs: 5000, μ: 9767, ~: 9767)
[PASS] test_extSloads(uint256) (runs: 5000, μ: 950474, ~: 926350)
Logs:
Bound result 812
[PASS] test_extSloads(uint256,bytes) (runs: 5000, μ: 1008291, ~: 970986)
Logs:
Bound result 362
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 60.73s (60.73s CPU time)
Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17151)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 41629, ~: 41629)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13119)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 13791)
[PASS] test_registerSpoke_unregister() (gas: 36076)
[PASS] test_renouncePositionManagerRole() (gas: 65293)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 74220)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74439)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 401.47ms (377.88ms CPU time)
Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 918137)
[PASS] test_repayNative() (gas: 989507)
[PASS] test_supplyAndCollateralNative() (gas: 305191)
[PASS] test_supplyNative() (gas: 286672)
[PASS] test_withdrawNative() (gas: 508764)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 48.26ms (4.16ms CPU time)
Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 745414)
[PASS] test_repayWithSig() (gas: 980290)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209574)
[PASS] test_setUsingAsCollateralWithSig() (gas: 289367)
[PASS] test_supplyWithSig() (gas: 460951)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145257)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143188)
[PASS] test_withdrawWithSig() (gas: 409924)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 50.65ms (7.66ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 206688)
[PASS] test_change_role_responsibility() (gas: 121256)
[PASS] test_hub_access_manager_exposure() (gas: 13439)
[PASS] test_hub_admin_access() (gas: 1350380)
[PASS] test_migrate_role_responsibility() (gas: 708973)
[PASS] test_setInterestRateData_access() (gas: 102663)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.54ms (3.84ms CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 133148)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 632442, ~: 632271)
Logs:
Bound result 9
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 250235, ~: 250237)
Logs:
Bound result 9
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 579271, ~: 579703)
Logs:
Bound result 68691281934999
Bound result 0
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 538634, ~: 538996)
Logs:
Bound result 68691281934999
Bound result 0
[SKIP: pending rft] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 0, μ: 0, ~: 0)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 4051529, ~: 4067556)
Logs:
Bound result 21895
Bound result 300000000000000000000000000
Bound result 238
Bound result 33562733834177737067
Bound result 10536
Bound result 1712
Bound result 13000
Bound result 2514
Bound result 6576
Bound result 14242
Bound result 12585
Bound result 22572
Bound result 12742
Bound result 10536
Bound result 1712
Bound result 13000
Bound result 2514
Suite result: ok. 6 passed; 0 failed; 1 skipped; finished in 115.65s (115.63s 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, μ: 540588, ~: 540644)
Logs:
Bound result 31614
Bound result 480000000
Bound result 2
Bound result 773487948
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 797808, ~: 797909)
Logs:
Bound result 4343
Bound result 480000000
Bound result 0
Bound result 835
Bound result 16662
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 639972524)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 261407150)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 540706)
Logs:
Bound result 5000
Bound result 34560000
Bound result 2
Bound result 500000000000000000000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 18.78s (18.76s CPU time)
Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 667323)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 157885, ~: 157840)
Logs:
Bound result 9
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 332463, ~: 332624)
Logs:
Bound result 3
Bound result 218470873395738003579119570309
Bound result 446067553769140138733721804
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112436, ~: 112391)
Logs:
Bound result 9
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 267381, ~: 267118)
Logs:
Bound result 306530331032
Bound result 980000000000000000
Bound result 12358
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 224032, ~: 224229)
Logs:
Bound result 999999999900000000000000000241
Bound result 1233646065
Bound result 3
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 342375, ~: 342395)
Logs:
Bound result 2
Bound result 378088810586379137523864648212
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 806015, ~: 805922)
Logs:
Bound result 500000000000000000000000
Bound result 704000000
[PASS] test_add_multi_add_minimal_shares() (gas: 322799)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 197165)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64504)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13631)
[PASS] test_add_revertsWith_InvalidShares() (gas: 223627)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224355)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 99705)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99741)
[PASS] test_add_single_asset() (gas: 330244)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 301465)
[PASS] test_add_with_increased_index_with_premium() (gas: 680810)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 45.31s (45.28s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 862471)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 122174)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 245260, ~: 245218)
Logs:
Bound result 9
[PASS] test_accrueLiquidityFee_exact() (gas: 868383)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 949214, ~: 961264)
Logs:
Bound result 68691281934999
Bound result 0
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 545998)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 894642)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 19.58s (19.55s CPU time)
Ran 21 tests for tests/unit/Spoke/Spoke.Withdraw.HealthFactor.t.sol:SpokeWithdrawHealthFactorTest
[PASS] test_unsetCollateral_fuzz_revertsWith_HealthFactorBelowThreshold(uint256) (runs: 5000, μ: 761258, ~: 760870)
Logs:
Bound result 3124043968137
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_interest_increase(uint256,uint256) (runs: 5000, μ: 655740, ~: 656103)
Logs:
Bound result 2
Bound result 595590744
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 883517, ~: 883674)
Logs:
Bound result 8936218498763515
Bound result 51848526221
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1168318, ~: 1168780)
Logs:
Bound result 10000
Bound result 22219
Bound result 5000000000000
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1168863, ~: 1168797)
Logs:
Bound result 500000000
Bound result 22219
Bound result 5000000000000
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256) (runs: 5000, μ: 937329, ~: 938043)
Logs:
Bound result 8936218498763515
Bound result 51848526221
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1004805, ~: 1004254)
Logs:
Bound result 32079202706852892415564980452
Bound result 3
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_price_drop(uint256,uint256,uint256) (runs: 5000, μ: 1276919, ~: 1276625)
Logs:
Bound result 3750000000
Bound result 670000000000000000
Bound result 1290
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1042093, ~: 1041701)
Logs:
Bound result 480000000
Bound result 670000000000000000
Bound result 1290
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_price_drop(uint256,uint256) (runs: 5000, μ: 891268, ~: 891600)
Logs:
Bound result 195048251870
Bound result 160047259400334145866830271
[PASS] test_withdraw_fuzz_revertsWith_HealthFactorBelowThreshold_singleBorrow(uint256) (runs: 5000, μ: 621129, ~: 621093)
Logs:
Bound result 422056457348955450402177305176
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_interest_increase() (gas: 650833)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 879125)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_dai() (gas: 1162629)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_price_drop_weth() (gas: 1162631)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 933065)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 999352)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts_price_drop() (gas: 1270068)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1035437)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_price_drop() (gas: 886092)
[PASS] test_withdraw_revertsWith_HealthFactorBelowThreshold_singleBorrow() (gas: 622132)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 160.68s (160.66s 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, μ: 1043418, ~: 1043522)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5000, μ: 1416603, ~: 1416685)
Logs:
Bound result 2428830011
Bound result 3000000000000000000
Bound result 627576576
[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5000, μ: 1085828, ~: 1085577)
Logs:
Bound result 68691281934999
Bound result 832464101
[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1146206)
[PASS] test_borrow_rounding_effect_shares() (gas: 1084839)
Logs:
Bound result 5000000000000000000
Bound result 94608000
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 58.47s (58.44s CPU time)
Ran 5 tests for tests/unit/Spoke/Spoke.Withdraw.Scenario.t.sol:SpokeWithdrawScenarioTest
[PASS] test_withdraw_fuzz_all_liquidity_with_interest_multi_user((uint256,uint256,uint256,uint256,uint256[2],uint256)) (runs: 5000, μ: 943639, ~: 963319)
Logs:
Bound result 3
Bound result 8280118470698177
Bound result 856413930177073271
Bound result 198561005
Bound result 4977022
Bound result 18500505542859128
Bound result 2
[PASS] test_withdraw_fuzz_partial_full_with_interest(uint256,uint256,uint256,uint40) (runs: 5000, μ: 713194, ~: 713165)
Logs:
Bound result 513645760948659913
Bound result 174739688449221050
Bound result 34557394232813354
Bound result 15813241
[PASS] test_withdraw_round_trip_deposit_withdraw(uint256,uint256,address,uint256) (runs: 5000, μ: 412884, ~: 412862)
Logs:
Bound result 4
Bound result 15665
Bound result 12500000000000000000000000000
[PASS] test_withdraw_round_trip_withdraw_deposit(uint256,uint256,uint256,address,uint256) (runs: 5000, μ: 433677, ~: 432976)
Logs:
Bound result 0
Bound result 576000000000000000
Bound result 121075139883606912489964729787
Bound result 878924860115817087510035286744
[PASS] test_withdraw_underwater_reserve_not_collateral() (gas: 816667)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 61.19s (61.16s CPU time)
Ran 38 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 390339, ~: 390378)
Logs:
Bound result 18
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 45290, ~: 44992)
Logs:
Bound result 10
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 45333, ~: 45035)
Logs:
Bound result 10
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 36719, ~: 36719)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 45943, ~: 45986)
Logs:
Bound result 36
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 46022, ~: 46308)
Logs:
Bound result 0
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 82037407383, ~: 34963)
Logs:
Bound result 17
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 956632)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 953768)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 48980)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 126674, ~: 126724)
Logs:
Bound result 1
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 35246, ~: 35235)
Logs:
Bound result 13951
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33929, ~: 33979)
Logs:
Bound result 1
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 39773)
[PASS] test_getAssetId() (gas: 73160)
[PASS] test_getAssetId_fuzz_revertsWith_AssetNotListed(address) (runs: 5000, μ: 18561, ~: 18561)
[PASS] test_hub_deploy_reverts_on_InvalidConstructorInput() (gas: 829353)
[PASS] test_hub_max_riskPremium() (gas: 8610)
[PASS] test_isUnderlyingListed() (gas: 1178398)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 719515)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 618854)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 70706)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 269309, ~: 269625)
Logs:
Bound result 3
Bound result 258
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 822286, ~: 822147)
Logs:
Bound result 3
Bound result 1
Bound result 3
Bound result 0
Bound result 3
Bound result 1
[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 724800, ~: 724661)
Logs:
Bound result 3
Bound result 1
Bound result 3
Bound result 1
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 824066, ~: 824100)
Logs:
Bound result 3
Bound result 3
Bound result 1000
[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 698497, ~: 698531)
Logs:
Bound result 3
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 875722, ~: 875756)
Logs:
Bound result 3
Bound result 3
Bound result 3
Bound result 1000
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 700560, ~: 700613)
Logs:
Bound result 3
Bound result 3
Bound result 1000
Bound result 3
Bound result 1000
Bound result 3
Bound result 0
Bound result 3
Bound result 0
Bound result 3
Bound result 0
Bound result 3
Bound result 0
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 61083, ~: 61136)
Logs:
Bound result 3
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 40149, ~: 40042)
Logs:
Bound result 3
Bound result 258
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 485636)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 198802, ~: 199250)
Logs:
Bound result 3
Bound result 15
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 95918, ~: 96293)
Logs:
Bound result 0
Bound result 12
[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 880198)
Logs:
Bound result 1
Bound result 500
Bound result 3
Bound result 1000
Bound result 5
Bound result 500
Bound result 3
Bound result 1000
[PASS] test_updateSpokeConfig_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 59224, ~: 59284)
Logs:
Bound result 3
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40525, ~: 40592)
Logs:
Bound result 0
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29639)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 95.73s (95.70s CPU time)
Ran 6 tests for tests/unit/Spoke/Spoke.Withdraw.Validation.t.sol:SpokeWithdrawValidationTest
[PASS] test_withdraw_fuzz_revertsWith_InsufficientLiquidity_with_debt(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 430637, ~: 430734)
Logs:
Bound result 0
Bound result 1416089352958
Bound result 297625380355
Bound result 65411
Bound result 842872994
[PASS] test_withdraw_fuzz_revertsWith_InsufficientSupply_zero_supplied(uint256) (runs: 5000, μ: 55096, ~: 54808)
Logs:
Bound result 3124043968137
[PASS] test_withdraw_revertsWith_InsufficientLiquidity_with_debt() (gas: 427152)
[PASS] test_withdraw_revertsWith_InvalidAmount_zero_supplied() (gas: 51428)
[PASS] test_withdraw_revertsWith_ReserveNotListed() (gas: 22408)
[PASS] test_withdraw_revertsWith_ReservePaused() (gas: 62929)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 5.84s (5.82s CPU time)
Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 355586)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 697058, ~: 696998)
Logs:
Bound result 3
Bound result 100
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 289083, ~: 289101)
Logs:
Bound result 3
Bound result 100
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5000, μ: 82326, ~: 82282)
Logs:
Bound result 9
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 287131, ~: 287374)
Logs:
Bound result 1291
Bound result 70309
Bound result 173721804
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 34737, ~: 34510)
Logs:
Bound result 3
Bound result 100
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 172769, ~: 172482)
Logs:
Bound result 3124043968137
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 134490, ~: 134288)
Logs:
Bound result 3124043968137
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 16138, ~: 16138)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 270496)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28287)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 169093)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 131624)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 16269)
[PASS] test_draw_revertsWith_SpokeHalted() (gas: 61452)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 61391)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 23.38s (23.36s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 663797, ~: 663797)
[PASS] test_eliminateDeficit_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 32580, ~: 32580)
[PASS] test_eliminateDeficit_fuzz_revertsWith_ArithmeticUnderflow_CallerSpokeNoFunds(uint256) (runs: 5000, μ: 352111, ~: 352111)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 36025)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 348288)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_on_UnregisteredCoveredSpoke() (gas: 36412)
[PASS] test_eliminateDeficit_revertsWith_SpokeNotActive_on_UnregisteredAsset() (gas: 384110)
[PASS] test_eliminateDeficit_revertsWith_callerSpokeNotActive() (gas: 159412)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 16.50s (16.47s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.MintFeeShares.t.sol:HubMintFeeSharesTest
[PASS] test_mintFeeShares() (gas: 312233)
[PASS] test_mintFeeShares_noFees() (gas: 368129)
[PASS] test_mintFeeShares_noShares() (gas: 293127)
[PASS] test_mintFeeShares_revertsWith_AccessManagedUnauthorized() (gas: 24139)
[PASS] test_mintFeeShares_revertsWith_AssetNotListed() (gas: 27553)
[PASS] test_mintFeeShares_revertsWith_SpokeNotActive() (gas: 242825)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.96ms (3.94ms CPU time)
Ran 9 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 270122)
[PASS] test_deficit() (gas: 1342173)
[PASS] test_draw() (gas: 418574)
[PASS] test_mintFeeShares() (gas: 500012)
[PASS] test_payFee_transferShares() (gas: 968770)
[PASS] test_refreshPremium() (gas: 634540)
[PASS] test_remove() (gas: 310685)
[PASS] test_restore() (gas: 878028)
[PASS] test_restore_with_transfer() (gas: 878693)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 49.53ms (6.94ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 703955, ~: 704125)
Logs:
Bound result 68691281934999
Bound result 0
Bound result 100
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 704416, ~: 704673)
Logs:
Bound result 615514462186775432459
Bound result 10765498
Bound result 571193127101173104469
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20356)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 61390)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 138736)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 643508)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 25.22s (25.20s CPU time)
Ran 8 tests for tests/unit/Spoke/Spoke.Repay.Scenario.t.sol:SpokeRepayScenarioTest
[PASS] test_fuzz_repay_borrow_twice_repay_twice((uint256,uint256,uint256,uint40),(uint256,uint256,uint256,uint40)) (runs: 5000, μ: 1255682, ~: 1260413)
Logs:
Bound result 7446
Bound result 5671
Bound result 650000000000000000
Bound result 7238
Bound result 3207
Bound result 5010
[PASS] test_fuzz_repay_multiple_users_repay_same_reserve((uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),uint256) (runs: 5000, μ: 2025242, ~: 1998567)
Logs:
Bound result 16112
Bound result 750000000000000000000
Bound result 300000000
Bound result 3294
Bound result 12
Bound result 1650000000000000000
Bound result 10431
[PASS] test_repay_fuzz_multiple_users_multiple_assets(((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),uint40) (runs: 5000, μ: 6055298, ~: 6055620)
Logs:
Bound result 14236
Bound result 1000000000000000000000000
Bound result 1634
Bound result 20985
Bound result 2500000000000000000000000000
Bound result 216
Bound result 5169
Bound result 184
Bound result 15973
Bound result 5000000000000000000000
Bound result 11648
Bound result 583003452
Bound result 7900
Bound result 9500000000000000000000
Bound result 108777730950657423409358146872389265620318417278482925710176337674170366164991
Bound result 3774700636
Bound result 25
Bound result 78340066645871065499466465281
Bound result 15503
Bound result 20000
Bound result 31536000
Bound result 36
Bound result 16096
Bound result 14552
Bound result 8936
[PASS] test_repay_fuzz_two_users_multiple_assets(((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),uint40) (runs: 5000, μ: 4288684, ~: 4288941)
Logs:
Bound result 2238
Bound result 1383378920
Bound result 125000000000000000
Bound result 2514000705
Bound result 75000000000000000000000
Bound result 10600
Bound result 865400000000000000
Bound result 105043461164273464021752700502650212874950645272684403332447275062290229477920
Bound result 13052238805970149254
Bound result 255
Bound result 102797135663890432
Bound result 7222
Bound result 115792089237316195417293883273301227089774477609353836086818603170880863338494
Bound result 1500000000000000000000000000
Bound result 1278
Bound result 1000000000000
Bound result 737
[PASS] test_repay_partial_then_max() (gas: 690484)
[PASS] test_repay_round_trip_borrow_repay(uint256,uint256,uint40,address,uint256) (runs: 5000, μ: 872228, ~: 875900)
Logs:
Bound result 1
Bound result 49999999999999999998
Bound result 192934
Bound result 1
[PASS] test_repay_round_trip_repay_borrow(uint256,uint256,uint256,uint40,address,uint256) (runs: 5000, μ: 953738, ~: 962925)
Logs:
Bound result 0
Bound result 15658
Bound result 13123
Bound result 100000000000000000000000000000
Bound result 30000000000000000000000
[PASS] test_repay_two_users_repay_same_reserve((uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),uint256) (runs: 5000, μ: 1463721, ~: 1494116)
Logs:
Bound result 5401549876140600956580819487
Bound result 65251468040295843421393
Bound result 11263328023241632836759
Bound result 7707153379656042561281651440489383780992440
Bound result 681445185
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 307.37s (307.35s CPU time)
Ran 2 tests for tests/unit/Spoke/Spoke.Repay.Validation.t.sol:SpokeRepayValidationTest
[PASS] test_repay_revertsWith_ReserveNotListed() (gas: 23228)
[PASS] test_repay_revertsWith_ReservePaused() (gas: 63748)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 24.73ms (391.80µs CPU time)
Ran 11 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 652763)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 635215)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 654446, ~: 653704)
Logs:
Bound result 615514462186775432459
Bound result 571193127101173104469
Bound result 564283877115702805413
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 743815)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 13093)
[PASS] test_reclaim_revertsWith_InsufficientTransferred() (gas: 456508)
[PASS] test_reclaim_revertsWith_InsufficientTransferred_noSwept() (gas: 102549)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 92719)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93602, ~: 93602)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40516)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 619860)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 14.93s (14.91s CPU time)
Ran 14 tests for tests/unit/Spoke/Spoke.Withdraw.t.sol:SpokeWithdrawTest
[PASS] test_fuzz_withdraw_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 730959, ~: 732931)
Logs:
Bound result 100
Bound result 68691281934999
[PASS] test_withdraw_all_liquidity() (gas: 238613)
[PASS] test_withdraw_all_liquidity_with_interest_no_premium() (gas: 798403)
[PASS] test_withdraw_all_liquidity_with_interest_with_premium() (gas: 805965)
[PASS] test_withdraw_fuzz_all_elapsed_with_interest(uint256,uint256,uint40) (runs: 5000, μ: 661016, ~: 661149)
Logs:
Bound result 528020163876968457821593886488
Bound result 10045030247183841305493547549
Bound result 75620
[PASS] test_withdraw_fuzz_all_greater_than_supplied(uint256) (runs: 5000, μ: 241633, ~: 241432)
Logs:
Bound result 3124043968137
[PASS] test_withdraw_fuzz_all_liquidity_with_interest_no_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 871349, ~: 871862)
Logs:
Bound result 0
Bound result 2
Bound result 1
Bound result 2
Bound result 286517826
[PASS] test_withdraw_fuzz_all_liquidity_with_interest_with_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 875839, ~: 875882)
Logs:
Bound result 0
Bound result 2
Bound result 1
Bound result 2
Bound result 286517826
[PASS] test_withdraw_fuzz_all_with_interest(uint256,uint256) (runs: 5000, μ: 674039, ~: 673960)
Logs:
Bound result 882970742685671417854463684075
Bound result 9000
[PASS] test_withdraw_fuzz_suppliedAmount(uint256) (runs: 5000, μ: 243226, ~: 243024)
Logs:
Bound result 3124043968137
[PASS] test_withdraw_max_greater_than_supplied() (gas: 222061)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 654722)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 402087)
[PASS] test_withdraw_same_block() (gas: 243744)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 77.88s (77.85s 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, μ: 910793, ~: 910766)
Logs:
Bound result 100
Bound result 68691281934999
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5000, μ: 857325, ~: 857772)
Logs:
Bound result 117300740
Bound result 6894
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 893987, ~: 894061)
Logs:
Bound result 1809
Bound result 5000000000000
Bound result 7345
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5000, μ: 1097930, ~: 1098163)
Logs:
Bound result 99999999999068691281935000
Bound result 99999999999000000000000101
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 1137319, ~: 1137440)
Logs:
Bound result 2
Bound result 104118608034233039444323595906
Bound result 853035505
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5000, μ: 673608, ~: 673780)
Logs:
Bound result 7422
Bound result 2157
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 641078)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 905016)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 851553)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1125238)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1125282)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 889070)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1090403)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1129105)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 668486)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5000, μ: 1129400, ~: 1129763)
Logs:
Bound result 1389
Bound result 3319
Bound result 259200000
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5000, μ: 1129864, ~: 1129785)
Logs:
Bound result 1389
Bound result 3319
Bound result 259200000
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 124.82s (124.80s CPU time)
Ran 16 tests for tests/unit/SpokeConfigurator.GranularAccessControl.t.sol:SpokeConfiguratorGranularAccessControlTest
[PASS] test_fuzz_unauthorized_cannotCall_liquidationConfigManagerMethods(address) (runs: 5000, μ: 117059, ~: 117059)
[PASS] test_fuzz_unauthorized_cannotCall_positionManagerAdminMethods(address) (runs: 5000, μ: 39761, ~: 39761)
[PASS] test_fuzz_unauthorized_cannotCall_reserveManagerMethods(address) (runs: 5000, μ: 483447, ~: 483447)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationConfig() (gas: 62503)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationTargetHealthFactor() (gas: 62044)
[PASS] test_liquidationConfigManager_cannotCall_anyPositionManagerAdminMethod() (gas: 38976)
[PASS] test_liquidationConfigManager_cannotCall_anyReserveMethod() (gas: 486121)
[PASS] test_positionManagerAdmin_canCall_updatePositionManager() (gas: 75206)
[PASS] test_positionManagerAdmin_cannotCall_anyLiquidationConfigMethod() (gas: 117021)
[PASS] test_positionManagerAdmin_cannotCall_anyReserveMethod() (gas: 485869)
[PASS] test_reserveManager_canCall_freezeAllReserves() (gas: 156806)
[PASS] test_reserveManager_canCall_pauseAllReserves() (gas: 156791)
[PASS] test_reserveManager_canCall_updateFrozen() (gas: 65173)
[PASS] test_reserveManager_canCall_updatePaused() (gas: 65119)
[PASS] test_reserveManager_cannotCall_anyLiquidationConfigMethod() (gas: 116976)
[PASS] test_reserveManager_cannotCall_anyPositionManagerAdminMethod() (gas: 38975)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 6.46s (6.44s CPU time)
Ran 51 tests for tests/unit/SpokeConfigurator.t.sol:SpokeConfiguratorTest
[PASS] test_addCollateralFactor() (gas: 125615)
[PASS] test_addCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29173)
[PASS] test_addDynamicReserveConfig() (gas: 105429)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29344)
[PASS] test_addLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29072)
[PASS] test_addLiquidationFee() (gas: 125602)
[PASS] test_addLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29073)
[PASS] test_addMaxLiquidationBonus() (gas: 125652)
[PASS] test_addReserve() (gas: 456697)
[PASS] test_addReserve_revertsWith_AccessManagedUnauthorized() (gas: 30019)
[PASS] test_addReserve_revertsWith_MaximumReservesReached() (gas: 289234)
[PASS] test_freezeAllReserves() (gas: 202540)
[PASS] test_freezeAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26853)
[PASS] test_freezeReserve() (gas: 72273)
[PASS] test_freezeReserve_revertsWith_AccessManagedUnauthorized() (gas: 28955)
[PASS] test_pauseAllReserves() (gas: 202442)
[PASS] test_pauseAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26808)
[PASS] test_pauseReserve() (gas: 72245)
[PASS] test_pauseReserve_revertsWith_AccessManagedUnauthorized() (gas: 28976)
[PASS] test_updateBorrowable() (gas: 102767)
[PASS] test_updateBorrowable_revertsWith_AccessManagedUnauthorized() (gas: 29057)
[PASS] test_updateCollateralFactor() (gas: 82719)
[PASS] test_updateCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29198)
[PASS] test_updateCollateralRisk() (gas: 76917)
[PASS] test_updateCollateralRisk_revertsWith_AccessManagedUnauthorized() (gas: 29028)
[PASS] test_updateDynamicReserveConfig() (gas: 201323)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29433)
[PASS] test_updateFrozen() (gas: 105534)
[PASS] test_updateFrozen_revertsWith_AccessManagedUnauthorized() (gas: 29056)
[PASS] test_updateHealthFactorForMaxBonus() (gas: 68165)
[PASS] test_updateHealthFactorForMaxBonus_revertsWith_AccessManagedUnauthorized() (gas: 26799)
[PASS] test_updateLiquidationBonusFactor() (gas: 71080)
[PASS] test_updateLiquidationBonusFactor_revertsWith_AccessManagedUnauthorized() (gas: 26844)
[PASS] test_updateLiquidationConfig() (gas: 65757)
[PASS] test_updateLiquidationConfig_revertsWith_AccessManagedUnauthorized() (gas: 27193)
[PASS] test_updateLiquidationFee() (gas: 82779)
[PASS] test_updateLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29173)
[PASS] test_updateLiquidationTargetHealthFactor() (gas: 71043)
[PASS] test_updateLiquidationTargetHealthFactor_revertsWith_AccessManagedUnauthorized() (gas: 26909)
[PASS] test_updateMaxLiquidationBonus() (gas: 82715)
[PASS] test_updateMaxLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29109)
[PASS] test_updateMaxReserves() (gas: 53672)
[PASS] test_updateMaxReserves_revertsWith_AccessManagedUnauthorized() (gas: 26909)
[PASS] test_updatePaused() (gas: 105536)
[PASS] test_updatePaused_revertsWith_AccessManagedUnauthorized() (gas: 29077)
[PASS] test_updatePositionManager() (gas: 74331)
[PASS] test_updatePositionManager_revertsWith_AccessManagedUnauthorized() (gas: 26996)
[PASS] test_updateReceiveSharesEnabled() (gas: 102864)
[PASS] test_updateReceiveSharesEnabled_revertsWith_AccessManagedUnauthorized() (gas: 29121)
[PASS] test_updateReservePriceSource() (gas: 280163)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized() (gas: 29052)
Suite result: ok. 51 passed; 0 failed; 0 skipped; finished in 40.51ms (14.84ms CPU time)
Ran 6 tests for tests/unit/libraries/SpokeUtils.t.sol:SpokeUtilsTest
[PASS] test_fuzz_toValue(uint256,uint256,uint256) (runs: 5000, μ: 15780, ~: 15844)
Logs:
Bound result 615514462186775432459
Bound result 9
Bound result 9140094126966428
[PASS] test_get() (gas: 180696)
[PASS] test_get_revertsWith_ReserveNotListed() (gas: 167195)
[PASS] test_toValue() (gas: 8806)
[PASS] test_toValue_revertsWith_ArithmeticOverflow() (gas: 8959)
[PASS] test_toValue_revertsWith_ArithmeticUnderflow() (gas: 8734)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 454.20ms (425.41ms CPU time)
Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 254766)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 488498, ~: 493787)
Logs:
Bound result 999999999910000000000000000001
Bound result 1
Bound result 2585
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 466267, ~: 475352)
Logs:
Bound result 912
Bound result 7
Bound result 7500000000000000000000000000
Bound result 120137166892226934500041207483
[PASS] test_refreshPremium_haltedSpokesAllowed() (gas: 121461)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 898663)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 458624, ~: 459168)
Logs:
Bound result 3124043968137
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 528660, ~: 528878)
Logs:
Bound result 3124043968137
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 854154)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 875395)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 58921)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 920946)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 707827)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 20.39s (20.37s CPU time)
Ran 15 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 208957)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 368419)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 207728, ~: 207663)
Logs:
Bound result 4
Bound result 100
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 419592, ~: 419851)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 288988, ~: 289090)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 422332, ~: 422879)
Logs:
Bound result 47305749386555548123257161681
Bound result 23681
Bound result 7500000000000000000000000000
Bound result 407511040
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 158403)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 147496)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 21376)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 16471)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 18628)
[PASS] test_remove_revertsWith_SpokeHalted() (gas: 61971)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 61880)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 185376)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 364744)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 30.47s (30.44s CPU time)
Ran 17 tests for tests/unit/Spoke/TreasurySpoke.t.sol:TreasurySpokeTest
[PASS] test_borrow_revertsWith_UnsupportedAction() (gas: 9654)
[PASS] test_deploy_reverts_on_invalid_params() (gas: 4182)
[PASS] test_getters() (gas: 743804)
[PASS] test_initial_state() (gas: 167944)
[PASS] test_liquidationCall_revertsWith_UnsupportedAction() (gas: 10474)
[PASS] test_repay_revertsWith_UnsupportedAction() (gas: 9656)
[PASS] test_supply(uint256) (runs: 5000, μ: 124855, ~: 124638)
Logs:
Bound result 3124043968137
[PASS] test_supply_revertsWith_Unauthorized(address) (runs: 5000, μ: 16113, ~: 16113)
[PASS] test_transfer_fuzz(address,uint256,uint256) (runs: 5000, μ: 100105, ~: 101179)
Logs:
Bound result 2764385159
Bound result 2227385047
[PASS] test_transfer_revertsWith_ERC20InsufficientBalance(uint256) (runs: 5000, μ: 604008, ~: 604008)
[PASS] test_transfer_revertsWith_Unauthorized(address) (runs: 5000, μ: 14826, ~: 14826)
[PASS] test_withdraw_fuzz_amount_feesOnly(uint256) (runs: 5000, μ: 789504, ~: 789216)
Logs:
Bound result 3124043968137
[PASS] test_withdraw_fuzz_amount_interestAndFees(uint256) (runs: 5000, μ: 776569, ~: 776397)
Logs:
Bound result 3124043968137
[PASS] test_withdraw_fuzz_amount_interestOnly(uint256) (runs: 5000, μ: 809508, ~: 809214)
Logs:
Bound result 23432
[PASS] test_withdraw_fuzz_maxLiquidityFee(uint256,uint256,uint256) (runs: 5000, μ: 854074, ~: 854186)
Logs:
Bound result 4
Bound result 218470873395738003579119570309
Bound result 173721804
[PASS] test_withdraw_maxLiquidityFee() (gas: 854808)
Logs:
Bound result 2
Bound result 1000000000000000000000
Bound result 29376000
[PASS] test_withdraw_revertsWith_Unauthorized(address) (runs: 5000, μ: 16476, ~: 16476)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 54.46s (54.44s CPU time)
Ran 8 tests for tests/unit/UnitPriceFeed.t.sol:UnitPriceFeedTest
[PASS] testDECIMALS() (gas: 8305)
[PASS] test_constructor_revertsWith_Uint8Overflow() (gas: 4674)
[PASS] test_description() (gas: 11865)
[PASS] test_fuzz_latestRoundData(uint80) (runs: 5000, μ: 11105, ~: 11105)
[PASS] test_fuzz_latestRoundData_DifferentDecimals(uint8) (runs: 5000, μ: 14420, ~: 14578)
Logs:
Bound result 1
[PASS] test_getRoundData() (gas: 12402)
[PASS] test_getRoundData_futureRound() (gas: 12325)
[PASS] test_version() (gas: 8261)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 973.79ms (961.17ms CPU time)
Ran 7 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 220112, ~: 220555)
Logs:
Bound result 3124043968137
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 221137, ~: 221580)
Logs:
Bound result 3124043968137
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 674773, ~: 675513)
Logs:
Bound result 734846934
Bound result 12836
Bound result 1873
Bound result 7500000000000000000000000000
[PASS] test_reportDeficit_halted() (gas: 265261)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 24893)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 33865, ~: 33865)
[PASS] test_reportDeficit_with_premium() (gas: 673873)
Logs:
Bound result 10000000000
Bound result 31536000
Bound result 5000000000
Bound result 0
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 17.63s (17.60s CPU time)
Ran 12 tests for tests/unit/libraries/UserPositionDebt.t.sol:UserPositionUtilsTest
[PASS] test_applyPremiumDelta() (gas: 26101)
[PASS] test_calculatePremiumDelta() (gas: 17592)
[PASS] test_calculatePremiumRay() (gas: 19352)
[PASS] test_calculateRestoreAmount() (gas: 24204)
[PASS] test_fuzz_applyPremiumDelta((int256,int256,uint256)) (runs: 5000, μ: 34090, ~: 34184)
Logs:
Bound result 215016815803108445248527167096
Bound result 331073717946348281691194968263
[PASS] test_fuzz_calculatePremiumDelta((uint256,uint256,int256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 48831, ~: 49021)
Logs:
Bound result 99000000050384421173548891413
Bound result 267064735
Bound result 15166708452425474209087810086592205507
Bound result 310273141488122044938099248275
Bound result 16212485736382855360724910945
Bound result 99999
Bound result 11272700326030427879754413608164415047
[PASS] test_fuzz_calculatePremiumRay(uint256,int256,uint256) (runs: 5000, μ: 33196, ~: 33181)
Logs:
Bound result 99000000000000000000517440284
Bound result 6000000000000000000000000000
Bound result -1
[PASS] test_fuzz_calculateRestoreAmount(uint256,uint256,int256,uint256,uint256) (runs: 5000, μ: 42317, ~: 42275)
Logs:
Bound result 59609612905231002086766766882
Bound result 800000000000000000
Bound result 15355
Bound result 12245
Bound result 1000100000000000000
[PASS] test_fuzz_getUserDebt_DrawnIndex(uint256,uint256,int256,uint256) (runs: 5000, μ: 39430, ~: 39396)
Logs:
Bound result 99000000000000000000000007443
Bound result 960000000000000000
Bound result -40000000000000000000
Bound result 518877802919256876800202355087
[PASS] test_fuzz_getUserDebt_HubAndAssetId(uint256,uint256,int256,uint256) (runs: 5000, μ: 45390, ~: 45356)
Logs:
Bound result 99000000000000000000000007443
Bound result 960000000000000000
Bound result -40000000000000000000
Bound result 518877802919256876800202355087
[PASS] test_getUserDebt_DrawnIndex() (gas: 23419)
[PASS] test_getUserDebt_HubAndAssetId() (gas: 30124)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 4.31s (4.31s CPU time)
Ran 12 tests for tests/unit/libraries/UserPositionUtils.t.sol:UserPositionUtilsTest
[PASS] test_applyPremiumDelta() (gas: 26101)
[PASS] test_calculatePremiumDelta() (gas: 17592)
[PASS] test_calculatePremiumRay() (gas: 19352)
[PASS] test_calculateRestoreAmount() (gas: 24204)
[PASS] test_fuzz_applyPremiumDelta((int256,int256,uint256)) (runs: 5000, μ: 34090, ~: 34184)
Logs:
Bound result 215016815803108445248527167096
Bound result 331073717946348281691194968263
[PASS] test_fuzz_calculatePremiumDelta((uint256,uint256,int256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 48831, ~: 49021)
Logs:
Bound result 99000000050384421173548891413
Bound result 267064735
Bound result 15166708452425474209087810086592205507
Bound result 310273141488122044938099248275
Bound result 16212485736382855360724910945
Bound result 99999
Bound result 11272700326030427879754413608164415047
[PASS] test_fuzz_calculatePremiumRay(uint256,int256,uint256) (runs: 5000, μ: 33196, ~: 33181)
Logs:
Bound result 99000000000000000000517440284
Bound result 6000000000000000000000000000
Bound result -1
[PASS] test_fuzz_calculateRestoreAmount(uint256,uint256,int256,uint256,uint256) (runs: 5000, μ: 42317, ~: 42275)
Logs:
Bound result 59609612905231002086766766882
Bound result 800000000000000000
Bound result 15355
Bound result 12245
Bound result 1000100000000000000
[PASS] test_fuzz_getUserDebt_DrawnIndex(uint256,uint256,int256,uint256) (runs: 5000, μ: 39430, ~: 39396)
Logs:
Bound result 99000000000000000000000007443
Bound result 960000000000000000
Bound result -40000000000000000000
Bound result 518877802919256876800202355087
[PASS] test_fuzz_getUserDebt_HubAndAssetId(uint256,uint256,int256,uint256) (runs: 5000, μ: 45390, ~: 45356)
Logs:
Bound result 99000000000000000000000007443
Bound result 960000000000000000
Bound result -40000000000000000000
Bound result 518877802919256876800202355087
[PASS] test_getUserDebt_DrawnIndex() (gas: 23419)
[PASS] test_getUserDebt_HubAndAssetId() (gas: 30124)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 4.24s (4.24s CPU time)
Ran 17 tests for tests/unit/WadRayMath.t.sol:WadRayMathDifferentialTests
[PASS] test_bpsToRay_fuzz(uint256) (runs: 5000, μ: 11774, ~: 11826)
[PASS] test_bpsToWad_fuzz(uint256) (runs: 5000, μ: 11770, ~: 11813)
[PASS] test_constants() (gas: 12879)
[PASS] test_fromRayUp_fuzz(uint256) (runs: 5000, μ: 11046, ~: 11072)
[PASS] test_fromWadDown_fuzz(uint256) (runs: 5000, μ: 9378, ~: 9378)
[PASS] test_fuzz_rayDiv(uint256,uint256) (runs: 5000, μ: 12436, ~: 12807)
[PASS] test_fuzz_rayMul(uint256,uint256) (runs: 5000, μ: 11634, ~: 12155)
[PASS] test_fuzz_wadDiv(uint256,uint256) (runs: 5000, μ: 12617, ~: 12918)
[PASS] test_fuzz_wadMul(uint256,uint256) (runs: 5000, μ: 11593, ~: 12134)
[PASS] test_rayDiv() (gas: 39659)
[PASS] test_rayMul() (gas: 28767)
[PASS] test_roundRayUp_fuzz(uint256) (runs: 5000, μ: 12760, ~: 12909)
[PASS] test_roundRayUp_overflow() (gas: 14831)
[PASS] test_toRay_fuzz(uint256) (runs: 5000, μ: 11696, ~: 12264)
[PASS] test_toWad_fuzz(uint256) (runs: 5000, μ: 11844, ~: 12262)
[PASS] test_wadDiv() (gas: 40065)
[PASS] test_wadMul() (gas: 28408)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 2.15s (2.15s CPU time)
Ran 3 tests for tests/unit/Hub/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 274510)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 514717, ~: 514677)
Logs:
Bound result 351500639
Bound result 1256746
[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 454191, ~: 453984)
Logs:
Bound result 3124043968137
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 17.83s (17.81s CPU time)
Ran 23 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 364117)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 674189)
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, μ: 365437, ~: 365535)
Logs:
Bound result 615514462186775432459
Bound result 5711931271011731...*[Comment body truncated]* |
Forge Build Sizes
🔕 Unchanged
|
♻️ Forge Gas Snapshots
🔕 Unchanged
|
DhairyaSethi
reviewed
Feb 7, 2026
|
|
||
| uint256 initialSharePrice = getAddExRate(daiAssetId); | ||
| assertGt(initialSharePrice, 1e30); | ||
| assertGe(initialSharePrice, 1e30); |
Member
There was a problem hiding this comment.
bc fees can take entirety of the growth when its too little yeah? thats a problem of this approach like tomer said
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.
No description provided.