Skip to content

Comments

feat: Use latestAnswer instead of latestRoundData for reserve price on AaveOracle#1221

Open
CheyenneAtapour wants to merge 2 commits intomainfrom
feat/latest-answer
Open

feat: Use latestAnswer instead of latestRoundData for reserve price on AaveOracle#1221
CheyenneAtapour wants to merge 2 commits intomainfrom
feat/latest-answer

Conversation

@CheyenneAtapour
Copy link
Contributor

@CheyenneAtapour CheyenneAtapour commented Feb 18, 2026

This PR replaces latestRoundData() with latestAnswer() call to fetch price of a reserve on AaveOracle contract.

Chainlink team confirmed that both functions will continue to be supported, with no plans to deprecate either function. They are also removing the deprecation notice for latestAnswer from their documentation.

Their rationale for exposing latestRoundData() is that it enables staleness checks, which latestAnswer() does not. Since we are not currently performing staleness checks, we can switch to latestAnswer() for simplicity, gas efficiency, and alignment with the Aave V3 AaveOracle contract.

Going forward, we can consider adding staleness checks or other safeguards to ensure the Chainlink price feed data is fresh, accurate, and up to date.

Copilot AI review requested due to automatic review settings February 18, 2026 02:56
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 updates the price oracle implementation to use latestAnswer() from Chainlink's V2 interface instead of latestRoundData() from the V3 interface. This change reduces gas consumption by fetching only the price value rather than the complete round data structure.

Changes:

  • Introduces AggregatorInterface and AggregatorV2V3Interface from Chainlink to support both V2 and V3 methods
  • Updates AaveOracle to use latestAnswer() for price retrieval instead of latestRoundData()
  • Updates UnitPriceFeed and MockPriceFeed to implement the combined V2V3 interface
  • Adds comprehensive tests for the new V2 interface methods (latestAnswer, latestTimestamp, latestRound, getAnswer, getTimestamp)
  • Updates gas snapshots reflecting gas savings across operations

Reviewed changes

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

Show a summary per file
File Description
src/dependencies/chainlink/AggregatorInterface.sol Adds Chainlink V2 aggregator interface with legacy price feed methods
src/dependencies/chainlink/AggregatorV2V3Interface.sol Combines V2 and V3 interfaces for comprehensive price feed support
src/spoke/AaveOracle.sol Updates from AggregatorV3Interface to AggregatorV2V3Interface, changes price fetching from latestRoundData() to latestAnswer()
src/misc/UnitPriceFeed.sol Implements AggregatorV2V3Interface, adds V2 method implementations
tests/mocks/MockPriceFeed.sol Implements AggregatorV2V3Interface, adds V2 method implementations for testing
tests/unit/AaveOracle.t.sol Updates test mocks to use latestAnswer() instead of latestRoundData()
tests/unit/UnitPriceFeed.t.sol Adds tests for new V2 interface methods, updates existing test assertions
snapshots/*.json Reflects gas cost reductions from using latestAnswer() instead of latestRoundData()

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

return block.timestamp;
}

function getAnswer(uint256) external view override returns (int256) {
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The getAnswer function ignores the roundId parameter and always returns the current price. According to the Chainlink AggregatorInterface specification, getAnswer should return historical answers based on the roundId. This implementation is inconsistent with UnitPriceFeed.getAnswer which does check the roundId parameter. Consider either documenting this deviation from the standard interface behavior or implementing historical round tracking if accurate behavior is required.

Suggested change
function getAnswer(uint256) external view override returns (int256) {
/// @notice Returns the current mocked price.
/// @dev This mock does not support historical rounds; `roundId` is ignored.
function getAnswer(uint256 /* roundId */) external view override returns (int256) {

Copilot uses AI. Check for mistakes.
Comment on lines +67 to +68
function getTimestamp(uint256) external view override returns (uint256) {
return block.timestamp;
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The getTimestamp function ignores the roundId parameter and always returns the current block.timestamp. According to the Chainlink AggregatorInterface specification, getTimestamp should return the timestamp of a specific round. This implementation is inconsistent with UnitPriceFeed.getTimestamp which does check the roundId parameter. Consider either documenting this deviation from the standard interface behavior or implementing historical round tracking if accurate behavior is required.

Suggested change
function getTimestamp(uint256) external view override returns (uint256) {
return block.timestamp;
function getTimestamp(uint256 roundId) external view override returns (uint256) {
return roundId;

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +7
import {AggregatorV2V3Interface} from 'src/dependencies/chainlink/AggregatorV2V3Interface.sol';
import {AggregatorV3Interface} from 'src/dependencies/chainlink/AggregatorV3Interface.sol';
import {AggregatorInterface} from 'src/dependencies/chainlink/AggregatorInterface.sol';
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The imports AggregatorV3Interface and AggregatorInterface are redundant since AggregatorV2V3Interface already extends both of these interfaces. Consider removing these imports to keep the code clean and reduce unnecessary dependencies.

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

github-actions bot commented Feb 18, 2026

Forge Build Sizes

Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle ↓3% (-90) 2,744 ↓3% (-90) 3,398 ↑0% (+90) 21,832 ↑0% (+90) 45,754
MockPriceFeed ↑30% (+224) 961 ↑17% (+237) 1,632 ↓1% (-224) 23,615 ↓0% (-237) 47,520
UnitPriceFeed ↑49% (+382) 1,159 ↑22% (+395) 2,166 ↓2% (-382) 23,417 ↓1% (-395) 46,986
🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AccessManager 12,985 14,210 11,591 34,942
AccessManagerEnumerable 16,886 18,704 7,690 30,448
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,704 2,889 21,872 46,263
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
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) 441 493 24,135 48,659
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
GatewayBaseWrapper 2,400 2,675 22,176 46,477
Hashes 44 94 24,532 49,058
Hub 23,510 23,707 1,066 25,445
HubConfigurator 13,833 14,029 10,743 35,123
JsonBindings 17,744 17,796 6,832 31,356
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,440 12,492 12,136 36,660
LiquidationLogic.spoke 9,829 9,861 14,747 39,291
LiquidationLogicWrapper 18,567 18,741 6,009 30,411
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
MockReentrantCaller 882 1,083 23,694 48,069
MockSkimSpoke 1,116 1,275 23,460 47,877
NativeTokenGateway 6,187 6,604 18,389 42,548
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
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 11,485 12,024 13,091 37,128
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,021 12,751 37,131
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
TestnetERC20 3,649 4,525 20,927 44,627
Time 44 94 24,532 49,058
TokenizationSpokeInstance 13,497 14,796 11,079 34,356
TransientSlot 44 94 24,532 49,058
TransientSlot.spoke 16 44 24,560 49,108
TransparentUpgradeableProxy 1,419 4,078 23,157 45,074
TreasurySpoke 3,599 4,014 20,977 45,138
UserPositionUtils (src/spoke/libraries/UserPositionDebt.sol) 44 94 24,532 49,058
UserPositionUtils (src/spoke/libraries/UserPositionUtils.sol) 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 Feb 18, 2026

🌈 Test Results
No files changed, compilation skipped

Ran 13 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Scenarios.t.sol:SpokeLiquidationCallScenariosTest
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 25946703)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 25819096)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubReportDeficit() (gas: 25930215)
[PASS] test_liquidationCall_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 25894502)
[PASS] test_liquidationCall_scenario1() (gas: 3837178)
[PASS] test_liquidationCall_scenario2() (gas: 3845504)
[PASS] test_liquidationCall_scenario3() (gas: 3458131)
[PASS] test_liquidationCall_scenario4() (gas: 27480745)
[PASS] test_liquidationCall_scenario5() (gas: 3595785)
[PASS] test_liquidationCall_scenario6() (gas: 2432801)
[PASS] test_liquidationCall_scenario7() (gas: 3176662)
[PASS] test_scenario_halted_asset() (gas: 26568139)
[PASS] test_scenario_halted_asset_with_deficit() (gas: 26412375)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 159.43ms (128.13ms CPU time)

