Skip to content

Conversation

@DhairyaSethi
Copy link
Member

@DhairyaSethi DhairyaSethi commented Dec 15, 2025

todo inline caller arg to avoid using msg.sender internally

@github-actions
Copy link

Forge Build Sizes

🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle 1,842 2,580 22,734 46,572
AccessManager 10,198 11,423 14,378 37,729
AccessManagerEnumerable 12,137 13,534 12,439 35,618
Address 44 94 24,532 49,058
Arrays 44 94 24,532 49,058
AssetInterestRateStrategy 2,349 2,534 22,227 46,618
AssetLogic 44 94 24,532 49,058
AuthorityUtils 44 94 24,532 49,058
Bytes 44 94 24,532 49,058
Comparators 44 94 24,532 49,058
Constants 447 499 24,129 48,653
ECDSA 44 94 24,532 49,058
EIP712Hash 441 493 24,135 48,659
EIP712Types 44 94 24,532 49,058
ERC1967Proxy 122 934 24,454 48,218
ERC1967Utils 44 94 24,532 49,058
EnumerableSet 44 94 24,532 49,058
Errors 44 94 24,532 49,058
GatewayBaseWrapper 1,810 2,085 22,766 47,067
Hub 21,598 21,832 2,978 27,320
HubConfigurator 9,981 10,254 14,595 38,898
JsonBindings 9,244 9,296 15,332 39,856
KeyValueList 44 94 24,532 49,058
KeyValueListWrapper 802 830 23,774 48,322
LibBit 44 94 24,532 49,058
LiquidationLogic 6,542 6,594 18,034 42,558
LiquidationLogicWrapper 10,943 11,117 13,633 38,035
Math 44 94 24,532 49,058
MathUtils 44 94 24,532 49,058
MockERC1271Wallet 599 733 23,977 48,419
MockERC20 1,913 2,379 22,663 46,773
MockNoncesKeyed 601 629 23,975 48,523
MockPriceFeed 642 1,300 23,934 47,852
MockSkimSpoke 923 1,082 23,653 48,070
NativeTokenGateway 4,799 5,216 19,777 43,936
NoncesKeyed 425 453 24,151 48,699
Panic 44 94 24,532 49,058
PercentageMath 44 94 24,532 49,058
PercentageMathWrapper 592 620 23,984 48,532
PositionStatusMap 44 94 24,532 49,058
PositionStatusMapWrapper 2,389 2,417 22,187 46,735
Premium 44 94 24,532 49,058
ProxyAdmin 977 1,213 23,599 47,939
RescuableWrapper 770 904 23,806 48,248
ReserveFlagsMap 44 94 24,532 49,058
ReserveFlagsMapWrapper 1,075 1,103 23,501 48,049
Roles 153 203 24,423 48,949
SafeCast 44 94 24,532 49,058
SafeERC20 44 94 24,532 49,058
SharesMath 44 94 24,532 49,058
SignatureChecker 44 94 24,532 49,058
SignatureGateway 9,913 10,424 14,663 38,728
SlotDerivation 44 94 24,532 49,058
SpokeConfigurator 8,659 8,932 15,917 40,220
SpokeInstance 24,555 25,298 21 23,854
StorageSlot 44 94 24,532 49,058
TestnetERC20 2,810 3,686 21,766 45,466
Time 44 94 24,532 49,058
TransientSlot 44 94 24,532 49,058
TransparentUpgradeableProxy 1,073 3,445 23,503 45,707
TreasurySpoke 2,801 3,216 21,775 45,936
UnitPriceFeed 700 1,635 23,876 47,517
UserPositionDebt 44 94 24,532 49,058
UserPositionDebtWrapper 2,677 2,705 21,899 46,447
Utils 44 94 24,532 49,058
WETH9 1,864 2,330 22,712 46,822
WadRayMath 44 94 24,532 49,058
WadRayMathWrapper 1,371 1,399 23,205 47,753

@github-actions
Copy link

🌈 Test Results
No files changed, compilation skipped

Ran 1 test for tests/unit/Spoke/Spoke.AccrueInterest.Scenario.t.sol:SpokeAccrueInterestScenarioTest
[SKIP: pending rft] test_accrueInterest_fuzz_RPBorrowAndSkipTime_twoActions((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 0, μ: 0, ~: 0)
Suite result: ok. 0 passed; 0 failed; 1 skipped; finished in 41.60ms (4.41ms CPU time)

Ran 8 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 5450)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4659, ~: 4659)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4615, ~: 4615)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 4902, ~: 4902)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4703, ~: 4703)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 4441, ~: 4441)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 4462, ~: 4462)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 4681, ~: 4681)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 998.76ms (998.54ms CPU time)

Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17646)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 42033, ~: 42033)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13345)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 14077)
[PASS] test_registerSpoke_unregister() (gas: 36599)
[PASS] test_renouncePositionManagerRole() (gas: 65303)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 76717)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 76878)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 347.16ms (328.03ms CPU time)

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 921861)
[PASS] test_repayNative() (gas: 1009990)
[PASS] test_supplyAndCollateralNative() (gas: 320256)
[PASS] test_supplyNative() (gas: 290629)
[PASS] test_withdrawNative() (gas: 511175)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 36.99ms (4.38ms CPU time)

