Conversation
♻️ Forge Gas Snapshots
🔕 Unchanged
|
Forge Build Sizes
🔕 Unchanged
|
🌈 Test ResultsNo files changed, compilation skipped
Ran 2 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 455825)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 87268)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 42.09ms (4.18ms CPU time)
Ran 5 tests for tests/gas/Spoke.Getters.gas.t.sol:SpokeGetters_Gas_Tests
[PASS] test_getUserAccountData() (gas: 23594)
[PASS] test_getUserAccountData_oneSupplies() (gas: 285291)
[PASS] test_getUserAccountData_twoSupplies() (gas: 521822)
[PASS] test_getUserAccountData_twoSupplies_oneBorrows() (gas: 1051246)
[PASS] test_getUserAccountData_twoSupplies_twoBorrows() (gas: 1619782)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 61.05ms (4.48ms CPU time)
Ran 19 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 15306)
[PASS] test_decimals() (gas: 8313)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 16711, ~: 17038)
Logs:
Bound result 1
[PASS] test_getReservePrice() (gas: 46772)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 44558)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10876)
[PASS] test_getReservePrices() (gas: 76731)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 48897)
[PASS] test_getReserveSource() (gas: 47161)
[PASS] test_setReserveSource() (gas: 44226)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97405)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17138)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 16953)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 12996)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5029298)
[PASS] test_setSpoke() (gas: 5057662)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10914)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13485, ~: 13485)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15102)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 1.06s (1.04s CPU time)
Ran 6 tests for tests/unit/Spoke/Spoke.Getters.t.sol:SpokeGettersTest
[PASS] test_getLiquidationBonus_configured() (gas: 100816)
Logs:
Bound result 2
Bound result 1000000000000000000
Bound result 4000
Bound result 900000000000000000
[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 99641, ~: 99990)
Logs:
Bound result 2
Bound result 247316907484828394
Bound result 79
Bound result 427395439924470173
[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 77601, ~: 77823)
Logs:
Bound result 4
Bound result 100
[PASS] test_getLiquidationBonus_notConfigured() (gas: 78811)
Logs:
Bound result 2
Bound result 1000000000000000000
[PASS] test_premiumRayGetters() (gas: 1539405)
[PASS] test_protocol_getters() (gas: 288396)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 2.42s (2.40s CPU time)
Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 17747619)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 17736030)
[PASS] test_dustColl_allowed() (gas: 17596722)
[PASS] test_dustDebt_allowed() (gas: 17727296)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 53.90ms (21.83ms CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 228386, ~: 218588)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 106091)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 115525)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 177141)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.65s (2.60s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 373079)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 73786)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 141521)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 146114)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 34.70ms (1.71ms CPU time)
Ran 15 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Scenarios.t.sol:SpokeLiquidationCallScenariosTest
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 25955736)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 25828066)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubReportDeficit() (gas: 25939163)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 25903472)
[PASS] test_liquidationCall_scenario1() (gas: 3848940)
[PASS] test_liquidationCall_scenario2() (gas: 3857266)
[PASS] test_liquidationCall_scenario3() (gas: 3263193)
[PASS] test_liquidationCall_scenario4() (gas: 27490843)
[PASS] test_liquidationCall_scenario5() (gas: 3400849)
[PASS] test_liquidationCall_scenario6() (gas: 2237766)
[PASS] test_liquidationCall_scenario7() (gas: 2981704)
[PASS] test_liquidationCall_scenario8() (gas: 2207135)
[PASS] test_liquidationCall_scenario9() (gas: 1627901)
[PASS] test_scenario_halted_asset() (gas: 26575931)
[PASS] test_scenario_halted_asset_with_deficit() (gas: 26420075)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 175.00ms (142.28ms CPU time)
Ran 21 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1982095, ~: 1980880)
Logs:
Bound result 9
Bound result 10
[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1601097, ~: 1600128)
Logs:
Bound result 9
Bound result 10
[PASS] test_grantRole() (gas: 315933)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 917560, ~: 920059)
Logs:
Bound result 5
[PASS] test_renounceRole() (gas: 321091)
[PASS] test_renounceRole_shouldNotTrack() (gas: 24510)
[PASS] test_revokeRole() (gas: 323262)
[PASS] test_revokeRole_shouldNotTrack() (gas: 33158)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2139108, ~: 2196726)
Logs:
Bound result 12
[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5000, μ: 1954729, ~: 1899678)
Logs:
Bound result 12
[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606166)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577193)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602394)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378260)
[PASS] test_setRoleGuardian_trackRoles() (gas: 262021)
[PASS] test_setTargetFunctionRole() (gas: 489773)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1181595)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 1018326)
[PASS] test_setTargetFunctionRole_skipAddPublicRole() (gas: 206355)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 34319)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 672090)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 23.26s (23.26s CPU time)
Ran 22 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
Bound result 10000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_AtOptimalPoint() (gas: 24281)
Logs:
Bound result 2000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_LeftToOptimalPoint(uint256) (runs: 5000, μ: 24191, ~: 24330)
Logs:
Bound result 137
Bound result 252173843969976304268974536488
[PASS] test_calculateInterestRate_RightToOptimalPoint(uint256) (runs: 5000, μ: 25302, ~: 25349)
Logs:
Bound result 8137
Bound result 252173843969976304268974536488
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18793)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19074, ~: 18822)
Logs:
Bound result 3124043968137
[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11203)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3724)
[PASS] test_getBaseDrawnRate() (gas: 14746)
[PASS] test_getInterestRateData() (gas: 19268)
[PASS] test_getMaxDrawnRate() (gas: 15234)
[PASS] test_getOptimalUsageRatio() (gas: 14727)
[PASS] test_getRateGrowthAfterOptimal() (gas: 14791)
[PASS] test_getRateGrowthBeforeOptimal() (gas: 14791)
[PASS] test_maxDrawnRate() (gas: 8314)
[PASS] test_maxOptimalRatio() (gas: 8357)
[PASS] test_minOptimalRatio() (gas: 8299)
[PASS] test_setInterestRateData() (gas: 68942)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxDrawnRate() (gas: 41762)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42403)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35291)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23502)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 1.13s (1.11s CPU time)
Ran 6 tests for tests/unit/position-manager/libraries/ConfigPermissions.t.sol:ConfigPermissionsTests
[PASS] test_constants() (gas: 12052)
[PASS] test_getConfigPermissionValues(uint8) (runs: 5000, μ: 13682, ~: 13682)
[PASS] test_setCanSetUsingAsCollateral_fuzz(uint8,bool) (runs: 5000, μ: 10623, ~: 10611)
[PASS] test_setCanUpdateUserDynamicConfig_fuzz(uint8,bool) (runs: 5000, μ: 10602, ~: 10590)
[PASS] test_setCanUpdateUserRiskPremium_fuzz(uint8,bool) (runs: 5000, μ: 10612, ~: 10600)
[PASS] test_setFullPermissions_fuzz(bool) (runs: 5000, μ: 13124, ~: 13134)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 971.51ms (971.06ms CPU time)
Ran 21 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154991, ~: 154552)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39084)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37322)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154947, ~: 154508)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39017)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37344)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154325, ~: 155416)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39067)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37411)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155010, ~: 154571)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39084)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37376)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 141405, ~: 140132)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25399)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27083)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 141354, ~: 140081)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25333)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27032)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155011, ~: 154572)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39126)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37386)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 41.43s (41.41s CPU time)
Ran 9 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 166686)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 167392)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 285796, ~: 274675)
Logs:
Bound result 3
Bound result 2767
Bound result 443124196721905572
Bound result 14843
Bound result 8
Bound result 18
Bound result 13290
Bound result 5661
Bound result 1999999999999999997
Bound result 443124196721905572
Bound result 9304570613870847
Bound result 9
Bound result 999999999999999999999999999997
Bound result 1000000000000000000000000000
Bound result 28591
Bound result 54527
Bound result 6504484831365108
Bound result 7
Bound result 1109
Bound result 18850239771387979476210927906
Bound result 0
Bound result 6504484831365108
Bound result 26
Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 240680, ~: 228842)
Logs:
Bound result 3
Bound result 2767
Bound result 443124196721905572
Bound result 14843
Bound result 8
Bound result 18
Bound result 13290
Bound result 5661
Bound result 1999999999999999997
Bound result 443124196721905572
Bound result 9304570613870847
Bound result 9
Bound result 999999999999999999999999999997
Bound result 1000000000000000000000000000
Bound result 28591
Bound result 54527
Bound result 6504484831365108
Bound result 7
Bound result 1109
Bound result 18850239771387979476210927906
Bound result 0
Bound result 18850239771387979476210927906
Bound result 999999999999999999999999999997
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 259916, ~: 248053)
Logs:
Bound result 98020581243928659
Bound result 9434
Bound result 0
Bound result 10008
Bound result 14
Bound result 362902507454157297736832118868343942642399513960811609542965143241
Bound result 10008
Bound result 4779
Bound result 1000000000000000131
Bound result 0
Bound result 2508165906222592
Bound result 9
Bound result 20241
Bound result 99000000000000000000000015361
Bound result 2000
Bound result 343
Bound result 432000
Bound result 13
Bound result 200
Bound result 120000000
Bound result 2
Bound result 362902507454157297736832118868343942642399513960811609542965143241
Bound result 10008
Bound result 4779
Bound result 1000000000000000131
Bound result 0
Bound result 2508165906222592
Bound result 9
Bound result 20241
Bound result 99000000000000000000000015361
Bound result 2000
Bound result 343
Bound result 2508165906222592
Bound result 371
Bound result 1000000000000000000000120000000
Bound result 115792089237316195423570985008687907853269984665640564039457584007913129606497
[PASS] test_calculateLiquidationAmounts_fuzz_ExactCollateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 245170, ~: 233062)
Logs:
Bound result 493707029584030159
Bound result 4726
Bound result 728161183272615584
Bound result 11178
Bound result 15
Bound result 29815
Bound result 10889
Bound result 7141
Bound result 1476533684402258488
Bound result 728161183272615584
Bound result 5129744233314671
Bound result 12
Bound result 1000000000000000000000000000000
Bound result 11510029575607604883612971089
Bound result 121956329
Bound result 164468887
Bound result 9454033835407639
Bound result 15
Bound result 9294
Bound result 570558597754027936591560378176
Bound result 3
Bound result 1000000000000000000000000000000
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 246125, ~: 234153)
Logs:
Bound result 493707029584030159
Bound result 4726
Bound result 728161183272615584
Bound result 11178
Bound result 15
Bound result 29815
Bound result 10889
Bound result 7141
Bound result 1476533684402258488
Bound result 728161183272615584
Bound result 5129744233314671
Bound result 12
Bound result 1000000000000000000000000000000
Bound result 11510029575607604883612971089
Bound result 121956329
Bound result 164468887
Bound result 9454033835407639
Bound result 15
Bound result 9294
Bound result 570558597754027936591560378176
Bound result 3
Bound result 304091136
Bound result 1000000000000000000000000000000
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 268694, ~: 257099)
Logs:
Bound result 3886412
Bound result 2
Bound result 147
Bound result 12468
Bound result 6
Bound result 28951245481117846533722652
Bound result 12468
Bound result 3739
Bound result 1000109044247905327
Bound result 147
Bound result 1766670143596910
Bound result 14
Bound result 885000589634409638603543244567
Bound result 45625495039344622427514351693
Bound result 1
Bound result 45089934476
Bound result 9035404749081580
Bound result 15
Bound result 274
Bound result 471071379138868438154450132077
Bound result 5
Bound result 9035404749081580
Bound result 3252684925
Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 255963, ~: 244050)
Logs:
Bound result 98020581243928659
Bound result 9434
Bound result 0
Bound result 10008
Bound result 14
Bound result 362902507454157297736832118868343942642399513960811609542965143241
Bound result 10008
Bound result 4779
Bound result 1000000000000000131
Bound result 0
Bound result 2508165906222592
Bound result 9
Bound result 20241
Bound result 99000000000000000000000015361
Bound result 2000
Bound result 343
Bound result 432000
Bound result 13
Bound result 200
Bound result 120000000
Bound result 2
Bound result 362902507454157297736832118868343942642399513960811609542965143241
Bound result 10008
Bound result 4779
Bound result 1000000000000000131
Bound result 0
Bound result 2508165906222592
Bound result 9
Bound result 20241
Bound result 99000000000000000000000015361
Bound result 2000
Bound result 343
Bound result 2508165906222592
Bound result 371
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 41.18s (41.16s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 12488)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 12509)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 20353, ~: 20128)
Logs:
Bound result 3467785138
Bound result 4390
Bound result 0
Bound result 13124
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 23297, ~: 23072)
Logs:
Bound result 3467785138
Bound result 4390
Bound result 0
Bound result 13124
Bound result 0
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 1.12s (1.09s CPU time)
Ran 11 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26036)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259738)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31769)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26861)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26980)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27033)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27018)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26947)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33724)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 34.80ms (2.13ms CPU time)
Ran 29 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4679)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9050, ~: 8812)
Logs:
Bound result -57896044618658097711785492504343953926634992332820282013197946218740589849150
[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 3920, ~: 3916)
[PASS] test_calculateLinearInterest() (gas: 4368)
[PASS] test_calculateLinearInterest_add_edge() (gas: 4890)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16246)
Logs:
Bound result 0
Bound result 1
Bound result 864000000
Bound result 864000000
[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint40) (runs: 5000, μ: 7544, ~: 7381)
Logs:
Bound result 9
[PASS] test_constants() (gas: 3133)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8592, ~: 8824)
Logs:
Bound result 10765498
[PASS] test_fuzz_divUp(uint256,uint256) (runs: 5000, μ: 3540, ~: 3544)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3514, ~: 3577)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3592, ~: 3724)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3281, ~: 3281)
[PASS] test_mulDivDown_NoRemainder() (gas: 3223)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3107)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3183)
[PASS] test_mulDivDown_WithRemainder() (gas: 3268)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3721)
[PASS] test_mulDivUp_NoRemainder() (gas: 3272)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3084)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3184)
[PASS] test_mulDivUp_WithRemainder() (gas: 3293)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3792)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8599, ~: 8530)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_signedSub_revertsWith_SafeCastOverflowedUintToInt(uint256) (runs: 5000, μ: 7650, ~: 7702)
Logs:
Bound result 57896044618658097711785492504343953926634992332820282019728792007080608788105
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3447, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12556, ~: 9884)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3443, ~: 3362)
[PASS] test_zeroFloorSub(uint256,uint256) (runs: 5000, μ: 3290, ~: 3326)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 2.73s (2.71s CPU time)
Ran 7 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13410, ~: 13410)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13410, ~: 13410)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13401, ~: 13401)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13475, ~: 13475)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13686, ~: 13686)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13665, ~: 13665)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13497, ~: 13497)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 18.52s (18.50s CPU time)
Ran 7 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 80414)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 113529)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 72985)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 140065)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 81380)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 81469)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 79447)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 32.38ms (4.36ms CPU time)
Ran 7 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 78206)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 111321)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 70777)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 137857)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 79172)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 79261)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 77239)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 29.97ms (4.26ms CPU time)
Ran 4 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.SetSelfAsUserPositionManagerWithSig.t.sol:SignatureGatewaySetSelfAsUserPositionManagerTest
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 140181)
[PASS] test_setSelfAsUserPositionManagerWithSig_forwards_correct_call() (gas: 32642)
[PASS] test_setSelfAsUserPositionManagerWithSig_ignores_underlying_spoke_reverts() (gas: 29661)
[PASS] test_setSelfAsUserPositionManagerWithSig_revertsWith_SpokeNotRegistered() (gas: 16473)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 26.24ms (1.14ms CPU time)
Ran 14 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 813771)
[PASS] test_multicall() (gas: 628738)
[PASS] test_multicall_atomicity_on_revert() (gas: 523532)
[PASS] test_multicall_no_atomicity_with_trycatch() (gas: 625435)
[PASS] test_renouncePositionManagerRole() (gas: 27532)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18068)
[PASS] test_repayWithSig() (gas: 817382)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 330140)
[PASS] test_setUsingAsCollateralWithSig() (gas: 631699)
[PASS] test_supplyWithSig() (gas: 601458)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 340321)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 1036587)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13323, ~: 13323)
[PASS] test_withdrawWithSig() (gas: 605099)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 480.04ms (454.26ms CPU time)
Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 514218)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 569372)
[PASS] testAccess_spoke_admin_config_access() (gas: 491538)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 34.43ms (3.02ms CPU time)
Ran 26 tests for tests/unit/position-manager/ConfigPositionManager/ConfigPositionManager.Permit.t.sol:ConfigPositionManagerPermitTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5688)
[PASS] test_eip712Domain() (gas: 10941)
[PASS] test_setCanSetUsingAsCollateralPermissionPermit_typeHash() (gas: 9951)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 158421, ~: 157009)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144916, ~: 142519)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28199)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32591)
[PASS] test_setCanSetUsingAsCollateralPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61515)
[PASS] test_setCanUpdateUserDynamicConfigPermissionPermit_typeHash() (gas: 9863)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 158427, ~: 157015)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144938, ~: 142541)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28190)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32571)
[PASS] test_setCanUpdateUserDynamicConfigPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61528)
[PASS] test_setCanUpdateUserRiskPremiumPermissionPermit_typeHash() (gas: 9949)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 158404, ~: 156992)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144873, ~: 142476)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28189)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32560)
[PASS] test_setCanUpdateUserRiskPremiumPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61460)
[PASS] test_setGlobalPermissionPermit_typeHash() (gas: 9957)
[PASS] test_setGlobalPermissionWithSig_fuzz(address,bool) (runs: 5000, μ: 162674, ~: 161111)
[PASS] test_setGlobalPermissionWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 144899, ~: 142502)
[PASS] test_setGlobalPermissionWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 28176)
[PASS] test_setGlobalPermissionWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 32532)
[PASS] test_setGlobalPermissionWithSig_revertsWith_SpokeNotRegistered() (gas: 61468)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 46.50s (46.47s CPU time)
Ran 39 tests for tests/unit/position-manager/ConfigPositionManager/ConfigPositionManager.t.sol:ConfigPositionManagerTest
[PASS] test_multicall() (gas: 84518)
[PASS] test_renounceCanUpdateUserDynamicConfigPermission() (gas: 41286)
[PASS] test_renounceCanUpdateUserDynamicConfigPermission_revertsWith_SpokeNotRegistered() (gas: 17489)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission() (gas: 41198)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission_revertsWith_SpokeNotRegistered() (gas: 17380)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission() (gas: 41215)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission_revertsWith_SpokeNotRegistered() (gas: 17402)
[PASS] test_renounceGlobalPermission() (gas: 42252)
[PASS] test_renounceGlobalPermission_revertsWith_SpokeNotRegistered() (gas: 17423)
[PASS] test_setCanSetUsingAsCollateralPermission() (gas: 54009)
[PASS] test_setCanSetUsingAsCollateralPermission_remove() (gas: 41304)
[PASS] test_setCanSetUsingAsCollateralPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17885)
[PASS] test_setCanSetUsingAsCollateralPermission_revertsWith_SpokeNotRegistered() (gas: 17497)
[PASS] test_setCanUpdateUserDynamicConfigPermission() (gas: 54032)
[PASS] test_setCanUpdateUserDynamicConfigPermission_remove() (gas: 41359)
[PASS] test_setCanUpdateUserDynamicConfigPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17937)
[PASS] test_setCanUpdateUserDynamicConfigPermission_revertsWith_SpokeNotRegistered() (gas: 17561)
[PASS] test_setCanUpdateUserRiskPremiumPermission() (gas: 54033)
[PASS] test_setCanUpdateUserRiskPremiumPermission_remove() (gas: 41341)
[PASS] test_setCanUpdateUserRiskPremiumPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17916)
[PASS] test_setCanUpdateUserRiskPremiumPermission_revertsWith_SpokeNotRegistered() (gas: 17542)
[PASS] test_setGlobalPermission() (gas: 55612)
[PASS] test_setGlobalPermission_removeAllPermissions() (gas: 42393)
[PASS] test_setGlobalPermission_removePreviousPermissions() (gas: 46538)
[PASS] test_setGlobalPermission_revertsWith_InvalidAddress_zeroDelegatee() (gas: 17869)
[PASS] test_setGlobalPermission_revertsWith_SpokeNotRegistered() (gas: 17540)
[PASS] test_setGlobalPermission_setThenRemove() (gas: 50008)
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withGlobalPermission(uint256,bool) (runs: 5000, μ: 105690, ~: 110529)
Logs:
Bound result 2
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withPermission(uint256,bool) (runs: 5000, μ: 105750, ~: 110589)
Logs:
Bound result 2
[PASS] test_setUsingAsCollateralOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 22151)
[PASS] test_setUsingAsCollateralOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17584)
[PASS] test_updateUserDynamicConfigOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 19908)
[PASS] test_updateUserDynamicConfigOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17422)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withGlobalPermission() (gas: 69720)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withPermission() (gas: 69822)
[PASS] test_updateUserRiskPremiumOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 19909)
[PASS] test_updateUserRiskPremiumOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17469)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withGlobalPermission() (gas: 809271)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withPermission() (gas: 809284)
Suite result: ok. 39 passed; 0 failed; 0 skipped; finished in 11.03s (11.00s CPU time)
Ran 41 tests for tests/unit/position-manager/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 667531)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 666918, ~: 668264)
Logs:
Bound result 3124043968137
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32444)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32519)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 283143)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271222)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25378)
[PASS] test_constructor() (gas: 12675)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 5958)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17595)
[PASS] test_multicall_revertsWith_UnsupportedAction() (gas: 11265)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 759989)
Logs:
Bound result 5000000000000000000
[PASS] test_repayNative_excessAmount() (gas: 668542)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 755423, ~: 760622)
Logs:
Bound result 3124043968137
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 679424, ~: 674621)
Logs:
Bound result 90000068691281935000
Bound result 25920101
[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 32481)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30002)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39249)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 326265)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 303321)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38722)
[PASS] test_supplyAndCollateralNative() (gas: 333564)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 333885, ~: 333592)
Logs:
Bound result 3124043968137
[PASS] test_supplyNative() (gas: 305258)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 305578, ~: 305285)
Logs:
Bound result 3124043968137
[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 32457)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 29986)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39237)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_hubAdd() (gas: 374260)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336151)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38734)
[PASS] test_withdrawNative() (gas: 331913)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 331437, ~: 331919)
Logs:
Bound result 3124043968137
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 268049, ~: 267842)
Logs:
Bound result 3124043968137
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 616160, ~: 616089)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32475)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32508)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 300006)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271196)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25345)
Suite result: ok. 41 passed; 0 failed; 0 skipped; finished in 73.07s (73.04s CPU time)
Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 12902, ~: 12902)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 95279, ~: 94374)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13570, ~: 13570)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.85s (3.84s CPU time)
Ran 10 tests for tests/unit/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 8604)
[PASS] test_fromBpsDown() (gas: 9654)
[PASS] test_percentDiv() (gas: 14993)
[PASS] test_percentDivUp_ge_value(uint256,uint256) (runs: 5000, μ: 15140, ~: 15261)
Logs:
Bound result 100
Bound result 68691281934999
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15345, ~: 15347)
Logs:
Bound result 90101
Bound result 68691281934999
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12597, ~: 12760)
[PASS] test_percentMul() (gas: 14932)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15328, ~: 15330)
Logs:
Bound result 90101
Bound result 68691281934999
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15143, ~: 15264)
Logs:
Bound result 100
Bound result 68691281934999
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11516, ~: 12063)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.41s (1.41s CPU time)
Ran 17 tests for tests/unit/position-manager/PositionManagerBase.t.sol:PositionManagerBaseTest
[PASS] test_constructor() (gas: 17209)
[PASS] test_getReserveUnderlying_fuzz(uint256) (runs: 5000, μ: 36890, ~: 36947)
Logs:
Bound result 2
[PASS] test_getReserveUnderlying_revertsWith_ReserveNotListed() (gas: 25763)
[PASS] test_multicall() (gas: 73158)
[PASS] test_multicall_atomicity_on_revert() (gas: 48181)
[PASS] test_multicall_revertsWith_UnsupportedAction() (gas: 11243)
[PASS] test_permitReserveUnderlying() (gas: 128765)
[PASS] test_permitReserveUnderlying_forwards_correct_call() (gas: 78195)
[PASS] test_permitReserveUnderlying_ignores_permit_reverts() (gas: 67273)
[PASS] test_permitReserveUnderlying_revertsWith_ReserveNotListed() (gas: 58153)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 41640, ~: 41640)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13087)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 15935)
[PASS] test_registerSpoke_unregister() (gas: 36116)
[PASS] test_renouncePositionManagerRole() (gas: 65242)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74572)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 131425)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 955.82ms (929.71ms CPU time)
Ran 10 tests for tests/unit/position-manager/libraries/PositionManagerEIP712Hash.t.sol:PositionManagerEIP712HashTest
[PASS] test_constants() (gas: 13419)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6712, ~: 6712)
[PASS] test_hash_creditDelegation_fuzz((address,uint256,address,address,uint256,uint256,uint256)) (runs: 5000, μ: 4810, ~: 4810)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6690, ~: 6690)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7171, ~: 7171)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6711, ~: 6711)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6349, ~: 6349)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6370, ~: 6370)
[PASS] test_hash_withdrawPermit_fuzz((address,uint256,address,address,uint256,uint256,uint256)) (runs: 5000, μ: 4832, ~: 4832)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6689, ~: 6689)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 4.51s (4.51s CPU time)
Ran 11 tests for tests/gas/PositionManagers.Operations.gas.t.sol:ConfigPositionManager_Gas_Tests
[PASS] test_renounceCanUpdateUserDynamicConfigPermission() (gas: 93331)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission() (gas: 93308)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission() (gas: 93243)
[PASS] test_renounceGlobalPermission() (gas: 93180)
[PASS] test_setCanSetUsingAsCollateralPermission() (gas: 69240)
[PASS] test_setCanUpdateUserDynamicConfigPermission() (gas: 69259)
[PASS] test_setCanUpdateUserRiskPremiumPermission() (gas: 69282)
[PASS] test_setGlobalPermission() (gas: 69173)
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withGlobalPermission() (gas: 145058)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withGlobalPermission() (gas: 120767)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withGlobalPermission() (gas: 713857)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 48.62ms (2.44ms CPU time)
Ran 2 tests for tests/gas/PositionManagers.Operations.gas.t.sol:GiverPositionManager_Gas_Tests
[PASS] test_repayOnBehalfOf() (gas: 919766)
[PASS] test_supplyOnBehalfOf() (gas: 282870)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 47.04ms (1.81ms CPU time)
Ran 1 test for tests/gas/PositionManagers.Operations.gas.t.sol:PositionManager_Gas_Tests
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 215923)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 45.46ms (812.02µs CPU time)
Ran 8 tests for tests/gas/PositionManagers.Operations.gas.t.sol:TakerPositionManager_Gas_Tests
[PASS] test_approveWithdraw() (gas: 69195)
[PASS] test_approveWithdrawWithSig() (gas: 155438)
[PASS] test_borrowOnBehalfOf() (gas: 763831)
[PASS] test_creditDelegation() (gas: 69162)
[PASS] test_delegateCreditWithSig() (gas: 155432)
[PASS] test_renounceCreditDelegation() (gas: 93655)
[PASS] test_renounceWithdrawAllowance() (gas: 93762)
[PASS] test_withdrawOnBehalfOf() (gas: 584219)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 48.39ms (3.62ms 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, μ: 949366, ~: 905610)
Logs:
Bound result 812
[PASS] test_extSloads(uint256,bytes) (runs: 5000, μ: 1008419, ~: 968863)
Logs:
Bound result 362
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 56.38s (56.38s CPU time)
Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 924794)
[PASS] test_repayNative() (gas: 992785)
[PASS] test_supplyAndCollateralNative() (gas: 305250)
[PASS] test_supplyNative() (gas: 286691)
[PASS] test_withdrawNative() (gas: 508792)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 49.95ms (4.35ms CPU time)
Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 748631)
[PASS] test_repayWithSig() (gas: 955129)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209293)
[PASS] test_setUsingAsCollateralWithSig() (gas: 289353)
[PASS] test_supplyWithSig() (gas: 434276)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145250)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143115)
[PASS] test_withdrawWithSig() (gas: 409926)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 53.52ms (8.15ms CPU time)
Ran 12 tests for tests/unit/position-manager/GiverPositionManager.t.sol:GiverPositionManagerTest
[PASS] test_multicall() (gas: 334903)
[PASS] test_repayOnBehalfOf() (gas: 640360)
Logs:
Bound result 50000000000000000000
[PASS] test_repayOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 637476, ~: 640655)
Logs:
Bound result 3124043968137
[PASS] test_repayOnBehalfOf_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 571458, ~: 567797)
Logs:
Bound result 900000068691281935000
Bound result 25920101
[PASS] test_repayOnBehalfOf_maxRepay() (gas: 561613)
[PASS] test_repayOnBehalfOf_maxRepay_revertsWith_InvalidRepayAmount() (gas: 483216)
[PASS] test_repayOnBehalfOf_revertsWith_ReserveNotListed() (gas: 32366)
[PASS] test_repayOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 28744)
[PASS] test_supplyOnBehalfOf() (gas: 296643)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 296914, ~: 296693)
Logs:
Bound result 3124043968137
[PASS] test_supplyOnBehalfOf_revertsWith_ReserveNotListed() (gas: 32405)
[PASS] test_supplyOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 28794)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 30.58s (30.56s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 206679)
[PASS] test_change_role_responsibility() (gas: 121287)
[PASS] test_hub_access_manager_exposure() (gas: 13439)
[PASS] test_hub_admin_access() (gas: 1350370)
[PASS] test_migrate_role_responsibility() (gas: 709202)
[PASS] test_setInterestRateData_access() (gas: 102610)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 29.18ms (3.93ms CPU time)
Ran 1 test for tests/unit/Spoke/Spoke.AccrueInterest.Scenario.t.sol:SpokeAccrueInterestScenarioTest
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime_twoActions((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 5586220, ~: 5436967)
Logs:
Bound result 416966230219621053938274952927
Bound result 0
Bound result 255831241153786906
Bound result 41191294854201435881
Bound result 124281697546210950467266407747
Bound result 33522909571553656
Bound result 481970306954558904
Bound result 12412
Bound result 6
Bound result 124281697546210950467266407747
Bound result 33522909571553656
Bound result 481970306954558904
Bound result 12412
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 130.25s (130.23s CPU time)
Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 660714)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 157881, ~: 157837)
Logs:
Bound result 9
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 332470, ~: 332622)
Logs:
Bound result 3
Bound result 218470873395738003579119570309
Bound result 446067553769140138733721804
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112437, ~: 112393)
Logs:
Bound result 9
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 263830, ~: 263690)
Logs:
Bound result 1291
Bound result 1071208440522043736492
Bound result 173721804
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 220659, ~: 220858)
Logs:
Bound result 494814332414361652770697333760
Bound result 3122066956
Bound result 8
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 342356, ~: 342395)
Logs:
Bound result 1
Bound result 22978
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 785683, ~: 785711)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_add_multi_add_minimal_shares() (gas: 316011)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 357696)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64504)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13631)
[PASS] test_add_revertsWith_InvalidShares() (gas: 220197)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224358)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 99705)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99741)
[PASS] test_add_single_asset() (gas: 330246)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 298042)
[PASS] test_add_with_increased_index_with_premium() (gas: 674207)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 45.26s (45.24s CPU time)
Ran 32 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_borrowCount() (gas: 108134)
[PASS] test_borrowCount(uint256) (runs: 5000, μ: 1930883, ~: 1770259)
Logs:
Bound result 812
[PASS] test_borrowCount_ignoresInvalidBits() (gas: 122795)
[PASS] test_bucketId() (gas: 8922)
[PASS] test_collateralCount() (gas: 108082)
[PASS] test_collateralCount(uint256) (runs: 5000, μ: 1946596, ~: 1786685)
Logs:
Bound result 812
[PASS] test_collateralCount_ignoresInvalidBits() (gas: 122986)
[PASS] test_constants() (gas: 44556)
[PASS] test_fls() (gas: 509035)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14038, ~: 14336)
Logs:
Bound result 151
Bound result 100
[PASS] test_fuzz_setBorrowing(uint256,bool) (runs: 5000, μ: 22255, ~: 32137)
[PASS] test_fuzz_setUseAsCollateral(uint256,bool) (runs: 5000, μ: 22307, ~: 32189)
[PASS] test_getBucketWord(uint256) (runs: 5000, μ: 14179, ~: 14179)
[PASS] test_isUsingAsCollateralOrBorrowing_slot0() (gas: 108352)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 43997)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 153030, ~: 153030)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 144782, ~: 144548)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 152949, ~: 152949)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 144717, ~: 144483)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 134621, ~: 134616)
[PASS] test_next(uint256) (runs: 5000, μ: 20038, ~: 18925)
Logs:
Bound result 649
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18007, ~: 16874)
Logs:
Bound result 649
[PASS] test_nextBorrowing_continuous() (gas: 61801685)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18165, ~: 16983)
Logs:
Bound result 649
[PASS] test_nextCollateral_continuous() (gas: 62157760)
[PASS] test_next_continuous() (gas: 89136467)
[PASS] test_popCount(bytes32) (runs: 5000, μ: 37881, ~: 38011)
[PASS] test_setBorrowing_slot0() (gas: 43906)
[PASS] test_setBorrowing_slot1() (gas: 43942)
[PASS] test_setUseAsCollateral_slot0() (gas: 44158)
[PASS] test_setUseAsCollateral_slot1() (gas: 44140)
[PASS] test_setters_use_correct_slot(uint256) (runs: 5000, μ: 36549, ~: 41309)
Suite result: ok. 32 passed; 0 failed; 0 skipped; finished in 159.67s (159.66s CPU time)
Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12531)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33306, ~: 33509)
Logs:
Bound result 3124043968137
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11089)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 206643, ~: 206782)
Logs:
Bound result 3124043968137
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 180556)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.16s (3.14s CPU time)
Ran 7 tests for tests/unit/ReserveFlags.t.sol:ReserveFlagsTests
[PASS] test_constants() (gas: 12118)
[PASS] test_create_fuzz(bool,bool,bool,bool) (runs: 5000, μ: 14707, ~: 14707)
[PASS] test_setBorrowable_fuzz(uint8) (runs: 5000, μ: 13338, ~: 13338)
[PASS] test_setFrozen_fuzz(uint8) (runs: 5000, μ: 13280, ~: 13280)
[PASS] test_setPaused_fuzz(uint8) (runs: 5000, μ: 13289, ~: 13289)
[PASS] test_setReceiveSharesEnabled_fuzz(uint8) (runs: 5000, μ: 13196, ~: 13196)
[PASS] test_set_flags() (gas: 65513)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 1.26s (1.25s CPU time)
Ran 10 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5628)
[PASS] test_borrow_typeHash() (gas: 9733)
[PASS] test_constructor() (gas: 3749)
[PASS] test_eip712Domain() (gas: 10940)
[PASS] test_repay_typeHash() (gas: 9857)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9780)
[PASS] test_supply_typeHash() (gas: 9871)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 9758)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9779)
[PASS] test_withdraw_typeHash() (gas: 9756)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 28.21ms (2.34ms CPU time)
Ran 5 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 101550)
[PASS] test_permitReserve_forwards_correct_call() (gas: 51045)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40070)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30985)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29349)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 27.34ms (1.59ms CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 133168)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 640199, ~: 640028)
Logs:
Bound result 9
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 250256, ~: 250250)
Logs:
Bound result 9
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 583625, ~: 584050)
Logs:
Bound result 68691281934999
Bound result 0
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 542989, ~: 543343)
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, μ: 4030057, ~: 4046716)
Logs:
Bound result 20917
Bound result 400
Bound result 1252
Bound result 11146
Bound result 9958
Bound result 1990
Bound result 11000
Bound result 3521021950
Bound result 6198
Bound result 18578
Bound result 11809
Bound result 50335
Bound result 3808
Bound result 9958
Bound result 1990
Bound result 11000
Bound result 3475
Suite result: ok. 6 passed; 0 failed; 1 skipped; finished in 111.49s (111.46s CPU time)
Ran 38 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 390278, ~: 390317)
Logs:
Bound result 18
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 45293, ~: 44992)
Logs:
Bound result 0
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 45358, ~: 45057)
Logs:
Bound result 0
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 36654, ~: 36654)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 45895, ~: 45941)
Logs:
Bound result 21
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 46042, ~: 46330)
Logs:
Bound result 3
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 80332734889, ~: 34985)
Logs:
Bound result 2
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 956555)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 953681)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 48915)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 126697, ~: 126748)
Logs:
Bound result 4
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 35268, ~: 35257)
Logs:
Bound result 12802
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33864, ~: 33915)
Logs:
Bound result 4
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 39795)
[PASS] test_getAssetId() (gas: 73181)
[PASS] test_getAssetId_fuzz_revertsWith_AssetNotListed(address) (runs: 5000, μ: 18582, ~: 18583)
[PASS] test_hub_deploy_reverts_on_InvalidConstructorInput() (gas: 828575)
[PASS] test_hub_max_riskPremium() (gas: 8643)
[PASS] test_isUnderlyingListed() (gas: 1178368)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 716118)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 613450)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 70730)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 269193, ~: 269545)
Logs:
Bound result 5
Bound result 182
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 819031, ~: 818857)
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, μ: 721451, ~: 721277)
Logs:
Bound result 3
Bound result 1
Bound result 3
Bound result 1
[PASS] test_updateAssetConfig_fuzz_NewDrawnRateStrategy(uint256) (runs: 5000, μ: 698285, ~: 698285)
Logs:
Bound result 3
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 820365, ~: 820365)
Logs:
Bound result 3
Bound result 3
Bound result 1000
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 872045, ~: 872045)
Logs:
Bound result 3
Bound result 3
Bound result 3
Bound result 1000
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 700435, ~: 700489)
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, μ: 61104, ~: 61158)
Logs:
Bound result 3
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 40144, ~: 40042)
Logs:
Bound result 5
Bound result 182
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 469741)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 198869, ~: 199317)
Logs:
Bound result 5
Bound result 4
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 95894, ~: 96293)
Logs:
Bound result 3
Bound result 0
[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 880059)
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, μ: 59179, ~: 59239)
Logs:
Bound result 2
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40546, ~: 40614)
Logs:
Bound result 0
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29661)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 93.84s (93.82s CPU time)
Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 254727)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 490186, ~: 495399)
Logs:
Bound result 999999999910000000000000000001
Bound result 1
Bound result 2504
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 467770, ~: 476864)
Logs:
Bound result 1118761457
Bound result 102
Bound result 25000000000000000000
Bound result 13098
[PASS] test_refreshPremium_haltedSpokesAllowed() (gas: 121430)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 897881)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 460181, ~: 460729)
Logs:
Bound result 3124043968137
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 529757, ~: 529971)
Logs:
Bound result 3124043968137
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 853291)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 874603)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 58921)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 920059)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 710944)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 19.98s (19.96s 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, μ: 545650, ~: 545698)
Logs:
Bound result 8058
Bound result 160000000
Bound result 2
Bound result 1300
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 803281, ~: 803380)
Logs:
Bound result 4558
Bound result 704000000
Bound result 3
Bound result 2434413586
Bound result 12707
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 639919045)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 261369126)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 545760)
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.47s (18.44s CPU time)
Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 352273)
[PASS] test_draw_fuzz_IncreasedDrawnRate(uint256,uint256) (runs: 5000, μ: 693479, ~: 693712)
Logs:
Bound result 3
Bound result 100
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 285887, ~: 286020)
Logs:
Bound result 3
Bound result 100
[PASS] test_draw_fuzz_revertsWith_DrawCapEx...*[Comment body truncated]* |
tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Scenarios.t.sol
Outdated
Show resolved
Hide resolved
| }); | ||
|
|
||
| uint256 liquidatorDebtAfter = tokenList.weth.balanceOf(liquidator); | ||
| // without recalculation, the debt to liquidate would be 183 (drawnShares to liquidate 122) |
There was a problem hiding this comment.
this says 183, but comment above says 184
// liquidate 184 debt assets, 184 / 1.5 -> 122 drawn shares to liquidate (rounded down)
I think it would be better if we can make comments and checks in share terms (drawnShares) , this would be more accurate I think
There was a problem hiding this comment.
checks in share terms
reason why i didnt do that is, due to all coll being liquidated, it means deficit so the user position no longer has any drawnShares remaining so it is more roundabout to get the "true" shares diff as a result of the liquidation.
this says 183, but comment above says 184
comment discrepancy is bc: input is 184 (debtToCover), which is 122 drawnShares to liquidate, but drawnAmountToRestore & debtRayToLiquidate is 183. Added some comments to clarify 7d4681b
| uint256 liquidatorDebtBefore = tokenList.weth.balanceOf(liquidator); | ||
|
|
||
| // liquidate 184 debt assets, 184 / 1.5 -> 122 drawn shares to liquidate (rounded down) | ||
| // 122 drawn shares to liquidate -> 183 debt assets, $366 collateral value |
There was a problem hiding this comment.
this says 183, but below we say 182
// now with recalculation, the debt to liquidate is 182 (drawnShares to liquidate 121)
There was a problem hiding this comment.
i meant this part as before the recalculation, and below when it comes to 182 is after a recalculation that we've added here. added more commetns 7d4681b
| LiquidationLogic.LiquidationAmounts | ||
| memory expectedLiquidationAmounts = _calculateAdjustedLiquidationAmounts(params); | ||
|
|
||
| params.debtToCover = bound( |
There was a problem hiding this comment.
isn't this already bounded? don't we invalidate scenario here? can we check after liquidation that entire collateral was liquidated (by checking drawn shares is 0), just to be extra sure?
There was a problem hiding this comment.
need to bound this again in order to avoid the dust condition on the collateral, ie must be high enough so that it leads to 100% of coll being liquidated.
by checking drawn shares is 0
I think you mean added shares on coll side, added this 7d4681b
No description provided.