Skip to content

fix: Skipped accrue test#1253

Open
CheyenneAtapour wants to merge 3 commits intomainfrom
fix/accrue-test
Open

fix: Skipped accrue test#1253
CheyenneAtapour wants to merge 3 commits intomainfrom
fix/accrue-test

Conversation

@CheyenneAtapour
Copy link
Contributor

Fixes the previously skipped test_accrueInterest_fuzz_RPBorrowAndSkipTime test, passing now with 100k fuzz runs

@CheyenneAtapour CheyenneAtapour marked this pull request as ready for review March 10, 2026 06:47
Copilot AI review requested due to automatic review settings March 10, 2026 06:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR un-skips and stabilizes the previously skipped test_accrueInterest_fuzz_RPBorrowAndSkipTime by refactoring the accrue-interest fuzz tests to use shared helpers and looped per-asset logic, and by slightly relaxing premium/total debt assertion tolerances.

Changes:

  • Added a shared _assertProtocolSupplyAndDebt helper to centralize supply + debt consistency checks across user/reserve/spoke/asset accounting.
  • Refactored accrue-interest fuzz tests to iterate over a parsed per-asset input array rather than duplicating logic for each asset.
  • Increased assertApproxEqAbs tolerances for premium/total debt assertions from 3 to 4 in tests/Base.t.sol.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/unit/Spoke/SpokeBase.t.sol Adds a reusable helper to assert protocol supply/debt consistency across accounting layers.
tests/unit/Spoke/Spoke.AccrueInterest.t.sol Un-skips and refactors fuzz tests using per-asset arrays/loops and shared assertions.
tests/unit/Spoke/Spoke.AccrueInterest.Scenario.t.sol Updates scenario test to use the shared helper (now parameterized by spoke/user).
tests/Base.t.sol Relaxes premium/total debt assertion tolerances to reduce fuzz flakiness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +276 to +311
// Bob supplies amounts on spoke 1, then we deploy remainder of liquidity up to respective add caps
for (uint256 i = 0; i < 4; ++i) {
if (testAmounts[i].supplyAmount > 0) {
Utils.supplyCollateral(
spoke1,
testAmounts[i].reserveId,
bob,
testAmounts[i].supplyAmount,
bob
);
}
if (testAmounts[i].supplyAmount < MAX_SUPPLY_AMOUNT) {
_openSupplyPosition(
spoke1,
testAmounts[i].reserveId,
MAX_SUPPLY_AMOUNT - testAmounts[i].supplyAmount
);
}
}

// Bob borrows usdx from spoke 1
if (amounts.usdxBorrowAmount > 0) {
Utils.borrow(spoke1, _usdxReserveId(spoke1), bob, amounts.usdxBorrowAmount, bob);
}

// Bob borrows wbtc from spoke 1
if (amounts.wbtcBorrowAmount > 0) {
Utils.borrow(spoke1, _wbtcReserveId(spoke1), bob, amounts.wbtcBorrowAmount, bob);
// Bob borrows amounts from spoke 1
for (uint256 i = 0; i < 4; ++i) {
if (testAmounts[i].borrowAmount > 0) {
Utils.borrow(spoke1, testAmounts[i].reserveId, bob, testAmounts[i].borrowAmount, bob);
}
}

// Check Bob's risk premium
uint256 bobRp = _getUserRiskPremium(spoke1, bob);
assertEq(bobRp, _calculateExpectedUserRP(spoke1, bob), 'user risk premium Before');

// Store base borrow rates
Rates memory rates;
rates.daiBaseBorrowRate = hub1.getAssetDrawnRate(daiAssetId).toUint96();
rates.wethBaseBorrowRate = hub1.getAssetDrawnRate(wethAssetId).toUint96();
rates.usdxBaseBorrowRate = hub1.getAssetDrawnRate(usdxAssetId).toUint96();
rates.wbtcBaseBorrowRate = hub1.getAssetDrawnRate(wbtcAssetId).toUint96();

// Check bob's drawn debt, premium debt, and supplied amounts for all assets at user, reserve, spoke, and asset level
uint256 drawnDebt = _calculateExpectedDrawnDebt(
amounts.daiBorrowAmount,
rates.daiBaseBorrowRate,
startTime
);
_assertSingleUserProtocolDebt(
spoke1,
_daiReserveId(spoke1),
bob,
drawnDebt,
0,
'dai before accrual'
);
_assertUserSupply(
spoke1,
_daiReserveId(spoke1),
bob,
amounts.daiSupplyAmount,
'dai before accrual'
);
_assertReserveSupply(spoke1, _daiReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'dai before accrual');
_assertSpokeSupply(spoke1, _daiReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'dai before accrual');
_assertAssetSupply(spoke1, _daiReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'dai before accrual');

drawnDebt = _calculateExpectedDrawnDebt(
amounts.wethBorrowAmount,
rates.wethBaseBorrowRate,
startTime
);
_assertSingleUserProtocolDebt(
spoke1,
_wethReserveId(spoke1),
bob,
drawnDebt,
0,
'weth before accrual'
);
_assertUserSupply(
spoke1,
_wethReserveId(spoke1),
bob,
amounts.wethSupplyAmount,
'weth before accrual'
);
_assertReserveSupply(spoke1, _wethReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'weth before accrual');
_assertSpokeSupply(spoke1, _wethReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'weth before accrual');
_assertAssetSupply(spoke1, _wethReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'weth before accrual');

drawnDebt = _calculateExpectedDrawnDebt(
amounts.usdxBorrowAmount,
rates.usdxBaseBorrowRate,
startTime
);
_assertSingleUserProtocolDebt(
spoke1,
_usdxReserveId(spoke1),
bob,
drawnDebt,
0,
'usdx before accrual'
);
_assertUserSupply(
spoke1,
_usdxReserveId(spoke1),
bob,
amounts.usdxSupplyAmount,
'usdx before accrual'
);
_assertReserveSupply(spoke1, _usdxReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'usdx before accrual');
_assertSpokeSupply(spoke1, _usdxReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'usdx before accrual');
_assertAssetSupply(spoke1, _usdxReserveId(spoke1), MAX_SUPPLY_AMOUNT, 'usdx before accrual');
uint96[] memory baseBorrowRates = new uint96[](4);
for (uint256 i = 0; i < 4; ++i) {
baseBorrowRates[i] = hub1.getAssetDrawnRate(testAmounts[i].assetId).toUint96();
}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Several loops and arrays are hard-coded to length 4 (e.g., for (…; i < 4; …) and new …[](4)). Since the iteration is over testAmounts, consider using testAmounts.length to prevent accidental out-of-bounds or missed assets if the test inputs set ever changes.

Copilot uses AI. Check for mistakes.
Comment on lines +521 to +556
function _parseTestInputs(
TestAmounts memory amounts
) internal view returns (TestAmount[] memory) {
TestAmount[] memory testAmounts = new TestAmount[](4);

testAmounts[0] = TestAmount({
supplyAmount: amounts.daiSupplyAmount,
borrowAmount: amounts.daiBorrowAmount,
reserveId: _daiReserveId(spoke1),
assetId: daiAssetId,
name: 'DAI'
});

testAmounts[1] = TestAmount({
supplyAmount: amounts.wethSupplyAmount,
borrowAmount: amounts.wethBorrowAmount,
reserveId: _wethReserveId(spoke1),
assetId: wethAssetId,
name: 'WETH'
});

testAmounts[2] = TestAmount({
supplyAmount: amounts.usdxSupplyAmount,
borrowAmount: amounts.usdxBorrowAmount,
reserveId: _usdxReserveId(spoke1),
assetId: usdxAssetId,
name: 'USDX'
});

testAmounts[3] = TestAmount({
supplyAmount: amounts.wbtcSupplyAmount,
borrowAmount: amounts.wbtcBorrowAmount,
reserveId: _wbtcReserveId(spoke1),
assetId: wbtcAssetId,
name: 'WBTC'
});
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

_parseTestInputs hard-codes spoke1 when computing reserveIds. This makes the helper easy to misuse if this test pattern is copied for another spoke (and the returned reserveIds would be wrong). Consider passing the target ISpoke spoke into _parseTestInputs and deriving reserveIds from that parameter.

Copilot uses AI. Check for mistakes.
Comment on lines 1843 to 1853
assertApproxEqAbs(
actualPremiumDebt,
expectedPremiumDebt,
3,
4,
string.concat('user premium debt ', label)
);
assertApproxEqAbs(
spoke.getUserTotalDebt(reserveId, user),
expectedDrawnDebt + expectedPremiumDebt,
3,
4,
string.concat('user total debt ', label)
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The assertion tolerances for premium/total debt were increased (3 -> 4) in Base helpers, which affects all tests using these helpers. Consider scoping the relaxed tolerance to the specific flaky accrual test(s) (or making the tolerance a named constant with a brief rationale) so unrelated tests don’t silently accept larger accounting drift.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

🌈 Test Results
No files changed, compilation skipped

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 373076)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 73786)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 141518)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 146111)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 38.80ms (1.62ms CPU time)

Ran 19 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 15306)
[PASS] test_decimals() (gas: 8313)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 16710, ~: 17038)
Logs:
  Bound result 1

[PASS] test_getReservePrice() (gas: 46772)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 44558)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10876)
[PASS] test_getReservePrices() (gas: 76731)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 48897)
[PASS] test_getReserveSource() (gas: 47161)
[PASS] test_setReserveSource() (gas: 44226)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97405)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17138)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 16953)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 12996)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5029298)
[PASS] test_setSpoke() (gas: 5057662)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10914)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13485, ~: 13485)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15102)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 1.05s (1.02s CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.Getters.t.sol:SpokeGettersTest
[PASS] test_getLiquidationBonus_configured() (gas: 100816)
Logs:
  Bound result 2
  Bound result 1000000000000000000
  Bound result 4000
  Bound result 900000000000000000

[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 99652, ~: 99990)
Logs:
  Bound result 1
  Bound result 24030
  Bound result 1397
  Bound result 8857

[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 77601, ~: 77823)
Logs:
  Bound result 4
  Bound result 100

[PASS] test_getLiquidationBonus_notConfigured() (gas: 78811)
Logs:
  Bound result 2
  Bound result 1000000000000000000

[PASS] test_premiumRayGetters() (gas: 1539405)
[PASS] test_protocol_getters() (gas: 288396)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 2.46s (2.43s CPU time)

Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 17747613)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 17736024)
[PASS] test_dustColl_allowed() (gas: 17596716)
[PASS] test_dustDebt_allowed() (gas: 17727290)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 52.06ms (21.26ms CPU time)

Ran 14 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Scenarios.t.sol:SpokeLiquidationCallScenariosTest
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 25955719)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 25827962)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubReportDeficit() (gas: 25939081)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 25903368)
[PASS] test_liquidationCall_scenario1() (gas: 3848874)
[PASS] test_liquidationCall_scenario2() (gas: 3857200)
[PASS] test_liquidationCall_scenario3() (gas: 3263193)
[PASS] test_liquidationCall_scenario4() (gas: 27490834)
[PASS] test_liquidationCall_scenario5() (gas: 3400829)
[PASS] test_liquidationCall_scenario6() (gas: 2237622)
[PASS] test_liquidationCall_scenario7() (gas: 2981560)
[PASS] test_liquidationCall_scenario8() (gas: 2207108)
[PASS] test_scenario_halted_asset() (gas: 26575755)
[PASS] test_scenario_halted_asset_with_deficit() (gas: 26419921)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 165.74ms (134.33ms 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, μ: 432035, ~: 432143)
Logs:
  Bound result 0
  Bound result 283293328975186164965
  Bound result 4147973527
  Bound result 93380
  Bound result 505540176

[PASS] test_withdraw_fuzz_revertsWith_InsufficientSupply_zero_supplied(uint256) (runs: 5000, μ: 55105, ~: 54812)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_revertsWith_InsufficientLiquidity_with_debt() (gas: 428561)
[PASS] test_withdraw_revertsWith_InvalidAmount_zero_supplied() (gas: 51432)
[PASS] test_withdraw_revertsWith_ReserveNotListed() (gas: 22408)
[PASS] test_withdraw_revertsWith_ReservePaused() (gas: 62929)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 5.83s (5.79s CPU time)

Ran 21 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1982066, ~: 1981000)
Logs:
  Bound result 9
  Bound result 10

[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1601074, ~: 1600248)
Logs:
  Bound result 9
  Bound result 10

[PASS] test_grantRole() (gas: 315933)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 923558, ~: 920059)
Logs:
  Bound result 9

[PASS] test_renounceRole() (gas: 321091)
[PASS] test_renounceRole_shouldNotTrack() (gas: 24510)
[PASS] test_revokeRole() (gas: 323262)
[PASS] test_revokeRole_shouldNotTrack() (gas: 33158)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2142696, ~: 2223105)
Logs:
  Bound result 12

[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5000, μ: 1958511, ~: 1899678)
Logs:
  Bound result 12

[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606166)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577193)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602394)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378260)
[PASS] test_setRoleGuardian_trackRoles() (gas: 262021)
[PASS] test_setTargetFunctionRole() (gas: 489773)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1181595)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 1018326)
[PASS] test_setTargetFunctionRole_skipAddPublicRole() (gas: 206355)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 34319)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 672090)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 22.78s (22.78s CPU time)

Ran 22 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
  Bound result 10000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_AtOptimalPoint() (gas: 24281)
Logs:
  Bound result 2000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_LeftToOptimalPoint(uint256) (runs: 5000, μ: 24192, ~: 24330)
Logs:
  Bound result 137
  Bound result 252173843969976304268974536488

[PASS] test_calculateInterestRate_RightToOptimalPoint(uint256) (runs: 5000, μ: 25303, ~: 25349)
Logs:
  Bound result 8137
  Bound result 252173843969976304268974536488

[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18793)
Logs:
  Bound result 0

[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19073, ~: 18822)
Logs:
  Bound result 3124043968137

[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11203)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3724)
[PASS] test_getBaseDrawnRate() (gas: 14746)
[PASS] test_getInterestRateData() (gas: 19268)
[PASS] test_getMaxDrawnRate() (gas: 15234)
[PASS] test_getOptimalUsageRatio() (gas: 14727)
[PASS] test_getRateGrowthAfterOptimal() (gas: 14791)
[PASS] test_getRateGrowthBeforeOptimal() (gas: 14791)
[PASS] test_maxDrawnRate() (gas: 8314)
[PASS] test_maxOptimalRatio() (gas: 8357)
[PASS] test_minOptimalRatio() (gas: 8299)
[PASS] test_setInterestRateData() (gas: 68942)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxDrawnRate() (gas: 41762)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42403)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35291)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23502)
Suite result: ok. 22 passed; 0 failed; 0 skipped; finished in 1.14s (1.13s CPU time)

Ran 6 tests for tests/unit/position-manager/libraries/ConfigPermissions.t.sol:ConfigPermissionsTests
[PASS] test_constants() (gas: 12052)
[PASS] test_getConfigPermissionValues(uint8) (runs: 5000, μ: 13682, ~: 13682)
[PASS] test_setCanSetUsingAsCollateral_fuzz(uint8,bool) (runs: 5000, μ: 10623, ~: 10611)
[PASS] test_setCanUpdateUserDynamicConfig_fuzz(uint8,bool) (runs: 5000, μ: 10602, ~: 10590)
[PASS] test_setCanUpdateUserRiskPremium_fuzz(uint8,bool) (runs: 5000, μ: 10612, ~: 10600)
[PASS] test_setFullPermissions_fuzz(bool) (runs: 5000, μ: 13124, ~: 13134)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 1.01s (1.01s CPU time)

Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 166661)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 167389)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 285522, ~: 274725)
Logs:
  Bound result 3
  Bound result 2767
  Bound result 443124196721905572
  Bound result 14843
  Bound result 8
  Bound result 18
  Bound result 13290
  Bound result 5661
  Bound result 1999999999999999997
  Bound result 443124196721905572
  Bound result 9304570613870847
  Bound result 9
  Bound result 999999999999999999999999999997
  Bound result 1000000000000000000000000000
  Bound result 28591
  Bound result 54527
  Bound result 6504484831365108
  Bound result 7
  Bound result 1109
  Bound result 18850239771387979476210927906
  Bound result 0
  Bound result 6504484831365108
  Bound result 26
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935

[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 240348, ~: 228822)
Logs:
  Bound result 3
  Bound result 2767
  Bound result 443124196721905572
  Bound result 14843
  Bound result 8
  Bound result 18
  Bound result 13290
  Bound result 5661
  Bound result 1999999999999999997
  Bound result 443124196721905572
  Bound result 9304570613870847
  Bound result 9
  Bound result 999999999999999999999999999997
  Bound result 1000000000000000000000000000
  Bound result 28591
  Bound result 54527
  Bound result 6504484831365108
  Bound result 7
  Bound result 1109
  Bound result 18850239771387979476210927906
  Bound result 0
  Bound result 18850239771387979476210927906
  Bound result 999999999999999999999999999997

[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 259439, ~: 247927)
Logs:
  Bound result 893415334883476655
  Bound result 2978
  Bound result 585276700757443494
  Bound result 14565
  Bound result 17
  Bound result 6068916064772864016873118816625778489046207115382530586
  Bound result 14565
  Bound result 4221
  Bound result 1761319261088019793
  Bound result 585276700757443494
  Bound result 2668101281511416
  Bound result 17
  Bound result 939188368361739499122738155709
  Bound result 99000000009036773106626147332
  Bound result 16273769303837
  Bound result 25177732562014
  Bound result 530496439064419
  Bound result 16
  Bound result 1239
  Bound result 671701841481068112906874569041
  Bound result 3
  Bound result 6068916064772864016873118816625778489046207115382530586
  Bound result 14565
  Bound result 4221
  Bound result 1761319261088019793
  Bound result 585276700757443494
  Bound result 2668101281511416
  Bound result 17
  Bound result 939188368361739499122738155709
  Bound result 99000000009036773106626147332
  Bound result 16273769303837
  Bound result 25177732562014
  Bound result 2668101281511416
  Bound result 4335186362
  Bound result 671701841481068112906874569041
  Bound result 939188368361739499122738155709

[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 245474, ~: 234099)
Logs:
  Bound result 429912746388796126
  Bound result 3311
  Bound result 5052402489320383
  Bound result 12967
  Bound result 11
  Bound result 999999999999999999999999999999999999999999999999999999999999999998
  Bound result 12967
  Bound result 6790
  Bound result 1378265718299091866
  Bound result 5052402489320383
  Bound result 8901987828932520
  Bound result 17
  Bound result 495552499072027682690487423586
  Bound result 96705648907898872785052364816
  Bound result 9818176197301
  Bound result 3
  Bound result 4119816840576273
  Bound result 10
  Bound result 3593
  Bound result 31556456
  Bound result 0
  Bound result 31556456
  Bound result 495552499072027682690487423586

[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 268382, ~: 257159)
Logs:
  Bound result 3886412
  Bound result 2
  Bound result 147
  Bound result 12468
  Bound result 6
  Bound result 28951245481117846533722652
  Bound result 12468
  Bound result 3739
  Bound result 1000109044247905327
  Bound result 147
  Bound result 1766670143596910
  Bound result 14
  Bound result 885000589634409638603543244567
  Bound result 45625495039344622427514351693
  Bound result 1
  Bound result 45089934476
  Bound result 9035404749081580
  Bound result 15
  Bound result 274
  Bound result 471071379138868438154450132077
  Bound result 5
  Bound result 9035404749081580
  Bound result 3252684925
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935

[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 251253, ~: 239655)
Logs:
  Bound result 893415334883476655
  Bound result 2978
  Bound result 585276700757443494
  Bound result 14565
  Bound result 17
  Bound result 6068916064772864016873118816625778489046207115382530586
  Bound result 14565
  Bound result 4221
  Bound result 1761319261088019793
  Bound result 585276700757443494
  Bound result 2668101281511416
  Bound result 17
  Bound result 939188368361739499122738155709
  Bound result 99000000009036773106626147332
  Bound result 16273769303837
  Bound result 25177732562014
  Bound result 530496439064419
  Bound result 16
  Bound result 1239
  Bound result 671701841481068112906874569041
  Bound result 3
  Bound result 6068916064772864016873118816625778489046207115382530586
  Bound result 14565
  Bound result 4221
  Bound result 1761319261088019793
  Bound result 585276700757443494
  Bound result 2668101281511416
  Bound result 17
  Bound result 939188368361739499122738155709
  Bound result 99000000009036773106626147332
  Bound result 16273769303837
  Bound result 25177732562014
  Bound result 2668101281511416
  Bound result 4335186362

Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 34.57s (34.55s CPU time)

Ran 35 tests for tests/unit/position-manager/ConfigPositionManager.t.sol:ConfigPositionManagerTest
[PASS] test_multicall() (gas: 84257)
[PASS] test_renounceCanUpdateUserDynamicConfigPermission() (gas: 41118)
[PASS] test_renounceCanUpdateUserDynamicConfigPermission_revertsWith_SpokeNotRegistered() (gas: 17401)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission() (gas: 41172)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission_revertsWith_SpokeNotRegistered() (gas: 17380)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission() (gas: 41172)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission_revertsWith_SpokeNotRegistered() (gas: 17380)
[PASS] test_renounceGlobalPermission() (gas: 42190)
[PASS] test_renounceGlobalPermission_revertsWith_SpokeNotRegistered() (gas: 17401)
[PASS] test_setCanUpdateUserDynamicConfigPermission() (gas: 53889)
[PASS] test_setCanUpdateUserDynamicConfigPermission_remove() (gas: 41184)
[PASS] test_setCanUpdateUserDynamicConfigPermission_revertsWith_SpokeNotRegistered() (gas: 17538)
[PASS] test_setCanUpdateUserRiskPremiumPermission() (gas: 53934)
[PASS] test_setCanUpdateUserRiskPremiumPermission_remove() (gas: 41220)
[PASS] test_setCanUpdateUserRiskPremiumPermission_revertsWith_SpokeNotRegistered() (gas: 17497)
[PASS] test_setCanUpdateUsingAsCollateralPermission() (gas: 53965)
[PASS] test_setCanUpdateUsingAsCollateralPermission_remove() (gas: 41217)
[PASS] test_setCanUpdateUsingAsCollateralPermission_revertsWith_SpokeNotRegistered() (gas: 17497)
[PASS] test_setGlobalPermission() (gas: 55559)
[PASS] test_setGlobalPermission_removeAllPermissions() (gas: 42238)
[PASS] test_setGlobalPermission_removePreviousPermissions() (gas: 46357)
[PASS] test_setGlobalPermission_revertsWith_SpokeNotRegistered() (gas: 17518)
[PASS] test_setGlobalPermission_setThenRemove() (gas: 49896)
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withGlobalPermission(uint256,bool) (runs: 5000, μ: 105661, ~: 110500)
Logs:
  Bound result 2

[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withPermission(uint256,bool) (runs: 5000, μ: 105653, ~: 110492)
Logs:
  Bound result 2

[PASS] test_setUsingAsCollateralOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 22195)
[PASS] test_setUsingAsCollateralOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17540)
[PASS] test_updateUserDynamicConfigOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 19886)
[PASS] test_updateUserDynamicConfigOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17445)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withGlobalPermission() (gas: 69691)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withPermission() (gas: 69703)
[PASS] test_updateUserRiskPremiumOnBehalfOf_revertsWith_CallerNotAllowed() (gas: 19842)
[PASS] test_updateUserRiskPremiumOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17380)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withGlobalPermission() (gas: 809086)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withPermission() (gas: 809120)
Suite result: ok. 35 passed; 0 failed; 0 skipped; finished in 9.71s (9.69s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 12488)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 12509)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 20349, ~: 20128)
Logs:
  Bound result 457941479331201024
  Bound result 4976
  Bound result 25000000000000000
  Bound result 13805

[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 23293, ~: 23072)
Logs:
  Bound result 457941479331201024
  Bound result 4976
  Bound result 25000000000000000
  Bound result 13805
  Bound result 25000000000000000

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 1.20s (1.17s CPU time)

Ran 11 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26036)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259738)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31769)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26861)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26980)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27033)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27018)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26947)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33724)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 26.90ms (1.48ms CPU time)

Ran 29 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4679)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9049, ~: 8812)
Logs:
  Bound result -57896044618658097711785492504343953926634992332820282013197946218740589849150

[PASS] test_add_positive_operand(uint256,int256) (runs: 5000, μ: 3920, ~: 3916)
[PASS] test_calculateLinearInterest() (gas: 4368)
[PASS] test_calculateLinearInterest_add_edge() (gas: 4890)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16246)
Logs:
  Bound result 0
  Bound result 1
  Bound result 864000000
  Bound result 864000000

[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint40) (runs: 5000, μ: 7546, ~: 7381)
Logs:
  Bound result 9

[PASS] test_constants() (gas: 3133)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8589, ~: 8824)
Logs:
  Bound result 10765498

[PASS] test_fuzz_divUp(uint256,uint256) (runs: 5000, μ: 3540, ~: 3544)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3514, ~: 3577)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3593, ~: 3724)
[PASS] test_min(uint256,uint256) (runs: 5000, μ: 3281, ~: 3281)
[PASS] test_mulDivDown_NoRemainder() (gas: 3223)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3107)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3183)
[PASS] test_mulDivDown_WithRemainder() (gas: 3268)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3721)
[PASS] test_mulDivUp_NoRemainder() (gas: 3272)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3084)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3184)
[PASS] test_mulDivUp_WithRemainder() (gas: 3293)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3792)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8595, ~: 8530)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_signedSub_revertsWith_SafeCastOverflowedUintToInt(uint256) (runs: 5000, μ: 7649, ~: 7702)
Logs:
  Bound result 57896044618658097711785492504343953926634992332820282019728792007080608788105

[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3447, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12487, ~: 9802)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3442, ~: 3362)
[PASS] test_zeroFloorSub(uint256,uint256) (runs: 5000, μ: 3290, ~: 3326)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 2.73s (2.71s CPU time)

Ran 14 tests for tests/unit/Spoke/Spoke.Withdraw.t.sol:SpokeWithdrawTest
[PASS] test_fuzz_withdraw_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 733375, ~: 735389)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_withdraw_all_liquidity() (gas: 238623)
[PASS] test_withdraw_all_liquidity_with_interest_no_premium() (gas: 801597)
[PASS] test_withdraw_all_liquidity_with_interest_with_premium() (gas: 809128)
[PASS] test_withdraw_fuzz_all_elapsed_with_interest(uint256,uint256,uint40) (runs: 5000, μ: 661782, ~: 661698)
Logs:
  Bound result 394745026295682460997
  Bound result 95696758000740450767
  Bound result 1

[PASS] test_withdraw_fuzz_all_greater_than_supplied(uint256) (runs: 5000, μ: 241647, ~: 241441)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_fuzz_all_liquidity_with_interest_no_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 874630, ~: 875115)
Logs:
  Bound result 0
  Bound result 2
  Bound result 1
  Bound result 2
  Bound result 286517826

[PASS] test_withdraw_fuzz_all_liquidity_with_interest_with_premium((uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 878411, ~: 878463)
Logs:
  Bound result 0
  Bound result 2
  Bound result 1
  Bound result 2
  Bound result 286517826

[PASS] test_withdraw_fuzz_all_with_interest(uint256,uint256) (runs: 5000, μ: 674934, ~: 674876)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_withdraw_fuzz_suppliedAmount(uint256) (runs: 5000, μ: 243240, ~: 243034)
Logs:
  Bound result 3124043968137

[PASS] test_withdraw_max_greater_than_supplied() (gas: 222068)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 655934)
[PASS] test_withdraw_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 402082)
[PASS] test_withdraw_same_block() (gas: 243752)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 73.56s (73.53s CPU time)

Ran 16 tests for tests/unit/SpokeConfigurator.GranularAccessControl.t.sol:SpokeConfiguratorGranularAccessControlTest
[PASS] test_fuzz_unauthorized_cannotCall_liquidationConfigManagerMethods(address) (runs: 5000, μ: 117059, ~: 117059)
[PASS] test_fuzz_unauthorized_cannotCall_positionManagerAdminMethods(address) (runs: 5000, μ: 39761, ~: 39761)
[PASS] test_fuzz_unauthorized_cannotCall_reserveManagerMethods(address) (runs: 5000, μ: 458283, ~: 458283)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationConfig() (gas: 62481)
[PASS] test_liquidationConfigManager_canCall_updateLiquidationTargetHealthFactor() (gas: 62044)
[PASS] test_liquidationConfigManager_cannotCall_anyPositionManagerAdminMethod() (gas: 38976)
[PASS] test_liquidationConfigManager_cannotCall_anyReserveMethod() (gas: 460745)
[PASS] test_positionManagerAdmin_canCall_updatePositionManager() (gas: 75206)
[PASS] test_positionManagerAdmin_cannotCall_anyLiquidationConfigMethod() (gas: 117021)
[PASS] test_positionManagerAdmin_cannotCall_anyReserveMethod() (gas: 460504)
[PASS] test_reserveManager_canCall_freezeAllReserves() (gas: 156806)
[PASS] test_reserveManager_canCall_pauseAllReserves() (gas: 156791)
[PASS] test_reserveManager_canCall_updateFrozen() (gas: 65173)
[PASS] test_reserveManager_canCall_updatePaused() (gas: 65119)
[PASS] test_reserveManager_cannotCall_anyLiquidationConfigMethod() (gas: 116976)
[PASS] test_reserveManager_cannotCall_anyPositionManagerAdminMethod() (gas: 38975)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 6.01s (5.98s CPU time)

Ran 48 tests for tests/unit/SpokeConfigurator.t.sol:SpokeConfiguratorTest
[PASS] test_addCollateralFactor() (gas: 125646)
[PASS] test_addCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29137)
[PASS] test_addDynamicReserveConfig() (gas: 105390)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29330)
[PASS] test_addLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29058)
[PASS] test_addLiquidationFee() (gas: 125612)
[PASS] test_addLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29081)
[PASS] test_addMaxLiquidationBonus() (gas: 125639)
[PASS] test_addReserve() (gas: 402177)
[PASS] test_addReserve_revertsWith_AccessManagedUnauthorized() (gas: 30001)
[PASS] test_freezeAllReserves() (gas: 202537)
[PASS] test_freezeAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26901)
[PASS] test_freezeReserve() (gas: 72293)
[PASS] test_freezeReserve_revertsWith_AccessManagedUnauthorized() (gas: 28937)
[PASS] test_pauseAllReserves() (gas: 202417)
[PASS] test_pauseAllReserves_revertsWith_AccessManagedUnauthorized() (gas: 26812)
[PASS] test_pauseReserve() (gas: 72242)
[PASS] test_pauseReserve_revertsWith_AccessManagedUnauthorized() (gas: 28958)
[PASS] test_updateBorrowable() (gas: 102783)
[PASS] test_updateBorrowable_revertsWith_AccessManagedUnauthorized() (gas: 29105)
[PASS] test_updateCollateralFactor() (gas: 82759)
[PASS] test_updateCollateralFactor_revertsWith_AccessManagedUnauthorized() (gas: 29202)
[PASS] test_updateCollateralRisk() (gas: 76979)
[PASS] test_updateCollateralRisk_revertsWith_AccessManagedUnauthorized() (gas: 29010)
[PASS] test_updateDynamicReserveConfig() (gas: 201220)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized() (gas: 29413)
[PASS] test_updateFrozen() (gas: 105571)
[PASS] test_updateFrozen_revertsWith_AccessManagedUnauthorized() (gas: 29038)
[PASS] test_updateHealthFactorForMaxBonus() (gas: 68162)
[PASS] test_updateHealthFactorForMaxBonus_revertsWith_AccessManagedUnauthorized() (gas: 26869)
[PASS] test_updateLiquidationBonusFactor() (gas: 71077)
[PASS] test_updateLiquidationBonusFactor_revertsWith_AccessManagedUnauthorized() (gas: 26848)
[PASS] test_updateLiquidationConfig() (gas: 65754)
[PASS] test_updateLiquidationConfig_revertsWith_AccessManagedUnauthorized() (gas: 27131)
[PASS] test_updateLiquidationFee() (gas: 82754)
[PASS] test_updateLiquidationFee_revertsWith_AccessManagedUnauthorized() (gas: 29177)
[PASS] test_updateLiquidationTargetHealthFactor() (gas: 71018)
[PASS] test_updateLiquidationTargetHealthFactor_revertsWith_AccessManagedUnauthorized() (gas: 26891)
[PASS] test_updateMaxLiquidationBonus() (gas: 82778)
[PASS] test_updateMaxLiquidationBonus_revertsWith_AccessManagedUnauthorized() (gas: 29136)
[PASS] test_updatePaused() (gas: 105486)
[PASS] test_updatePaused_revertsWith_AccessManagedUnauthorized() (gas: 29059)
[PASS] test_updatePositionManager() (gas: 74337)
[PASS] test_updatePositionManager_revertsWith_AccessManagedUnauthorized() (gas: 27000)
[PASS] test_updateReceiveSharesEnabled() (gas: 102902)
[PASS] test_updateReceiveSharesEnabled_revertsWith_AccessManagedUnauthorized() (gas: 29103)
[PASS] test_updateReservePriceSource() (gas: 257953)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized() (gas: 29056)
Suite result: ok. 48 passed; 0 failed; 0 skipped; finished in 41.41ms (14.43ms 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, μ: 947796, ~: 909560)
Logs:
  Bound result 812

[PASS] test_extSloads(uint256,bytes) (runs: 5000, μ: 1012923, ~: 979457)
Logs:
  Bound result 362

Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 59.05s (59.05s CPU time)

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 924782)
[PASS] test_repayNative() (gas: 992773)
[PASS] test_supplyAndCollateralNative() (gas: 305238)
[PASS] test_supplyNative() (gas: 286683)
[PASS] test_withdrawNative() (gas: 508844)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 48.92ms (4.21ms CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 748631)
[PASS] test_repayWithSig() (gas: 955129)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209293)
[PASS] test_setUsingAsCollateralWithSig() (gas: 289353)
[PASS] test_supplyWithSig() (gas: 434276)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145250)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143115)
[PASS] test_withdrawWithSig() (gas: 409926)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 53.92ms (8.38ms CPU time)

Ran 7 tests for tests/unit/libraries/SpokeEIP712Hash.t.sol:SpokeEIP712HashTest
[PASS] test_constants() (gas: 9906)
[PASS] test_hash_positionManagerUpdate_fuzz((address,bool)) (runs: 5000, μ: 5339, ~: 5339)
[PASS] test_hash_setUserPositionManagers_fuzz((address,(address,bool)[],uint256,uint256)) (runs: 5000, μ: 278353, ~: 277775)
[PASS] test_hash_tokenizedDeposit_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6515, ~: 6515)
[PASS] test_hash_tokenizedMint_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6514, ~: 6514)
[PASS] test_hash_tokenizedRedeem_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6515, ~: 6515)
[PASS] test_hash_tokenizedWithdraw_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6536, ~: 6536)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 14.85s (14.85s CPU time)

Ran 6 tests for tests/unit/libraries/SpokeUtils.t.sol:SpokeUtilsTest
[PASS] test_fuzz_toValue(uint256,uint256,uint256) (runs: 5000, μ: 15792, ~: 15844)
Logs:
  Bound result 615514462186775432459
  Bound result 9
  Bound result 9140094126966428

[PASS] test_get() (gas: 180696)
[PASS] test_get_revertsWith_ReserveNotListed() (gas: 167195)
[PASS] test_toValue() (gas: 8806)
[PASS] test_toValue_revertsWith_ArithmeticOverflow() (gas: 8959)
[PASS] test_toValue_revertsWith_ArithmeticUnderflow() (gas: 8734)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 445.80ms (420.84ms CPU time)

Ran 41 tests for tests/unit/position-manager/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 667519)
Logs:
  Bound result 5000000000000000000

[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 666921, ~: 668252)
Logs:
  Bound result 3124043968137

[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32444)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32519)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 283143)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271222)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25378)
[PASS] test_constructor() (gas: 12697)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 5958)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17617)
[PASS] test_multicall_revertsWith_UnsupportedAction() (gas: 11243)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 759977)
Logs:
  Bound result 5000000000000000000

[PASS] test_repayNative_excessAmount() (gas: 668530)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 755473, ~: 760610)
Logs:
  Bound result 3124043968137

[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 679334, ~: 674609)
Logs:
  Bound result 90000068691281935000
  Bound result 25920101

[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 32481)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30002)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39249)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 326265)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 303321)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38722)
[PASS] test_supplyAndCollateralNative() (gas: 333552)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 333874, ~: 333580)
Logs:
  Bound result 3124043968137

[PASS] test_supplyNative() (gas: 305246)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 305567, ~: 305273)
Logs:
  Bound result 3124043968137

[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 32457)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 29986)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39237)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_hubAdd() (gas: 374260)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336151)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38734)
[PASS] test_withdrawNative() (gas: 331946)
Logs:
  Bound result 100000000000000000000

[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 331327, ~: 331952)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 268076, ~: 267868)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 616186, ~: 616116)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32520)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32553)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 300096)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271286)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25435)
Suite result: ok. 41 passed; 0 failed; 0 skipped; finished in 67.89s (67.86s CPU time)

Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 12902, ~: 12902)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 95279, ~: 94374)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13570, ~: 13570)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 4.03s (4.02s 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, μ: 15139, ~: 15261)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15345, ~: 15347)
Logs:
  Bound result 90101
  Bound result 68691281934999

[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12598, ~: 12760)
[PASS] test_percentMul() (gas: 14932)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15328, ~: 15330)
Logs:
  Bound result 90101
  Bound result 68691281934999

[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15142, ~: 15264)
Logs:
  Bound result 100
  Bound result 68691281934999

[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11520, ~: 12063)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.54s (1.54s CPU time)

Ran 17 tests for tests/unit/position-manager/PositionManagerBase.t.sol:PositionManagerBaseTest
[PASS] test_constructor() (gas: 17255)
[PASS] test_getReserveUnderlying_fuzz(uint256) (runs: 5000, μ: 36868, ~: 36925)
Logs:
  Bound result 2

[PASS] test_getReserveUnderlying_revertsWith_ReserveNotListed() (gas: 25741)
[PASS] test_multicall() (gas: 73366)
[PASS] test_multicall_atomicity_on_revert() (gas: 48261)
[PASS] test_multicall_revertsWith_UnsupportedAction() (gas: 11221)
[PASS] test_permitReserveUnderlying() (gas: 128810)
[PASS] test_permitReserveUnderlying_forwards_correct_call() (gas: 78240)
[PASS] test_permitReserveUnderlying_ignores_permit_reverts() (gas: 67318)
[PASS] test_permitReserveUnderlying_revertsWith_ReserveNotListed() (gas: 58198)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 41775, ~: 41775)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13110)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 15958)
[PASS] test_registerSpoke_unregister() (gas: 36288)
[PASS] test_renouncePositionManagerRole() (gas: 65288)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74618)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 131426)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 1.01s (984.75ms CPU time)

Ran 10 tests for tests/unit/position-manager/libraries/PositionManagerEIP712Hash.t.sol:PositionManagerEIP712HashTest
[PASS] test_constants() (gas: 13419)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6712, ~: 6712)
[PASS] test_hash_creditDelegation_fuzz((address,uint256,address,address,uint256,uint256,uint256)) (runs: 5000, μ: 4810, ~: 4810)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6690, ~: 6690)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7171, ~: 7171)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6711, ~: 6711)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6349, ~: 6349)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6370, ~: 6370)
[PASS] test_hash_withdrawPermit_fuzz((address,uint256,address,address,uint256,uint256,uint256)) (runs: 5000, μ: 4832, ~: 4832)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6689, ~: 6689)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 5.10s (5.10s CPU time)

Ran 11 tests for tests/gas/PositionManagers.Operations.gas.t.sol:ConfigPositionManager_Gas_Tests
[PASS] test_renounceCanUpdateUserDynamicConfigPermission() (gas: 93123)
[PASS] test_renounceCanUpdateUserRiskPremiumPermission() (gas: 93210)
[PASS] test_renounceCanUpdateUsingAsCollateralPermission() (gas: 93212)
[PASS] test_renounceGlobalPermission() (gas: 93061)
[PASS] test_setCanUpdateUserDynamicConfigPermission() (gas: 69162)
[PASS] test_setCanUpdateUserRiskPremiumPermission() (gas: 69185)
[PASS] test_setCanUpdateUsingAsCollateralPermission() (gas: 69208)
[PASS] test_setGlobalPermission() (gas: 69143)
[PASS] test_setUsingAsCollateralOnBehalfOf_fuzz_withGlobalPermission() (gas: 144984)
[PASS] test_updateUserDynamicConfigOnBehalfOf_withGlobalPermission() (gas: 120671)
[PASS] test_updateUserRiskPremiumOnBehalfOf_withGlobalPermission() (gas: 713761)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 48.79ms (2.60ms CPU time)

Ran 2 tests for tests/gas/PositionManagers.Operations.gas.t.sol:GiverPositionManager_Gas_Tests
[PASS] test_repayOnBehalfOf() (gas: 919789)
[PASS] test_supplyOnBehalfOf() (gas: 282870)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 46.98ms (1.84ms CPU time)

Ran 1 test for tests/gas/PositionManagers.Operations.gas.t.sol:PositionManager_Gas_Tests
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 215901)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 45.59ms (708.08µs CPU time)

Ran 8 tests for tests/gas/PositionManagers.Operations.gas.t.sol:TakerPositionManager_Gas_Tests
[PASS] test_approveWithdraw() (gas: 69195)
[PASS] test_approveWithdrawWithSig() (gas: 155438)
[PASS] test_borrowOnBehalfOf() (gas: 763831)
[PASS] test_creditDelegation() (gas: 69162)
[PASS] test_delegateCreditWithSig() (gas: 155432)
[PASS] test_renounceCreditDelegation() (gas: 93655)
[PASS] test_renounceWithdrawAllowance() (gas: 93762)
[PASS] test_withdrawOnBehalfOf() (gas: 584219)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 50.53ms (3.58ms CPU time)

Ran 12 tests for tests/unit/position-manager/GiverPositionManager.t.sol:GiverPositionManagerTest
[PASS] test_multicall() (gas: 334953)
[PASS] test_repayOnBehalfOf() (gas: 640383)
Logs:
  Bound result 50000000000000000000

[PASS] test_repayOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 637293, ~: 640678)
Logs:
  Bound result 3124043968137

[PASS] test_repayOnBehalfOf_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 571530, ~: 567820)
Logs:
  Bound result 900000068691281935000
  Bound result 25920101

[PASS] test_repayOnBehalfOf_maxRepay() (gas: 561636)
[PASS] test_repayOnBehalfOf_maxRepay_revertsWith_InvalidRepayAmount() (gas: 483239)
[PASS] test_repayOnBehalfOf_revertsWith_ReserveNotListed() (gas: 32389)
[PASS] test_repayOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 28767)
[PASS] test_supplyOnBehalfOf() (gas: 296643)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 296900, ~: 296693)
Logs:
  Bound result 3124043968137

[PASS] test_supplyOnBehalfOf_revertsWith_ReserveNotListed() (gas: 32405)
[PASS] test_supplyOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 28794)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 28.31s (28.29s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 206679)
[PASS] test_change_role_responsibility() (gas: 121287)
[PASS] test_hub_access_manager_exposure() (gas: 13439)
[PASS] test_hub_admin_access() (gas: 1350370)
[PASS] test_migrate_role_responsibility() (gas: 709202)
[PASS] test_setInterestRateData_access() (gas: 102610)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 28.52ms (3.90ms CPU time)

Ran 14 tests for tests/unit/position-manager/TakerPositionManager/TakerPositionManager.Permit.t.sol:TakerPositionManagerPermitTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5687)
[PASS] test_approveBorrowWithSig_fuzz(address,uint256,uint256) (runs: 5000, μ: 191925, ~: 191402)
Logs:
  Bound result 1
  Bound result 511

[PASS] test_approveBorrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155706, ~: 155431)
[PASS] test_approveBorrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39559)
[PASS] test_approveBorrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37463)
[PASS] test_approveBorrowWithSig_revertsWith_SpokeNotRegistered() (gas: 171651)
[PASS] test_approveWithdrawWithSig_fuzz(address,uint256,uint256) (runs: 5000, μ: 191937, ~: 191414)
Logs:
  Bound result 1
  Bound result 511

[PASS] test_approveWithdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155638, ~: 155363)
[PASS] test_approveWithdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39600)
[PASS] test_approveWithdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37430)
[PASS] test_approveWithdrawWithSig_revertsWith_SpokeNotRegistered() (gas: 171585)
[PASS] test_borrowPermit_typeHash() (gas: 9783)
[PASS] test_eip712Domain() (gas: 11029)
[PASS] test_withdrawPermit_typeHash() (gas: 9844)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 24.49s (24.46s CPU time)

Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 660714)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 157880, ~: 157837)
Logs:
  Bound result 9

[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 332458, ~: 332622)
Logs:
  Bound result 3
  Bound result 218470873395738003579119570309
  Bound result 446067553769140138733721804

[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112436, ~: 112393)
Logs:
  Bound result 9

[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 263828, ~: 263690)
Logs:
  Bound result 1291
  Bound result 1071208440522043736492
  Bound result 173721804

[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 220656, ~: 220858)
Logs:
  Bound result 13052238805970149253731343284
  Bound result 3122065200
  Bound result 3

[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 342374, ~: 342395)
Logs:
  Bound result 0
  Bound result 714477922937634359008573850498

[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 785688, ~: 785711)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_add_multi_add_minimal_shares() (gas: 316011)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 357696)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64504)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13631)
[PASS] test_add_revertsWith_InvalidShares() (gas: 220197)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224358)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 99705)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99741)
[PASS] test_add_single_asset() (gas: 330246)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_add_with_increased_index() (gas: 298042)
[PASS] test_add_with_increased_index_with_premium() (gas: 674207)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 43.82s (43.80s CPU time)

Ran 25 tests for tests/unit/position-manager/TakerPositionManager/TakerPositionManager.t.sol:TakerPositionManagerTest
[PASS] test_approveBorrow_fuzz(address,uint256,uint256) (runs: 5000, μ: 63771, ~: 63543)
Logs:
  Bound result 0
  Bound result 6000000000000000000

[PASS] test_approveBorrow_revertsWith_SpokeNotRegistered() (gas: 17493)
[PASS] test_approveWithdraw_fuzz(address,uint256,uint256) (runs: 5000, μ: 63760, ~: 63532)
Logs:
  Bound result 0
  Bound result 6000000000000000000

[PASS] test_approveWithdraw_revertsWith_SpokeNotRegistered() (gas: 17514)
[PASS] test_borrowOnBehalfOf() (gas: 594079)
Logs:
  Bound result 5000000000000000000
  Bound result 5000000000000000000

[PASS] test_borrowOnBehalfOf_fuzz(uint256,uint256) (runs: 5000, μ: 614616, ~: 614751)
Logs:
  Bound result 68691281934999
  Bound result 618221537415092

[PASS] test_borrowOnBehalfOf_fuzz_noAllowanceDecrease(uint256) (runs: 5000, μ: 623906, ~: 623658)
Logs:
  Bound result 3124043968137

[PASS] test_borrowOnBehalfOf_revertsWith_InsufficientBorrowAllowance(uint256) (runs: 5000, μ: 307570, ~: 307887)
Logs:
  Bound result 3124043968137

[PASS] test_borrowOnBehalfOf_revertsWith_ReserveNotListed() (gas: 59159)
[PASS] test_borrowOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17490)
[PASS] test_multicall() (gas: 81480)
[PASS] test_renounceBorrowAllowance_fuzz(uint256) (runs: 5000, μ: 51491, ~: 51284)
Logs:
  Bound result 3124043968137

[PASS] test_renounceBorrowAllowance_noop_alreadyRenounced() (gas: 45494)
[PASS] test_renounceBorrowAllowance_revertsWith_SpokeNotRegistered() (gas: 17394)
[PASS] test_renounceWithdrawAllowance_fuzz(uint256) (runs: 5000, μ: 51560, ~: 51353)
Logs:
  Bound result 3124043968137

[PASS] test_renounceWithdrawAllowance_noop_alreadyRenounced() (gas: 45640)
[PASS] test_renounceWithdrawAllowance_revertsWith_SpokeNotRegistered() (gas: 17458)
[PASS] test_withdrawOnBehalfOf() (gas: 320889)
Logs:
  Bound result 100000000000000000000

[PASS] test_withdrawOnBehalfOf_fuzz(uint256) (runs: 5000, μ: 320625, ~: 320917)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawOnBehalfOf_fuzz_allBalance(uint256) (runs: 5000, μ: 277157, ~: 276950)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawOnBehalfOf_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 755651, ~: 755588)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_withdrawOnBehalfOf_fuzz_allBalance_noAllowanceDecreased(uint256) (runs: 5000, μ: 277828, ~: 277621)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawOnBehalfOf_revertsWith_InsufficientWithdrawAllowance(uint256) (runs: 5000, μ: 191357, ~: 191674)
Logs:
  Bound result 3124043968137

[PASS] test_withdrawOnBehalfOf_revertsWith_ReserveNotListed() (gas: 59245)
[PASS] test_withdrawOnBehalfOf_revertsWith_SpokeNotRegistered() (gas: 17483)
Suite result: ok. 25 passed; 0 failed; 0 skipped; finished in 58.01s (57.99s CPU time)

Ran 4 tests for tests/unit/TokenizationSpoke/TokenizationSpoke.Config.t.sol:TokenizationSpokeConfigTest
[PASS] test_configuration() (gas: 22899)
[PASS] test_constructor_asset_correctly_set() (gas: 51551)
[PASS] test_constructor_reverts_when_invalid_setup() (gas: 13995)
[PASS] test_setUp() (gas: 69892)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 28.54ms (1.17ms CPU time)

Ran 7 tests for tests/unit/TokenizationSpoke/TokenizationSpoke.Constants.t.sol:TokenizationSpokeConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 14498)
[PASS] test_deposit_typeHash() (gas: 15183)
[PASS] test_eip712Domain() (gas: 19707)
[PASS] test_mint_typeHash() (gas: 15232)
[PASS] test_permit_typeHash() (gas: 15126)
[PASS] test_redeem_typeHash() (gas: 15126)
[PASS] test_withdraw_typeHash() (gas: 15129)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 27.00ms (2.18ms CPU time)

Ran 4 tests for tests/unit/TokenizationSpoke/TokenizationSpoke.DepositWithPermit.t.sol:TokenizationSpokeDepositWithPermitTest
[PASS] test_depositWithPermit() (gas: 238120)
[PASS] test_depositWithPermit_forwards_correct_call() (gas: 194314)
[PASS] test_depositWithPermit_ignores_permit_reverts() (gas: 183502)
[PASS] test_depositWithPermit_works_with_existing_allowance() (gas: 203611)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 27.40ms (2.82ms CPU time)

Ran 38 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5000, μ: 390278, ~: 390317)
Logs:
  Bound result 18

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5000, μ: 45292, ~: 44992)
Logs:
  Bound result 8

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 45357, ~: 45057)
Logs:
  Bound result 8

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 36654, ~: 36654)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 45898, ~: 45941)
Logs:
  Bound result 20

[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 46043, ~: 46330)
Logs:
  Bound result 1

[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 79267314684, ~: 34985)
Logs:
  Bound result 1

[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 956555)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 953681)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 48915)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 126698, ~: 126748)
Logs:
  Bound result 3

[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 35268, ~: 35257)
Logs:
  Bound result 13809

[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33865, ~: 33915)
Logs:
  Bound result 3

[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 39795)
[PASS] test_getAssetId() (gas: 73181)
[PASS] test_getAssetId_fuzz_revertsWith_AssetNotListed(address) (runs: 5000, μ: 18583, ~: 18583)
[PASS] test_hub_deploy_reverts_on_InvalidConstructorInput() (gas: 828575)
[PASS] test_hub_max_riskPremium() (gas: 8643)
[PASS] test_isUnderlyingListed() (gas: 1178368)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 716118)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 613450)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 70730)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 269180, ~: 269545)
Logs:
  Bound result 0
  Bound result 58

[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 819028, ~: 818857)
Logs:
  Bound result 3
  Bound result 1
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 1

[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5000, μ: 721448, ~: 721277)
Logs:
  Bound result 3
  Bound result 1
  Bound result 3
  Bound result 1

[PASS] test_updateAssetConfig_fuzz_NewDrawnRateStrategy(uint256) (runs: 5000, μ: 698284, ~: 698285)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5000, μ: 820364, ~: 820365)
Logs:
  Bound result 3
  Bound result 3
  Bound result 1000

[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5000, μ: 872044, ~: 872045)
Logs:
  Bound result 3
  Bound result 3
  Bound result 3
  Bound result 1000

[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 700435, ~: 700489)
Logs:
  Bound result 3
  Bound result 3
  Bound result 1000
  Bound result 3
  Bound result 1000
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5000, μ: 61104, ~: 61158)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 40144, ~: 40042)
Logs:
  Bound result 0
  Bound result 58

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 469741)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 198871, ~: 199317)
Logs:
  Bound result 2
  Bound result 3113

[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 95905, ~: 96293)
Logs:
  Bound result 4
  Bound result 9900

[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 880059)
Logs:
  Bound result 1
  Bound result 500
  Bound result 3
  Bound result 1000
  Bound result 5
  Bound result 500
  Bound result 3
  Bound result 1000

[PASS] test_updateSpokeConfig_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 59179, ~: 59239)
Logs:
  Bound result 1

[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40546, ~: 40614)
Logs:
  Bound result 0

[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29661)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 92.73s (92.70s CPU time)

Ran 32 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_borrowCount() (gas: 108134)
[PASS] test_borrowCount(uint256) (runs: 5000, μ: 1922108, ~: 1762472)
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, μ: 1937752, ~: 1778120)
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, μ: 144705, ~: 144367)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 152949, ~: 152949)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 144640, ~: 144302)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 134619, ~: 134612)
[PASS] test_next(uint256) (runs: 5000, μ: 20044, ~: 18925)
Logs:
  Bound result 649

[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 18010, ~: 16874)
Logs:
  Bound result 649

[PASS] test_nextBorrowing_continuous() (gas: 61801685)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 18178, ~: 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 161.97s (161.97s CPU time)

Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 352273)
[PASS] test_draw_fuzz_IncreasedDrawnRate(uint256,uint256) (runs: 5000, μ: 693479, ~: 693712)
Logs:
  Bound result 3
  Bound result 100

[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 285887, ~: 286020)
Logs:
  Bound result 3
  Bound result 100

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5000, μ: 82351, ~: 82306)
Logs:
  Bound result 9

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 283791, ~: 284032)
Logs:
  Bound result 1291
  Bound result 70309
  Bound result 173721804

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 34737, ~: 34512)
Logs:
  Bound result 3
  Bound result 100

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 169519, ~: 169225)
Logs:
  Bound result 3124043968137

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 131907, ~: 131700)
Logs:
  Bound result 3124043968137

[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 16138, ~: 16138)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 267241)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28311)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 165858)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 129018)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 16202)
[PASS] test_draw_revertsWith_SpokeHalted() (gas: 61452)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 61391)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 22.29s (22.26s CPU time)

Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12531)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33306, ~: 33509)
Logs:
  Bound result 3124043968137

[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11089)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 206643, ~: 206775)
Logs:
  Bound result 3124043968137

[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 180556)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.28s (3.26s 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.34s (1.34s CPU time)

Ran 10 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5628)
[PASS] test_borrow_typeHash() (gas: 9733)
[PASS] test_constructor() (gas: 3749)
[PASS] test_eip712Domain() (gas: 10940)
[PASS] test_repay_typeHash() (gas: 9857)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9780)
[PASS] test_supply_typeHash() (gas: 9871)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 9758)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9779)
[PASS] test_withdraw_typeHash() (gas: 9756)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 27.26ms (2.23ms CPU time)

Ran 5 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 101550)
[PASS] test_permitReserve_forwards_correct_call() (gas: 51045)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40070)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30985)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29349)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 27.07ms (1.40ms CPU time)

Ran 2 tests for tests/unit/position-manager/SignatureGateway/SignatureGateway.Reverts.InsufficientAllowance.t.sol:SignatureGateway_InsufficientAllowance_Test
[PASS] test_repayWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 455825)
[PASS] test_supplyWithSig_revertsWith_ERC20InsufficientAllowance() (gas: 87268)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 28.57ms (3.50ms CPU time)

Ran 8 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 654362, ~: 654362)
[PASS] test_eliminateDeficit_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 32607, ~: 32607)
[PASS] test_eliminateDeficit_fuzz_reve...*[Comment body truncated]*

@github-actions
Copy link

github-actions bot commented Mar 10, 2026

Forge Build Sizes

🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle 2,396 2,529 22,180 46,623
AccessManager 12,985 14,210 11,591 34,942
AccessManagerEnumerable 16,917 18,756 7,659 30,396
Address 44 94 24,532 49,058
Arrays 44 94 24,532 49,058
Arrays.hub 16 44 24,560 49,108
Arrays.spoke 16 44 24,560 49,108
AssetInterestRateStrategy 2,626 2,811 21,950 46,341
AssetLogic 44 94 24,532 49,058
AssetLogic.hub 16 44 24,560 49,108
AuthorityUtils 44 94 24,532 49,058
AuthorityUtils.hub 16 44 24,560 49,108
AuthorityUtils.spoke 16 44 24,560 49,108
Bytes 44 94 24,532 49,058
Bytes.spoke 16 44 24,560 49,108
Comparators 44 94 24,532 49,058
Comparators.hub 16 44 24,560 49,108
Comparators.spoke 16 44 24,560 49,108
ConfigPermissionsMap 44 94 24,532 49,058
ConfigPermissionsWrapper 1,001 1,029 23,575 48,123
ConfigPositionManager 9,852 10,369 14,724 38,783
Constants 499 551 24,077 48,601
Create2Utils 134 184 24,442 48,968
DeployUtils 44 94 24,532 49,058
DeployWrapper 3,330 3,358 21,246 45,794
ECDSA 44 94 24,532 49,058
ECDSA.spoke 16 44 24,560 49,108
EIP712Hash (src/position-manager/libraries/EIP712Hash.sol) 556 608 24,020 48,544
EIP712Hash (src/spoke/libraries/EIP712Hash.sol) 441 493 24,135 48,659
EIP712Hash.spoke 491 521 24,085 48,631
EIP712Types 44 94 24,532 49,058
ERC1967Proxy 135 891 24,441 48,261
ERC1967Utils 44 94 24,532 49,058
EnumerableSet 44 94 24,532 49,058
EnumerableSet.hub 16 44 24,560 49,108
Errors 44 94 24,532 49,058
ExtSloadWrapper 394 422 24,182 48,730
GiverPositionManager 7,917 8,434 16,659 40,718
Hashes 44 94 24,532 49,058
Hub 23,538 23,735 1,038 25,417
HubConfigurator 13,833 14,067 10,743 35,085
JsonBindings 20,364 20,416 4,212 28,736
KeyValueList 44 94 24,532 49,058
KeyValueList.spoke 16 44 24,560 49,108
KeyValueListWrapper 957 985 23,619 48,167
LibBit 44 94 24,532 49,058
LibBit.spoke 16 44 24,560 49,108
LiquidationLogic 12,519 12,571 12,057 36,581
LiquidationLogic.spoke 9,835 9,867 14,741 39,285
LiquidationLogicWrapper 18,611 18,785 5,965 30,367
LowLevelCall 44 94 24,532 49,058
Math 44 94 24,532 49,058
Math.hub 16 44 24,560 49,108
Math.spoke 16 44 24,560 49,108
MathUtils 44 94 24,532 49,058
MathUtils.hub 16 44 24,560 49,108
MathUtils.spoke 16 44 24,560 49,108
MockERC1271Wallet 828 962 23,748 48,190
MockERC20 2,540 3,006 22,036 46,146
MockNoncesKeyed 858 886 23,718 48,266
MockPriceFeed 538 1,187 24,038 47,965
MockReentrantCaller 882 1,083 23,694 48,069
MockSkimSpoke 1,116 1,275 23,460 47,877
NativeTokenGateway 10,072 10,719 14,504 38,433
NoncesKeyed 644 672 23,932 48,480
NoncesKeyed.spoke 387 413 24,189 48,739
Panic 44 94 24,532 49,058
Panic.hub 16 44 24,560 49,108
Panic.spoke 16 44 24,560 49,108
PercentageMath 44 94 24,532 49,058
PercentageMath.hub 16 44 24,560 49,108
PercentageMath.spoke 16 44 24,560 49,108
PercentageMathWrapper 632 660 23,944 48,492
PositionManagerBaseWrapper 6,286 6,803 18,290 42,349
PositionManagerNoMulticall 6,222 6,739 18,354 42,413
PositionStatusMap 44 94 24,532 49,058
PositionStatusMap.spoke 16 44 24,560 49,108
PositionStatusMapWrapper 3,341 3,369 21,235 45,783
Premium 44 94 24,532 49,058
Premium.hub 16 44 24,560 49,108
Premium.spoke 16 44 24,560 49,108
ProxyAdmin 1,320 1,556 23,256 47,596
RescuableWrapper 908 1,042 23,668 48,110
ReserveFlagsMap 44 94 24,532 49,058
ReserveFlagsMap.spoke 16 44 24,560 49,108
ReserveFlagsMapWrapper 928 956 23,648 48,196
Roles 218 269 24,358 48,883
SafeCast 44 94 24,532 49,058
SafeCast.hub 16 44 24,560 49,108
SafeCast.spoke 16 44 24,560 49,108
SafeERC20 44 94 24,532 49,058
SafeERC20.hub 16 44 24,560 49,108
SafeERC20.spoke 16 44 24,560 49,108
SharesMath 44 94 24,532 49,058
SharesMath.hub 16 44 24,560 49,108
SignatureChecker 44 94 24,532 49,058
SignatureChecker.spoke 16 44 24,560 49,108
SignatureGateway 12,107 12,646 12,469 36,506
SlotDerivation 44 94 24,532 49,058
SlotDerivation.hub 16 44 24,560 49,108
SlotDerivation.spoke 16 44 24,560 49,108
SpokeConfigurator 11,825 12,059 12,751 37,093
SpokeInstance 24,291 25,098 285 24,054
SpokeUtils 96 146 24,480 49,006
SpokeUtils.spoke 71 99 24,505 49,053
SpokeUtilsWrapper 1,827 1,855 22,749 47,297
StorageSlot 44 94 24,532 49,058
StorageSlot.hub 16 44 24,560 49,108
StorageSlot.spoke 16 44 24,560 49,108
TakerPositionManager 10,996 11,548 13,580 37,604
TestnetERC20 3,649 4,525 20,927 44,627
Time 44 94 24,532 49,058
TokenizationSpokeInstance 13,627 14,953 10,949 34,199
TransientSlot 44 94 24,532 49,058
TransientSlot.spoke 16 44 24,560 49,108
TransparentUpgradeableProxy 1,419 4,078 23,157 45,074
TreasurySpokeInstance 4,004 4,218 20,572 44,934
UserPositionUtils 44 94 24,532 49,058
UserPositionUtils.spoke 16 44 24,560 49,108
UserPositionUtilsWrapper (tests/mocks/UserPositionDebtWrapper.sol) 3,263 3,291 21,313 45,861
UserPositionUtilsWrapper (tests/mocks/UserPositionUtilsWrapper.sol) 3,263 3,291 21,313 45,861
Utils 44 94 24,532 49,058
WETH9 2,148 2,614 22,428 46,538
WadRayMath 44 94 24,532 49,058
WadRayMath.hub 16 44 24,560 49,108
WadRayMath.spoke 16 44 24,560 49,108
WadRayMathWrapper 1,514 1,542 23,062 47,610

@github-actions
Copy link

github-actions bot commented Mar 10, 2026

♻️ Forge Gas Snapshots

🔕 Unchanged
Path Value
snapshots/ConfigPositionManager.Operations.json
renounceCanUpdateUserDynamicConfigPermission 27,659
renounceCanUpdateUserRiskPremiumPermission 27,681
renounceCanUpdateUsingAsCollateralPermission 27,682
renounceGlobalPermission 27,640
setCanUpdateUserDynamicConfigPermission 49,773
setCanUpdateUserRiskPremiumPermission 49,795
setCanUpdateUsingAsCollateralPermission 49,795
setGlobalPermission 49,748
setUsingAsCollateralOnBehalfOf 72,503
updateUserDynamicConfigOnBehalfOf 50,433
updateUserRiskPremiumOnBehalfOf 131,907
snapshots/GiverPositionManager.Operations.json
repayOnBehalfOf 167,927
supplyOnBehalfOf 136,911
snapshots/Hub.Operations.json
add 86,692
add: with transfer 107,989
draw 104,148
eliminateDeficit: full 72,579
eliminateDeficit: partial 82,184
mintFeeShares 82,741
payFee 70,805
refreshPremium 70,362
remove: full 75,596
remove: partial 80,734
reportDeficit 111,925
restore: full 76,552
restore: full - with transfer 169,161
restore: partial 85,262
restore: partial - with transfer 143,242
transferShares 69,619
snapshots/NativeTokenGateway.Operations.json
borrowNative 232,030
repayNative 166,499
supplyAsCollateralNative 160,183
supplyNative 135,784
withdrawNative: full 125,598
withdrawNative: partial 136,797
snapshots/PositionManagerBase.Operations.json
setSelfAsUserPositionManagerWithSig 75,007
snapshots/SignatureGateway.Operations.json
borrowWithSig 215,467
repayWithSig 186,703
setSelfAsUserPositionManagerWithSig 75,126
setUsingAsCollateralWithSig 85,380
supplyWithSig 151,980
updateUserDynamicConfigWithSig 63,113
updateUserRiskPremiumWithSig 61,995
withdrawWithSig 130,797
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 13,014
getUserAccountData: supplies: 1, borrows: 0 51,132
getUserAccountData: supplies: 2, borrows: 0 84,514
getUserAccountData: supplies: 2, borrows: 1 106,572
getUserAccountData: supplies: 2, borrows: 2 127,538
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first 193,708
borrow: second action, same reserve 173,574
liquidationCall (receiveShares): full 305,343
liquidationCall (receiveShares): partial 304,761
liquidationCall (reportDeficit): full 370,494
liquidationCall: full 322,971
liquidationCall: partial 322,389
permitReserve + repay (multicall) 164,565
permitReserve + supply (multicall) 146,745
permitReserve + supply + enable collateral (multicall) 161,196
repay: full 123,903
repay: partial 128,861
setUserPositionManagersWithSig: disable 46,772
setUserPositionManagersWithSig: enable 68,684
supply + enable collateral (multicall) 141,398
supply: 0 borrows, collateral disabled 122,835
supply: 0 borrows, collateral enabled 105,806
supply: second action, same reserve 105,735
updateUserDynamicConfig: 1 collateral 76,251
updateUserDynamicConfig: 2 collaterals 92,825
updateUserRiskPremium: 1 borrow 99,069
updateUserRiskPremium: 2 borrows 108,749
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, disable 109,113
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, disable 132,368
usingAsCollateral: 2 borrows, enable 42,516
withdraw: 0 borrows, full 129,650
withdraw: 0 borrows, partial 134,546
withdraw: 1 borrow, partial 163,306
withdraw: 2 borrows, partial 179,570
withdraw: non collateral 105,891
snapshots/Spoke.Operations.json
borrow: first 262,632
borrow: second action, same reserve 205,498
liquidationCall (receiveShares): full 337,376
liquidationCall (receiveShares): partial 336,794
liquidationCall (reportDeficit): full 362,694
liquidationCall: full 355,004
liquidationCall: partial 354,422
permitReserve + repay (multicall) 162,036
permitReserve + supply (multicall) 146,745
permitReserve + supply + enable collateral (multicall) 161,196
repay: full 117,982
repay: partial 137,340
setUserPositionManagersWithSig: disable 46,772
setUserPositionManagersWithSig: enable 68,684
supply + enable collateral (multicall) 141,398
supply: 0 borrows, collateral disabled 122,835
supply: 0 borrows, collateral enabled 105,806
supply: second action, same reserve 105,735
updateUserDynamicConfig: 1 collateral 76,251
updateUserDynamicConfig: 2 collaterals 92,825
updateUserRiskPremium: 1 borrow 152,417
updateUserRiskPremium: 2 borrows 202,668
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, disable 162,458
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, disable 234,283
usingAsCollateral: 2 borrows, enable 42,516
withdraw: 0 borrows, full 129,650
withdraw: 0 borrows, partial 134,546
withdraw: 1 borrow, partial 214,149
withdraw: 2 borrows, partial 262,020
withdraw: non collateral 105,891
snapshots/TakerPositionManager.Operations.json
approveBorrow 49,802
approveBorrowWithSig 65,684
approveWithdraw 49,833
approveWithdrawWithSig 65,660
borrowOnBehalfOf 312,136
renounceBorrowAllowance 27,924
renounceWithdrawAllowance 28,000
withdrawOnBehalfOf: full 120,697
withdrawOnBehalfOf: partial 130,671
snapshots/TokenizationSpoke.Operations.json
deposit 113,234
depositWithSig 124,138
mint 112,915
mintWithSig 123,782
permit 62,766
redeem: on behalf, full 90,886
redeem: on behalf, partial 113,607
redeem: self, full 88,874
redeem: self, partial 108,074
redeemWithSig 123,456
withdraw: on behalf, full 91,302
withdraw: on behalf, partial 114,127
withdraw: self, full 89,394
withdraw: self, partial 108,594
withdrawWithSig 123,987

hub1.getAssetTotalOwed(assetId),
expectedDrawnDebt + expectedPremiumDebt,
3,
4,
Copy link
Contributor

Choose a reason for hiding this comment

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

tbh even with the abs of 3, seems a bit much. made more sense with the old prem accounting, but feel like now it should be quite exact. Wonder why that's happening

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could be 0, but it's just that I'm calculating premium debt / rp in a different way than it happens on the contract, but I think it's fine

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants