rft: mint perfect feeShares during accrual, leaving remainder in realizedFees#1195
Closed
rft: mint perfect feeShares during accrual, leaving remainder in realizedFees#1195
Conversation
yan-man
commented
Feb 5, 2026
|
|
||
| return ( | ||
| feeShares, | ||
| feeShares > 0 ? feeAmount - feeShares.toAssetsUp(totalAssets, totalShares) : feeAmount, |
Contributor
Author
There was a problem hiding this comment.
must round up on asset conversion to effectively round down on remainder, to be safe and overestimate the remaining realizedFees
🌈 Test ResultsCompiling 262 files with Solc 0.8.28
Compiling 28 files with Solc 0.8.28
Compiling 54 files with Solc 0.8.28
Solc 0.8.28 finished in 3.23s
Solc 0.8.28 finished in 5.07s
Solc 0.8.28 finished in 157.19s
Compiler run successful!
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, μ: 19886, ~: 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: 4912846)
[PASS] test_setSpoke() (gas: 4940751)
[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.11s CPU time)
Ran 60 tests for tests/unit/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint256,uint16,uint32,uint32,uint32) (runs: 5000, μ: 447506, ~: 448062)
Logs:
Bound result 8
Bound result 2930
Bound result 3346
Bound result 2
Bound result 641
Bound result 94505
[PASS] test_addAsset_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 42288, ~: 42657)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 65067, ~: 65042)
Logs:
Bound result 97
Bound result 5146
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 58146)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 58107)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 350257)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 76315)
[PASS] test_addSpoke() (gas: 135288)
[PASS] test_addSpokeToAssets() (gas: 232368)
[PASS] test_addSpokeToAssets_revertsWith_AccessManagedUnauthorized() (gas: 28173)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 35927)
[PASS] test_addSpoke_revertsWith_AccessManagedUnauthorized() (gas: 27817)
[PASS] test_deactivateAsset() (gas: 175253)
[PASS] test_deactivateAsset_revertsWith_AccessManagedUnauthorized() (gas: 28980)
[PASS] test_deactivateSpoke() (gas: 173809)
[PASS] test_deactivateSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29017)
[PASS] test_freezeAsset() (gas: 249402)
[PASS] test_freezeAsset_revertsWith_AccessManagedUnauthorized() (gas: 28957)
[PASS] test_freezeSpoke() (gas: 266777)
[PASS] test_freezeSpoke_revertsWith_AccessManagedUnauthorized() (gas: 28983)
[PASS] test_haltAsset() (gas: 175220)
[PASS] test_haltAsset_revertsWith_AccessManagedUnauthorized() (gas: 28959)
[PASS] test_haltSpoke() (gas: 173852)
[PASS] test_haltSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29047)
[PASS] test_updateFeeConfig_Scenario() (gas: 341059)
Logs:
Bound result 0
Bound result 1800
Bound result 0
Bound result 400
Bound result 0
Bound result 0
[PASS] test_updateFeeConfig_fuzz(uint256,uint16,address) (runs: 5000, μ: 187680, ~: 187968)
Logs:
Bound result 0
Bound result 9889
[PASS] test_updateFeeConfig_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28541, ~: 28541)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 59280)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 62400)
[PASS] test_updateFeeReceiver_Scenario() (gas: 219141)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 418353)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 447936)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 181296, ~: 181296)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28203, ~: 28203)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 63936)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 80616)
[PASS] test_updateInterestRateData() (gas: 79376)
[PASS] test_updateInterestRateData_revertsWith_AccessManagedUnauthorized() (gas: 30139)
[PASS] test_updateInterestRateStrategy() (gas: 99782)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 39578, ~: 39578)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 85671)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 75403)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 75946)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 97504, ~: 99114)
Logs:
Bound result 3
Bound result 0
[PASS] test_updateLiquidityFee_revertsWith_AccessManagedUnauthorized() (gas: 27627)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 64099)
[PASS] test_updateReinvestmentController() (gas: 107990)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28182, ~: 28182)
[PASS] test_updateSpokeActive() (gas: 98807)
[PASS] test_updateSpokeActive_revertsWith_AccessManagedUnauthorized() (gas: 31303)
[PASS] test_updateSpokeCaps() (gas: 75165)
[PASS] test_updateSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 31260)
[PASS] test_updateSpokeDrawCap() (gas: 74992)
[PASS] test_updateSpokeDrawCap_revertsWith_AccessManagedUnauthorized() (gas: 31293)
[PASS] test_updateSpokeHalted() (gas: 101520)
[PASS] test_updateSpokeHalted_revertsWith_AccessManagedUnauthorized() (gas: 31302)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 75015)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_AccessManagedUnauthorized() (gas: 31261)
[PASS] test_updateSpokeSupplyCap() (gas: 74987)
[PASS] test_updateSpokeSupplyCap_revertsWith_AccessManagedUnauthorized() (gas: 31271)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 11.78s (11.74s CPU time)
Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 708075, ~: 708233)
Logs:
Bound result 68691281934999
Bound result 0
Bound result 100
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 708534, ~: 708781)
Logs:
Bound result 615514462186775432459
Bound result 10765498
Bound result 571193127101173104469
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20311)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 61127)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 138197)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 649832)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 18.16s (18.12s CPU time)
Ran 17 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1981568, ~: 1980367)
Logs:
Bound result 9
Bound result 10
[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1528905, ~: 1527966)
Logs:
Bound result 9
Bound result 10
[PASS] test_grantRole() (gas: 315886)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 920563, ~: 919753)
Logs:
Bound result 5
[PASS] test_revokeRole() (gas: 323138)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2152262, ~: 2244247)
Logs:
Bound result 12
[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5000, μ: 1966282, ~: 1899754)
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 21.77s (21.77s CPU time)
Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24368)
Logs:
Bound result 2000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24681)
Logs:
Bound result 10000
Bound result 778565440757296803935461404101
[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24231, ~: 24372)
Logs:
Bound result 137
Bound result 252173843969976304268974536488
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25365, ~: 25411)
Logs:
Bound result 8137
Bound result 252173843969976304268974536488
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18783)
Logs:
Bound result 0
[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19083, ~: 18834)
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.14s (1.13s CPU time)
Ran 11 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 650208)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 200000000000000000000
[PASS] test_reclaim_fullAmount() (gas: 632721)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 651891, ~: 651152)
Logs:
Bound result 615514462186775432459
Bound result 571193127101173104469
Bound result 564283877115702805413
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 740352)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 13049)
[PASS] test_reclaim_revertsWith_InsufficientTransferred() (gas: 454598)
[PASS] test_reclaim_revertsWith_InsufficientTransferred_noSwept() (gas: 99615)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 89825)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 90708, ~: 90708)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40377)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 617918)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 11.28s (11.25s 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 22.34s (22.34s CPU time)
Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 253553)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 486359, ~: 491671)
Logs:
Bound result 999999999910000000000000000001
Bound result 1
Bound result 2793
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 472013, ~: 481736)
Logs:
Bound result 7393
Bound result 795
Bound result 5000000000000000
Bound result 20915647621013546343585762145
[PASS] test_refreshPremium_haltedSpokesAllowed() (gas: 118474)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 896580)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 456328, ~: 456322)
Logs:
Bound result 3124043968137
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 533650, ~: 533871)
Logs:
Bound result 3124043968137
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 856323)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 874132)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 58682)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 922539)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 714951)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 20.59s (20.55s CPU time)
Ran 15 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 209380)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_remove_all_with_interest() (gas: 414506)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 208153, ~: 208086)
Logs:
Bound result 4
Bound result 100
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 461849, ~: 466868)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 288524, ~: 288619)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 465747, ~: 472121)
Logs:
Bound result 7107
Bound result 1207
Bound result 6014
Bound result 10026
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 157433)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 147518)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 21319)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 16426)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 18583)
[PASS] test_remove_revertsWith_SpokeHalted() (gas: 61708)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 61617)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 184062)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 369344)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 27.62s (27.60s CPU time)
Ran 9 tests for tests/unit/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 354262)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 231335, ~: 232296)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 254322, ~: 258916)
Logs:
Bound result 100
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 408309, ~: 409179)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 279586, ~: 261724)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 186017, ~: 161387)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 466148, ~: 460990)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 216600, ~: 215463)
Logs:
Bound result 37
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 545269, ~: 542743)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 73.12s (73.12s CPU time)
Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToLiquidate.t.sol:LiquidationLogicDebtToLiquidateTest
[PASS] test_calculateDebtToLiquidate_fuzz((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 30197, ~: 30268)
Logs:
Bound result 1
Bound result 11604
Bound result 8176
Bound result 1101723444617478663
Bound result 12412
Bound result 4101085102398758
Bound result 9
Bound result 624281697546212355234969681685
Bound result 0
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 31926, ~: 32003)
Logs:
Bound result 1
Bound result 11604
Bound result 8176
Bound result 1101723444617478663
Bound result 12412
Bound result 4101085102398758
Bound result 9
Bound result 624281697546212355234969681685
Bound result 0
Bound result 2
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 33998, ~: 33981)
Logs:
Bound result 1
Bound result 11604
Bound result 8176
Bound result 1101723444617478663
Bound result 12412
Bound result 4101085102398758
Bound result 9
Bound result 624281697546212355234969681685
Bound result 0
Bound result 5
Bound result 10000000000000000
Bound result 1
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.48s (3.45s CPU time)
Ran 7 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToTargetHealthFactor.t.sol:LiquidationLogicDebtToTargetHealthFactorTest
[PASS] test_calculateDebtToTargetHealthFactor_HealthFactorEqualsTargetHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22800, ~: 22724)
Logs:
Bound result 3116123919
Bound result 10725
Bound result 2977
Bound result 1486249897798496545
Bound result 555054242782847130
Bound result 6199474701275945
Bound result 9
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 24870)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 14911)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 24870)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 19926, ~: 19850)
Logs:
Bound result 3116123919
Bound result 10725
Bound result 2977
Bound result 1486249897798496545
Bound result 555054242782847130
Bound result 6199474701275945
Bound result 9
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22558, ~: 22482)
Logs:
Bound result 3116123919
Bound result 10725
Bound result 2977
Bound result 1486249897798496545
Bound result 555054242782847130
Bound result 6199474701275945
Bound result 9
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22541, ~: 22465)
Logs:
Bound result 3116123919
Bound result 10725
Bound result 2977
Bound result 1486249897798496545
Bound result 555054242782847130
Bound result 6199474701275945
Bound result 9
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.98s (2.96s CPU time)
Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 8885)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8853)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8874)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8841)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8867)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 8934)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 8899)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 8887)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 8887)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8876)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8810)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8843)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8820)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8877)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8828)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 8906)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 26.04ms (1.31ms CPU time)
Ran 7 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 229714, ~: 230680)
Logs:
Bound result 3124043968137
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 230630, ~: 231596)
Logs:
Bound result 3124043968137
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 677343, ~: 679873)
Logs:
Bound result 7258
Bound result 13256
Bound result 186
Bound result 5000000000000000
[PASS] test_reportDeficit_halted() (gas: 264305)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 24872)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 33776, ~: 33776)
[PASS] test_reportDeficit_with_premium() (gas: 678452)
Logs:
Bound result 10000000000
Bound result 31536000
Bound result 5000000000
Bound result 0
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 14.30s (14.27s CPU time)
Ran 5 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 268636, ~: 269412)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_liquidateCollateral_fuzz_CollateralToLiquidatorIsZero(uint256) (runs: 5000, μ: 109641, ~: 110554)
Logs:
Bound result 3124043968137
[PASS] test_liquidateCollateral_fuzz_receiveShares_sharesToLiquidator(uint256,uint256) (runs: 5000, μ: 742147, ~: 743458)
Logs:
Bound result 934999
Bound result 100
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 100893, ~: 100682)
Logs:
Bound result 999999999900000068691281934999
Bound result 100
[PASS] test_liquidateCollateral_receiveShares_sharesToLiquidatorIsZero() (gas: 727242)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 12.74s (12.72s 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, μ: 957327, ~: 930302)
Logs:
Bound result 812
[PASS] test_extSloads(uint256,bytes) (runs: 5000, μ: 1000378, ~: 922380)
Logs:
Bound result 362
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 59.04s (59.04s 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: 65337)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 74242)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74461)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 401.99ms (378.74ms CPU time)
Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 910801)
[PASS] test_repayNative() (gas: 980882)
[PASS] test_supplyAndCollateralNative() (gas: 304419)
[PASS] test_supplyNative() (gas: 286032)
[PASS] test_withdrawNative() (gas: 507225)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 47.79ms (4.12ms CPU time)
Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 742376)
[PASS] test_repayWithSig() (gas: 973713)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209662)
[PASS] test_setUsingAsCollateralWithSig() (gas: 288981)
[PASS] test_supplyWithSig() (gas: 460237)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145275)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143206)
[PASS] test_withdrawWithSig() (gas: 408810)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 51.99ms (8.23ms CPU time)
Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 203659)
[PASS] test_change_role_responsibility() (gas: 108093)
[PASS] test_hub_access_manager_exposure() (gas: 13405)
[PASS] test_hub_admin_access() (gas: 1347096)
[PASS] test_migrate_role_responsibility() (gas: 694868)
[PASS] test_setInterestRateData_access() (gas: 102038)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.18ms (3.77ms CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 243887, ~: 243786)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 97655)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 124648)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 181984)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 3.01s (2.98s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 366068)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 76453)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 109879)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 119015)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 32.55ms (1.43ms CPU time)
Ran 3 tests for tests/unit/Hub/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 290881)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 511183, ~: 511090)
Logs:
Bound result 351500639
Bound result 1256746
[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 450662, ~: 450456)
Logs:
Bound result 3124043968137
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 17.41s (17.39s CPU time)
Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 15199)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 15451)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 55995, ~: 55810)
Logs:
Bound result 123
Bound result 9935
Bound result 242144962160795
Bound result 10002
Bound result 4104678259
Bound result 1
Bound result 10001
Bound result 7951
Bound result 2000000000000000000
Bound result 242144962160795
Bound result 61982116876475
Bound result 6
Bound result 324984479734706524154718337860
Bound result 0
Bound result 41696925614953
Bound result 113050968807981175
Bound result 7393
Bound result 999999999999999999999999999997
Bound result 324984479734706524154718337860
Bound result 107270261361382
Bound result 324984479734706524154718337860
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 54996, ~: 54995)
Logs:
Bound result 123
Bound result 9935
Bound result 242144962160795
Bound result 10002
Bound result 4104678259
Bound result 1
Bound result 10001
Bound result 7951
Bound result 2000000000000000000
Bound result 242144962160795
Bound result 61982116876475
Bound result 6
Bound result 324984479734706524154718337860
Bound result 0
Bound result 41696925614953
Bound result 113050968807981175
Bound result 7393
Bound result 999999999999999999999999999997
Bound result 999999999999999999999999999997
Bound result 324984479734706524154718337860
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 71318, ~: 71328)
Logs:
Bound result 123
Bound result 9935
Bound result 242144962160795
Bound result 10002
Bound result 4104678259
Bound result 1
Bound result 10001
Bound result 7951
Bound result 2000000000000000000
Bound result 242144962160795
Bound result 61982116876475
Bound result 6
Bound result 324984479734706524154718337860
Bound result 0
Bound result 41696925614953
Bound result 113050968807981175
Bound result 7393
Bound result 999999999999999999999999999997
Bound result 1
Bound result 10001
Bound result 7951
Bound result 2000000000000000000
Bound result 242144962160795
Bound result 61982116876475
Bound result 6
Bound result 324984479734706524154718337860
Bound result 0
Bound result 2
Bound result 999999999999999999999999999997
Bound result 324984479734706524154718337860
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 58532, ~: 58435)
Logs:
Bound result 0
Bound result 9833
Bound result 189597072245179535
Bound result 10342
Bound result 358915368519517850
Bound result 1991000276852174993102
Bound result 10340
Bound result 1
Bound result 1000000000003502901
Bound result 189597072245179535
Bound result 3290645237291771
Bound result 14
Bound result 311073772336127683036626566477
Bound result 57
Bound result 5949105505117825
Bound result 438096387541847346
Bound result 2363
Bound result 567515969767983651245938229139
Bound result 30
Bound result 311073772336127683036626566477
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 55394, ~: 55192)
Logs:
Bound result 5710875288681642
Bound result 3809
Bound result 84256159614910858
Bound result 14411
Bound result 45072257358
Bound result 832917937072393996250990176956276824108
Bound result 14195
Bound result 1057
Bound result 1652381707363908279
Bound result 84256159614910858
Bound result 9999999999999997
Bound result 11
Bound result 549547979191394535544497935208
Bound result 5378009896918780
Bound result 2
Bound result 999999999999060718
Bound result 1059
Bound result 673338644076316849611487814999
Bound result 549547979191394535544497935208
Bound result 617049571022759060521779360899146823592
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 68036, ~: 67975)
Logs:
Bound result 123
Bound result 9935
Bound result 242144962160795
Bound result 10002
Bound result 4104678259
Bound result 1
Bound result 10001
Bound result 7951
Bound result 2000000000000000000
Bound result 242144962160795
Bound result 61982116876475
Bound result 6
Bound result 324984479734706524154718337860
Bound result 0
Bound result 41696925614953
Bound result 113050968807981175
Bound result 7393
Bound result 999999999999999999999999999997
Bound result 1
Bound result 10001
Bound result 7951
Bound result 2000000000000000000
Bound result 242144962160795
Bound result 61982116876475
Bound result 6
Bound result 324984479734706524154718337860
Bound result 0
Bound result 2
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.12s (17.10s CPU time)
Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 9265)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 9286)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 17117, ~: 16909)
Logs:
Bound result 7847
Bound result 2594
Bound result 5000000000000000
Bound result 11557
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19345, ~: 19134)
Logs:
Bound result 7847
Bound result 2594
Bound result 5000000000000000
Bound result 11557
Bound result 1256
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 1.09s (1.06s CPU time)
Ran 11 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26013)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259431)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31746)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26838)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26957)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27010)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 26995)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26924)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31966)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31966)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33701)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 25.04ms (1.35ms 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, μ: 5351521, ~: 5175406)
Logs:
Bound result 416966230219621053938274952927
Bound result 0
Bound result 796581240052418918521216347353
Bound result 563389367259961125742974148930
Bound result 124281697546210950467266407747
Bound result 33522909571553656
Bound result 198784650842049752704523792805
Bound result 12412
Bound result 6
Bound result 124281697546210950467266407747
Bound result 33522909571553656
Bound result 198784650842049752704523792805
Bound result 12412
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 126.28s (126.25s CPU time)
Ran 27 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4679)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9072, ~: 8834)
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, μ: 7545, ~: 7381)
Logs:
Bound result 9
[PASS] test_constants() (gas: 3110)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8585, ~: 8824)
Logs:
Bound result 10765498
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3515, ~: 3577)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3596, ~: 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: 3161)
[PASS] test_mulDivDown_WithRemainder() (gas: 3268)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3721)
[PASS] test_mulDivUp_NoRemainder() (gas: 3249)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3084)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3140)
[PASS] test_mulDivUp_WithRemainder() (gas: 3248)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3792)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8596, ~: 8530)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_signedSub_revertsWith_SafeCastOverflowedUintToInt(uint256) (runs: 5000, μ: 7652, ~: 7702)
Logs:
Bound result 57896044618658097711785492504343953926634992332820282019728792007080608788105
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3447, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12504, ~: 9811)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3421, ~: 3340)
Suite result: ok. 27 passed; 0 failed; 0 skipped; finished in 2.41s (2.40s CPU time)
Ran 23 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 384465)
Logs:
Bound result 1000000000000000000000
Bound result 500000000000000000000
Bound result 31536000
[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 693123)
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, μ: 383891, ~: 385883)
Logs:
Bound result 615514462186775432459
Bound result 571193127101173104469
Bound result 173721804
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 682029, ~: 695033)
Logs:
Bound result 3595
Bound result 488
Bound result 32000000
Bound result 2
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 249668, ~: 253364)
Logs:
Bound result 615514462186775432459
Bound result 571193127101173104469
Bound result 173721804
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 641885, ~: 645197)
Logs:
Bound result 3595
Bound result 488
Bound result 32000000
Bound result 2
[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 211780)
[PASS] test_restore_partial_drawn() (gas: 343453)
[PASS] test_restore_partial_same_block() (gas: 323849)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 232066)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 260954)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 55430)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 218767)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 218744)
[PASS] test_restore_revertsWith_SpokeHalted() (gas: 96422)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 178011)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 360686)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 251989)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 15768000
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest_and_premium() (gas: 643310)
Logs:
Bound result 100000000000000000000
Bound result 50000000000000000000
Bound result 31536000
Bound result 1
[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 530545)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 236285)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 225393)
[PASS] test_restore_when_asset_frozen() (gas: 436116)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 19.42s (19.39s CPU time)
Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 658733636)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.97s (2.95s CPU time)
Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 674872)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 159656, ~: 159612)
Logs:
Bound result 9
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 334933, ~: 335080)
Logs:
Bound result 3
Bound result 218470873395738003579119570309
Bound result 446067553769140138733721804
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112375, ~: 112331)
Logs:
Bound result 9
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 273643, ~: 275299)
Logs:
Bound result 1291
Bound result 1071208440522043736492
Bound result 173721804
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 229183, ~: 229385)
Logs:
Bound result 888155841543549236576985341915
Bound result 1883605286
Bound result 8
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 343278, ~: 343297)
Logs:
Bound result 2
Bound result 378088810586379137523864648212
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 836860, ~: 839703)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_add_multi_add_minimal_shares() (gas: 337055)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 359906)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64471)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13610)
[PASS] test_add_revertsWith_InvalidShares() (gas: 229032)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224488)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 99466)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99502)
[PASS] test_add_single_asset() (gas: 331146)
Logs:
Bound result 2
Bound result 100000000000000000000
[PASS] test_add_with_increased_index() (gas: 314947)
[PASS] test_add_with_increased_index_with_premium() (gas: 690562)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 38.25s (38.23s CPU time)
Ran 4 tests for tests/unit/Hub/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 229366, ~: 229432)
Logs:
Bound result 3
Bound result 18470873395738003579119570309
Bound result 446067553769140138733721804
[PASS] test_skimAdd_fuzz_donationBeforeAdd(uint256,uint256,uint256) (runs: 5000, μ: 229398, ~: 229464)
Logs:
Bound result 3
Bound result 18470873395738003579119570309
Bound result 446067553769140138733721804
[PASS] test_skimAdd_fuzz_wrongSpokeTransfer(uint256,uint256,uint256) (runs: 5000, μ: 218486, ~: 218428)
Logs:
Bound result 3
Bound result 18132171100462486213502917929
Bound result 446067553769140138733721804
[PASS] test_skimRestore_fuzz_liquidityDonation(uint256,uint256,uint256) (runs: 5000, μ: 271527, ~: 272954)
Logs:
Bound result 3
Bound result 18470873395738003579119570309
Bound result 446067553769140138733721804
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 14.01s (13.98s CPU time)
Ran 9 tests for tests/unit/Hub/Hub.SpokeConfig.t.sol:HubSpokeConfigTest
[PASS] test_add_active_halted_scenarios() (gas: 301170)
[PASS] test_draw_active_halted_scenarios() (gas: 300269)
[PASS] test_eliminateDeficit_active_halted_scenarios() (gas: 841734)
[PASS] test_payFeeShares_active_halted_scenarios() (gas: 365167)
[PASS] test_refreshPremium_active_halted_scenarios() (gas: 262209)
[PASS] test_remove_active_halted_scenarios() (gas: 316466)
[PASS] test_reportDeficit_active_halted_scenarios() (gas: 442284)
[PASS] test_restore_active_halted_scenarios() (gas: 352720)
[PASS] test_transferShares_fuzz_active_halted_scenarios(bool,bool,bool,bool) (runs: 5000, μ: 211913, ~: 211955)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 3.99s (3.97s CPU time)
Ran 40 tests for tests/unit/misc/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 662276)
Logs:
Bound result 5000000000000000000
[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 661756, ~: 663009)
Logs:
Bound result 3124043968137
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32404)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32479)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 283169)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271182)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25340)
[PASS] test_constructor() (gas: 12715)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 5958)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17616)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 752069)
Logs:
Bound result 5000000000000000000
[PASS] test_repayNative_excessAmount() (gas: 671263)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 747963, ~: 752680)
Logs:
Bound result 3124043968137
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 682162, ~: 677342)
Logs:
Bound result 90000068691281935000
Bound result 25920101
[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 32485)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30030)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39253)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 326235)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 303286)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38728)
[PASS] test_supplyAndCollateralNative() (gas: 333440)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 333756, ~: 333468)
Logs:
Bound result 3124043968137
[PASS] test_supplyNative() (gas: 305134)
Logs:
Bound result 100000000000000000000
[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 305449, ~: 305161)
Logs:
Bound result 3124043968137
[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 32439)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 30014)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39219)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_hubAdd() (gas: 374308)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336177)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38740)
[PASS] test_withdrawNative() (gas: 331272)
Logs:
Bound result 100000000000000000000
[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 330868, ~: 331344)
Logs:
Bound result 3124043968137
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 267521, ~: 267318)
Logs:
Bound result 3124043968137
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 620253, ~: 622051)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32501)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32534)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 300149)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271244)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25395)
Suite result: ok. 40 passed; 0 failed; 0 skipped; finished in 35.42s (35.40s CPU time)
Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 483450)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 627718, ~: 628661)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 481852, ~: 481737)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12537)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 217958)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 102871)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 91050, ~: 91050)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 39916)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 14.70s (14.68s CPU time)
Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 12863, ~: 12863)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 95268, ~: 94363)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13531, ~: 13531)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.98s (3.98s 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, μ: 15128, ~: 15261)
Logs:
Bound result 100
Bound result 68691281934999
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15355, ~: 15347)
Logs:
Bound result 90101
Bound result 68691281934999
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12601, ~: 12760)
[PASS] test_percentMul() (gas: 14932)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15338, ~: 15330)
Logs:
Bound result 90101
Bound result 68691281934999
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15131, ~: 15264)
Logs:
Bound result 100
Bound result 68691281934999
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11529, ~: 12063)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.53s (1.53s CPU time)
Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 193610)
Logs:
Bound result 1000000000000000000000
Bound result 1000000000000000000000
[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 196996, ~: 197193)
Logs:
Bound result 68691281934999
Bound result 100
[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 150936, ~: 150645)
Logs:
Bound result 3124043968137
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 195204)
[PASS] test_transferShares_revertsWith_SpokeHalted() (gas: 184210)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 177474)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22550)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 4.35s (4.32s CPU time)
Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 42546)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 369063, ~: 368984)
Logs:
Bound result 9
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 206161, ~: 206098)
Logs:
Bound result 9
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 276362, ~: 278705)
Logs:
Bound result 68691281934999
Bound result 1
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 389701, ~: 393239)
Logs:
Bound result 615514462186775432459
Bound result 27544
Bound result 6348
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 277556, ~: 277455)
Logs:
Bound result 9
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 23.16s (23.13s CPU time)
Ran 13 tests for tests/unit/HubConfigurator.GranularAccessControl.t.sol:HubConfiguratorGranularAccessControlTest
[PASS] test_assetManager_canCall_deactivateAsset() (gas: 137485)
[PASS] test_assetManager_canCall_freezeAsset() (gas: 137982)
[PASS] test_assetManager_canCall_haltAsset() (gas: 137478)
[PASS] test_assetManager_canCall_updateLiquidityFee() (gas: 81365)
[PASS] test_assetManager_cannotCall_anySpokeManagerMethod() (gas: 354044)
[PASS] test_fuzz_unauthorized_cannotCall_assetManagerMethods(address) (runs: 5000, μ: 277851, ~: 277851)
[PASS] test_fuzz_unauthorized_cannotCall_spokeManagerMethods(address) (runs: 5000, μ: 352501, ~: 352501)
[PASS] test_spokeManager_canCall_addSpoke() (gas: 126648)
[PASS] test_spokeManager_canCall_freezeSpoke() (gas: 183775)
[PASS] test_spokeManager_canCall_updateSpokeActive() (gas: 65763)
[PASS] test_spokeManager_canCall_updateSpokeCaps() (gas: 66353)
[PASS] test_spokeManager_canCall_updateSpokeHalted() (gas: 65732)
[PASS] test_spokeManager_cannotCall_anyAssetManagerMethod() (gas: 278828)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 5.73s (5.70s CPU time)
Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1360671)
[PASS] test_liquidation_full() (gas: 1911120)
[PASS] test_liquidation_partial() (gas: 1910837)
[PASS] test_liquidation_receiveShares_full() (gas: 1902286)
[PASS] test_liquidation_receiveShares_partial() (gas: 1902005)
[PASS] test_liquidation_reportDeficit_full() (gas: 1890908)
[PASS] test_multicall_ops() (gas: 1397348)
[PASS] test_repay() (gas: 859766)
[PASS] test_setUserPositionManagersWithSig() (gas: 307284)
[PASS] test_supply() (gas: 537460)
[PASS] test_updateRiskPremium() (gas: 1337041)
[PASS] test_updateUserDynamicConfig() (gas: 583417)
[PASS] test_usingAsCollateral() (gas: 1492215)
[PASS] test_withdraw() (gas: 1945107)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 74.46ms (30.98ms CPU time)
Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 1128793)
[PASS] test_liquidation_full() (gas: 1777187)
[PASS] test_liquidation_partial() (gas: 1776904)
[PASS] test_liquidation_receiveShares_full() (gas: 1768353)
[PASS] test_liquidation_receiveShares_partial() (gas: 1768072)
[PASS] test_liquidation_reportDeficit_full() (gas: 1813184)
[PASS] test_multicall_ops() (gas: 1314281)
[PASS] test_repay() (gas: 769329)
[PASS] test_setUserPositionManagersWithSig() (gas: 311738)
[PASS] test_supply() (gas: 540141)
[PASS] test_updateRiskPremium() (gas: 937307)
[PASS] test_updateUserDynamicConfig() (gas: 587871)
[PASS] test_usingAsCollateral() (gas: 1085162)
[PASS] test_withdraw() (gas: 1587373)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 71.87ms (27.24ms CPU time)
Ran 4 tests for tests/unit/Spoke/Spoke.PermitReserve.t.sol:SpokePermitReserveTest
[PASS] test_permitReserve() (gas: 88249)
[PASS] test_permitReserve_forwards_correct_call() (gas: 35576)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 24412)
[PASS] test_permitReserve_revertsWith_ReserveNotListedIn() (gas: 22993)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 24.71ms (1.10ms CPU time)
Ran 10 tests for tests/unit/Spoke/Spoke.PositionManager.t.sol:SpokePositionManagerTest
[PASS] test_onlyPositionManager_on_borrow() (gas: 536971)
[PASS] test_onlyPositionManager_on_repay() (gas: 559131)
[PASS] test_onlyPositionManager_on_supply() (gas: 291739)
[PASS] test_onlyPositionManager_on_updateUserDynamicConfig() (gas: 1281054)
[PASS] test_onlyPositionManager_on_updateUserRiskPremium() (gas: 1409640)
[PASS] test_onlyPositionManager_on_usingAsCollateral() (gas: 144615)
[PASS] test_onlyPositionManager_on_withdraw() (gas: 320174)
[PASS] test_renouncePositionManagerRole() (gas: 20290)
[PASS] test_renouncePositionManagerRole_noop_from_disabled() (gas: 21926)
[PASS] test_setApprovalForPositionManager(bytes32) (runs: 5000, μ: 18133, ~: 18133)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 512.67ms (489.44ms CPU time)
Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 9396224)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 9388752)
[PASS] test_dustColl_allowed() (gas: 9254783)
[PASS] test_dustDebt_allowed() (gas: 9383656)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 49.22ms (19.20ms 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, μ: 693076, ~: 693216)
Logs:
Bound result 100000000000000000000000000000
Bound result 11645004
Bound result 40775633259982327842294181619
[PASS] test_repay_less_than_share() (gas: 588312)
[PASS] test_repay_only_base_debt_interest() (gas: 766968)
[PASS] test_repay_only_base_debt_no_premium() (gas: 650623)
[PASS] test_repay_supply_ex_rate_decr() (gas: 1461014)
[PASS] test_repay_supply_ex_rate_decr_skip_time() (gas: 1458330)
[PASS] test_repay_zero_shares_nonzero_premium_debt() (gas: 759686)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 10.83s (10.81s CPU time)
Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 138009)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 642470, ~: 642300)
Logs:
Bound result 9
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 254873, ~: 254880)
Logs:
Bound result 9
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 582443, ~: 582819)
Logs:
Bound result 68691281934999
Bound result 0
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 542163, ~: 542612)
Logs:
Bound result 68691281934999
Bound result 0
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 3878247, ~: 3894370)
Logs:
Bound result 416966230219621053938274952927
Bound result 0
Bound result 796581240052418918521216347353
Bound result 563389367259961125742974148930
Bound result 124281697546210950467266407747
Bound result 33522909571553656
Bound result 198784650842049752704523792805
Bound result 12412
Bound result 6
Bound result 124281697546210950467266407747
Bound result 33522909571553656
Bound result 198784650842049752704523792805
Bound result 12412
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 3942134, ~: 3957300)
Logs:
Bound result 24855
Bound result 6000
Bound result 702486556866863663715258507576
Bound result 602
Bound result 5000000000000
Bound result 651
Bound result 600000000000000000000
Bound result 2182879385
Bound result 3058
Bound result 82857
Bound result 12827
Bound result 23602
Bound result 12142
Bound result 5000000000000
Bound result 651
Bound result 600000000000000000000
Bound result 2182879385
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 186.70s (186.68s 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, μ: 525551, ~: 525692)
Logs:
Bound result 530
Bound result 57247
Bound result 32000000
Bound result 1
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 772709, ~: 772809)
Logs:
Bound result 7719
Bound result 10754
Bound result 38687
Bound result 96000000
Bound result 3
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 530654336)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 226668497)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 525854)
Logs:
Bound result 500000000000000000000
Bound result 5000
Bound result 34560000
Bound result 2
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 17.80s (17.78s CPU time)
Ran 32 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_borrowCount() (gas: 108134)
[PASS] test_borrowCount(uint256) (runs: 5000, μ: 1913140, ~: 1745979)
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, μ: 1928715, ~: 1761601)
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, μ: 14041, ~: 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, μ: 144727, ~: 144367)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 152949, ~: 152949)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 144662, ~: 144302)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 134619, ~: 134612)
[PASS] test_next(uint256) (runs: 5000, μ: 20073, ~: 18925)
Logs:
Bound result 649
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18021, ~: 16874)
Logs:
Bound result 649
[PASS] test_nextBorrowing_continuous() (gas: 61801685)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18185, ~: 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 162.08s (162.08s CPU time)
Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12531)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33303, ~: 33478)
Logs:
Bound result 3124043968137
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11089)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 206641, ~: 206759)
Logs:
Bound result 3124043968137
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 180556)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.30s (3.27s 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.32s (1.32s CPU time)
Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5650)
[PASS] test_borrow_typeHash() (gas: 9867)
[PASS] test...*[Comment body truncated]* |
♻️ Forge Gas Snapshots
🔕 Unchanged
|
Contributor
Author
|
refer to #1193 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.