Skip to content

feat: Add docs regarding rounding decisions#1129

Draft
CheyenneAtapour wants to merge 5 commits into
devfrom
feat/rounding-properties
Draft

feat: Add docs regarding rounding decisions#1129
CheyenneAtapour wants to merge 5 commits into
devfrom
feat/rounding-properties

Conversation

@CheyenneAtapour

Copy link
Copy Markdown
Contributor

Adds a document describing rounding directions chosen in the protocol, as well as motivations for the chosen directions

@github-actions

Copy link
Copy Markdown

♻️ Forge Gas Snapshots

🔕 Unchanged
Path Value
snapshots/Hub.Operations.json
add 86,624
add: with transfer 107,921
draw 104,105
eliminateDeficit: full 58,850
eliminateDeficit: partial 68,453
mintFeeShares 82,661
payFee 70,786
refreshPremium 70,367
remove: full 75,357
remove: partial 80,495
reportDeficit 111,875
restore: full 76,533
restore: full - with transfer 169,118
restore: partial 85,255
restore: partial - with transfer 143,235
transferShares 69,588
snapshots/NativeTokenGateway.Operations.json
borrowNative 227,621
repayNative 166,091
supplyAsCollateralNative 159,972
supplyNative 135,681
withdrawNative: full 125,318
withdrawNative: partial 136,447
snapshots/SignatureGateway.Operations.json
borrowWithSig 212,847
repayWithSig 186,399
setSelfAsUserPositionManagerWithSig 75,432
setUsingAsCollateralWithSig 85,363
supplyWithSig 151,942
updateUserDynamicConfigWithSig 63,101
updateUserRiskPremiumWithSig 62,083
withdrawWithSig 130,601
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 12,919
getUserAccountData: supplies: 1, borrows: 0 49,208
getUserAccountData: supplies: 2, borrows: 0 80,783
getUserAccountData: supplies: 2, borrows: 1 100,194
getUserAccountData: supplies: 2, borrows: 2 118,951
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first 189,248
borrow: second action, same reserve 169,197
liquidationCall (receiveShares): full 294,936
liquidationCall (receiveShares): partial 294,654
liquidationCall: full 304,221
liquidationCall: partial 303,939
permitReserve + repay (multicall) 164,333
permitReserve + supply (multicall) 146,622
permitReserve + supply + enable collateral (multicall) 161,025
repay: full 123,692
repay: partial 128,662
setUserPositionManagersWithSig: disable 47,350
setUserPositionManagersWithSig: enable 69,262
supply + enable collateral (multicall) 141,205
supply: 0 borrows, collateral disabled 122,745
supply: 0 borrows, collateral enabled 105,716
supply: second action, same reserve 105,645
updateUserDynamicConfig: 1 collateral 74,527
updateUserDynamicConfig: 2 collaterals 89,432
updateUserRiskPremium: 1 borrow 94,760
updateUserRiskPremium: 2 borrows 103,895
usingAsCollateral: 0 borrows, enable 59,556
usingAsCollateral: 1 borrow, disable 104,875
usingAsCollateral: 1 borrow, enable 42,444
usingAsCollateral: 2 borrows, disable 125,971
usingAsCollateral: 2 borrows, enable 42,456
withdraw: 0 borrows, full 127,660
withdraw: 0 borrows, partial 132,346
withdraw: 1 borrow, partial 158,728
withdraw: 2 borrows, partial 172,834
withdraw: non collateral 105,615
snapshots/Spoke.Operations.json
borrow: first 258,151
borrow: second action, same reserve 201,100
liquidationCall (receiveShares): full 326,944
liquidationCall (receiveShares): partial 326,662
liquidationCall: full 336,229
liquidationCall: partial 335,947
permitReserve + repay (multicall) 161,850
permitReserve + supply (multicall) 146,622
permitReserve + supply + enable collateral (multicall) 161,025
repay: full 117,771
repay: partial 137,141
setUserPositionManagersWithSig: disable 47,350
setUserPositionManagersWithSig: enable 69,262
supply + enable collateral (multicall) 141,205
supply: 0 borrows, collateral disabled 122,745
supply: 0 borrows, collateral enabled 105,716
supply: second action, same reserve 105,645
updateUserDynamicConfig: 1 collateral 74,527
updateUserDynamicConfig: 2 collaterals 89,432
updateUserRiskPremium: 1 borrow 148,084
updateUserRiskPremium: 2 borrows 197,791
usingAsCollateral: 0 borrows, enable 59,556
usingAsCollateral: 1 borrow, disable 158,199
usingAsCollateral: 1 borrow, enable 42,444
usingAsCollateral: 2 borrows, disable 227,867
usingAsCollateral: 2 borrows, enable 42,456
withdraw: 0 borrows, full 127,660
withdraw: 0 borrows, partial 132,346
withdraw: 1 borrow, partial 209,550
withdraw: 2 borrows, partial 255,263
withdraw: non collateral 105,615

@github-actions

Copy link
Copy Markdown

Forge Build Sizes

🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle 2,834 3,488 21,742 45,664
AccessManager 12,985 14,210 11,591 34,942
AccessManagerEnumerable 16,881 18,699 7,695 30,453
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,709 2,894 21,867 46,258
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 427 479 24,149 48,673
Create2Utils 134 184 24,442 48,968
DeployUtils 44 94 24,532 49,058
DeployWrapper 6,773 6,801 17,803 42,351
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) 171 221 24,405 48,931
EIP712Hash.spoke 166 194 24,410 48,958
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
GatewayBaseWrapper 2,400 2,675 22,176 46,477
Hashes 44 94 24,532 49,058
Hub 24,364 24,561 212 24,591
HubConfigurator 13,133 13,406 11,443 35,746
JsonBindings 12,835 12,887 11,741 36,265
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 7,942 7,994 16,634 41,158
LiquidationLogic.spoke 5,603 5,635 18,973 43,517
LiquidationLogicWrapper 13,706 13,880 10,870 35,272
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 775 803 23,801 48,349
MockPriceFeed 737 1,395 23,839 47,757
MockReentrantCaller 882 1,083 23,694 48,069
MockSkimSpoke 1,116 1,275 23,460 47,877
NativeTokenGateway 6,168 6,585 18,408 42,567
NoncesKeyed 561 589 24,015 48,563
NoncesKeyed.spoke 323 349 24,253 48,803
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,102 3,130 21,474 46,022
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 1,075 1,103 23,501 48,049
Roles 153 203 24,423 48,949
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,387 11,926 13,189 37,226
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,354 11,627 13,222 37,525
SpokeInstance 24,195 24,927 381 24,225
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
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
UnitPriceFeed 777 1,771 23,799 47,381
UserPositionDebt 44 94 24,532 49,058
UserPositionDebt.spoke 16 44 24,560 49,108
UserPositionDebtWrapper 3,259 3,287 21,317 45,865
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,394 1,422 23,182 47,730

@github-actions

Copy link
Copy Markdown
🌈 Test Results
No files changed, compilation skipped

Ran 20 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_DECIMALS() (gas: 8326)
[PASS] test_constructor() (gas: 641047)
[PASS] test_description() (gas: 12039)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 642514, ~: 642835)
[PASS] test_getReservePrice() (gas: 48787)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 48043)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10894)
[PASS] test_getReservePrices() (gas: 80715)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 50926)
[PASS] test_getReserveSource() (gas: 48957)
[PASS] test_setReserveSource() (gas: 45999)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 102778)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17224)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 17072)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 13021)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 6254448)
[PASS] test_setSpoke() (gas: 5659870)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10870)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13397, ~: 13397)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15081)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 650.41ms (771.89ms CPU time)

Ran 17 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5000, μ: 1981489, ~: 1980367)
[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5000, μ: 1528843, ~: 1527966)
[PASS] test_grantRole() (gas: 315886)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5000, μ: 923424, ~: 919753)
[PASS] test_revokeRole() (gas: 323138)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5000, μ: 2088146, ~: 2142906)
[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5000, μ: 1981626, ~: 2114661)
[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606131)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577217)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602311)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378311)
[PASS] test_setRoleGuardian_trackRoles() (gas: 263932)
[PASS] test_setTargetFunctionRole() (gas: 414440)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1103911)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 894967)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 30940)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 549104)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 22.67s (36.06s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 702301, ~: 702439)
[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 702732, ~: 702987)
[PASS] test_payFee_revertsWith_InvalidShares() (gas: 20320)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 61202)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 138343)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 642318)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 26.11s (39.54s CPU time)

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

[PASS] test_reclaim_fullAmount() (gas: 634379)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 653592, ~: 652782)
[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 742924)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 13093)
[PASS] test_reclaim_revertsWith_InsufficientTransferred() (gas: 455770)
[PASS] test_reclaim_revertsWith_InsufficientTransferred_noSwept() (gas: 102165)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 92347)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93230, ~: 93230)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 40386)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 619122)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 14.53s (16.11s CPU time)

Ran 10 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 13531)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6805, ~: 6805)
[PASS] test_hash_positionManagerUpdate_fuzz((address,bool)) (runs: 5000, μ: 6193, ~: 6193)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6806, ~: 6806)
[PASS] test_hash_setUserPositionManagers_fuzz((address,(address,bool)[],uint256,uint256)) (runs: 5000, μ: 455664, ~: 449260)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 7305, ~: 7305)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6849, ~: 6849)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6450, ~: 6450)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5000, μ: 6471, ~: 6471)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 6805, ~: 6805)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 21.89s (21.89s 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: 65227)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 74198)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74417)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 328.54ms (308.42ms CPU time)

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 915702)
[PASS] test_repayNative() (gas: 987507)
[PASS] test_supplyAndCollateralNative() (gas: 304937)
[PASS] test_supplyNative() (gas: 286516)
[PASS] test_withdrawNative() (gas: 507906)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 38.15ms (4.06ms CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 748335)
[PASS] test_repayWithSig() (gas: 983340)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 210400)
[PASS] test_setUsingAsCollateralWithSig() (gas: 294555)
[PASS] test_supplyWithSig() (gas: 466009)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 146030)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 143973)
[PASS] test_withdrawWithSig() (gas: 414688)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 42.25ms (8.14ms CPU time)

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

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

[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5000, μ: 24225, ~: 24372)
[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5000, μ: 25364, ~: 25411)
[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18783)
Logs:
  Bound result 0

[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5000, μ: 19077, ~: 18834)
[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11225)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 36272)
[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 23.28s (23.46s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 2867083)
[PASS] test_change_role_responsibility() (gas: 121132)
[PASS] test_hub_access_manager_exposure() (gas: 13427)
[PASS] test_hub_admin_access() (gas: 1365850)
[PASS] test_migrate_role_responsibility() (gas: 781111)
[PASS] test_setInterestRateData_access() (gas: 102489)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 23.68ms (3.68ms CPU time)

Ran 9 tests for tests/unit/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 354262)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 231316, ~: 232296)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 255783, ~: 258916)
[PASS] test_fuzz_get(uint256[]) (runs: 5000, μ: 401741, ~: 399822)
[PASS] test_fuzz_get_uninitialized(uint256[]) (runs: 5000, μ: 253178, ~: 242626)
[PASS] test_fuzz_get_uninitialized_sorted(uint256[]) (runs: 5000, μ: 202312, ~: 181984)
[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 458148, ~: 448336)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 220676, ~: 225096)
[PASS] test_fuzz_sortByKey_with_collision(uint256[]) (runs: 5000, μ: 537484, ~: 528170)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 71.74s (122.14s CPU time)

Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToLiquidate.t.sol:LiquidationLogicDebtToLiquidateTest
[PASS] test_calculateDebtToLiquidate_fuzz((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 30181, ~: 30251)
[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 31906, ~: 32003)
[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 33976, ~: 33877)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.31s (5.57s 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, μ: 22789, ~: 22724)
[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 24870)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 14911)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 24870)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 19915, ~: 19850)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22547, ~: 22482)
[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 22530, ~: 22465)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 2.73s (4.75s 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 21.55ms (981.81µs CPU time)

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

[PASS] test_remove_all_with_interest() (gas: 366363)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 206340, ~: 206291)
[PASS] test_remove_fuzz_all_liquidity_with_interest(uint256,uint256) (runs: 5000, μ: 417173, ~: 417417)
[PASS] test_remove_fuzz_multi_spoke(uint256,uint256) (runs: 5000, μ: 287097, ~: 287219)
[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 419823, ~: 420326)
[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 157978)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 147067)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 21306)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 16413)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 18525)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 61694)
[PASS] test_remove_revertsWith_SpokePaused() (gas: 61676)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 184546)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 362276)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 29.93s (29.91s CPU time)

Ran 5 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256) (runs: 5000, μ: 266779, ~: 267675)
[PASS] test_liquidateCollateral_fuzz_CollateralToLiquidatorIsZero(uint256) (runs: 5000, μ: 110024, ~: 110732)
[PASS] test_liquidateCollateral_fuzz_receiveShares_sharesToLiquidator(uint256,uint256) (runs: 5000, μ: 752660, ~: 753946)
[PASS] test_liquidateCollateral_fuzz_revertsWith_ArithmeticUnderflow(uint256,uint256) (runs: 5000, μ: 100539, ~: 100347)
[PASS] test_liquidateCollateral_receiveShares_sharesToLiquidatorIsZero() (gas: 736943)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 12.53s (13.81s CPU time)

Ran 7 tests for tests/unit/Hub/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 217854, ~: 217560)
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusPremiumRayDeficitReported(uint256) (runs: 5000, μ: 218812, ~: 218518)
[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 669778, ~: 670667)
[PASS] test_reportDeficit_paused() (gas: 264951)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 24838)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 33829, ~: 33829)
[PASS] test_reportDeficit_with_premium() (gas: 669246)
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.53s (17.51s CPU time)

Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 15199)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 15451)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 55965, ~: 55808)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 54968, ~: 54975)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 71287, ~: 71186)
[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 58501, ~: 58361)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 55423, ~: 55192)
[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 68000, ~: 67971)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.67s (17.65s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 9265)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 9286)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 17123, ~: 16909)
[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 19349, ~: 19134)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 971.93ms (951.61ms CPU time)

Ran 12 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26045)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259541)
[PASS] test_validateLiquidationCall_revertsWith_CollateralCannotBeLiquidated() (gas: 45213)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31843)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26816)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26935)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27042)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27072)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26902)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31944)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31944)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33701)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 22.13ms (1.44ms CPU time)

Ran 27 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4679)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5000, μ: 9084, ~: 8834)
[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, μ: 7535, ~: 7381)
[PASS] test_constants() (gas: 3110)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5000, μ: 8585, ~: 8824)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5000, μ: 3515, ~: 3577)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5000, μ: 3595, ~: 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: 3161)
[PASS] test_mulDivDown_WithRemainder() (gas: 3268)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3721)
[PASS] test_mulDivUp_NoRemainder() (gas: 3249)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3084)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3140)
[PASS] test_mulDivUp_WithRemainder() (gas: 3248)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3792)
[PASS] test_signedSub(uint256,uint256) (runs: 5000, μ: 8591, ~: 8530)
[PASS] test_signedSub_revertsWith_SafeCastOverflowedUintToInt(uint256) (runs: 5000, μ: 7656, ~: 7702)
[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5000, μ: 3447, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5000, μ: 12347, ~: 9588)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5000, μ: 3422, ~: 3504)
Suite result: ok. 27 passed; 0 failed; 0 skipped; finished in 1.79s (1.78s CPU time)

Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 354762)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5000, μ: 693558, ~: 693684)
[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5000, μ: 287761, ~: 287798)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5000, μ: 82137, ~: 82096)
[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 286505, ~: 286749)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5000, μ: 34698, ~: 34486)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5000, μ: 172364, ~: 172081)
[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5000, μ: 134005, ~: 133805)
[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5000, μ: 16102, ~: 16102)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 269925)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28241)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 168692)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 131141)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 16233)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 61236)
[PASS] test_draw_revertsWith_SpokePaused() (gas: 61188)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 23.02s (23.00s CPU time)

Ran 3 tests for tests/unit/Hub/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 273385)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 512690, ~: 512654)
[PASS] test_rescue_scenario_fuzz(uint256) (runs: 5000, μ: 452313, ~: 452108)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 17.97s (17.95s CPU time)

Ran 5 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5000, μ: 641380, ~: 641380)
[PASS] test_eliminateDeficit_fuzz_revertsWith_ArithmeticUnderflow_CallerSpokeNoFunds(uint256) (runs: 5000, μ: 335090, ~: 335090)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 22623)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 333064)
[PASS] test_eliminateDeficit_revertsWith_callerSpokeNotActive() (gas: 63787)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 15.21s (15.19s CPU time)

Ran 6 tests for tests/unit/Hub/Hub.MintFeeShares.t.sol:HubMintFeeSharesTest
[PASS] test_mintFeeShares() (gas: 310124)
[PASS] test_mintFeeShares_noFees() (gas: 365611)
[PASS] test_mintFeeShares_noShares() (gas: 291681)
[PASS] test_mintFeeShares_revertsWith_AccessManagedUnauthorized() (gas: 24115)
[PASS] test_mintFeeShares_revertsWith_AssetNotListed() (gas: 27529)
[PASS] test_mintFeeShares_revertsWith_SpokeNotActive() (gas: 242098)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 25.80ms (4.04ms CPU time)

Ran 9 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 269972)
[PASS] test_deficit() (gas: 1172996)
[PASS] test_draw() (gas: 418374)
[PASS] test_mintFeeShares() (gas: 499664)
[PASS] test_payFee_transferShares() (gas: 966930)
[PASS] test_refreshPremium() (gas: 633170)
[PASS] test_remove() (gas: 310118)
[PASS] test_restore() (gas: 877564)
[PASS] test_restore_with_transfer() (gas: 878229)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 41.59ms (6.76ms CPU time)

Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 664082)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5000, μ: 157554, ~: 157512)
[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5000, μ: 331164, ~: 331291)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5000, μ: 112172, ~: 112130)
[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5000, μ: 266074, ~: 265935)
[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5000, μ: 223429, ~: 223634)
[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5000, μ: 341716, ~: 341741)
[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5000, μ: 798870, ~: 798910)
[PASS] test_add_multi_add_minimal_shares() (gas: 320018)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 359810)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64480)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13619)
[PASS] test_add_revertsWith_InvalidShares() (gas: 222924)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224170)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99533)
[PASS] test_add_revertsWith_SpokePaused() (gas: 99540)
[PASS] test_add_single_asset() (gas: 329572)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_add_with_increased_index() (gas: 300274)
[PASS] test_add_with_increased_index_with_premium() (gas: 678484)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 82.03s (118.95s CPU time)

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

[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 669203)
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, μ: 361696, ~: 361788)
[PASS] test_restore_fuzz_full_amount_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 659507, ~: 671144)
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 243246, ~: 244502)
[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest_and_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 634200, ~: 634394)
[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 211474)
[PASS] test_restore_partial_drawn() (gas: 321716)
[PASS] test_restore_partial_same_block() (gas: 321892)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 232177)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 251950)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 55102)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 218439)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 218438)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 169045)
[PASS] test_restore_revertsWith_SpokePaused() (gas: 96095)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 360819)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 243105)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 15768000

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

[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 526536)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 227317)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 216814)
[PASS] test_restore_when_asset_frozen() (gas: 425565)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 18.93s (18.91s CPU time)

Ran 12 tests for tests/unit/Hub/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 254285)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 465593, ~: 470125)
[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 529055, ~: 535921)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 885599)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 456798, ~: 456800)
[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 525698, ~: 525920)
[PASS] test_refreshPremium_pausedSpokesAllowed() (gas: 121075)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 841357)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 862507)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 58757)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 907705)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 704841)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 105.36s (115.68s CPU time)

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

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

[PASS] test_borrowNative_fuzz(uint256) (runs: 5000, μ: 662048, ~: 663350)
[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32382)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32457)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 283015)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271116)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25340)
[PASS] test_constructor() (gas: 1307097)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 65604)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17616)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 751550)
Logs:
  Bound result 5000000000000000000

[PASS] test_repayNative_excessAmount() (gas: 660069)
[PASS] test_repayNative_fuzz(uint256) (runs: 5000, μ: 747219, ~: 752161)
[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5000, μ: 670743, ~: 666148)
[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: 325863)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 303089)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38728)
[PASS] test_supplyAndCollateralNative() (gas: 332925)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5000, μ: 333239, ~: 332953)
[PASS] test_supplyNative() (gas: 304701)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyNative_fuzz(uint256) (runs: 5000, μ: 305014, ~: 304728)
[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: 374176)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336111)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38740)
[PASS] test_withdrawNative() (gas: 330749)
Logs:
  Bound result 100000000000000000000

[PASS] test_withdrawNative_fuzz(uint256) (runs: 5000, μ: 330396, ~: 330821)
[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5000, μ: 267587, ~: 267385)
[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5000, μ: 613244, ~: 613236)
[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32479)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32512)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 299961)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271178)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25395)
Suite result: ok. 40 passed; 0 failed; 0 skipped; finished in 62.76s (62.74s CPU time)

Ran 4 tests for tests/unit/Hub/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 227269, ~: 227224)
[PASS] test_skimAdd_fuzz_donationBeforeAdd(uint256,uint256,uint256) (runs: 5000, μ: 227301, ~: 227256)
[PASS] test_skimAdd_fuzz_wrongSpokeTransfer(uint256,uint256,uint256) (runs: 5000, μ: 216391, ~: 216340)
[PASS] test_skimRestore_fuzz_liquidityDonation(uint256,uint256,uint256) (runs: 5000, μ: 271785, ~: 273268)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 26.71s (40.24s CPU time)

Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5000, μ: 12810, ~: 12810)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 95730, ~: 95730)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13478, ~: 13478)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 3.95s (3.95s 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, μ: 15125, ~: 15261)
[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5000, μ: 15351, ~: 15347)
[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5000, μ: 12610, ~: 12760)
[PASS] test_percentMul() (gas: 14932)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5000, μ: 15334, ~: 15330)
[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5000, μ: 15128, ~: 15264)
[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5000, μ: 11554, ~: 12063)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 1.50s (1.50s CPU time)

Ran 10 tests for tests/unit/Hub/Hub.SpokeConfig.t.sol:HubSpokeConfigTest
[PASS] test_add_active_paused_scenarios() (gas: 302089)
[PASS] test_draw_active_paused_scenarios() (gas: 303048)
[PASS] test_eliminateDeficit_active_paused_scenarios() (gas: 653660)
[PASS] test_mintFeeShares_active_paused_scenarios() (gas: 835071)
[PASS] test_payFeeShares_active_paused_scenarios() (gas: 367249)
[PASS] test_refreshPremium_active_paused_scenarios() (gas: 265802)
[PASS] test_remove_active_paused_scenarios() (gas: 317589)
[PASS] test_reportDeficit_active_paused_scenarios() (gas: 443613)
[PASS] test_restore_active_paused_scenarios() (gas: 353725)
[PASS] test_transferShares_fuzz_active_paused_scenarios(bool,bool,bool,bool) (runs: 5000, μ: 212578, ~: 212584)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 4.01s (3.99s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 229592, ~: 229592)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 97257)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 124250)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 181665)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 91.64s (91.61s CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 363003)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 76375)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 109856)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 118992)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 28.33ms (1.42ms CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 132400)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 627609, ~: 627445)
[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 249404, ~: 249392)
[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 576591, ~: 576972)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 535325, ~: 535782)
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 3834531, ~: 3851631)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 3905425, ~: 3920791)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 191.71s (282.55s CPU time)

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

[PASS] test_transferShares_fuzz(uint256,uint256) (runs: 5000, μ: 194022, ~: 194229)
[PASS] test_transferShares_fuzz_revertsWith_underflow_spoke_added_shares_exceeded(uint256) (runs: 5000, μ: 150975, ~: 150690)
[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 194839)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 177490)
[PASS] test_transferShares_revertsWith_SpokePaused() (gas: 179662)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 22559)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.40s (7.37s CPU time)

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

[PASS] test_sweep_does_not_impact_utilization(uint256,uint256) (runs: 5000, μ: 628819, ~: 630119)
[PASS] test_sweep_fuzz(uint256,uint256) (runs: 5000, μ: 482906, ~: 482908)
[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 12581)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 219260)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 103393)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 93572, ~: 93572)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 39925)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 25.58s (35.07s CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.EdgeCases.t.sol:SpokeAccrueLiquidityFeeEdgeCasesTest
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 536186, ~: 536340)
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 787436, ~: 787517)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 642589341)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 256387842)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 536502)
Logs:
  Bound result 500000000000000000000
  Bound result 5000
  Bound result 34560000
  Bound result 2

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

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 857660)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 121564)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 244543, ~: 244486)
[PASS] test_accrueLiquidityFee_exact() (gas: 863439)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 933058, ~: 954532)
[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 542408)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 889781)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 19.41s (35.46s CPU time)

Ran 6 tests for tests/unit/Hub/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 42540)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 389295, ~: 389195)
[PASS] test_accrueInterest_NoInterest_OnlyAdd(uint40) (runs: 5000, μ: 206053, ~: 205992)
[PASS] test_accrueInterest_fuzz_BorrowAmountAndElapsed(uint256,uint40) (runs: 5000, μ: 270270, ~: 270173)
[PASS] test_accrueInterest_fuzz_BorrowAmountRateAndElapsed(uint256,uint256,uint40) (runs: 5000, μ: 390244, ~: 390003)
[PASS] test_accrueInterest_fuzz_BorrowAndWait(uint40) (runs: 5000, μ: 269001, ~: 268901)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 24.49s (37.62s CPU time)

Ran 4 tests for tests/gas/Spoke.Operations.Liquidation.gas.t.sol:SpokeOperations_Liquidation_ZeroRiskPremium_Gas_Tests
[PASS] test_liquidation_full() (gas: 326064)
[PASS] test_liquidation_partial() (gas: 325826)
[PASS] test_liquidation_receiveShares_full() (gas: 316820)
[PASS] test_liquidation_receiveShares_partial() (gas: 316560)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 42.95ms (3.81ms CPU time)

Ran 9 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Basic_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 1087268)
[PASS] test_multicall_ops() (gas: 1319539)
[PASS] test_repay() (gas: 775693)
[PASS] test_setUserPositionManagersWithSig() (gas: 313293)
[PASS] test_supply() (gas: 541326)
[PASS] test_updateRiskPremium() (gas: 937610)
[PASS] test_updateUserDynamicConfig() (gas: 587390)
[PASS] test_usingAsCollateral() (gas: 1083610)
[PASS] test_withdraw() (gas: 1580467)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 50.33ms (14.14ms CPU time)

Ran 9 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_Gas_Tests
[PASS] test_borrow() (gas: 1320548)
[PASS] test_multicall_ops() (gas: 1402028)
[PASS] test_repay() (gas: 866422)
[PASS] test_setUserPositionManagersWithSig() (gas: 308761)
[PASS] test_supply() (gas: 538528)
[PASS] test_updateRiskPremium() (gas: 1309531)
[PASS] test_updateUserDynamicConfig() (gas: 582858)
[PASS] test_usingAsCollateral() (gas: 1464733)
[PASS] test_withdraw() (gas: 1939621)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 52.04ms (17.01ms CPU time)

Ran 4 tests for tests/unit/Spoke/Spoke.PermitReserve.t.sol:SpokePermitReserveTest
[PASS] test_permitReserve() (gas: 88258)
[PASS] test_permitReserve_forwards_correct_call() (gas: 35570)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 24418)
[PASS] test_permitReserve_revertsWith_ReserveNotListedIn() (gas: 22950)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 21.34ms (1.11ms CPU time)

Ran 10 tests for tests/unit/Spoke/Spoke.PositionManager.t.sol:SpokePositionManagerTest
[PASS] test_onlyPositionManager_on_borrow() (gas: 536389)
[PASS] test_onlyPositionManager_on_repay() (gas: 559667)
[PASS] test_onlyPositionManager_on_supply() (gas: 291060)
[PASS] test_onlyPositionManager_on_updateUserDynamicConfig() (gas: 1278728)
[PASS] test_onlyPositionManager_on_updateUserRiskPremium() (gas: 1407701)
[PASS] test_onlyPositionManager_on_usingAsCollateral() (gas: 144159)
[PASS] test_onlyPositionManager_on_withdraw() (gas: 319662)
[PASS] test_renouncePositionManagerRole() (gas: 20224)
[PASS] test_renouncePositionManagerRole_noop_from_disabled() (gas: 21816)
[PASS] test_setApprovalForPositionManager(bytes32) (runs: 5000, μ: 18089, ~: 18089)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 350.25ms (330.32ms CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.Repay.EdgeCases.t.sol:SpokeRepayEdgeCaseTest
[PASS] test_fuzz_repay_effect_on_ex_rates(uint256,uint256) (runs: 5000, μ: 683425, ~: 683255)
[PASS] test_repay_less_than_share() (gas: 577706)
[PASS] test_repay_only_base_debt_interest() (gas: 754364)
[PASS] test_repay_only_base_debt_no_premium() (gas: 638838)
[PASS] test_repay_supply_ex_rate_decr() (gas: 1464340)
[PASS] test_repay_supply_ex_rate_decr_skip_time() (gas: 1461053)
[PASS] test_repay_zero_shares_nonzero_premium_debt() (gas: 758110)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 14.35s (14.32s CPU time)

Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13428, ~: 13428)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13428, ~: 13428)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13397, ~: 13397)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13471, ~: 13471)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13682, ~: 13682)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13749, ~: 13749)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13493, ~: 13493)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 12.10s (12.08s CPU time)

Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 80334)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 113279)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 72905)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 139985)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 81321)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 81498)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 79389)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 24.71ms (4.09ms CPU time)

Ran 7 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 78126)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 111071)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 70697)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 137777)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 79113)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 79290)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 77181)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 24.85ms (4.00ms CPU time)

Ran 4 tests for tests/unit/misc/SignatureGateway/SignatureGateway.SetSelfAsUserPositionManagerWithSig.t.sol:SignatureGatewaySetSelfAsUserPositionManagerTest
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 140371)
[PASS] test_setSelfAsUserPositionManagerWithSig_forwards_correct_call() (gas: 32923)
[PASS] test_setSelfAsUserPositionManagerWithSig_ignores_underlying_spoke_reverts() (gas: 29675)
[PASS] test_setSelfAsUserPositionManagerWithSig_revertsWith_SpokeNotRegistered() (gas: 16476)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 20.98ms (1.06ms CPU time)

Ran 11 tests for tests/unit/misc/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 793732)
[PASS] test_renouncePositionManagerRole() (gas: 27467)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18090)
[PASS] test_repayWithSig() (gas: 796936)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 309216)
[PASS] test_setUsingAsCollateralWithSig() (gas: 616306)
[PASS] test_supplyWithSig() (gas: 587369)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 319128)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 892715)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13325, ~: 13325)
[PASS] test_withdrawWithSig() (gas: 587461)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 409.82ms (384.40ms CPU time)

Ran 3 tests for tests/unit/Spoke/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 3194505)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 568767)
[PASS] testAccess_spoke_admin_config_access() (gas: 512779)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 22.82ms (2.91ms CPU time)

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

Ran 5 tests for tests/unit/Rescuable.t.sol:RescuableTest
[PASS] test_constructor() (gas: 12531)
[PASS] test_rescueNative_fuzz(uint256) (runs: 5000, μ: 33300, ~: 33478)
[PASS] test_rescueNative_revertsWith_OnlyRescueGuardian() (gas: 11089)
[PASS] test_rescueToken_fuzz(uint256) (runs: 5000, μ: 206646, ~: 206766)
[PASS] test_rescueToken_revertsWith_OnlyRescueGuardian() (gas: 180558)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 3.30s (3.28s CPU time)

Ran 8 tests for tests/unit/ReserveFlags.t.sol:ReserveFlagsTests
[PASS] test_constants() (gas: 13493)
[PASS] test_create_fuzz(bool,bool,bool,bool,bool) (runs: 5000, μ: 16325, ~: 16332)
[PASS] test_setBorrowable_fuzz(uint8) (runs: 5000, μ: 13338, ~: 13338)
[PASS] test_setFrozen_fuzz(uint8) (runs: 5000, μ: 13301, ~: 13301)
[PASS] test_setLiquidatable_fuzz(uint8) (runs: 5000, μ: 13346, ~: 13346)
[PASS] test_setPaused_fuzz(uint8) (runs: 5000, μ: 13221, ~: 13221)
[PASS] test_setReceiveSharesEnabled_fuzz(uint8) (runs: 5000, μ: 13284, ~: 13284)
[PASS] test_set_flags() (gas: 94213)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 1.63s (1.63s CPU time)

Ran 29 tests for tests/unit/libraries/PositionStatusMap.t.sol:PositionStatusMapTest
[PASS] test_bucketId() (gas: 8878)
[PASS] test_collateralCount() (gas: 107741)
[PASS] test_collateralCount(uint256) (runs: 5000, μ: 1919704, ~: 1755406)
[PASS] test_collateralCount_ignoresInvalidBits() (gas: 122622)
[PASS] test_constants() (gas: 44556)
[PASS] test_fls() (gas: 509035)
[PASS] test_fromBitId(uint256,uint256) (runs: 5000, μ: 14042, ~: 14336)
[PASS] test_fuzz_setBorrowing(uint256,bool) (runs: 5000, μ: 22306, ~: 32093)
[PASS] test_fuzz_setUseAsCollateral(uint256,bool) (runs: 5000, μ: 22402, ~: 32189)
[PASS] test_getBucketWord(uint256) (runs: 5000, μ: 14179, ~: 14179)
[PASS] test_isUsingAsCollateralOrBorrowing_slot0() (gas: 108334)
[PASS] test_isUsingAsCollateralOrBorrowing_slot1() (gas: 43997)
[PASS] test_isolateBorrowing(uint256) (runs: 5000, μ: 153030, ~: 153030)
[PASS] test_isolateBorrowingUntil(uint256,uint256) (runs: 5000, μ: 144459, ~: 143960)
[PASS] test_isolateCollateral(uint256) (runs: 5000, μ: 152949, ~: 152949)
[PASS] test_isolateCollateralUntil(uint256,uint256) (runs: 5000, μ: 144439, ~: 143940)
[PASS] test_isolateUntil(uint256,uint256) (runs: 5000, μ: 134615, ~: 134604)
[PASS] test_next(uint256) (runs: 5000, μ: 19939, ~: 18858)
[PASS] test_nextBorrowing(uint256) (runs: 5000, μ: 17952, ~: 18068)
[PASS] test_nextBorrowing_continuous() (gas: 61801640)
[PASS] test_nextCollateral(uint256) (runs: 5000, μ: 17674, ~: 16845)
[PASS] test_nextCollateral_continuous() (gas: 61883200)
[PASS] test_next_continuous() (gas: 89246797)
[PASS] test_popCount(bytes32) (runs: 5000, μ: 38033, ~: 38033)
[PASS] test_setBorrowing_slot0() (gas: 43924)
[PASS] test_setBorrowing_slot1() (gas: 43924)
[PASS] test_setUseAsCollateral_slot0() (gas: 44105)
[PASS] test_setUseAsCollateral_slot1() (gas: 44088)
[PASS] test_setters_use_correct_slot(uint256) (runs: 5000, μ: 21402, ~: 21402)
Suite result: ok. 29 passed; 0 failed; 0 skipped; finished in 97.09s (120.28s CPU time)

Ran 10 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Constants.t.sol:SignatureGatewayConstantsTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 2349061)
[PASS] test_borrow_typeHash() (gas: 9867)
[PASS] test_constructor() (gas: 53322)
[PASS] test_eip712Domain() (gas: 2354295)
[PASS] test_repay_typeHash() (gas: 9813)
[PASS] test_setUsingAsCollateral_typeHash() (gas: 9802)
[PASS] test_supply_typeHash() (gas: 9826)
[PASS] test_updateUserDynamicConfig_typeHash() (gas: 9910)
[PASS] test_updateUserRiskPremium_typeHash() (gas: 9867)
[PASS] test_withdraw_typeHash() (gas: 9912)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 24.52ms (1.82ms CPU time)

Ran 5 tests for tests/unit/misc/SignatureGateway/SignatureGateway.PermitReserve.t.sol:SignatureGatewayPermitReserveTest
[PASS] test_permitReserve() (gas: 103670)
[PASS] test_permitReserve_forwards_correct_call() (gas: 51036)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 40061)
[PASS] test_permitReserve_revertsWith_ReserveNotListed() (gas: 30976)
[PASS] test_permitReserve_revertsWith_SpokeNotRegistered() (gas: 29351)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 21.82ms (1.41ms CPU time)

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

Ran 4 tests for tests/unit/Spoke/Spoke.Borrow.t.sol:SpokeBorrowTest
[PASS] test_borrow() (gas: 1116912)
[PASS] test_borrow_fuzz_amounts(uint256,uint256) (runs: 5000, μ: 1126048, ~: 1126110)
[PASS] test_borrow_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 400012)
[PASS] test_borrow_revertsWith_ReentrancyGuardReentrantCall_hubRefreshPremium() (gas: 525352)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 27.24s (27.21s CPU time)

Ran 24 tests for tests/unit/Spoke/Spoke.Config.t.sol:SpokeConfigTest
[PASS] test_addReserve() (gas: 418784)
[PASS] test_addReserve_fuzz_revertsWith_AssetNotListed() (gas: 285800)
[PASS] test_addReserve_revertsWith_InvalidAddress_hub() (gas: 6435179)
[PASS] test_addReserve_revertsWith_InvalidAddress_oracle() (gas: 6493380)
[PASS] test_addReserve_revertsWith_InvalidAssetId() (gas: 32930)
[PASS] test_addReserve_revertsWith_ReserveExists() (gas: 397633)
[PASS] test_spoke_deploy() (gas: 5006135)
[PASS] test_spoke_deploy_reverts_on_InvalidConstructorInput() (gas: 1522785)
[PASS] test_spoke_deploy_reverts_on_InvalidOracleDecimals() (gas: 1525029)
[PASS] test_updateLiquidationConfig_fuzz_liqBonusConfig((uint128,uint64,uint16)) (runs: 5000, μ: 52856, ~: 52931)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus((uint128,uint64,uint16)) (runs: 5000, μ: 36866, ~: 37115)
[PASS] test_updateLiquidationConfig_fuzz_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor((uint128,uint64,uint16)) (runs: 5000, μ: 36660, ~: 36418)
[PASS] test_updateLiquidationConfig_fuzz_targetHealthFactor(uint128) (runs: 5000, μ: 46880, ~: 47183)
[PASS] test_updateLiquidationConfig_liqBonusConfig() (gas: 51951)
Logs:
  Bound result 900000000000000000
  Bound result 1000
  Bound result 1000000000000000000

[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_healthFactorForMaxBonus() (gas: 35575)
Logs:
  Bound result 1000000000000000000
  Bound result 1000
  Bound result 1000000000000000000

[PASS] test_updateLiquidationConfig_revertsWith_InvalidLiquidationConfig_liquidationBonusFactor() (gas: 35574)
Logs:
  Bound result 900000000000000000
  Bound result 10001
  Bound result 1000000000000000000

[PASS] test_updateLiquidationConfig_targetHealthFactor() (gas: 46512)
Logs:
  Bound result 1000000000000000001

[PASS] test_updateReserveConfig() (gas: 55923)
[PASS] test_updateReserveConfig_fuzz((uint24,bool,bool,bool,bool,bool)) (runs: 5000, μ: 57001, ~: 56835)
[PASS] test_updateReserveConfig_revertsWith_InvalidCollateralRisk() (gas: 40298)
[PASS] test_updateReserveConfig_revertsWith_ReserveNotListed() (gas: 36808)
[PASS] test_updateReservePriceSource() (gas: 261406)
[PASS] test_updateReservePriceSource_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 30987, ~: 30987)
[PASS] test_updateReservePriceSource_revertsWith_ReserveNotListed() (gas: 34767)
Suite result: ok. 24 passed; 0 failed; 0 skipped; finished in 3.73s (3.71s CPU time)

Ran 21 tests for tests/unit/misc/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 180670, ~: 180670)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39048)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37237)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 180626, ~: 180626)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38981)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37281)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 221414, ~: 221414)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39009)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37307)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 180667, ~: 180667)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39026)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37269)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 65216, ~: 65216)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25316)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27046)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 65253, ~: 65253)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25338)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27083)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 180668, ~: 180668)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39068)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37279)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 41.66s (65.17s CPU time)

Ran 21 tests for tests/unit/Spoke/Spoke.DynamicConfig.t.sol:SpokeDynamicConfigTest
[PASS] test_addDynamicReserveConfig() (gas: 79122)
[PASS] test_addDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_incompatible(uint16,uint32) (runs: 5000, μ: 46248, ~: 46424)
[PASS] test_addDynamicReserveConfig_once() (gas: 507245)
[PASS] test_addDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 43298, ~: 43298)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 57244)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 40400)
[PASS] test_addDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 40918)
[PASS] test_addDynamicReserveConfig_revertsWith_MaximumDynamicConfigKeyReached() (gas: 43454)
[PASS] test_addDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 28270)
[PASS] test_fuzz_addDynamicReserveConfig_spaced_dup_updates(bytes32) (runs: 5000, μ: 138686, ~: 138686)
[PASS] test_fuzz_addDynamicReserveConfig_trailing_order(bytes32) (runs: 5000, μ: 132988, ~: 132988)
[PASS] test_offboardReserve_existing_borrows_remain_unaffected() (gas: 1124595)
[PASS] test_updateDynamicReserveConfig() (gas: 1713825)
[PASS] test_updateDynamicReserveConfig_fuzz_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus(uint16,uint32) (runs: 5000, μ: 56732, ~: 56908)
[PASS] test_updateDynamicReserveConfig_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 43322, ~: 43322)
[PASS] test_updateDynamicReserveConfig_revertsWith_ConfigKeyUninitialized() (gas: 48922)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactor() (gas: 49933)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_collateralFactor() (gas: 50652)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidCollateralFactorAndMaxLiquidationBonus_liquidationBonus() (gas: 50817)
[PASS] test_updateDynamicReserveConfig_revertsWith_InvalidLiquidationFee() (gas: 51377)
[PASS] test_updateDynamicReserveConfig_revertsWith_ReserveNotListed() (gas: 28599)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 8.69s (13.83s CPU time)

Ran 5 tests for tests/gas/Spoke.Getters.gas.t.sol:SpokeGetters_Gas_Tests
[PASS] test_getUserAccountData() (gas: 23499)
[PASS] test_getUserAccountData_oneSupplies() (gas: 283217)
[PASS] test_getUserAccountData_twoSupplies() (gas: 517791)
[PASS] test_getUserAccountData_twoSupplies_oneBorrows() (gas: 1037971)
[PASS] test_getUserAccountData_twoSupplies_twoBorrows() (gas: 1595494)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 40.68ms (4.39ms CPU time)

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

[PASS] test_getLiquidationBonus_fuzz_configured(uint256,uint256,uint16,uint64) (runs: 5000, μ: 94095, ~: 94380)
[PASS] test_getLiquidationBonus_fuzz_notConfigured(uint256,uint256) (runs: 5000, μ: 71997, ~: 72222)
[PASS] test_getLiquidationBonus_notConfigured() (gas: 73210)
Logs:
  Bound result 2
  Bound result 1000000000000000000

[PASS] test_premiumRayGetters() (gas: 1537277)
[PASS] test_protocol_getters() (gas: 287172)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 2.15s (3.09s CPU time)

Ran 4 tests for tests/unit/Spoke/Liquidations/Spoke.LiquidationCall.Dust.t.sol:SpokeLiquidationCallDustTest
[PASS] test_collateralDust_min_debtToTarget() (gas: 9326672)
[PASS] test_debtToCover_exceeds_collateralValue() (gas: 9319141)
[PASS] test_dustColl_allowed() (gas: 9184896)
[PASS] test_dustDebt_allowed() (gas: 9314176)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 45.94ms (19.41ms CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.SetUsingAsCollateral.t.sol:SpokeConfigTest
[PASS] test_setUsingAsCollateral() (gas: 310803)
[PASS] test_setUsingAsCollateral_collateralStatusUnchanged() (gas: 466968)
[PASS] test_setUsingAsCollateral_revertsWith_ReentrancyGuardReentrantCall() (gas: 763065)
[PASS] test_setUsingAsCollateral_revertsWith_ReserveFrozen() (gas: 106916)
[PASS] test_setUsingAsCollateral_...*[Comment body truncated]*

Comment thread docs/Aave-v4-rounding.md
- when calculating the liquidation fee portion of a liquidation to distribute to the treasury, the result is rounded down.
- when calculating the value of a user's supplied collateral in the base currency, the result is rounded down.
- when calculating the value of a user's total debt in the base currency, the result is rounded up.
- when calculating the total amount of an asset supplied to the protocol (totalAddedAssets), the result is rounded down.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think these need to be fleshed out more with rationale, and also need a big section on liquidations tbd. See notion

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.

2 participants