Ran 20 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_DECIMALS() (gas: 8326)
[PASS] test_constructor() (gas: 18428)
[PASS] test_description() (gas: 12039)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 19888, ~: 20214)
Logs:
  Bound result 1

[PASS] test_getReservePrice() (gas: 46807)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 44626)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10898)
[PASS] test_getReservePrices() (gas: 76801)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 48965)
[PASS] test_getReserveSource() (gas: 47229)
[PASS] test_setReserveSource() (gas: 44272)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97653)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17228)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 17065)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 13021)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5030210)
[PASS] test_setSpoke() (gas: 5058111)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10870)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13397, ~: 13397)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15080)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 1.15s (1.12s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 228386, ~: 218588)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 106091)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 115525)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 177141)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.77s (2.73s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 368897)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 73786)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 137368)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 141961)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 32.74ms (1.66ms CPU time)

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

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

[PASS] test_grantRole() (gas: 315853)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 916299, ~: 919819)
Logs:
  Bound result 5

[PASS] test_renounceRole() (gas: 320971)
[PASS] test_renounceRole_shouldNotTrack() (gas: 24510)
[PASS] test_revokeRole() (gas: 323142)
[PASS] test_revokeRole_shouldNotTrack() (gas: 33091)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2150175, ~: 2243730)
Logs:
  Bound result 12

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

[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 605988)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 576953)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602234)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378157)
[PASS] test_setRoleGuardian_trackRoles() (gas: 263878)
[PASS] test_setTargetFunctionRole() (gas: 414440)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1103888)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 894968)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 30951)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 548994)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 22.35s (22.35s CPU time)

Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24326)
Logs:
  Bound result 2000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
  Bound result 10000
  Bound result 778565440757296803935461404101

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

[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25302, ~: 25351)
Logs:
  Bound result 8137
  Bound result 252173843969976304268974536488

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

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

[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11225)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3746)
[PASS] test_getBaseVariableBorrowRate() (gas: 14812)
[PASS] test_getInterestRateData() (gas: 19290)
[PASS] test_getMaxVariableBorrowRate() (gas: 15258)
[PASS] test_getOptimalUsageRatio() (gas: 14705)
[PASS] test_getVariableRateSlope1() (gas: 14791)
[PASS] test_getVariableRateSlope2() (gas: 14746)
[PASS] test_maxBorrowRate() (gas: 8312)
[PASS] test_maxOptimalRatio() (gas: 8312)
[PASS] test_minOptimalRatio() (gas: 8321)
[PASS] test_setInterestRateData() (gas: 68999)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 41819)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42380)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35269)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23502)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 37658)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 1.14s (1.13s CPU time)

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

[PASS] test_remove_all_with_interest() (gas: 361850)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 204532, ~: 204587)
Logs:
  Bound result 4
  Bound result 100

[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 409780, ~: 410030)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 282493, ~: 282594)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 412565, ~: 413053)
Logs:
  Bound result 2623
  Bound result 1891
  Bound result 766
  Bound result 18395

[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 155153)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 144250)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 21376)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 16471)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 18628)
[PASS] test_remove_revertsWith_SpokeHalted() (gas: 61971)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 61880)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 178890)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 354295)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 30.01s (29.98s CPU time)

Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 166635)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 167363)
[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, μ: 285433, ~: 274594)
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, μ: 240351, ~: 228792)
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, μ: 259498, ~: 247870)
Logs:
  Bound result 393391615779283980
  Bound result 2538
  Bound result 970149253731343284
  Bound result 10009
  Bound result 12
  Bound result 100000000000000000000000000000
  Bound result 10002
  Bound result 4006
  Bound result 1999999999999999252
  Bound result 970149253731343284
  Bound result 20
  Bound result 14
  Bound result 17967
  Bound result 99000000000281474977405344600
  Bound result 800000000000000000
  Bound result 133
  Bound result 10
  Bound result 6
  Bound result 9990
  Bound result 129
  Bound result 4
  Bound result 100000000000000000000000000000
  Bound result 10002
  Bound result 4006
  Bound result 1999999999999999252
  Bound result 970149253731343284
  Bound result 20
  Bound result 14
  Bound result 17967
  Bound result 99000000000281474977405344600
  Bound result 800000000000000000
  Bound result 133
  Bound result 20
  Bound result 800000000000000000
  Bound result 1000000000000000000000000000130
  Bound result 115792089237316195423570985008687907853269984665640563704641899669907063947656

[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, μ: 245404, ~: 233980)
Logs:
  Bound result 0
  Bound result 232
  Bound result 3437
  Bound result 14418
  Bound result 9
  Bound result 500000000000000000
  Bound result 14417
  Bound result 505
  Bound result 1500000000000000000
  Bound result 3437
  Bound result 6109
  Bound result 12
  Bound result 24024024024024024024024000001
  Bound result 99000000000000000000031536001
  Bound result 11327
  Bound result 1389
  Bound result 14342
  Bound result 7
  Bound result 15
  Bound result 12589
  Bound result 1
  Bound result 520
  Bound result 24024024024024024024024000001

[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, μ: 268412, ~: 257040)
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, μ: 251337, ~: 239627)
Logs:
  Bound result 393391615779283980
  Bound result 2538
  Bound result 970149253731343284
  Bound result 10009
  Bound result 12
  Bound result 100000000000000000000000000000
  Bound result 10002
  Bound result 4006
  Bound result 1999999999999999252
  Bound result 970149253731343284
  Bound result 20
  Bound result 14
  Bound result 17967
  Bound result 99000000000281474977405344600
  Bound result 800000000000000000
  Bound result 133
  Bound result 10
  Bound result 6
  Bound result 9990
  Bound result 129
  Bound result 4
  Bound result 100000000000000000000000000000
  Bound result 10002
  Bound result 4006
  Bound result 1999999999999999252
  Bound result 970149253731343284
  Bound result 20
  Bound result 14
  Bound result 17967
  Bound result 99000000000281474977405344600
  Bound result 800000000000000000
  Bound result 133
  Bound result 20
  Bound result 800000000000000000

Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 35.30s (35.27s 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, μ: 20342, ~: 20128)
Logs:
  Bound result 3915
  Bound result 9925
  Bound result 0
  Bound result 14630

[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 23286, ~: 23072)
Logs:
  Bound result 3915
  Bound result 9925
  Bound result 0
  Bound result 14630
  Bound result 0

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 1.16s (1.13s 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.27ms (1.55ms 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, μ: 8586, ~: 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, ~: 3282)
[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, μ: 8596, ~: 8530)
Logs:
  Bound result 68691281934999
  Bound result 100

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

[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3447, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12476, ~: 9808)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3444, ~: 3526)
[PASS] test_zeroFloorSub(uint256,uint256) (runs: 5000, μ: 3289, ~: 3254)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 2.69s (2.68s CPU time)

Ran 14 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 18335)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6689, ~: 6689)
[PASS] test_hash_positionManagerUpdate_fuzz((address,bool)) (runs: 5000, μ: 5361, ~: 5361)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6734, ~: 6734)
[PASS] test_hash_setUserPositionManagers_fuzz((address,(address,bool)[],uint256,uint256)) (runs: 5000, μ: 278419, ~: 277841)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7148, ~: 7148)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6755, ~: 6755)
[PASS] test_hash_tokenizedDeposit_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6561, ~: 6561)
[PASS] test_hash_tokenizedMint_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6538, ~: 6538)
[PASS] test_hash_tokenizedRedeem_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6561, ~: 6561)
[PASS] test_hash_tokenizedWithdraw_fuzz((address,uint256,address,uint256,uint256)) (runs: 5000, μ: 6582, ~: 6582)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6349, ~: 6349)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6348, ~: 6348)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6711, ~: 6711)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 19.54s (19.54s CPU time)

Ran 7 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 220000, ~: 220435)
Logs:
  Bound result 3124043968137

[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 221025, ~: 221460)
Logs:
  Bound result 3124043968137

[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 674154, ~: 674895)
Logs:
  Bound result 766912489964729789
  Bound result 20594
  Bound result 16077
  Bound result 7500000000000000000000000000

[PASS] test_reportDeficit_halted() (gas: 265108)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 22756)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 33911, ~: 33911)
[PASS] test_reportDeficit_with_premium() (gas: 673255)
Logs:
  Bound result 10000000000
  Bound result 31536000
  Bound result 5000000000
  Bound result 0

Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 17.59s (17.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: 264896)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 507018, ~: 506972)
Logs:
  Bound result 351500639
  Bound result 1256746

[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 446546, ~: 446336)
Logs:
  Bound result 3124043968137

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

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

[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 673254)
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, μ: 365366, ~: 365451)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 173721804

[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 664221, ~: 675315)
Logs:
  Bound result 3879
  Bound result 3476
  Bound result 480000000
  Bound result 662

[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 243458, ~: 244624)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 173721804

[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 637902, ~: 638152)
Logs:
  Bound result 3879
  Bound result 3476
  Bound result 480000000
  Bound result 662

[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 211618)
[PASS] test_restore_partial_drawn() (gas: 322405)
[PASS] test_restore_partial_same_block() (gas: 322531)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 232328)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 252128)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 58090)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 218581)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 218581)
[PASS] test_restore_revertsWith_SpokeHalted() (gas: 99279)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 181407)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 358172)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 243249)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 15768000

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

[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 508498)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 227438)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 213936)
[PASS] test_restore_when_asset_caps_reset() (gas: 435330)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 18.38s (18.35s CPU time)

Ran 1 test for tests/unit/Hub/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 664195417)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.92s (2.89s 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, μ: 952987, ~: 935242)
Logs:
  Bound result 812

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

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

Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17151)
[PASS] test_registerSpoke_fuzz(address) (runs: 5000, μ: 41629, ~: 41629)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13119)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 13791)
[PASS] test_registerSpoke_unregister() (gas: 36076)
[PASS] test_renouncePositionManagerRole() (gas: 65293)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 74220)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74439)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 377.46ms (353.80ms CPU time)

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 916421)
[PASS] test_repayNative() (gas: 988584)
[PASS] test_supplyAndCollateralNative() (gas: 305177)
[PASS] test_supplyNative() (gas: 286660)
[PASS] test_withdrawNative() (gas: 508744)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 48.85ms (4.17ms CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 744488)
[PASS] test_repayWithSig() (gas: 953061)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 209285)
[PASS] test_setUsingAsCollateralWithSig() (gas: 289338)
[PASS] test_supplyWithSig() (gas: 434257)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 145235)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143188)
[PASS] test_withdrawWithSig() (gas: 409909)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 51.88ms (8.20ms 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: 121247)
[PASS] test_hub_access_manager_exposure() (gas: 13439)
[PASS] test_hub_admin_access() (gas: 1350377)
[PASS] test_migrate_role_responsibility() (gas: 708944)
[PASS] test_setInterestRateData_access() (gas: 102656)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.83ms (3.83ms CPU time)

Ran 40 tests for tests/unit/misc/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 663308)
Logs:
  Bound result 5000000000000000000

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

[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32382)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32457)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 283081)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271138)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25340)
[PASS] test_constructor() (gas: 12715)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 5958)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17616)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 755810)
Logs:
  Bound result 5000000000000000000

[PASS] test_repayNative_excessAmount() (gas: 664341)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 751434, ~: 756421)
Logs:
  Bound result 3124043968137

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

[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 32463)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30030)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39231)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 326247)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 303281)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38728)
[PASS] test_supplyAndCollateralNative() (gas: 333491)
Logs:
  Bound result 100000000000000000000

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

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

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

[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 32417)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 30014)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39197)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_hubAdd() (gas: 374220)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336133)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38740)
[PASS] test_withdrawNative() (gas: 331818)
Logs:
  Bound result 100000000000000000000

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

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

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

[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32479)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32512)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 300032)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271200)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25395)
Suite result: ok. 40 passed; 0 failed; 0 skipped; finished in 66.83s (66.80s CPU time)

Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 12863, ~: 12863)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 95268, ~: 94363)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13531, ~: 13531)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.92s (3.91s 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, μ: 15137, ~: 15261)
Logs:
  Bound result 100
  Bound result 68691281934999

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

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

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

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

Ran 4 tests for tests/unit/Hub/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 228220, ~: 228282)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

[PASS] test_skimAdd_fuzz_donationBeforeAdd(uint256,uint256,uint256) (runs: 5000, μ: 228252, ~: 228314)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

[PASS] test_skimAdd_fuzz_wrongSpokeTransfer(uint256,uint256,uint256) (runs: 5000, μ: 217338, ~: 217278)
Logs:
  Bound result 3
  Bound result 18132171100462486213502917929
  Bound result 446067553769140138733721804

[PASS] test_skimRestore_fuzz_liquidityDonation(uint256,uint256,uint256) (runs: 5000, μ: 269552, ~: 270838)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

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

Ran 10 tests for tests/unit/Hub/Hub.SpokeConfig.t.sol:HubSpokeConfigTest
[PASS] test_add_active_halted_scenarios() (gas: 300448)
[PASS] test_draw_active_halted_scenarios() (gas: 304372)
[PASS] test_eliminateDeficit_active_halted_scenarios() (gas: 829159)
[PASS] test_mintFeeShares_active_halted_scenarios() (gas: 813892)
[PASS] test_payFeeShares_active_halted_scenarios() (gas: 366014)
[PASS] test_refreshPremium_active_halted_scenarios() (gas: 267080)
[PASS] test_remove_active_halted_scenarios() (gas: 316268)
[PASS] test_reportDeficit_active_halted_scenarios() (gas: 444921)
[PASS] test_restore_active_halted_scenarios() (gas: 352030)
[PASS] test_transferShares_fuzz_active_halted_scenarios(bool,bool,bool,bool) (runs: 5000, μ: 210291, ~: 210305)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 3.94s (3.92s CPU time)

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

[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 640168, ~: 641493)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 467571, ~: 467665)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12581)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 219855)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 103874)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93935, ~: 93935)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 40055)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 18.70s (18.68s CPU time)

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

[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 191565, ~: 191764)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 148195, ~: 147901)
Logs:
  Bound result 3124043968137

[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 192518)
[PASS] test_transferShares_revertsWith_SpokeHalted() (gas: 181672)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 174936)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22595)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.69s (7.67s 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, μ: 332466, ~: 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, μ: 263827, ~: 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, μ: 220657, ~: 220858)
Logs:
  Bound result 999999999900000000000000019353
  Bound result 3122064031
  Bound result 8

[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 342374, ~: 342396)
Logs:
  Bound result 2
  Bound result 378088810586379137523864648212

[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 785685, ~: 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.62s (43.60s CPU time)

Ran 8 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 42658)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 385633, ~: 385523)
Logs:
  Bound result 9

[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 200448, ~: 200383)
Logs:
  Bound result 9

[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 267979, ~: 267875)
Logs:
  Bound result 68691281934999
  Bound result 1

[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 379678, ~: 379419)
Logs:
  Bound result 615514462186775432459
  Bound result 27544
  Bound result 6348

[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 266728, ~: 266626)
Logs:
  Bound result 9

[PASS] test_getAssetDrawnRate_MatchesStoredAfterAction() (gas: 187107)
[PASS] test_getAssetDrawnRate_fuzz_DiffersAfterTimePasses(uint40) (runs: 5000, μ: 209884, ~: 209742)
Logs:
  Bound result 9

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

Ran 13 tests for tests/unit/HubConfigurator.GranularAccessControl.t.sol:HubConfiguratorGranularAccessControlTest
[PASS] test_assetManager_canCall_deactivateAsset() (gas: 138311)
[PASS] test_assetManager_canCall_haltAsset() (gas: 138325)
[PASS] test_assetManager_canCall_resetAssetCaps() (gas: 138743)
[PASS] test_assetManager_canCall_updateLiquidityFee() (gas: 84257)
[PASS] test_assetManager_cannotCall_anySpokeManagerMethod() (gas: 353934)
[PASS] test_fuzz_unauthorized_cannotCall_assetManagerMethods(address) (runs: 5000, μ: 277895, ~: 277895)
[PASS] test_fuzz_unauthorized_cannotCall_spokeManagerMethods(address) (runs: 5000, μ: 352478, ~: 352478)
[PASS] test_spokeManager_canCall_addSpoke() (gas: 126721)
[PASS] test_spokeManager_canCall_resetSpokeCaps() (gas: 185463)
[PASS] test_spokeManager_canCall_updateSpokeActive() (gas: 66003)
[PASS] test_spokeManager_canCall_updateSpokeCaps() (gas: 66504)
[PASS] test_spokeManager_canCall_updateSpokeHalted() (gas: 65972)
[PASS] test_spokeManager_cannotCall_anyAssetManagerMethod() (gas: 278850)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 5.78s (5.75s 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, μ: 448782, ~: 449331)
Logs:
  Bound result 7
  Bound result 8551
  Bound result 9999
  Bound result 0
  Bound result 31874
  Bound result 42657

[PASS] test_addAsset_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 42331, ~: 42700)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 65215, ~: 65188)
Logs:
  Bound result 19
  Bound result 5423

[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 58255)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 58171)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 350377)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 76503)
[PASS] test_addSpoke() (gas: 135409)
[PASS] test_addSpokeToAssets() (gas: 232696)
[PASS] test_addSpokeToAssets_revertsWith_AccessManagedUnauthorized() (gas: 28151)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 35971)
[PASS] test_addSpoke_revertsWith_AccessManagedUnauthorized() (gas: 27817)
[PASS] test_deactivateAsset() (gas: 176526)
[PASS] test_deactivateAsset_revertsWith_AccessManagedUnauthorized() (gas: 29002)
[PASS] test_deactivateSpoke() (gas: 175401)
[PASS] test_deactivateSpoke_revertsWith_AccessManagedUnauthorized() (gas: 28996)
[PASS] test_haltAsset() (gas: 176560)
[PASS] test_haltAsset_revertsWith_AccessManagedUnauthorized() (gas: 28981)
[PASS] test_haltSpoke() (gas: 175422)
[PASS] test_haltSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29004)
[PASS] test_resetAssetCaps() (gas: 250744)
[PASS] test_resetAssetCaps_revertsWith_AccessManagedUnauthorized() (gas: 28956)
[PASS] test_resetSpokeCaps() (gas: 268435)
[PASS] test_resetSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 29046)
[PASS] test_updateFeeConfig_Scenario() (gas: 353173)
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, μ: 195242, ~: 195550)
Logs:
  Bound result 0
  Bound result 1

[PASS] test_updateFeeConfig_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28519, ~: 28519)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 59417)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 62593)
[PASS] test_updateFeeReceiver_Scenario() (gas: 227670)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 426322)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 463271)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 188858, ~: 188878)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28203, ~: 28203)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 64072)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 89372)
[PASS] test_updateInterestRateData() (gas: 81905)
[PASS] test_updateInterestRateData_revertsWith_AccessManagedUnauthorized() (gas: 30162)
[PASS] test_updateInterestRateStrategy() (gas: 102766)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 39577, ~: 39577)
[PASS] test_updateInterestRateStrategy_revertsWith_InterestRateStrategyReverts() (gas: 85998)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 75586)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 76221)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 100473, ~: 102090)
Logs:
  Bound result 3
  Bound result 0

[PASS] test_updateLiquidityFee_revertsWith_AccessManagedUnauthorized() (gas: 27626)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 64212)
[PASS] test_updateReinvestmentController() (gas: 110919)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 28204, ~: 28204)
[PASS] test_updateSpokeActive() (gas: 99321)
[PASS] test_updateSpokeActive_revertsWith_AccessManagedUnauthorized() (gas: 31303)
[PASS] test_updateSpokeCaps() (gas: 75433)
[PASS] test_updateSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 31260)
[PASS] test_updateSpokeDrawCap() (gas: 75238)
[PASS] test_updateSpokeDrawCap_revertsWith_AccessManagedUnauthorized() (gas: 31227)
[PASS] test_updateSpokeHalted() (gas: 102054)
[PASS] test_updateSpokeHalted_revertsWith_AccessManagedUnauthorized() (gas: 31259)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 75305)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_AccessManagedUnauthorized() (gas: 31261)
[PASS] test_updateSpokeSupplyCap() (gas: 75277)
[PASS] test_updateSpokeSupplyCap_revertsWith_AccessManagedUnauthorized() (gas: 31271)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 12.32s (12.29s CPU time)

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

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

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5000, μ: 45335, ~: 45035)
Logs:
  Bound result 10

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5000, μ: 36719, ~: 36719)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5000, μ: 45943, ~: 45986)
Logs:
  Bound result 254

[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5000, μ: 46021, ~: 46308)
Logs:
  Bound result 2

[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5000, μ: 80332735010, ~: 34963)
Logs:
  Bound result 7

[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 956634)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 953770)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 48980)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 126676, ~: 126726)
Logs:
  Bound result 1

[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 35246, ~: 35235)
Logs:
  Bound result 50398236723875172266913096935417727651081943820318649041859156632768570458111

[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 33929, ~: 33979)
Logs:
  Bound result 1

[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 39773)
[PASS] test_getAssetId() (gas: 73160)
[PASS] test_getAssetId_fuzz_revertsWith_AssetNotListed(address) (runs: 5000, μ: 18561, ~: 18561)
[PASS] test_hub_deploy_reverts_on_InvalidConstructorInput() (gas: 828431)
[PASS] test_hub_max_riskPremium() (gas: 8610)
[PASS] test_isUnderlyingListed() (gas: 1178402)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 716089)
[PASS] test_updateAssetConfig_NewFeeReceiver_revertsWith_SpokeNotActive_noFees() (gas: 613421)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 70708)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5000, μ: 269293, ~: 269598)
Logs:
  Bound result 1
  Bound result 184

[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5000, μ: 818997, ~: 818822)
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, μ: 721401, ~: 721226)
Logs:
  Bound result 3
  Bound result 1
  Bound result 3
  Bound result 1

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

[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5000, μ: 698372, ~: 698374)
Logs:
  Bound result 3

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

[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5000, μ: 700485, ~: 700539)
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, μ: 61082, ~: 61136)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5000, μ: 40142, ~: 40042)
Logs:
  Bound result 1
  Bound result 184

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 469753)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 198864, ~: 199295)
Logs:
  Bound result 0
  Bound result 1

[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5000, μ: 95921, ~: 96293)
Logs:
  Bound result 1
  Bound result 0

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

[PASS] test_updateSpokeConfig_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 59224, ~: 59284)
Logs:
  Bound result 3

[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5000, μ: 40524, ~: 40592)
Logs:
  Bound result 2

[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29639)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 93.60s (93.57s CPU time)

Ran 11 tests for tests/unit/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 352075)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 231236, ~: 232296)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 241631, ~: 245293)
Logs:
  Bound result 100

[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 377309, ~: 378109)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 264434, ~: 249976)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 180029, ~: 153877)
[PASS] test_fuzz_pack_unpack_roundtrip(uint256,uint256) (runs: 5000, μ: 9174, ~: 9363)
Logs:
  Bound result 1869986064
  Bound result 100

[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 435212, ~: 428490)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 201614, ~: 199961)
Logs:
  Bound result 37

[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 512981, ~: 510828)
[PASS] test_fuzz_uncheckedAt(uint256[]) (runs: 5000, μ: 150000, ~: 150694)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 73.09s (73.09s CPU time)

Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 352240)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 693444, ~: 693678)
Logs:
  Bound result 3
  Bound result 100

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

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

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 283792, ~: 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, μ: 131889, ~: 131682)
Logs:
  Bound result 3124043968137

[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 16138, ~: 16138)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 267210)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28289)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 165836)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 129018)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 16269)
[PASS] test_draw_revertsWith_SpokeHalted() (gas: 61452)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 61391)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 22.64s (22.61s CPU time)

Ran 2 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.CollateralToLiquidate.t.sol:LiquidationLogicCollateralToLiquidateTest
[PASS] test_calculateCollateralAmountToLiquidate() (gas: 164906)
[PASS] test_calculateCollateralToLiquidate_fuzz((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 187465, ~: 176669)
Logs:
  Bound result 0
  Bound result 12
  Bound result 10000000000000000
  Bound result 99000000000000000002518900895
  Bound result 0
  Bound result 56
  Bound result 14
  Bound result 57179364930612997358944255
  Bound result 12872

Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 2.66s (2.63s 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,uint256,uint256,uint256)) (runs: 5000, μ: 39347, ~: 39474)
Logs:
  Bound result 1631194238
  Bound result 10585
  Bound result 3436
  Bound result 1187448874948792728
  Bound result 232473893725761368
  Bound result 7575125999959706
  Bound result 15
  Bound result 306286583169637935431906209884
  Bound result 75679658657443156232320694161
  Bound result 101634016077
  Bound result 57926430471

[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 41721, ~: 41942)
Logs:
  Bound result 92327073657016677
  Bound result 10002
  Bound result 9994
  Bound result 1151997209165071667
  Bound result 1
  Bound result 8150685937152570
  Bound result 9
  Bound result 999999999999999999999999999999
  Bound result 19615735700711600219664384692
  Bound result 6578
  Bound result 102160
  Bound result 8150685937152570
  Bound result 338

[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 41920, ~: 41879)
Logs:
  Bound result 1631194238
  Bound result 10585
  Bound result 3436
  Bound result 1187448874948792728
  Bound result 232473893725761368
  Bound result 7575125999959706
  Bound result 15
  Bound result 306286583169637935431906209884
  Bound result 75679658657443156232320694161
  Bound result 101634016077
  Bound result 57926430471
  Bound result 5
  Bound result 10000000000000000
  Bound result 101634016077

Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 4.67s (4.65s 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, μ: 23326, ~: 23367)
Logs:
  Bound result 3116123919
  Bound result 10725
  Bound result 2977
  Bound result 1486249897798496545
  Bound result 555054242782847130
  Bound result 6199474701275945
  Bound result 9

[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 27855)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 17346)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 27855)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20533, ~: 20495)
Logs:
  Bound result 3116123919
  Bound result 10725
  Bound result 2977
  Bound result 1486249897798496545
  Bound result 555054242782847130
  Bound result 6199474701275945
  Bound result 9

[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22835, ~: 22876)
Logs:
  Bound result 3116123919
  Bound result 10725
  Bound result 2977
  Bound result 1486249897798496545
  Bound result 555054242782847130
  Bound result 6199474701275945
  Bound result 9

[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22587, ~: 22628)
Logs:
  Bound result 3116123919
  Bound result 10725
  Bound result 2977
  Bound result 1486249897798496545
  Bound result 555054242782847130
  Bound result 6199474701275945
  Bound result 9

Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 3.01s (2.98s CPU time)

Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 8928)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8896)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8917)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8884)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8910)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 8977)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 8942)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 8930)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 8930)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8919)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8853)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8886)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8863)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8920)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8871)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 8949)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 26.24ms (1.36ms CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ExecuteLiquidation.t.sol:LiquidationLogicExecuteLiquidationTest
[PASS] test_executeLiquidation() (gas: 367810)
[PASS] test_executeLiquidation_revertsWith_InvalidDebtToCover() (gas: 81007)
[PASS] test_executeLiquidation_revertsWith_MustNotLeaveDust_Collateral() (gas: 140571)
[PASS] test_executeLiquidation_revertsWith_MustNotLeaveDust_Debt() (gas: 141123)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 33.54ms (1.58ms CPU time)

Ran 32 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_borrowCount() (gas: 108134)
[PASS] test_borrowCount(uint256) (runs: 5000, μ: 1938018, ~: 1778081)
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, μ: 1953778, ~: 1794707)
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, μ: 14042, ~: 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, μ: 144730, ~: 144457)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 152949, ~: 152949)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 144665, ~: 144392)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 134620, ~: 134614)
[PASS] test_next(uint256) (runs: 5000, μ: 20051, ~: 18925)
Logs:
  Bound result 649

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

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

Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256,bool) (runs: 5000, μ: 204107, ~: 189010)
Logs:
  Bound result 1000001000000000000
  Bound result 5495

[PASS] test_liquidateCollateral_revertsWith_ArithmeticUnderflow() (gas: 28059)
[PASS] test_liquidateCollateral_revertsWith_ArithmeticUnderflow_FeeShares() (gas: 124015)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 2.71s (2.68s 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.31s (3.28s 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.33s (1.33s CPU time)

Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 5628)
[PASS] test_borrow_typeHash() (gas: 9867)
[PASS] test_constructor() (gas: 3749)
[PASS] test_eip712Domain() (gas: 10918)
[PASS] test_repay_typeHash() (gas: 9813)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9780)
[PASS] test_supply_typeHash() (gas: 9871)
[PASS] test_updateUserD...*[Comment body truncated]*

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

♻️ Forge Gas Snapshots

Path Value
snapshots/NativeTokenGateway.Operations.json
borrowNative ↓0% (-738) 227,819
snapshots/SignatureGateway.Operations.json
borrowWithSig ↓0% (-369) 213,421
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 1, borrows: 0 ↓1% (-369) 49,057
getUserAccountData: supplies: 2, borrows: 0 ↓1% (-738) 80,364
getUserAccountData: supplies: 2, borrows: 1 ↓1% (-1107) 100,347
getUserAccountData: supplies: 2, borrows: 2 ↓1% (-1476) 119,238
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first ↓0% (-738) 189,558
borrow: second action, same reserve ↓0% (-738) 169,424
liquidationCall (receiveShares): full ↓1% (-2214) 300,867
liquidationCall (receiveShares): partial ↓1% (-2214) 300,285
liquidationCall (reportDeficit): full ↓0% (-1476) 366,089
liquidationCall: full ↓1% (-2214) 318,492
liquidationCall: partial ↓1% (-2214) 317,910
updateUserDynamicConfig: 1 collateral ↓0% (-369) 74,176
updateUserDynamicConfig: 2 collaterals ↓1% (-738) 88,675
updateUserRiskPremium: 1 borrow ↓1% (-738) 94,919
updateUserRiskPremium: 2 borrows ↓1% (-738) 104,599
usingAsCollateral: 1 borrow, disable ↓1% (-738) 104,963
usingAsCollateral: 2 borrows, disable ↓1% (-1107) 126,143
withdraw: 0 borrows, full ↓0% (-369) 127,575
withdraw: 0 borrows, partial ↓0% (-369) 132,471
withdraw: 1 borrow, partial ↓0% (-738) 159,156
withdraw: 2 borrows, partial ↓1% (-1107) 173,345
snapshots/Spoke.Operations.json
borrow: first ↓0% (-738) 258,482
borrow: second action, same reserve ↓0% (-738) 201,348
liquidationCall (receiveShares): full ↓1% (-2214) 332,900
liquidationCall (receiveShares): partial ↓1% (-2214) 332,318
liquidationCall (reportDeficit): full ↓0% (-1476) 358,289
liquidationCall: full ↓1% (-2214) 350,525
liquidationCall: partial ↓1% (-2214) 349,943
updateUserDynamicConfig: 1 collateral ↓0% (-369) 74,176
updateUserDynamicConfig: 2 collaterals ↓1% (-738) 88,675
updateUserRiskPremium: 1 borrow ↓0% (-738) 148,267
updateUserRiskPremium: 2 borrows ↓0% (-738) 198,518
usingAsCollateral: 1 borrow, disable ↓0% (-738) 158,308
usingAsCollateral: 2 borrows, disable ↓0% (-1107) 228,058
withdraw: 0 borrows, full ↓0% (-369) 127,575
withdraw: 0 borrows, partial ↓0% (-369) 132,471
withdraw: 1 borrow, partial ↓0% (-738) 209,999
withdraw: 2 borrows, partial ↓0% (-1107) 255,795
🔕 Unchanged
Path Value
snapshots/Hub.Operations.json
add 86,692
add: with transfer 107,989
draw 104,148
eliminateDeficit: full 72,567
eliminateDeficit: partial 82,172
mintFeeShares 82,741
payFee 70,805
refreshPremium 70,362
remove: full 75,596
remove: partial 80,734
reportDeficit 111,882
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
repayNative 166,460
supplyAsCollateralNative 160,122
supplyNative 135,753
withdrawNative: full 125,548
withdrawNative: partial 136,735
snapshots/SignatureGateway.Operations.json
repayWithSig 186,732
setSelfAsUserPositionManagerWithSig 75,118
setUsingAsCollateralWithSig 85,387
supplyWithSig 151,985
updateUserDynamicConfigWithSig 63,120
updateUserRiskPremiumWithSig 62,090
withdrawWithSig 130,803
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 13,014
snapshots/Spoke.Operations.ZeroRiskPremium.json
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
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, enable 42,516
withdraw: non collateral 105,891
snapshots/Spoke.Operations.json
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
usingAsCollateral: 0 borrows, enable 59,616
usingAsCollateral: 1 borrow, enable 42,504
usingAsCollateral: 2 borrows, enable 42,516
withdraw: non collateral 105,891
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

{
roundId = uint80(block.timestamp);
roundId = block.timestamp.toUint80();
answer = UNITS;
Copy link
Member

Choose a reason for hiding this comment

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

answer = latestAnswer();

Copy link
Contributor

Choose a reason for hiding this comment

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

i thought the point of this unit price feed was hard coding it to UNITS

Copy link
Member

Choose a reason for hiding this comment

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

yes that's what latestAnswer returns

Copy link
Member

Choose a reason for hiding this comment

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

suggestion is to avoid logic duplication, can be done either way

Copy link
Contributor

Choose a reason for hiding this comment

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

hm then we need to make latestAnswer public or create a _latestAnswer internal helper to return UNITS, also there's already some code duplication in getAnswer too

Copy link
Member

Choose a reason for hiding this comment

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

yes make it public

/// @notice Price feed that returns the unit price (1), with decimals precision.
/// @dev This price feed can be set for reserves that use the base currency as collateral.
contract UnitPriceFeed is AggregatorV3Interface {
contract UnitPriceFeed is AggregatorV2V3Interface {
Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine just using V2

return prices;
}

/// @inheritdoc IAaveOracle
Copy link
Member

Choose a reason for hiding this comment

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

we better say that this funciton reverts if price is zero. Same for getReservesPrices.
Also, setReserveSource docs needs update.

@miguelmtzinf miguelmtzinf changed the title feat: Use latestAnswer for price feat: Use latestAnswer instead of latestRoundData for reserve price on AaveOracle Feb 18, 2026
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.

4 participants