Ran 17 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] testDECIMALS() (gas: 8379)
[PASS] test_constructor() (gas: 440478)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 38111)
[PASS] test_description() (gas: 12049)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 444404, ~: 444725)
[PASS] test_getReservePrice() (gas: 47398)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 46691)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10998)
[PASS] test_getReservePrices() (gas: 79462)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 49374)
[PASS] test_getReserveSource() (gas: 47628)
[PASS] test_setReserveSource() (gas: 44488)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97705)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 15349)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 15171)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 10984)
[PASS] test_spoke() (gas: 10559)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 1.89s (1.88s CPU time)

Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 13319, ~: 13319)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 102401, ~: 102401)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 14081, ~: 14081)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 4.42s (8.54s CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 755212)
[PASS] test_repayWithSig() (gas: 992025)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 208927)
[PASS] test_setUsingAsCollateralWithSig() (gas: 296361)
[PASS] test_supplyWithSig() (gas: 468611)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145441)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143090)
[PASS] test_withdrawWithSig() (gas: 418613)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 49.13ms (8.70ms CPU time)

Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2312388)
[PASS] test_change_role_responsibility() (gas: 122065)
[PASS] test_hub_access_manager_exposure() (gas: 12684)
[PASS] test_hub_admin_access() (gas: 1205062)
[PASS] test_migrate_role_responsibility() (gas: 682280)
[PASS] test_setInterestRateData_access() (gas: 103546)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 23.57ms (3.78ms CPU time)

Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 674997)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 160182, ~: 160147)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 330229, ~: 330441)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112997, ~: 112962)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 274494, ~: 274376)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 229998, ~: 230208)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 345520, ~: 345444)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 822159, ~: 822213)
[PASS] test_add_multi_add_minimal_shares() (gas: 328544)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 368149)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64867)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13475)
[PASS] test_add_revertsWith_InvalidShares() (gas: 230124)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 228043)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 98590)
[PASS] test_add_revertsWith_SpokePaused() (gas: 98707)
[PASS] test_add_single_asset() (gas: 333479)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_add_with_increased_index() (gas: 308110)
[PASS] test_add_with_increased_index_with_premium() (gas: 688370)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 46.26s (46.24s CPU time)

Ran 9 tests for tests/unit/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 325391)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 200296, ~: 201361)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 266772, ~: 271836)
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 413030, ~: 411058)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 263153, ~: 252829)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 204995, ~: 185538)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 464454, ~: 455037)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 232469, ~: 241359)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 548154, ~: 538598)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 74.38s (74.38s 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, μ: 30634, ~: 30638)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 32361, ~: 32390)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 34477, ~: 34396)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.25s (3.23s 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, μ: 968782, ~: 969359)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 57696, ~: 57625)
[PASS] test_addAsset_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 31175, ~: 31175)
[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 50891)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 50790)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 872500)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 46921)
[PASS] test_addSpoke() (gas: 126299)
[PASS] test_addSpokeToAssets() (gas: 222721)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 24780)
[PASS] test_addSpokeToAssets_revertsWith_OwnableUnauthorizedAccount() (gas: 17127)
[PASS] test_addSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 16904)
[PASS] test_deactivateAsset() (gas: 158797)
[PASS] test_deactivateAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17944)
[PASS] test_deactivateSpoke() (gas: 156391)
[PASS] test_deactivateSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18038)
[PASS] test_freezeAsset() (gas: 233430)
[PASS] test_freezeAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 18007)
[PASS] test_freezeSpoke() (gas: 249608)
[PASS] test_freezeSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18016)
[PASS] test_pauseAsset() (gas: 158785)
[PASS] test_pauseAsset_revertsWith_OwnableUnauthorizedAccount() (gas: 17964)
[PASS] test_pauseSpoke() (gas: 156360)
[PASS] test_pauseSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 18015)
[PASS] test_updateFeeConfig_Scenario() (gas: 335983)
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, μ: 185972, ~: 186266)
[PASS] test_updateFeeConfig_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17771, ~: 17771)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 50132)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 52271)
[PASS] test_updateFeeReceiver_Scenario() (gas: 214649)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 1048755)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 1084042)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 180041, ~: 180041)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17292, ~: 17292)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 54713)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 86292)
[PASS] test_updateInterestRateData() (gas: 74045)
[PASS] test_updateInterestRateData_revertsWith_OwnableUnauthorizedAccount() (gas: 19194)
[PASS] test_updateInterestRateStrategy() (gas: 93835)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 28677, ~: 28677)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 76679)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 66356)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 66872)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 90586, ~: 92231)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 54744)
[PASS] test_updateLiquidityFee_revertsWith_OwnableUnauthorizedAccount() (gas: 16698)
[PASS] test_updateReinvestmentController() (gas: 101789)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_OwnableUnauthorizedAccount(address) (runs: 5000, μ: 17291, ~: 17291)
[PASS] test_updateSpokeActive() (gas: 84308)
[PASS] test_updateSpokeActive_revertsWith_OwnableUnauthorizedAccount() (gas: 20241)
[PASS] test_updateSpokeCaps() (gas: 64461)
[PASS] test_updateSpokeCaps_revertsWith_OwnableUnauthorizedAccount() (gas: 20238)
[PASS] test_updateSpokeDrawCap() (gas: 64292)
[PASS] test_updateSpokeDrawCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20179)
[PASS] test_updateSpokePaused() (gas: 87332)
[PASS] test_updateSpokePaused_revertsWith_OwnableUnauthorizedAccount() (gas: 20308)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 64234)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_OwnableUnauthorizedAccount() (gas: 20246)
[PASS] test_updateSpokeSupplyCap() (gas: 64238)
[PASS] test_updateSpokeSupplyCap_revertsWith_OwnableUnauthorizedAccount() (gas: 20213)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 89.24s (95.75s 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, μ: 23062, ~: 23016)
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 25208)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 15209)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 25141)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20123, ~: 20077)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22822, ~: 22776)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22905, ~: 22859)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.68s (4.66s CPU time)

Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 9012)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8980)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 9001)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8968)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8994)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 9061)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 9026)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 9014)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 9014)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 9003)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8937)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8970)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8947)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 9004)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8955)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 9033)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 22.59ms (1.25ms CPU time)

Ran 29 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_bucketId() (gas: 8971)
[PASS] test_collateralCount() (gas: 110158)
[PASS] test_collateralCount(uint256) (runs: 5000, μ: 2031098, ~: 1834648)
[PASS] test_collateralCount_ignoresInvalidBits() (gas: 124482)
[PASS] test_constants() (gas: 44966)
[PASS] test_fls() (gas: 545261)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14159, ~: 14452)
[PASS] test_fuzz_setBorrowing(uint256,bool) (runs: 5000, μ: 22353, ~: 32140)
[PASS] test_fuzz_setUseAsCollateral(uint256,bool) (runs: 5000, μ: 22449, ~: 32236)
[PASS] test_getBucketWord(uint256) (runs: 5000, μ: 14489, ~: 14489)
[PASS] test_isUsingAsCollateralOrBorrowing_slot0() (gas: 109180)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 44203)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 162282, ~: 162282)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 153488, ~: 152852)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 162044, ~: 162044)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 153467, ~: 152831)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 143593, ~: 143579)
[PASS] test_next(uint256) (runs: 5000, μ: 20224, ~: 19157)
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18185, ~: 18289)
[PASS] test_nextBorrowing_continuous() (gas: 63845326)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 17938, ~: 17116)
[PASS] test_nextCollateral_continuous() (gas: 64381718)
[PASS] test_next_continuous() (gas: 91795620)
[PASS] test_popCount(bytes32) (runs: 5000, μ: 38133, ~: 38133)
[PASS] test_setBorrowing_slot0() (gas: 44129)
[PASS] test_setBorrowing_slot1() (gas: 44166)
[PASS] test_setUseAsCollateral_slot0() (gas: 44203)
[PASS] test_setUseAsCollateral_slot1() (gas: 44185)
[PASS] test_setters_use_correct_slot(uint256) (runs: 5000, μ: 22195, ~: 22195)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 98.72s (98.71s CPU time)

Ran 10 tests for tests/unit/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 8664)
[PASS] test_fromBpsDown() (gas: 9678)
[PASS] test_percentDiv() (gas: 15222)
[PASS] test_percentDivUp_ge_value(uint256,uint256) (runs: 5000, μ: 15346, ~: 15509)
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15670, ~: 15662)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12869, ~: 13012)
[PASS] test_percentMul() (gas: 15116)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15653, ~: 15645)
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15349, ~: 15512)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11731, ~: 12247)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 100.35s (101.40s CPU time)

Ran 5 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 268284, ~: 269280)
[PASS] test_liquidateCollateral_fuzz_CollateralToLiquidatorIsZero(uint256) (runs: 5000, μ: 110209, ~: 110942)
[PASS] test_liquidateCollateral_fuzz_receiveShares_sharesToLiquidator(uint256,uint256) (runs: 5000, μ: 755075, ~: 756359)
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 100456, ~: 100270)
[PASS] test_liquidateCollateral_receiveShares_sharesToLiquidatorIsZero() (gas: 741869)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 13.37s (14.72s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 368104)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 76753)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 110465)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 119743)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 32.24ms (1.39ms CPU time)

Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12654)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33713, ~: 33899)
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11400)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 209644, ~: 209774)
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 183215)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.28s (6.20s CPU time)

Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2053339)
[PASS] test_borrow_typeHash() (gas: 10008)
[PASS] test_constructor() (gas: 53238)
[PASS] test_eip712Domain() (gas: 2058969)
[PASS] test_repay_typeHash() (gas: 9931)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9943)
[PASS] test_supply_typeHash() (gas: 9945)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 10001)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 10008)
[PASS] test_withdraw_typeHash() (gas: 10053)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 20.51ms (1.86ms CPU time)

Ran 5 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 103986)
[PASS] test_permitReserve_forwards_correct_call() (gas: 51127)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40007)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30958)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29517)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 20.69ms (1.47ms CPU time)

Ran 8 tests for tests/unit/ReserveFlags.t.sol:ReserveFlagsTests
[PASS] test_constants() (gas: 13620)
[PASS] test_create_fuzz(bool,bool,bool,bool,bool) (runs: 5000, μ: 16485, ~: 16492)
[PASS] test_setBorrowable_fuzz(uint8) (runs: 5000, μ: 13414, ~: 13414)
[PASS] test_setFrozen_fuzz(uint8) (runs: 5000, μ: 13422, ~: 13422)
[PASS] test_setLiquidatable_fuzz(uint8) (runs: 5000, μ: 13422, ~: 13422)
[PASS] test_setPaused_fuzz(uint8) (runs: 5000, μ: 13297, ~: 13297)
[PASS] test_setReceiveSharesEnabled_fuzz(uint8) (runs: 5000, μ: 13405, ~: 13405)
[PASS] test_set_flags() (gas: 95757)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 1.62s (2.12s CPU time)

Ran 2 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 455870)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 84029)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 23.43ms (3.58ms CPU time)

Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 15487)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 15739)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 57008, ~: 56823)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 56019, ~: 55994)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 72627, ~: 72477)
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 59618, ~: 59477)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 56327, ~: 56155)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 69163, ~: 69098)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.32s (17.30s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 232952, ~: 232952)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 97214)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 124353)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 182249)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 20.46s (20.44s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 9317)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 9338)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 17326, ~: 17135)
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19614, ~: 19420)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 952.37ms (1.45s CPU time)

Ran 12 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26157)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 262562)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated() (gas: 46049)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 32053)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 27026)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 27145)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27266)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27282)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 27112)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 32175)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 32175)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33938)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 21.62ms (1.74ms CPU time)

Ran 26 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4854)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9259, ~: 9012)
[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 4015, ~: 4010)
[PASS] test_calculateLinearInterest() (gas: 4467)
[PASS] test_calculateLinearInterest_add_edge() (gas: 5043)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16815)
Logs:
  Bound result 0
  Bound result 1
  Bound result 864000000
  Bound result 864000000

[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint40) (runs: 5000, μ: 7704, ~: 7550)
[PASS] test_constants() (gas: 3167)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8753, ~: 8996)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3577, ~: 3634)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3660, ~: 3781)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3338, ~: 3339)
[PASS] test_mulDivDown_NoRemainder() (gas: 3302)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3147)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3181)
[PASS] test_mulDivDown_WithRemainder() (gas: 3236)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3768)
[PASS] test_mulDivUp_NoRemainder() (gas: 3306)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3102)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3160)
[PASS] test_mulDivUp_WithRemainder() (gas: 3305)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3884)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8714, ~: 8661)
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3416, ~: 3408)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12046, ~: 9378)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3436, ~: 3518)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 1.69s (2.98s CPU time)

Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190412, ~: 190412)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38493)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36935)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190368, ~: 190368)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38426)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37001)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 234170, ~: 234170)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38387)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36983)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190409, ~: 190409)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38449)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36944)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 67492, ~: 67492)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25509)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 26941)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 67535, ~: 67535)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25514)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27029)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 190343, ~: 190343)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38491)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 36977)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 43.54s (68.06s CPU time)

Ran 36 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 916150, ~: 916184)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 46608, ~: 46938)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 46639, ~: 46969)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 37590, ~: 37590)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 47157, ~: 46949)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 47407, ~: 47648)
[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 40923, ~: 36219)
[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 767690)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 764636)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 47752)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 125865, ~: 125918)
[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 34744, ~: 34731)
[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33334, ~: 33387)
[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 38876)
[PASS] test_hub_deploy_revertsWith_InvalidAddress() (gas: 47579)
[PASS] test_hub_max_riskPremium() (gas: 8570)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 731780)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 625973)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 72068)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 268837, ~: 269125)
[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 822264, ~: 822217)
[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 724846, ~: 724799)
[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 831017, ~: 831137)
[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 1208197, ~: 1208317)
[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 883263, ~: 883383)
[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 680300, ~: 680351)
[PASS] test_updateAssetConfig_fuzz_UseExistingSpokeAsFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 71740, ~: 71740)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 59944, ~: 59995)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 40975, ~: 40880)
[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 490561)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 202238, ~: 202524)
[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 65091, ~: 64994)
[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 843050)
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, μ: 58476, ~: 58537)
[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40444, ~: 40504)
[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29356)
Suite result: ok. 36 passed; 0 failed; 0 skipped; finished in 96.61s (96.59s CPU time)

Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13878, ~: 13878)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13878, ~: 13878)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13857, ~: 13857)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13854, ~: 13854)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 14090, ~: 14090)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 14090, ~: 14090)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13921, ~: 13921)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 8.44s (12.78s CPU time)

Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 79854)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 113074)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 72954)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 140682)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 82468)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 82408)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 79910)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 24.58ms (4.36ms CPU time)

Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 77653)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 110873)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 70753)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 138481)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 80267)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 80207)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 77709)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 24.69ms (4.31ms CPU time)

Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 2616748)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 579019)
[PASS] testAccess_spoke_admin_config_access() (gas: 494285)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 30.04ms (3.30ms CPU time)

Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 797177)
[PASS] test_renouncePositionManagerRole() (gas: 26829)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18330)
[PASS] test_repayWithSig() (gas: 798567)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 298371)
[PASS] test_setUsingAsCollateralWithSig() (gas: 619366)
[PASS] test_supplyWithSig() (gas: 588837)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 311038)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 881078)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13922, ~: 13922)
[PASS] test_withdrawWithSig() (gas: 589453)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 474.30ms (454.38ms CPU time)

Ran 9 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 273543)
[PASS] test_deficit() (gas: 1181321)
[PASS] test_draw() (gas: 423925)
[PASS] test_mintFeeShares() (gas: 506169)
[PASS] test_payFee_transferShares() (gas: 975356)
[PASS] test_refreshPremium() (gas: 636408)
[PASS] test_remove() (gas: 314977)
[PASS] test_restore() (gas: 891658)
[PASS] test_restore_with_transfer() (gas: 892326)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 41.37ms (8.40ms CPU time)

Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 362336)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 704774, ~: 704809)
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 289007, ~: 288910)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5000, μ: 81416, ~: 81382)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 293869, ~: 294131)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 34071, ~: 33863)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 175324, ~: 175045)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 136212, ~: 136016)
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 15757, ~: 15757)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 274491)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28097)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 171620)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 133323)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 15877)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 59712)
[PASS] test_draw_revertsWith_SpokePaused() (gas: 59785)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 24.33s (24.31s CPU time)

Ran 5 tests for tests/unit/Hub/Hub.MintFeeShares.t.sol:HubMintFeeSharesTest
[PASS] test_mintFeeShares() (gas: 312892)
[PASS] test_mintFeeShares_noFees() (gas: 370166)
[PASS] test_mintFeeShares_noShares() (gas: 301138)
[PASS] test_mintFeeShares_revertsWith_AccessManagedUnauthorized() (gas: 25025)
[PASS] test_mintFeeShares_revertsWith_SpokeNotActive() (gas: 245875)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 23.07ms (4.23ms CPU time)

Ran 1 test for tests/unit/Spoke/Spoke.MultipleHub.SiloedBorrowing.t.sol:SpokeMultipleHubSiloedBorrowingTest
[PASS] test_siloed_borrowing() (gas: 667466)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 8.30ms (1.15ms CPU time)

Ran 2 tests for tests/unit/Spoke/Spoke.MultipleHub.t.sol:SpokeMultipleHubTest
[PASS] test_borrow_secondHub() (gas: 895777)
[PASS] test_borrow_thirdHub() (gas: 738239)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 26.65ms (3.59ms CPU time)

Ran 13 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1336406)
[PASS] test_liquidation_full() (gas: 1892288)
[PASS] test_liquidation_partial() (gas: 1891997)
[PASS] test_liquidation_receiveShares_full() (gas: 1881982)
[PASS] test_liquidation_receiveShares_partial() (gas: 1881699)
[PASS] test_multicall_ops() (gas: 1411319)
[PASS] test_repay() (gas: 876162)
[PASS] test_setUserPositionManagerWithSig() (gas: 303708)
[PASS] test_supply() (gas: 542560)
[PASS] test_updateRiskPremium() (gas: 1327654)
[PASS] test_updateUserDynamicConfig() (gas: 581996)
[PASS] test_usingAsCollateral() (gas: 1481907)
[PASS] test_withdraw() (gas: 1963074)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 62.85ms (30.28ms CPU time)

Ran 13 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 1097070)
[PASS] test_liquidation_full() (gas: 1754573)
[PASS] test_liquidation_partial() (gas: 1754282)
[PASS] test_liquidation_receiveShares_full() (gas: 1744267)
[PASS] test_liquidation_receiveShares_partial() (gas: 1743984)
[PASS] test_multicall_ops() (gas: 1327826)
[PASS] test_repay() (gas: 783690)
[PASS] test_setUserPositionManagerWithSig() (gas: 308156)
[PASS] test_supply() (gas: 545232)
[PASS] test_updateRiskPremium() (gas: 942814)
[PASS] test_updateUserDynamicConfig() (gas: 586444)
[PASS] test_usingAsCollateral() (gas: 1087739)
[PASS] test_withdraw() (gas: 1594007)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 59.99ms (25.86ms CPU time)

Ran 4 tests for tests/unit/Spoke/Spoke.PermitReserve.t.sol:SpokePermitReserveTest
[PASS] test_permitReserve() (gas: 89200)
[PASS] test_permitReserve_forwards_correct_call() (gas: 36410)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 25167)
[PASS] test_permitReserve_revertsWith_ReserveNotListedIn() (gas: 23229)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 20.09ms (1.03ms CPU time)

Ran 12 tests for tests/unit/Spoke/Spoke.PositionManager.t.sol:SpokePositionManagerTest
[PASS] test_disableApproval_on_InactivePositionManager() (gas: 99951)
[PASS] test_onlyPositionManager_on_borrow() (gas: 537065)
[PASS] test_onlyPositionManager_on_repay() (gas: 562108)
[PASS] test_onlyPositionManager_on_supply() (gas: 290841)
[PASS] test_onlyPositionManager_on_updateUserDynamicConfig() (gas: 1280966)
[PASS] test_onlyPositionManager_on_updateUserRiskPremium() (gas: 1410491)
[PASS] test_onlyPositionManager_on_usingAsCollateral() (gas: 143300)
[PASS] test_onlyPositionManager_on_withdraw() (gas: 321170)
[PASS] test_renouncePositionManagerRole() (gas: 20039)
[PASS] test_renouncePositionManagerRole_noop_from_disabled() (gas: 21367)
[PASS] test_setApprovalForPositionManager(bytes32) (runs: 5000, μ: 19902, ~: 19902)
[PASS] test_setApproval_revertsWith_InactivePositionManager() (gas: 20198)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 428.43ms (409.71ms CPU time)

Ran 6 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 656628, ~: 656628)
[PASS] test_eliminateDeficit_allowSpokePaused() (gas: 429180)
[PASS] test_eliminateDeficit_fuzz_revertsWith_ArithmeticUnderflow_CallerSpokeNoFunds(uint256) (runs: 5000, μ: 343306, ~: 343306)
[PASS] test_eliminateDeficit_fuzz_revertsWith_callerSpokeNotActive(address) (runs: 5000, μ: 28908, ~: 28908)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 20068)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 340316)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 16.35s (16.73s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 707705, ~: 707842)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 708189, ~: 708557)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20137)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 59678)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 138907)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 652789)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 25.02s (37.55s 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, μ: 696007, ~: 695856)
[PASS] test_repay_less_than_share() (gas: 584573)
[PASS] test_repay_only_base_debt_interest() (gas: 757550)
[PASS] test_repay_only_base_debt_no_premium() (gas: 641215)
[PASS] test_repay_supply_ex_rate_decr() (gas: 1484613)
[PASS] test_repay_supply_ex_rate_decr_skip_time() (gas: 1481941)
[PASS] test_repay_zero_shares_nonzero_premium_debt() (gas: 761091)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 15.08s (15.06s CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 131997)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 638645, ~: 638489)
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 252252, ~: 252286)
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 584405, ~: 584897)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 542044, ~: 542056)
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 3863331, ~: 3880964)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 3932339, ~: 3948220)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 199.21s (293.08s CPU time)

Ran 10 tests for tests/unit/Hub/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 680694)
Logs:
  Bound result 1000000000000000000000
  Bound result 500000000000000000000
  Bound result 200000000000000000000

[PASS] test_reclaim_fullAmount() (gas: 661472)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 682514, ~: 681692)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 789768)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 12439)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 93115)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93980, ~: 93980)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40003)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept() (gas: 98578)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 461593)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 14.86s (16.49s 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, μ: 540380, ~: 540562)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 791840, ~: 791892)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 647976417)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 260725893)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 540730)
Logs:
  Bound result 500000000000000000000
  Bound result 5000
  Bound result 34560000
  Bound result 2

Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 19.38s (29.56s CPU time)

Ran 3 tests for tests/unit/Hub/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 279900)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 526155, ~: 526142)
[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 462919, ~: 462720)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 18.94s (27.84s CPU time)

Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 679898780)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.27s (3.25s CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 881084)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 119999)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 247284, ~: 247261)
[PASS] test_accrueLiquidityFee_exact() (gas: 887627)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 958152, ~: 980742)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 546670)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 900583)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 21.13s (38.72s CPU time)

Ran 15 tests for tests/unit/Hub/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 210687)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_remove_all_with_interest() (gas: 377919)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 209239, ~: 209056)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 429875, ~: 430159)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 293877, ~: 294021)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 433373, ~: 433926)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 160467)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 148158)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 20745)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 15718)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 17819)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 59802)
[PASS] test_remove_revertsWith_SpokePaused() (gas: 59908)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 188116)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 372890)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 31.94s (31.92s CPU time)

Ran 4 tests for tests/unit/Hub/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 228306, ~: 228298)
[PASS] test_skimAdd_fuzz_donationBeforeAdd(uint256,uint256,uint256) (runs: 5000, μ: 228360, ~: 228352)
[PASS] test_skimAdd_fuzz_wrongSpokeTransfer(uint256,uint256,uint256) (runs: 5000, μ: 217210, ~: 217154)
[PASS] test_skimRestore_fuzz_liquidityDonation(uint256,uint256,uint256) (runs: 5000, μ: 276287, ~: 277893)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 26.83s (26.81s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 221507, ~: 221238)
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 223201, ~: 222932)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 676663, ~: 677583)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 24282)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 32428, ~: 32428)
[PASS] test_reportDeficit_with_premium() (gas: 676158)
Logs:
  Bound result 10000000000
  Bound result 31536000
  Bound result 5000000000
  Bound result 0

Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 17.97s (17.95s CPU time)

Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 259376)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 467866, ~: 472252)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 535482, ~: 542510)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 896285)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 461273, ~: 461278)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 534003, ~: 534234)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 120453)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 856562)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 874443)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 57758)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 921693)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 710679)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 72.42s (83.60s CPU time)

Ran 8 tests for tests/unit/Hub/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 486373)
Logs:
  Bound result 1000000000000000000000
  Bound result 1000000000000000000000

[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 635283, ~: 636683)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 486887, ~: 486893)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12406)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 222313)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 104209)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 94702, ~: 94702)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 40016)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 18.49s (18.47s CPU time)

Ran 7 tests for tests/unit/Hub/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 188879)
Logs:
  Bound result 1000000000000000000000
  Bound result 1000000000000000000000

[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 192241, ~: 192464)
[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 151660, ~: 151383)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 194958)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 176511)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 178870)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22457)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.29s (7.27s CPU time)

Ran 12 tests for tests/unit/Spoke/Spoke.SetUserPositionManagerWithSig.t.sol:SpokeSetUserPositionManagerWithSigTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 6021196)
[PASS] test_eip712Domain() (gas: 6026736)
[PASS] test_setUserPositionManagerWithSig() (gas: 291791)
[PASS] test_setUserPositionManagerWithSig_ERC1271() (gas: 326728)
[PASS] test_setUserPositionManagerWithSig_ERC1271_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 320784, ~: 320784)
[PASS] test_setUserPositionManagerWithSig_ERC1271_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 228740)
[PASS] test_setUserPositionManagerWithSig_ERC1271_revertsWith_InvalidSignature_dueTo_InvalidHash() (gas: 279411)
[PASS] test_setUserPositionManagerWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 281673, ~: 281673)
[PASS] test_setUserPositionManagerWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 30685)
[PASS] test_setUserPositionManagerWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 31969)
[PASS] test_setUserPositionManager_typeHash() (gas: 4015)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 17837, ~: 17837)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 15.89s (26.41s CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.SetUsingAsCollateral.t.sol:SpokeConfigTest
[PASS] test_setUsingAsCollateral() (gas: 313805)
[PASS] test_setUsingAsCollateral_collateralStatusUnchanged() (gas: 455302)
[PASS] test_setUsingAsCollateral_revertsWith_ReserveFrozen() (gas: 105453)
[PASS] test_setUsingAsCollateral_revertsWith_ReserveNotListed() (gas: 22064)
[PASS] test_setUsingAsCollateral_revertsWith_ReservePaused() (gas: 64667)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 24.24ms (5.07ms CPU time)

Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 43656)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 401945, ~: 401854)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 210913, ~: 210858)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 276621, ~: 276266)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 402348, ~: 402132)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 275374, ~: 275283)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 26.60s (26.58s CPU time)

Ran 23 tests for tests/unit/Hub/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 366911)
Logs:
  Bound result 1000000000000000000000
  Bound result 500000000000000000000
  Bound result 31536000

[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 677442)
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, μ: 368203, ~: 368310)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 667824, ~: 679393)
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 247912, ~: 249185)
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 639722, ~: 639930)
[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 214411)
[PASS] test_restore_partial_drawn() (gas: 330416)
[PASS] test_restore_partial_same_block() (gas: 326202)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 236116)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 258381)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 53355)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 221563)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 221607)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 165863)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 93326)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 364693)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 247761)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 15768000

[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest_and_premium() (gas: 638002)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 31536000
  Bound result 1

[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 534140)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 232803)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 221898)
[PASS] test_restore_when_asset_frozen() (gas: 428140)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 102.12s (107.23s CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.Withdraw.Validation.t.sol:SpokeWithdrawValidationTest
[PASS] test_withdraw_fuzz_revertsWith_InsufficientLiquidity_with_debt(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 432441, ~: 432681)
[PASS] test_withdraw_fuzz_revertsWith_InsufficientSupply_zero_supplied(uint256) (runs: 5000, μ: 53019, ~: 52742)
[PASS] test_withdraw_revertsWith_InsufficientLiquidity_with_debt() (gas: 429127)
[PASS] test_withdraw_revertsWith_InvalidAmount_zero_supplied() (gas: 49315)
[PASS] test_withdraw_revertsWith_ReserveNotListed() (gas: 22104)
[PASS] test_withdraw_revertsWith_ReservePaused() (gas: 64888)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 6.01s (6.70s CPU time)

Ran 14 tests for tests/unit/Spoke/Spoke.Supply.t.sol:SpokeSupplyTest
[PASS] test_fuzz_supply_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 706825, ~: 707913)
[PASS] test_supply() (gas: 303034)
[PASS] test_supply_does_not_update_risk_premium() (gas: 1658481)
[PASS] test_supply_fuzz_amounts(uint256) (runs: 5000, μ: 430670, ~: 430346)
[PASS] test_supply_fuzz_index_increase_no_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 663201, ~: 663486)
[PASS] test_supply_fuzz_index_increase_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 759755, ~: 759900)
[PASS] test_supply_fuzz_revertsWith_ERC20InsufficientBalance(uint256) (runs: 5000, μ: 62297, ~: 62021)
[PASS] test_supply_index_increase_no_premium() (gas: 865271)
[PASS] test_supply_index_increase_with_premium() (gas: 923946)
[PASS] test_supply_revertsWith_ERC20InsufficientAllowance() (gas: 39775)
[PASS] test_supply_revertsWith_InvalidSupplyAmount() (gas: 41988)
[PASS] test_supply_revertsWith_ReserveFrozen() (gas: 65076)
[PASS] test_supply_revertsWith_ReserveNotListed() (gas: 22132)
[PASS] test_supply_revertsWith_ReservePaused() (gas: 64996)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 47.89s (88.30s CPU time)

Ran 8 tests for tests/unit/Spoke/Spoke.Upgradeable.t.sol:SpokeUpgradeableTest
[PASS] test_implementation_constructor_fuzz(uint64) (runs: 5000, μ: 5027572, ~: 5027572)
[PASS] test_proxy_constructor_fuzz(uint64) (runs: 5000, μ: 5671738, ~: 5671732)
[PASS] test_proxy_constructor_fuzz_revertsWith_InvalidInitialization(uint64) (runs: 5000, μ: 10671021, ~: 10671015)
[PASS] test_proxy_constructor_revertsWith_InvalidAddress() (gas: 5073211)
[PASS] test_proxy_constructor_revertsWith_InvalidInitialization_ZeroRevision() (gas: 5085122)
[PASS] test_proxy_reinitialization_fuzz(uint64) (runs: 5000, μ: 11587975, ~: 11587962)
[PASS] test_proxy_reinitialization_revertsWith_CallerNotProxyAdmin() (gas: 10629292)
[PASS] test_proxy_reinitialization_revertsWith_InvalidAddress() (gas: 10631031)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 18.26s (31.96s CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.UserAccountData.t.sol:SpokeUserAccountDataTest
[PASS] test_userAccountData_scenario1() (gas: 499827)
[PASS] test_userAccountData_scenario2() (gas: 561749)
[PASS] test_userAccountData_scenario3() (gas: 562024)
[PASS] test_userAccountData_scenario4() (gas: 838385)
[PASS] test_userAccountData_scenario5() (gas: 717549)
[PASS] test_userAccountData_scenario6() (gas: 689794)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 25.78ms (4.57ms CPU time)

Ran 49 tests for tests/unit/SpokeConfigurator.t.sol:SpokeConfiguratorTest
[PASS] test_addCollateralFactor() (gas: 113903)
[PASS] test_addCollateralFactor_revertsWith_OwnableUnauthorizedAccount() (gas: 17995)
[PASS] test_addDynamicReserveConfig() (gas: 96204)
[PASS] test_addDynamicReserveConfig_revertsWith_OwnableUnauthorizedAccount() (gas: 18267)
[PASS] test_addLiquidationBonus_revertsWith_OwnableUnauthorizedAccount() (gas: 18102)
[PASS] test_addLiquidationFee() (gas: 113881)
[PASS] test_addLiquidationFee_revertsWith_OwnableUnauthorizedAccount() (gas: 17995)
[PASS] test_addMaxLiquidationBonus() (gas: 113962)
[PASS] test_addReserve() (gas: 420162)
[PASS] test_addReserve_revertsWith_MaximumReservesReached() (gas: 253892)
[PASS] test_addReserve_revertsWith_OwnableUnauthorizedAccount() (gas: 19139)
[PASS] test_freezeAllReserves() (gas: 199103)
[PASS] test_freezeAllReserves_revertsWith_OwnableUnauthorizedAccount() (gas: 15774)
[PASS] test_pauseAllReserves() (gas: 198932)
[PASS] test_pauseAllReserves_revertsWith_OwnableUnauthorizedAccount() (gas: 15731)
[PASS] test_updateBorrowable() (gas: 96367)
[PASS] test_updateBorrowable_revertsWith_OwnableUnauthorizedAccount() (gas: 17993)
[PASS] test_updateCollateralFactor() (gas: 71501)
[PASS] test_updateCollateralFactor_revertsWith_OwnableUnauthorizedAccount() (gas: 18116)
[PASS] test_updateColla...*[Comment body truncated]*

@github-actions
Copy link

♻️ Forge Gas Snapshots

Path Value
snapshots/NativeTokenGateway.Operations.json
borrowNative ↑0% (+56) 229,372
repayNative ↓4% (-6367) 161,657
supplyAsCollateralNative ↓4% (-6263) 154,110
supplyNative ↓9% (-12000) 124,476
withdrawNative: full ↑0% (+28) 125,648
withdrawNative: partial ↑0% (+34) 136,859
snapshots/SignatureGateway.Operations.json
borrowWithSig ↑0% (+56) 215,661
repayWithSig ↑0% (+47) 188,919
setSelfAsUserPositionManagerWithSig ↑0% (+22) 75,424
setUsingAsCollateralWithSig ↑0% (+56) 85,109
supplyWithSig ↑0% (+57) 153,262
updateUserDynamicConfigWithSig ↑0% (+22) 62,791
updateUserRiskPremiumWithSig ↑0% (+22) 61,601
withdrawWithSig ↑0% (+27) 131,723
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 ↑0% (+22) 11,959
getUserAccountData: supplies: 1, borrows: 0 ↑0% (+22) 48,622
getUserAccountData: supplies: 2, borrows: 0 ↑0% (+22) 80,400
getUserAccountData: supplies: 2, borrows: 1 ↑0% (+22) 100,188
getUserAccountData: supplies: 2, borrows: 2 ↑0% (+22) 118,618
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first ↑0% (+56) 191,381
borrow: second action, same reserve ↑0% (+56) 171,353
liquidationCall (receiveShares): full ↑0% (+22) 300,125
liquidationCall (receiveShares): partial ↑0% (+22) 299,843
liquidationCall: full ↑0% (+22) 310,490
liquidationCall: partial ↑0% (+22) 310,208
permitReserve + repay (multicall) ↑0% (+70) 166,099
permitReserve + supply (multicall) ↑0% (+6) 146,868
permitReserve + supply + enable collateral (multicall) ↑0% (+62) 160,635
repay: full ↑0% (+135) 126,229
repay: partial ↑0% (+135) 131,118
setUserPositionManagerWithSig: disable ↑0% (+22) 44,868
setUserPositionManagerWithSig: enable ↑0% (+22) 68,897
supply + enable collateral (multicall) ↑0% (+62) 140,686
supply: 0 borrows, collateral disabled ↑0% (+71) 123,750
supply: 0 borrows, collateral enabled ↑0% (+71) 106,672
supply: second action, same reserve ↑0% (+71) 106,650
updateUserDynamicConfig: 1 collateral ↑0% (+22) 73,716
updateUserDynamicConfig: 2 collaterals ↑0% (+22) 88,573
updateUserRiskPremium: 1 borrow ↑0% (+22) 94,826
updateUserRiskPremium: 2 borrows ↑0% (+22) 104,641
usingAsCollateral: 0 borrows, enable ↑0% (+56) 58,971
usingAsCollateral: 1 borrow, disable ↑0% (+56) 105,128
usingAsCollateral: 1 borrow, enable ↑0% (+56) 41,859
usingAsCollateral: 2 borrows, disable ↑0% (+56) 126,111
usingAsCollateral: 2 borrows, enable ↑0% (+56) 41,871
withdraw: 0 borrows, full ↑0% (+34) 128,944
withdraw: 0 borrows, partial ↑0% (+34) 133,507
withdraw: 1 borrow, partial ↑0% (+34) 161,070
withdraw: 2 borrows, partial ↑0% (+34) 174,248
withdraw: non collateral ↑0% (+34) 106,578
snapshots/Spoke.Operations.json
borrow: first ↑0% (+56) 261,777
borrow: second action, same reserve ↑0% (+56) 204,749
liquidationCall (receiveShares): full ↑0% (+22) 333,688
liquidationCall (receiveShares): partial ↑0% (+22) 333,406
liquidationCall: full ↑0% (+22) 344,053
liquidationCall: partial ↑0% (+22) 343,771
permitReserve + repay (multicall) ↑0% (+56) 163,329
permitReserve + supply (multicall) ↑0% (+6) 146,868
permitReserve + supply + enable collateral (multicall) ↑0% (+62) 160,635
repay: full ↑0% (+135) 120,391
repay: partial ↑0% (+135) 139,680
setUserPositionManagerWithSig: disable ↑0% (+22) 44,868
setUserPositionManagerWithSig: enable ↑0% (+22) 68,897
supply + enable collateral (multicall) ↑0% (+62) 140,686
supply: 0 borrows, collateral disabled ↑0% (+71) 123,750
supply: 0 borrows, collateral enabled ↑0% (+71) 106,672
supply: second action, same reserve ↑0% (+71) 106,650
updateUserDynamicConfig: 1 collateral ↑0% (+22) 73,716
updateUserDynamicConfig: 2 collaterals ↑0% (+22) 88,573
updateUserRiskPremium: 1 borrow ↑0% (+22) 151,102
updateUserRiskPremium: 2 borrows ↑0% (+22) 204,298
usingAsCollateral: 0 borrows, enable ↑0% (+56) 58,971
usingAsCollateral: 1 borrow, disable ↑0% (+56) 161,404
usingAsCollateral: 1 borrow, enable ↑0% (+56) 41,859
usingAsCollateral: 2 borrows, disable ↑0% (+56) 233,768
usingAsCollateral: 2 borrows, enable ↑0% (+56) 41,871
withdraw: 0 borrows, full ↑0% (+34) 128,944
withdraw: 0 borrows, partial ↑0% (+34) 133,507
withdraw: 1 borrow, partial ↑0% (+34) 214,844
withdraw: 2 borrows, partial ↑0% (+34) 259,306
withdraw: non collateral ↑0% (+34) 106,578
🔕 Unchanged
Path Value
snapshots/Hub.Operations.json
add 88,006
add: with transfer 109,613
draw 105,931
eliminateDeficit: full 59,781
eliminateDeficit: partial 69,429
mintFeeShares 84,007
payFee 72,302
refreshPremium 71,999
remove: full 76,993
remove: partial 81,640
reportDeficit 115,225
restore: full 80,471
restore: full - with transfer 173,377
restore: partial 89,137
restore: partial - with transfer 147,400
transferShares 71,192

/// @notice Modifier that checks if the caller is an approved positionManager for `onBehalfOf`.
modifier onlyPositionManager(address onBehalfOf) {
require(_isPositionManager({user: onBehalfOf, manager: msg.sender}), Unauthorized());
_onlyPositionManager({onBehalfOf: onBehalfOf, caller: msg.sender});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code size hack ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah jump instead of inlining but think compiler was already doing it

address onBehalfOf
) external returns (uint256, uint256);

function supplySkimmed(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you would say that any spoke should have this functionality?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes given the UX benefits, we can put this behind a gov feature flag to disable for spokes which might want flexibility (maybe RWA regulations don't like batching for ex)

"supply + enable collateral (multicall)": "140686",
"supply: 0 borrows, collateral disabled": "123750",
"supply: 0 borrows, collateral enabled": "106672",
"supply: second action, same reserve": "106650",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add skim version of those snapshots

userPosition.suppliedShares += suppliedShares.toUint120();

emit Supply(reserveId, msg.sender, onBehalfOf, suppliedShares, amount);
return _supply(reserveId, amount, onBehalfOf, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for both supply and repay, since the transfer caller -> hub does not impact calculations if made earlier than in current logic, might be interesting to do the transfer before calling the internal function, so we don't need to pass a true/false arg & perform an extra if check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and would allow to revert earlier if no allowance given.

And with the nonReentrant guards we want to add to those functions, this behavior should be safe enough, wdyt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants