Skip to content

refactor: make spoke gates first class - #1338

Open
AlbertoCentonze wants to merge 1 commit into
feat/mandatory-position-managerfrom
refactor/first-class-gates
Open

refactor: make spoke gates first class#1338
AlbertoCentonze wants to merge 1 commit into
feat/mandatory-position-managerfrom
refactor/first-class-gates

Conversation

@AlbertoCentonze

Copy link
Copy Markdown

Summary

  • make the gate an immutable first-class dependency of the unified SpokeInstance
  • remove position-manager storage, APIs, signature handling, and authorization logic from the Spoke
  • move canonical delegation into a reusable PositionManagerGate whose state is scoped by Spoke
  • remove PermissionedSpokeInstance and support new policies by selecting a gate at deployment
  • route configurator, deployment, role, position-manager, and config-engine flows through the selected gate

Gas analysis

The measurements compare this branch with the exact head of #1337 using equivalent isolated gas snapshots.

No-permissioning Spoke

A minimal self-only gate checks only caller == onBehalfOf. Compared with the old inline authorization path:

Action Old inline Self-only gate Change
Supply 127,753 131,303 +3,550 / +2.78%
Enable collateral 59,616 63,128 +3,512 / +5.89%
Borrow 269,297 272,719 +3,422 / +1.27%
Partial repay 142,713 146,204 +3,491 / +2.45%
Partial withdraw 140,394 143,995 +3,601 / +2.57%
Combined 739,773 757,349 +17,576 / +2.38%

The approximately 3.5k gas per-action increase is the cost of crossing the external gate boundary. The self-only values use the measured fixed 291 gas difference between the full position-manager gate and a minimal gate across the same five actions.

Delegated position-manager calls

Compared with the old inline position-manager implementation, the external PositionManagerGate adds 19,333 gas across the five-action sequence, or 2.33%. This is approximately 3.8–3.9k gas per delegated action.

Compared with #1337's callback-based PermissionedSpoke, removing the gate-to-Spoke callback makes delegated calls cheaper:

Action #1337 PermissionedSpoke First-class gate Saving
Supply 132,028 131,013 1,015 / 0.77%
Enable collateral 68,697 67,638 1,059 / 1.54%
Borrow 319,992 318,863 1,129 / 0.35%
Partial repay 155,455 154,396 1,059 / 0.68%
Partial withdraw 190,351 189,376 975 / 0.51%
Combined 866,523 861,286 5,237 / 0.60%

For signed delegation updates, enabling changes from 68,684 to 82,934 gas (+20.7%), while disabling changes from 46,772 to 43,946 gas (-6.0%).

Bytecode analysis

Implementation Runtime size EIP-170 margin
Old SpokeInstance 24,291 B 285 B
Old PermissionedSpokeInstance 24,543 B 33 B
Unified SpokeInstance 21,228 B 3,348 B

The unified implementation saves 3,063 bytes (12.61%) versus the old standard Spoke and 3,315 bytes (13.51%) versus PermissionedSpokeInstance. More importantly, its EIP-170 headroom increases to 3,348 bytes.

The minimal self-only gate is 196 bytes, so a single no-permissioning Spoke plus its gate is still 2,867 bytes (11.8%) smaller than the old standard Spoke.

The full PositionManagerGate is 7,016 bytes and can be shared because all state is scoped by Spoke. Its bytecode amortization against the old inline implementation is:

Spokes sharing one gate Old inline total Unified Spokes + gate Change
1 24,291 B 28,244 B +16.27%
2 48,582 B 49,472 B +1.83%
3 72,873 B 70,700 B -2.98%
5 121,455 B 113,156 B -6.83%
10 242,910 B 219,296 B -9.72%

Three Spokes sharing one PositionManagerGate is the bytecode break-even point.

@github-actions

Copy link
Copy Markdown

♻️ Forge Gas Snapshots

Path Value
snapshots/ConfigPositionManager.Operations.json
setUsingAsCollateralOnBehalfOf ↑5% (+3741) 81,569
updateUserDynamicConfigOnBehalfOf ↑7% (+3912) 56,254
updateUserRiskPremiumOnBehalfOf ↑3% (+3820) 143,955
snapshots/GiverPositionManager.Operations.json
repayOnBehalfOf ↑2% (+3676) 180,173
supplyOnBehalfOf ↑2% (+3076) 146,148
snapshots/NativeTokenGateway.Operations.json
borrowNative ↑2% (+3717) 242,424
repayNative ↑2% (+3676) 175,997
supplyAsCollateralNative ↑3% (+5218) 170,331
supplyNative ↑2% (+3076) 142,804
withdrawNative: full ↑2% (+3124) 133,022
withdrawNative: partial ↑3% (+3905) 146,077
snapshots/PositionManagerBase.Operations.json
setSelfAsUserPositionManagerWithSig ↑29% (+21994) 97,035
snapshots/SignatureGateway.Operations.json
borrowWithSig ↑2% (+3716) 225,860
repayWithSig ↑2% (+3676) 196,189
setSelfAsUserPositionManagerWithSig ↑29% (+21974) 97,112
setUsingAsCollateralWithSig ↑5% (+3873) 89,253
supplyWithSig ↑2% (+3076) 158,990
updateUserDynamicConfigWithSig ↑6% (+3912) 67,025
updateUserRiskPremiumWithSig ↑6% (+3880) 65,875
withdrawWithSig ↑2% (+3373) 138,497
snapshots/Spoke.Gate.Operations.json
borrow: borrow-allowlist policy 302550
borrow: global-manager policy 297141
borrow: position-manager policy 297290
repay: partial, borrow-allowlist policy 149851
repay: partial, global-manager policy 149774
repay: partial, position-manager policy 149923
supply: borrow-allowlist policy 131268
supply: global-manager policy 131191
supply: position-manager policy 131340
usingAsCollateral: enable, borrow-allowlist policy 63093
usingAsCollateral: enable, global-manager policy 63016
usingAsCollateral: enable, position-manager policy 63165
withdraw: partial, borrow-allowlist policy 184831
withdraw: partial, global-manager policy 184754
withdraw: partial, position-manager policy 184903
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 ↓1% (-154) 12,860
getUserAccountData: supplies: 1, borrows: 0 ↓0% (-154) 55,918
getUserAccountData: supplies: 2, borrows: 0 ↓0% (-154) 89,740
getUserAccountData: supplies: 2, borrows: 1 ↓0% (-202) 112,187
getUserAccountData: supplies: 2, borrows: 2 ↓0% (-202) 133,590
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first ↑2% (+3712) 203,221
borrow: second action, same reserve ↑2% (+3712) 183,087
liquidationCall (receiveShares): full ↓0% (-250) 313,977
liquidationCall (receiveShares): partial ↓0% (-250) 313,395
liquidationCall (reportDeficit): full ↓0% (-202) 380,105
liquidationCall: full ↓0% (-250) 332,513
liquidationCall: partial ↓0% (-250) 331,931
permitReserve + repay (multicall) ↑2% (+3544) 173,482
permitReserve + supply (multicall) ↑2% (+3591) 155,254
permitReserve + supply + enable collateral (multicall) ↑3% (+4879) 170,993
repay: full ↑3% (+3782) 133,058
repay: partial ↑3% (+3782) 138,016
setUserPositionManagersWithSig: disable ↓6% (-2826) 43,946
setUserPositionManagersWithSig: enable ↑21% (+14250) 82,934
supply + enable collateral (multicall) ↑3% (+4928) 151,244
supply: 0 borrows, collateral disabled ↑3% (+3841) 131,594
supply: 0 borrows, collateral enabled ↑3% (+3841) 114,565
supply: second action, same reserve ↑3% (+3841) 114,494
updateUserDynamicConfig: 1 collateral ↑5% (+3842) 80,093
updateUserDynamicConfig: 2 collaterals ↑4% (+3842) 96,667
updateUserRiskPremium: 1 borrow ↑4% (+3750) 108,196
updateUserRiskPremium: 2 borrows ↑3% (+3751) 118,314
usingAsCollateral: 0 borrows, enable ↑6% (+3803) 63,419
usingAsCollateral: 1 borrow, disable ↑3% (+3734) 118,224
usingAsCollateral: 1 borrow, enable ↑9% (+3803) 46,307
usingAsCollateral: 2 borrows, disable ↑3% (+3734) 141,916
usingAsCollateral: 2 borrows, enable ↑9% (+3803) 46,319
withdraw: 0 borrows, full ↑3% (+3892) 138,950
withdraw: 0 borrows, partial ↑3% (+3892) 144,286
withdraw: 1 borrow, partial ↑2% (+3844) 173,435
withdraw: 2 borrows, partial ↑2% (+3844) 190,136
withdraw: non collateral ↑4% (+3901) 115,200
snapshots/Spoke.Operations.json
borrow: first ↑1% (+3713) 273,010
borrow: second action, same reserve ↑2% (+3713) 215,876
liquidationCall (receiveShares): full ↓0% (-250) 346,874
liquidationCall (receiveShares): partial ↓0% (-250) 346,292
liquidationCall (reportDeficit): full ↓0% (-202) 372,305
liquidationCall: full ↓0% (-250) 365,410
liquidationCall: partial ↓0% (-250) 364,828
permitReserve + repay (multicall) ↑2% (+2835) 169,169
permitReserve + supply (multicall) ↑2% (+3591) 155,254
permitReserve + supply + enable collateral (multicall) ↑3% (+4879) 170,993
repay: full ↑3% (+3782) 127,137
repay: partial ↑3% (+3782) 146,495
setUserPositionManagersWithSig: disable ↓6% (-2826) 43,946
setUserPositionManagersWithSig: enable ↑21% (+14250) 82,934
supply + enable collateral (multicall) ↑3% (+4928) 151,244
supply: 0 borrows, collateral disabled ↑3% (+3841) 131,594
supply: 0 borrows, collateral enabled ↑3% (+3841) 114,565
supply: second action, same reserve ↑3% (+3841) 114,494
updateUserDynamicConfig: 1 collateral ↑5% (+3842) 80,093
updateUserDynamicConfig: 2 collaterals ↑4% (+3842) 96,667
updateUserRiskPremium: 1 borrow ↑2% (+3750) 162,408
updateUserRiskPremium: 2 borrows ↑2% (+3750) 213,960
usingAsCollateral: 0 borrows, enable ↑6% (+3803) 63,419
usingAsCollateral: 1 borrow, disable ↑2% (+3734) 172,433
usingAsCollateral: 1 borrow, enable ↑9% (+3803) 46,307
usingAsCollateral: 2 borrows, disable ↑2% (+3735) 245,560
usingAsCollateral: 2 borrows, enable ↑9% (+3803) 46,319
withdraw: 0 borrows, full ↑3% (+3892) 138,950
withdraw: 0 borrows, partial ↑3% (+3892) 144,286
withdraw: 1 borrow, partial ↑2% (+3844) 225,142
withdraw: 2 borrows, partial ↑1% (+3844) 274,314
withdraw: non collateral ↑4% (+3901) 115,200
snapshots/TakerPositionManager.Operations.json
borrowOnBehalfOf ↑1% (+3496) 336,008
withdrawOnBehalfOf: full ↑2% (+3124) 130,333
withdrawOnBehalfOf: partial ↑3% (+3905) 142,716
snapshots/TokenizationSpoke.Operations.json
mintWithSig ↓0% (-12) 129,118
redeemWithSig ↓0% (-12) 128,852
withdrawWithSig ↑0% (+12) 129,417
🔕 Unchanged
Path Value
snapshots/ConfigPositionManager.Operations.json
renounceCanUpdateUserDynamicConfigPermission 28,037
renounceCanUpdateUserRiskPremiumPermission 27,971
renounceCanUpdateUsingAsCollateralPermission 27,994
renounceGlobalPermission 27,952
setCanSetUsingAsCollateralPermission 50,136
setCanUpdateUserDynamicConfigPermission 50,158
setCanUpdateUserRiskPremiumPermission 50,158
setGlobalPermission 50,110
snapshots/Hub.Operations.json
add 91,610
add: with transfer 112,942
draw 109,072
eliminateDeficit: full 77,541
eliminateDeficit: partial 87,146
mintFeeShares 87,668
payFee 75,720
refreshPremium 75,289
remove: full 80,564
remove: partial 85,702
reportDeficit 116,908
restore: full 81,488
restore: full - with transfer 188,919
restore: partial 90,198
restore: partial - with transfer 148,213
transferShares 74,540
snapshots/TakerPositionManager.Operations.json
approveBorrow 49,807
approveBorrowWithSig 65,689
approveWithdraw 49,816
approveWithdrawWithSig 65,643
renounceBorrowAllowance 27,929
renounceWithdrawAllowance 27,983
snapshots/TokenizationSpoke.Operations.json
deposit 118,614
depositWithSig 129,518
mint 118,251
permit 62,766
redeem: on behalf, full 95,212
redeem: on behalf, partial 119,015
redeem: self, full 94,282
redeem: self, partial 113,482
withdraw: on behalf, full 95,646
withdraw: on behalf, partial 119,557
withdraw: self, full 94,824
withdraw: self, partial 114,024

@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,396 2,529 22,180 46,623
AaveOracle.spoke 1,507 1,648 23,069 47,504
AaveV4AaveOracleDeployProcedure 21 47 24,555 49,105
AaveV4AaveOracleDeployProcedure.spoke 16 40 24,560 49,112
AaveV4AccessManagerEnumerableDeployProcedure 21 47 24,555 49,105
AaveV4AccessManagerEnumerableDeployProcedure.spoke 16 40 24,560 49,112
AaveV4AccessManagerRolesProcedure 44 94 24,532 49,058
AaveV4AccessManagerRolesProcedure.spoke 16 44 24,560 49,108
AaveV4AuthorityBatch 145 24,028 24,431 25,124
AaveV4AuthorityBatch.spoke 167 17,393 24,409 31,759
AaveV4ConfigEngine 9,079 9,107 15,497 40,045
AaveV4ConfigPositionManagerDeployProcedure 21 47 24,555 49,105
AaveV4ConfigPositionManagerDeployProcedure.spoke 16 40 24,560 49,112
AaveV4ConfiguratorBatch 150 27,637 24,426 21,515
AaveV4ConfiguratorBatch.spoke 193 19,277 24,383 29,875
AaveV4DeployBase 44 94 24,532 49,058
AaveV4DeployBase.spoke 16 44 24,560 49,108
AaveV4DeployOrchestration 123 173 24,453 48,979
AaveV4DeployOrchestration.spoke 102 130 24,474 49,022
AaveV4DeployProcedureBase 21 47 24,555 49,105
AaveV4DeployProcedureBase.spoke 16 40 24,560 49,112
AaveV4GatewayBatch 150 24,048 24,426 25,104
AaveV4GatewayBatch.spoke 193 16,690 24,383 32,462
AaveV4GiverPositionManagerDeployProcedure 21 47 24,555 49,105
AaveV4GiverPositionManagerDeployProcedure.spoke 16 40 24,560 49,112
AaveV4HubConfiguratorDeployProcedure 21 47 24,555 49,105
AaveV4HubConfiguratorDeployProcedure.spoke 16 40 24,560 49,112
AaveV4HubConfiguratorRolesProcedure 44 94 24,532 49,058
AaveV4HubConfiguratorRolesProcedure.spoke 16 44 24,560 49,108
AaveV4HubDeployProcedure 21 47 24,555 49,105
AaveV4HubDeployProcedure.spoke 16 40 24,560 49,112
AaveV4HubInstanceBatch 215 8,845 24,361 40,307
AaveV4HubInstanceBatch.spoke 220 6,378 24,356 42,774
AaveV4HubRolesProcedure 44 94 24,532 49,058
AaveV4HubRolesProcedure.spoke 16 44 24,560 49,108
AaveV4InterestRateStrategyDeployProcedure 21 47 24,555 49,105
AaveV4InterestRateStrategyDeployProcedure.spoke 16 40 24,560 49,112
AaveV4NativeTokenGatewayDeployProcedure 21 47 24,555 49,105
AaveV4NativeTokenGatewayDeployProcedure.spoke 16 40 24,560 49,112
AaveV4PayloadSize 11,289 11,462 13,287 37,690
AaveV4PositionManagerBatch 215 36,385 24,361 12,767
AaveV4PositionManagerBatch.spoke 220 25,802 24,356 23,350
AaveV4SignatureGatewayDeployProcedure 21 47 24,555 49,105
AaveV4SignatureGatewayDeployProcedure.spoke 16 40 24,560 49,112
AaveV4SpokeConfiguratorDeployProcedure 21 47 24,555 49,105
AaveV4SpokeConfiguratorDeployProcedure.spoke 16 40 24,560 49,112
AaveV4SpokeConfiguratorRolesProcedure 44 94 24,532 49,058
AaveV4SpokeConfiguratorRolesProcedure.spoke 16 44 24,560 49,108
AaveV4SpokeDeployProcedure 21 47 24,555 49,105
AaveV4SpokeDeployProcedure.spoke 16 40 24,560 49,112
AaveV4SpokeInstanceBatch 323 9,824 24,253 39,328
AaveV4SpokeInstanceBatch.spoke 247 6,894 24,329 42,258
AaveV4SpokeRolesProcedure 44 94 24,532 49,058
AaveV4SpokeRolesProcedure.spoke 16 44 24,560 49,108
AaveV4TakerPositionManagerDeployProcedure 21 47 24,555 49,105
AaveV4TakerPositionManagerDeployProcedure.spoke 16 40 24,560 49,112
AaveV4TestOrchestrationWrapper 3,521 3,549 21,055 45,603
AaveV4TestOrchestrationWrapper.spoke 2,530 2,556 22,046 46,596
AaveV4TokenizationSpokeBatch 150 21,572 24,426 27,580
AaveV4TokenizationSpokeBatch.spoke 193 17,575 24,383 31,577
AaveV4TokenizationSpokeDeployProcedure 21 47 24,555 49,105
AaveV4TokenizationSpokeDeployProcedure.spoke 16 40 24,560 49,112
AaveV4TreasurySpokeBatch 145 9,715 24,431 39,437
AaveV4TreasurySpokeBatch.spoke 167 7,124 24,409 42,028
AaveV4TreasurySpokeDeployProcedure 21 47 24,555 49,105
AaveV4TreasurySpokeDeployProcedure.spoke 16 40 24,560 49,112
AccessManager 12,985 14,210 11,591 34,942
AccessManager.spoke 9,099 9,910 15,477 39,242
AccessManagerEngine 4,426 4,478 20,150 44,674
AccessManagerEnumerable 21,008 22,847 3,568 26,305
AccessManagerEnumerable.spoke 15,171 16,459 9,405 32,693
Address 44 94 24,532 49,058
Address.spoke 16 44 24,560 49,108
Arrays 44 94 24,532 49,058
Arrays.hub 16 44 24,560 49,108
Arrays.spoke 16 44 24,560 49,108
AssetInterestRateStrategy 2,626 2,811 21,950 46,341
AssetInterestRateStrategy.spoke 1,978 2,132 22,598 47,020
AssetLogic 44 94 24,532 49,058
AssetLogic.hub 16 44 24,560 49,108
AssetLogic.spoke 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
BatchReports 44 94 24,532 49,058
BatchReports.spoke 16 44 24,560 49,108
BorrowAllowlistPolicyGate 835 967 23,741 48,185
BorrowAllowlistPolicyGate.spoke 647 780 23,929 48,372
BytecodeHelper 44 94 24,532 49,058
BytecodeHelper.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
ConfigData 44 94 24,532 49,058
ConfigData.spoke 16 44 24,560 49,108
ConfigPermissionsMap 44 94 24,532 49,058
ConfigPermissionsMap.spoke 16 44 24,560 49,108
ConfigPermissionsMapWrapper 1,001 1,029 23,575 48,123
ConfigPositionManager 13,826 14,380 10,750 34,772
ConfigPositionManager.spoke 9,495 9,988 15,081 39,164
Create2Utils 134 184 24,442 48,968
Create2Utils.spoke 90 118 24,486 49,034
Create2UtilsWrapper 6,162 6,190 18,414 42,962
DeployConstants 133 183 24,443 48,969
DeployConstants.spoke 105 133 24,471 49,019
Dummy 21 47 24,555 49,105
ECDSA 44 94 24,532 49,058
ECDSA.spoke 16 44 24,560 49,108
EIP712Hash (src/position-manager/libraries/EIP712Hash.sol) 771 823 23,805 48,329
EIP712Hash (src/spoke/libraries/EIP712Hash.sol) 341 393 24,235 48,759
EIP712Hash.spoke (src/position-manager/libraries/EIP712Hash.sol) 875 905 23,701 48,247
EIP712Hash.spoke (src/spoke/libraries/EIP712Hash.sol) 363 393 24,213 48,759
EIP712Types 44 94 24,532 49,058
EIP712Types.spoke 16 44 24,560 49,108
ERC1967Proxy 135 891 24,441 48,261
ERC1967Proxy.spoke 100 622 24,476 48,530
ERC1967Utils 44 94 24,532 49,058
ERC1967Utils.spoke 16 44 24,560 49,108
EngineFlags 44 94 24,532 49,058
EngineFlagsHarness 339 367 24,237 48,785
EnumerableSet 44 94 24,532 49,058
EnumerableSet.hub 16 44 24,560 49,108
EnumerableSet.spoke 16 44 24,560 49,108
Errors 44 94 24,532 49,058
Errors.spoke 16 44 24,560 49,108
ExtSloadWrapper 394 422 24,182 48,730
GiverPositionManager 7,195 7,470 17,381 41,682
GiverPositionManager.spoke 4,830 5,048 19,746 44,104
GlobalManagerPolicyGate 513 644 24,063 48,508
GlobalManagerPolicyGate.spoke 347 480 24,229 48,672
Hashes 44 94 24,532 49,058
Hashes.spoke 16 44 24,560 49,108
HubActions 44 94 24,532 49,058
HubActions.spoke 16 44 24,560 49,108
HubConfigurator 13,833 14,067 10,743 35,085
HubConfigurator.spoke 9,396 9,593 15,180 39,559
HubEngine 13,521 13,573 11,055 35,579
HubInstance 24,353 24,560 223 24,592
InputUtils 44 94 24,532 49,058
InputUtils.spoke 16 44 24,560 49,108
KeyValueList 44 94 24,532 49,058
KeyValueList.spoke 16 44 24,560 49,108
KeyValueListWrapper 957 985 23,619 48,167
LibBit 44 94 24,532 49,058
LibBit.spoke 16 44 24,560 49,108
LiquidationLogic 12,519 12,571 12,057 36,581
LiquidationLogic.spoke 9,835 9,867 14,741 39,285
Logger 7,000 7,853 17,576 41,299
Logger.spoke 6,688 7,689 17,888 41,463
LowLevelCall 44 94 24,532 49,058
LowLevelCall.spoke 16 44 24,560 49,108
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
MetadataLogger 11,038 11,896 13,538 37,256
MinimalAaveV4Payload 11,389 11,562 13,187 37,590
MockAllowlist 353 381 24,223 48,771
MockAllowlist.spoke 247 272 24,329 48,880
MockERC1271Wallet 828 962 23,748 48,190
MockERC1271Wallet.spoke 518 654 24,058 48,498
MockERC20 2,540 3,006 22,036 46,146
MockERC20.spoke 1,833 2,625 22,743 46,527
MockGovernanceExecutor 896 1,027 23,680 48,125
MockNoncesKeyed 858 886 23,718 48,266
MockNoncesKeyed.spoke 600 626 23,976 48,526
MockPriceFeed 538 1,187 24,038 47,965
MockPriceFeed.spoke 513 1,095 24,063 48,057
MockReentrantCaller 882 1,083 23,694 48,069
MockReentrantCaller.spoke 609 787 23,967 48,365
MockSkimSpoke 1,116 1,275 23,460 47,877
MockSkimSpoke.spoke 843 996 23,733 48,156
MockSpokeGate 1,303 1,331 23,273 47,821
MockSpokeGate.spoke 902 928 23,674 48,224
MockTokenizationListingPayload 11,976 12,380 12,600 36,772
NativeTokenGateway 9,058 9,475 15,518 39,677
NativeTokenGateway.spoke 5,597 5,929 18,979 43,223
NoncesKeyed 644 672 23,932 48,480
NoncesKeyed.spoke 387 413 24,189 48,739
OrchestrationReports 44 94 24,532 49,058
OrchestrationReports.spoke 16 44 24,560 49,108
Panic 44 94 24,532 49,058
Panic.hub 16 44 24,560 49,108
Panic.spoke 16 44 24,560 49,108
PercentageMath 44 94 24,532 49,058
PercentageMath.hub 16 44 24,560 49,108
PercentageMath.spoke 16 44 24,560 49,108
PercentageMathWrapper 632 660 23,944 48,492
PositionManagerBaseWrapper 5,371 5,646 19,205 43,506
PositionManagerBaseWrapper.spoke 3,619 3,837 20,957 45,315
PositionManagerEngine 1,021 1,073 23,555 48,079
PositionManagerGate 7,016 7,535 17,560 41,617
PositionManagerGate.spoke 4,683 5,155 19,893 43,997
PositionManagerGateAdapter 44 94 24,532 49,058
PositionManagerGateAdapter.spoke 16 44 24,560 49,108
PositionManagerGateEIP712Hash 171 221 24,405 48,931
PositionManagerGateEIP712Hash.spoke 166 194 24,410 48,958
PositionManagerNoMulticall 5,307 5,582 19,269 43,570
PositionManagerNoMulticall.spoke 3,162 3,380 21,414 45,772
PositionStatusMap 44 94 24,532 49,058
PositionStatusMap.spoke 16 44 24,560 49,108
PositionStatusMapWrapper 3,341 3,369 21,235 45,783
PositionStatusMapWrapper.spoke 2,350 2,376 22,226 46,776
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
ProxyAdmin.spoke 859 1,068 23,717 48,084
ProxyHelper 44 94 24,532 49,058
ProxyHelper.spoke 16 44 24,560 49,108
RescuableWrapper 973 1,107 23,603 48,045
RescuableWrapper.spoke 546 682 24,030 48,470
ReserveFlagsMap 44 94 24,532 49,058
ReserveFlagsMap.spoke 16 44 24,560 49,108
ReserveFlagsMapWrapper 928 956 23,648 48,196
Roles 325 377 24,251 48,775
Roles.spoke 376 406 24,200 48,746
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
SharesMath.spoke 16 44 24,560 49,108
SignatureChecker 44 94 24,532 49,058
SignatureChecker.spoke 16 44 24,560 49,108
SignatureGateway 12,472 13,013 12,104 36,139
SignatureGateway.spoke 8,919 9,399 15,657 39,753
SlotDerivation 44 94 24,532 49,058
SlotDerivation.hub 16 44 24,560 49,108
SlotDerivation.spoke 16 44 24,560 49,108
SpokeActions 44 94 24,532 49,058
SpokeActions.spoke 16 44 24,560 49,108
SpokeConfigurator 11,971 12,205 12,605 36,947
SpokeConfigurator.spoke 8,292 8,489 16,284 40,663
SpokeEngine 8,730 8,782 15,846 40,370
SpokeInstance 21,228 21,884 3,348 27,268
SpokeUtils 96 146 24,480 49,006
SpokeUtils.spoke 71 99 24,505 49,053
SpokeUtilsWrapper 1,827 1,855 22,749 47,297
SpokeUtilsWrapper.spoke 1,044 1,070 23,532 48,082
StorageSlot 44 94 24,532 49,058
StorageSlot.hub 16 44 24,560 49,108
StorageSlot.spoke 16 44 24,560 49,108
TakerPositionManager 12,424 12,978 12,152 36,174
TakerPositionManager.spoke 8,990 9,483 15,586 39,669
TestTokensBatch 388 6,337 24,188 42,815
TestTokensBatch.spoke 375 5,211 24,201 43,941
TestTypes 44 94 24,532 49,058
TestTypes.spoke 16 44 24,560 49,108
TestnetERC20 3,649 4,525 20,927 44,627
TestnetERC20.spoke 2,572 3,635 22,004 45,517
TestnetERC20DeployProcedure 21 47 24,555 49,105
TestnetERC20DeployProcedure.spoke 16 40 24,560 49,112
Time 44 94 24,532 49,058
Time.spoke 16 44 24,560 49,108
TokenizationSpokeDeployer 23,031 23,083 1,545 26,069
TokenizationSpokeInstance 13,627 14,953 10,949 34,199
TokenizationSpokeInstance.spoke 11,573 12,778 13,003 36,374
TransientSlot 44 94 24,532 49,058
TransientSlot.spoke 16 44 24,560 49,108
TransparentUpgradeableProxy 1,419 4,078 23,157 45,074
TransparentUpgradeableProxy.spoke 789 2,673 23,787 46,479
TreasurySpokeInstance 4,004 4,218 20,572 44,934
TreasurySpokeInstance.spoke 3,152 3,359 21,424 45,793
UserPositionUtils 44 94 24,532 49,058
UserPositionUtils.spoke 16 44 24,560 49,108
UserPositionUtilsWrapper 3,263 3,291 21,313 45,861
WETH9 2,148 2,614 22,428 46,538
WETH9.spoke 1,782 2,113 22,794 47,039
WETHDeployProcedure 21 47 24,555 49,105
WETHDeployProcedure.spoke 16 40 24,560 49,112
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
Copy Markdown
🌈 Test Results
No files changed, compilation skipped

Ran 19 tests for tests/contracts/spoke/AaveOracle.t.sol:AaveOracleTest
[PASS] test_constructor() (gas: 15302)
[PASS] test_decimals() (gas: 8358)
[PASS] test_fuzz_constructor(uint8) (runs: 5000, μ: 16737, ~: 17057)
Logs:
  Bound result 1

[PASS] test_getReservePrice() (gas: 46802)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 44566)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10895)
[PASS] test_getReservePrices() (gas: 76762)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 48937)
[PASS] test_getReserveSource() (gas: 47192)
[PASS] test_setReserveSource() (gas: 44212)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 97497)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17205)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 16954)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 12996)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 4385340)
[PASS] test_setSpoke() (gas: 4413660)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10892)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5000, μ: 13464, ~: 13465)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15102)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 1.10s (1.07s CPU time)

Ran 2 tests for tests/deployments/procedures/deploy/spoke/AaveV4AaveOracleDeployProcedure.t.sol:AaveV4AaveOracleDeployProcedureTest
[PASS] test_deployAaveOracle() (gas: 524367)
[PASS] test_deployAaveOracle_reverts_inputValidation() (gas: 8466)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 5.04ms (94.48µs CPU time)

Ran 2 tests for tests/deployments/procedures/deploy/AaveV4AccessManagerEnumerableDeployProcedure.t.sol:AaveV4AccessManagerEnumerableDeployProcedureTest
[PASS] test_deployAccessManagerEnumerable() (gas: 4403047)
[PASS] test_deployAccessManagerEnumerable_reverts() (gas: 10562)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 5.31ms (512.25µs CPU time)

Ran 6 tests for tests/deployments/procedures/deploy/roles/AaveV4AccessManagerRolesProcedure.t.sol:AaveV4AccessManagerRolesProcedureTest
[PASS] test_grantAccessManagerAdminRole() (gas: 177653)
[PASS] test_grantAccessManagerAdminRole_reverts() (gas: 14109)
[PASS] test_labelAllRoles() (gas: 1713977)
[PASS] test_labelAllRoles_reverts_zeroAddress() (gas: 8466)
[PASS] test_replaceDefaultAdminRole() (gas: 144664)
[PASS] test_replaceDefaultAdminRole_reverts() (gas: 178651)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 6.22ms (1.62ms CPU time)

Ran 5 tests for tests/deployments/batches/AaveV4AuthorityBatch.t.sol:AaveV4AuthorityBatchTest
[PASS] test_adminRoleMemberTracking() (gas: 21955)
[PASS] test_differentSaltProducesDifferentAddress() (gas: 14435)
[PASS] test_getReport() (gas: 19948)
[PASS] test_noOtherRolesInitialized() (gas: 15847)
[PASS] test_revert_zeroAdmin() (gas: 3848)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 5.87ms (922.46µs CPU time)

Ran 6 tests for tests/contracts/hub/fees/Hub.PayFee.t.sol:HubPayFeeTest
[PASS] test_payFee_fuzz(uint256,uint256) (runs: 5000, μ: 712296, ~: 712461)
Logs:
  Bound result 68691281934999
  Bound result 0
  Bound result 100

[PASS] test_payFee_fuzz_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 712748, ~: 713010)
Logs:
  Bound result 615514462186775432459
  Bound result 10765498
  Bound result 571193127101173104469

[PASS] test_payFee_revertsWith_InvalidShares() (gas: 25298)
[PASS] test_payFee_revertsWith_SpokeNotActive() (gas: 67924)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded() (gas: 142707)
[PASS] test_payFee_revertsWith_underflow_added_shares_exceeded_with_interest() (gas: 646910)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 22.00s (21.96s CPU time)

Ran 21 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.InvalidSignature.t.sol:SignatureGatewayInvalidSignatureTest
[PASS] test_borrowWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155116, ~: 154677)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39153)
[PASS] test_borrowWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37499)
[PASS] test_repayWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155072, ~: 154633)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39174)
[PASS] test_repayWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37478)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 154429, ~: 155521)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39248)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37570)
[PASS] test_supplyWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155134, ~: 154695)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39219)
[PASS] test_supplyWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37510)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 141570, ~: 140298)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25576)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27259)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 141563, ~: 140291)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignatureDueTo_InvalidSigner() (gas: 25486)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 27230)
[PASS] test_withdrawWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 155113, ~: 154674)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 39260)
[PASS] test_withdrawWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 37499)
Suite result: ok. 21 passed; 0 failed; 0 skipped; finished in 30.38s (30.34s CPU time)

Ran 11 tests for tests/contracts/hub/add-remove/Hub.Reclaim.t.sol:HubReclaimTest
[PASS] test_reclaim() (gas: 642380)
Logs:
  Bound result 1000000000000000000000
  Bound result 500000000000000000000
  Bound result 200000000000000000000

[PASS] test_reclaim_fullAmount() (gas: 623500)
[PASS] test_reclaim_fuzz(uint256,uint256,uint256) (runs: 5000, μ: 644131, ~: 643359)
Logs:
  Bound result 615514462186775432459
  Bound result 571193127101173104469
  Bound result 564283877115702805413

[PASS] test_reclaim_multipleSweepsAndReclaims() (gas: 734059)
[PASS] test_reclaim_revertsWith_AssetNotListed() (gas: 18447)
[PASS] test_reclaim_revertsWith_InsufficientTransferred() (gas: 442969)
[PASS] test_reclaim_revertsWith_InsufficientTransferred_noSwept() (gas: 109437)
[PASS] test_reclaim_revertsWith_InvalidAmount_zero() (gas: 99190)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 98411, ~: 98411)
[PASS] test_reclaim_revertsWith_OnlyReinvestmentController_init() (gas: 46036)
[PASS] test_reclaim_revertsWith_underflow_exceedsSwept_afterSweep() (gas: 606717)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 12.29s (12.27s CPU time)

Ran 12 tests for tests/contracts/hub/draw-restore/Hub.RefreshPremium.t.sol:HubRefreshPremiumTest
[PASS] test_refreshPremium_emitsEvent() (gas: 264186)
[PASS] test_refreshPremium_fuzz_positiveDeltas(uint256,int256,int256) (runs: 5000, μ: 509961, ~: 515407)
Logs:
  Bound result 999999999910000000000000000001
  Bound result 1
  Bound result 16696

[PASS] test_refreshPremium_fuzz_withAccrual(uint256,uint256,uint256,uint256) (runs: 5000, μ: 487073, ~: 496798)
Logs:
  Bound result 380554468
  Bound result 2742
  Bound result 355555555555555555556
  Bound result 13721

[PASS] test_refreshPremium_haltedSpokesAllowed() (gas: 129404)
[PASS] test_refreshPremium_maxRiskPremiumThreshold() (gas: 918360)
[PASS] test_refreshPremium_negativeDeltas(uint256) (runs: 5000, μ: 478827, ~: 478854)
Logs:
  Bound result 3124043968137

[PASS] test_refreshPremium_negativeDeltas_withAccrual(uint256) (runs: 5000, μ: 551812, ~: 552035)
Logs:
  Bound result 3124043968137

[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_NonZeroRestoredPremiumRay() (gas: 874948)
[PASS] test_refreshPremium_revertsWith_InvalidPremiumChange_RiskPremiumThresholdExceeded_DecreasingPremium() (gas: 893812)
[PASS] test_refreshPremium_revertsWith_SpokeNotActive() (gas: 65397)
[PASS] test_refreshPremium_riskPremiumThreshold() (gas: 941450)
[PASS] test_refreshPremium_spokePremiumUpdateIsContained() (gas: 733473)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 15.98s (15.95s CPU time)

Ran 7 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.SpokeNotRegistered.t.sol:SignatureGateway_SpokeNotRegistered_Test
[PASS] test_borrowWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13437, ~: 13437)
[PASS] test_repayWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13415, ~: 13415)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_SpokeNotRegistered((address,uint256,bool,address,uint256,uint256)) (runs: 5000, μ: 13446, ~: 13446)
[PASS] test_supplyWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13480, ~: 13480)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13744, ~: 13744)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_SpokeNotRegistered((address,address,uint256,uint256)) (runs: 5000, μ: 13700, ~: 13700)
[PASS] test_withdrawWithSig_revertsWith_SpokeNotRegistered((address,uint256,uint256,address,uint256,uint256)) (runs: 5000, μ: 13480, ~: 13480)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 23.18s (23.15s CPU time)

Ran 7 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 84350)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 122293)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 77024)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 144046)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 85460)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 85526)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 83494)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 28.19ms (3.54ms CPU time)

Ran 7 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.Reverts.Unauthorized.t.sol:SignatureGateway_Unauthorized_PositionManagerNotActive_Test
[PASS] test_borrowWithSig_revertsWith_Unauthorized() (gas: 82162)
[PASS] test_repayWithSig_revertsWith_Unauthorized() (gas: 120105)
[PASS] test_setUsingAsCollateralWithSig_revertsWith_Unauthorized() (gas: 74836)
[PASS] test_supplyWithSig_revertsWith_Unauthorized() (gas: 141858)
[PASS] test_updateUserDynamicConfigWithSig_revertsWith_Unauthorized() (gas: 83272)
[PASS] test_updateUserRiskPremiumWithSig_revertsWith_Unauthorized() (gas: 83338)
[PASS] test_withdrawWithSig_revertsWith_Unauthorized() (gas: 81306)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 27.09ms (3.45ms CPU time)

Ran 4 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.SetSelfAsUserPositionManagerWithSig.t.sol:SignatureGatewaySetSelfAsUserPositionManagerTest
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 169178)
[PASS] test_setSelfAsUserPositionManagerWithSig_forwards_correct_call() (gas: 37781)
[PASS] test_setSelfAsUserPositionManagerWithSig_ignores_underlying_spoke_reverts() (gas: 41787)
[PASS] test_setSelfAsUserPositionManagerWithSig_revertsWith_SpokeNotRegistered() (gas: 16553)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 24.55ms (1.02ms CPU time)

Ran 14 tests for tests/contracts/position-manager/SignatureGateway/SignatureGateway.t.sol:SignatureGatewayTest
[PASS] test_borrowWithSig() (gas: 845919)
[PASS] test_multicall() (gas: 683064)
[PASS] test_multicall_atomicity_on_revert() (gas: 552099)
[PASS] test_multicall_no_atomicity_with_trycatch() (gas: 653372)
[PASS] test_renouncePositionManagerRole() (gas: 33142)
[PASS] test_renouncePositionManagerRole_revertsWith_OnlyOwner() (gas: 18135)
[PASS] test_repayWithSig() (gas: 859400)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 340126)
[PASS] test_setUsingAsCollateralWithSig() (gas: 545776)
[PASS] test_supplyWithSig() (gas: 629494)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 362261)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 1068003)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 13346, ~: 13346)
[PASS] test_withdrawWithSig() (gas: 634965)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 369.37ms (345.67ms CPU time)

Ran 3 tests for tests/contracts/spoke/misc/Spoke.Access.t.sol:SpokeAccessTest
[PASS] testAccess_change_authority() (gas: 518711)
[PASS] testAccess_hub_functions_callable_by_spokes() (gas: 603852)
[PASS] testAccess_spoke_admin_config_access() (gas: 496015)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 25.38ms (2.42ms CPU time)

Ran 15 tests for tests/contracts/hub/add-remove/Hub.Remove.t.sol:HubRemoveTest
[PASS] test_remove() (gas: 221125)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_remove_all_with_interest() (gas: 387468)
[PASS] test_remove_fuzz(uint256,uint256) (runs: 5000, μ: 219939, ~: 219998)
Logs:
  Bound result 4
  Bound result 100

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

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

[PASS] test_remove_fuzz_multi_spoke_with_interest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 439187, ~: 439714)
Logs:
  Bound result 12986
  Bound result 2279
  Bound result 12746
  Bound result 16255

[PASS] test_remove_revertsWith_InsufficientLiquidity() (gas: 162043)
[PASS] test_remove_revertsWith_InsufficientLiquidity_exceeding_added_amount() (gas: 151233)
[PASS] test_remove_revertsWith_InsufficientLiquidity_zero_added() (gas: 26348)
[PASS] test_remove_revertsWith_InvalidAddress() (gas: 21463)
[PASS] test_remove_revertsWith_InvalidAmount() (gas: 23620)
[PASS] test_remove_revertsWith_SpokeHalted() (gas: 68400)
[PASS] test_remove_revertsWith_SpokeNotActive() (gas: 68398)
[PASS] test_remove_revertsWith_underflow_exceeding_added_amount() (gas: 186917)
[PASS] test_remove_revertsWtih_underflow_one_extra_wei() (gas: 367420)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 24.03s (24.01s CPU time)

Ran 4 tests for tests/contracts/spoke/risk-premium/Spoke.RiskPremium.Scenario.t.sol:SpokeRiskPremiumScenarioTest
[PASS] test_getUserRiskPremium_applyInterest_two_users_two_reserves_borrowed() (gas: 3341954)
[PASS] test_getUserRiskPremium_fuzz_inflight_calcs((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint40) (runs: 5000, μ: 2516150, ~: 2572443)
Logs:
  Bound result 6
  Bound result 416966230219621053938274952927
  Bound result 796581240052418918521216347353
  Bound result 939822379796025780
  Bound result 42049413792536014079
  Bound result 0
  Bound result 151038352776559397490183429611
  Bound result 33522909571553656
  Bound result 12412

[PASS] test_getUserRiskPremium_fuzz_two_users_two_reserves_borrowed((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint16,uint16,uint40[3]) (runs: 5000, μ: 2986349, ~: 2896297)
Logs:
  Bound result 12757
  Bound result 766
  Bound result 80
  Bound result 40
  Bound result 24024024024024024024024072073
  Bound result 1200000000
  Bound result 10589
  Bound result 141
  Bound result 1
  Bound result 6255
  Bound result 1
  Bound result 78688
  Bound result 1159

[PASS] test_riskPremiumPropagatesCorrectly_singleBorrow() (gas: 2025938)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 83.95s (83.91s CPU time)

Ran 7 tests for tests/contracts/hub/deficit/Hub.ReportDeficit.t.sol:HubReportDeficitTest
[PASS] test_reportDeficit_fuzz_revertsWith_SurplusDrawnDeficitReported(uint256) (runs: 5000, μ: 229174, ~: 229606)
Logs:
  Bound result 3124043968137

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

[PASS] test_reportDeficit_fuzz_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 381728, ~: 382431)
Logs:
  Bound result 8864
  Bound result 13647
  Bound result 3618
  Bound result 355555555555555555556

[PASS] test_reportDeficit_halted() (gas: 274045)
[PASS] test_reportDeficit_revertsWith_InvalidAmount() (gas: 27786)
[PASS] test_reportDeficit_revertsWith_SpokeNotActive(address) (runs: 5000, μ: 40042, ~: 40042)
[PASS] test_reportDeficit_with_premium() (gas: 381054)
Logs:
  Bound result 10000000000
  Bound result 31536000
  Bound result 5000000000
  Bound result 0

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

Ran 3 tests for tests/contracts/hub/misc/Hub.Rescue.t.sol:HubRescueTest
[PASS] test_cannot_rescue_liquidity_fee_reverts_with_InsufficientTransferred() (gas: 277182)
[PASS] test_rescue_fuzz_with_interest(uint256,uint256) (runs: 5000, μ: 520753, ~: 520714)
Logs:
  Bound result 351500639
  Bound result 1256746

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

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

Ran 23 tests for tests/contracts/hub/draw-restore/Hub.Restore.t.sol:HubRestoreTest
[PASS] test_restore_full_amount_with_interest() (gas: 384649)
Logs:
  Bound result 1000000000000000000000
  Bound result 500000000000000000000
  Bound result 31536000

[PASS] test_restore_full_amount_with_interest_and_premium() (gas: 704017)
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, μ: 385930, ~: 386024)
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, μ: 694354, ~: 705969)
Logs:
  Bound result 380554468
  Bound result 2742
  Bound result 739555556
  Bound result 111

[PASS] test_restore_fuzz_revertsWith_SurplusDrawnRestored_with_interest(uint256,uint256,uint256) (runs: 5000, μ: 255056, ~: 256259)
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, μ: 663729, ~: 663987)
Logs:
  Bound result 380554468
  Bound result 2742
  Bound result 739555556
  Bound result 111

[PASS] test_restore_one_share_delta_increase_revertsWith_InvalidPremiumChange() (gas: 245970)
[PASS] test_restore_partial_drawn() (gas: 341016)
[PASS] test_restore_partial_same_block() (gas: 340098)
[PASS] test_restore_premiumDeltas_twoWeiIncrease_realizedDelta() (gas: 244396)
[PASS] test_restore_revertsWith_InsufficientTransferred() (gas: 263730)
[PASS] test_restore_revertsWith_InvalidAmount_zero() (gas: 67377)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumIncrease() (gas: 252903)
[PASS] test_restore_revertsWith_InvalidPremiumChange_premiumSharesIncrease() (gas: 252947)
[PASS] test_restore_revertsWith_SpokeHalted() (gas: 110016)
[PASS] test_restore_revertsWith_SpokeNotActive_whenPaused() (gas: 196533)
[PASS] test_restore_revertsWith_SurplusDrawnRestored() (gas: 371338)
[PASS] test_restore_revertsWith_SurplusDrawnRestored_with_interest() (gas: 254861)
Logs:
  Bound result 100000000000000000000
  Bound result 50000000000000000000
  Bound result 15768000

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

[PASS] test_restore_revertsWith_SurplusPremiumRayRestored() (gas: 517967)
[PASS] test_restore_revertsWith_underflow_offsetIncrease() (gas: 261784)
[PASS] test_restore_tooMuchDrawn_revertsWith_SurplusDrawnRestored() (gas: 222111)
[PASS] test_restore_when_asset_caps_reset() (gas: 458582)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 14.91s (14.89s CPU time)

Ran 1 test for tests/contracts/hub/misc/Hub.Rounding.t.sol:HubRoundingTest
[PASS] test_sharePriceWithMultipleDonations() (gas: 703859221)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.51s (2.48s CPU time)

Ran 4 tests for tests/contracts/hub/misc/Hub.Skim.t.sol:HubSkimTest
[PASS] test_skimAdd_fuzz_donationAfterAdd(uint256,uint256,uint256) (runs: 5000, μ: 241469, ~: 241547)
Logs:
  Bound result 3
  Bound result 18470873395738003579119570309
  Bound result 446067553769140138733721804

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

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

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

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

Ran 10 tests for tests/contracts/hub/configuration/Hub.SpokeConfig.t.sol:HubSpokeConfigTest
[PASS] test_add_active_halted_scenarios() (gas: 320777)
[PASS] test_draw_active_halted_scenarios() (gas: 323360)
[PASS] test_eliminateDeficit_active_halted_scenarios() (gas: 859545)
[PASS] test_mintFeeShares_active_halted_scenarios() (gas: 854233)
[PASS] test_payFeeShares_active_halted_scenarios() (gas: 390439)
[PASS] test_refreshPremium_active_halted_scenarios() (gas: 286040)
[PASS] test_remove_active_halted_scenarios() (gas: 337215)
[PASS] test_reportDeficit_active_halted_scenarios() (gas: 466692)
[PASS] test_restore_active_halted_scenarios() (gas: 372855)
[PASS] test_transferShares_fuzz_active_halted_scenarios(bool,bool,bool,bool) (runs: 5000, μ: 223438, ~: 223453)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 3.22s (3.20s CPU time)

Ran 8 tests for tests/contracts/hub/misc/Hub.Sweep.t.sol:HubSweepTest
[PASS] test_sweep() (gas: 471896)
Logs:
  Bound result 1000000000000000000000
  Bound result 1000000000000000000000

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

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

[PASS] test_sweep_revertsWith_AssetNotListed() (gas: 17956)
[PASS] test_sweep_revertsWith_InsufficientLiquidity() (gas: 227211)
[PASS] test_sweep_revertsWith_InvalidAmount() (gas: 110909)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController(address) (runs: 5000, μ: 98479, ~: 98479)
[PASS] test_sweep_revertsWith_OnlyReinvestmentController_init() (gas: 45573)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 15.94s (15.92s CPU time)

Ran 7 tests for tests/contracts/hub/add-remove/Hub.TransferShares.t.sol:HubTransferSharesTest
[PASS] test_transferShares() (gas: 199716)
Logs:
  Bound result 1000000000000000000000
  Bound result 1000000000000000000000

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

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

[PASS] test_transferShares_revertsWith_AddCapExceeded() (gas: 211348)
[PASS] test_transferShares_revertsWith_SpokeHalted() (gas: 190902)
[PASS] test_transferShares_revertsWith_SpokeNotActive() (gas: 184103)
[PASS] test_transferShares_zeroShares_revertsWith_InvalidShares() (gas: 27543)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 7.54s (7.52s CPU time)

Ran 1 test for tests/contracts/spoke/accrual/Spoke.AccrueInterest.Scenario.t.sol:SpokeAccrueInterestScenarioTest
[PASS] test_accrueInterest_fuzz_RPBorrowAndSkipTime_twoActions((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 5000, μ: 6648437, ~: 6492631)
Logs:
  Bound result 416966230219621053938274952927
  Bound result 0
  Bound result 255831241153786906
  Bound result 41191294854201435881
  Bound result 124281697546210950467266407747
  Bound result 33522909571553656
  Bound result 481970306954558904
  Bound result 12412
  Bound result 6
  Bound result 124281697546210950467266407747
  Bound result 33522909571553656
  Bound result 481970306954558904
  Bound result 12412

Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 122.52s (122.49s CPU time)

Ran 10 tests for tests/contracts/hub/misc/Hub.Upgradeable.t.sol:HubUpgradeableTest
[PASS] test_hub_revision_accessible() (gas: 5003152)
[PASS] test_implementation_constructor_fuzz(uint64) (runs: 5000, μ: 6332111, ~: 6332111)
[PASS] test_proxy_constructor_fuzz(uint64) (runs: 5000, μ: 6350277, ~: 6350269)
Logs:
  Bound result 649

[PASS] test_proxy_constructor_fuzz_revertsWith_InvalidInitialization(uint64) (runs: 5000, μ: 12660276, ~: 12660268)
Logs:
  Bound result 649

[PASS] test_proxy_constructor_revertsWith_InvalidAddress() (gas: 4998882)
[PASS] test_proxy_constructor_revertsWith_InvalidInitialization_ZeroRevision() (gas: 6329422)
[PASS] test_proxy_reinitialization_fuzz(uint64) (runs: 5000, μ: 14073222, ~: 14073206)
Logs:
  Bound result 649

[PASS] test_proxy_reinitialization_revertsWith_CallerNotProxyAdmin() (gas: 12650654)
[PASS] test_proxy_reinitialization_revertsWith_InvalidAddress() (gas: 12651077)
[PASS] test_proxy_storage_persists_across_upgrade() (gas: 14073302)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 17.85s (17.83s CPU time)

Ran 8 tests for tests/contracts/hub/misc/HubAccrueInterest.t.sol:HubAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 48710)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 406993, ~: 406870)
Logs:
  Bound result 9

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

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

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

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

[PASS] test_getAssetDrawnRate_MatchesStoredAfterAction() (gas: 195004)
[PASS] test_getAssetDrawnRate_fuzz_DiffersAfterTimePasses(uint40) (runs: 5000, μ: 219587, ~: 219462)
Logs:
  Bound result 9

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

Ran 13 tests for tests/contracts/hub/configurator/HubConfigurator.GranularAccessControl.t.sol:HubConfiguratorGranularAccessControlTest
[PASS] test_assetManager_canCall_deactivateAsset() (gas: 149209)
[PASS] test_assetManager_canCall_haltAsset() (gas: 149223)
[PASS] test_assetManager_canCall_resetAssetCaps() (gas: 149707)
[PASS] test_assetManager_canCall_updateLiquidityFee() (gas: 90184)
[PASS] test_assetManager_cannotCall_anySpokeManagerMethod() (gas: 354221)
[PASS] test_fuzz_unauthorized_cannotCall_assetManagerMethods(address) (runs: 5000, μ: 279962, ~: 279962)
[PASS] test_fuzz_unauthorized_cannotCall_spokeManagerMethods(address) (runs: 5000, μ: 354590, ~: 354590)
[PASS] test_spokeManager_canCall_addSpoke() (gas: 132156)
[PASS] test_spokeManager_canCall_resetSpokeCaps() (gas: 205666)
[PASS] test_spokeManager_canCall_updateSpokeActive() (gas: 71977)
[PASS] test_spokeManager_canCall_updateSpokeCaps() (gas: 72523)
[PASS] test_spokeManager_canCall_updateSpokeHalted() (gas: 71946)
[PASS] test_spokeManager_cannotCall_anyAssetManagerMethod() (gas: 279027)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 4.33s (4.30s CPU time)

Ran 60 tests for tests/contracts/hub/configurator/HubConfigurator.t.sol:HubConfiguratorTest
[PASS] test_addAsset_fuzz(bool,address,uint8,address,uint256,uint16,uint32,uint32,uint32) (runs: 5000, μ: 457967, ~: 458540)
Logs:
  Bound result 17
  Bound result 100
  Bound result 1329
  Bound result 10545
  Bound result 2
  Bound result 37246

[PASS] test_addAsset_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 48852, ~: 49221)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(bool,address,uint8,address,uint256,address) (runs: 5000, μ: 70231, ~: 70214)
Logs:
  Bound result 19
  Bound result 5423

[PASS] test_addAsset_revertsWith_InvalidAddress_irStrategy() (gas: 63250)
[PASS] test_addAsset_revertsWith_InvalidAddress_underlying() (gas: 63187)
[PASS] test_addAsset_revertsWith_InvalidLiquidityFee() (gas: 356185)
[PASS] test_addAsset_reverts_invalidIrData() (gas: 81471)
[PASS] test_addSpoke() (gas: 140965)
[PASS] test_addSpokeToAssets() (gas: 239204)
[PASS] test_addSpokeToAssets_revertsWith_AccessManagedUnauthorized() (gas: 28169)
[PASS] test_addSpokeToAssets_revertsWith_MismatchedConfigs() (gas: 35971)
[PASS] test_addSpoke_revertsWith_AccessManagedUnauthorized() (gas: 27836)
[PASS] test_deactivateAsset() (gas: 191176)
[PASS] test_deactivateAsset_revertsWith_AccessManagedUnauthorized() (gas: 29021)
[PASS] test_deactivateSpoke() (gas: 192554)
[PASS] test_deactivateSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29035)
[PASS] test_haltAsset() (gas: 191232)
[PASS] test_haltAsset_revertsWith_AccessManagedUnauthorized() (gas: 28977)
[PASS] test_haltSpoke() (gas: 192574)
[PASS] test_haltSpoke_revertsWith_AccessManagedUnauthorized() (gas: 29023)
[PASS] test_resetAssetCaps() (gas: 265416)
[PASS] test_resetAssetCaps_revertsWith_AccessManagedUnauthorized() (gas: 28952)
[PASS] test_resetSpokeCaps() (gas: 285587)
[PASS] test_resetSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 29087)
[PASS] test_updateFeeConfig_Scenario() (gas: 366884)
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, μ: 202964, ~: 203255)
Logs:
  Bound result 4
  Bound result 3660

[PASS] test_updateFeeConfig_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 35062, ~: 35062)
[PASS] test_updateFeeConfig_revertsWith_InvalidAddress_spoke() (gas: 65284)
[PASS] test_updateFeeConfig_revertsWith_InvalidLiquidityFee() (gas: 68932)
[PASS] test_updateFeeReceiver_Scenario() (gas: 237399)
[PASS] test_updateFeeReceiver_WithdrawFromOldSpoke() (gas: 2132208)
[PASS] test_updateFeeReceiver_correctAccruals() (gas: 2170340)
[PASS] test_updateFeeReceiver_fuzz(address) (runs: 5000, μ: 196127, ~: 196127)
[PASS] test_updateFeeReceiver_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 34746, ~: 34746)
[PASS] test_updateFeeReceiver_revertsWith_InvalidAddress_spoke() (gas: 69939)
[PASS] test_updateFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 95268)
[PASS] test_updateInterestRateData() (gas: 86852)
[PASS] test_updateInterestRateData_revertsWith_AccessManagedUnauthorized() (gas: 30180)
[PASS] test_updateInterestRateStrategy() (gas: 109286)
[PASS] test_updateInterestRateStrategy_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 46099, ~: 46099)
[PASS] test_updateInterestRateStrategy_revertsWith_DrawnRateStrategyReverts() (gas: 91881)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidAddress_irStrategy() (gas: 81455)
[PASS] test_updateInterestRateStrategy_revertsWith_InvalidInterestRateStrategy() (gas: 81656)
[PASS] test_updateLiquidityFee_fuzz(uint256,uint16) (runs: 5000, μ: 107232, ~: 108851)
Logs:
  Bound result 3
  Bound result 0

[PASS] test_updateLiquidityFee_revertsWith_AccessManagedUnauthorized() (gas: 27622)
[PASS] test_updateLiquidityFee_revertsWith_InvalidLiquidityFee() (gas: 70079)
[PASS] test_updateReinvestmentController() (gas: 117309)
[PASS] test_updateReinvestmentController_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5000, μ: 34703, ~: 34703)
[PASS] test_updateSpokeActive() (gas: 107347)
[PASS] test_updateSpokeActive_revertsWith_AccessManagedUnauthorized() (gas: 31321)
[PASS] test_updateSpokeAddCap() (gas: 81852)
[PASS] test_updateSpokeAddCap_revertsWith_AccessManagedUnauthorized() (gas: 31290)
[PASS] test_updateSpokeCaps() (gas: 81965)
[PASS] test_updateSpokeCaps_revertsWith_AccessManagedUnauthorized() (gas: 31300)
[PASS] test_updateSpokeDrawCap() (gas: 81770)
[PASS] test_updateSpokeDrawCap_revertsWith_AccessManagedUnauthorized() (gas: 31289)
[PASS] test_updateSpokeHalted() (gas: 110103)
[PASS] test_updateSpokeHalted_revertsWith_AccessManagedUnauthorized() (gas: 31276)
[PASS] test_updateSpokeRiskPremiumThreshold() (gas: 81837)
[PASS] test_updateSpokeRiskPremiumThreshold_revertsWith_AccessManagedUnauthorized() (gas: 31301)
Suite result: ok. 60 passed; 0 failed; 0 skipped; finished in 9.78s (9.75s CPU time)

Ran 51 tests for tests/config-engine/HubEngine.t.sol:HubEngineTest
[PASS] test_computeImplementationAddress() (gas: 23607)
[PASS] test_executeHubAssetCapsResets() (gas: 181431)
[PASS] test_executeHubAssetConfigUpdates_allFields() (gas: 334434)
[PASS] test_executeHubAssetConfigUpdates_crossHub() (gas: 247706)
[PASS] test_executeHubAssetConfigUpdates_feeBoth() (gas: 240731)
[PASS] test_executeHubAssetConfigUpdates_feeNeither() (gas: 66957)
[PASS] test_executeHubAssetConfigUpdates_feeOnly() (gas: 143489)
[PASS] test_executeHubAssetConfigUpdates_irDataOnly() (gas: 128422)
[PASS] test_executeHubAssetConfigUpdates_irNoOp() (gas: 58119)
[PASS] test_executeHubAssetConfigUpdates_multipleAssets() (gas: 221278)
[PASS] test_executeHubAssetConfigUpdates_receiverOnly() (gas: 219952)
[PASS] test_executeHubAssetConfigUpdates_reinvestmentController() (gas: 139724)
[PASS] test_executeHubAssetConfigUpdates_revertsWith_partialSentinelIrDataOnStrategyChange() (gas: 46869)
[PASS] test_executeHubAssetConfigUpdates_revertsWith_sentinelIrDataOnStrategyChange() (gas: 46745)
[PASS] test_executeHubAssetConfigUpdates_strategyChange() (gas: 146606)
[PASS] test_executeHubAssetDeactivations() (gas: 239791)
[PASS] test_executeHubAssetHalts() (gas: 166724)
[PASS] test_executeHubAssetHalts_multipleAssets() (gas: 285432)
[PASS] test_executeHubAssetListings() (gas: 410855)
[PASS] test_executeHubAssetListings_multipleHubs() (gas: 771221)
[PASS] test_executeHubAssetListings_noTokenization() (gas: 439553)
[PASS] test_executeHubAssetListings_revert() (gas: 420762)
[PASS] test_executeHubAssetListings_tokenization_deterministicAddress() (gas: 4123882)
[PASS] test_executeHubAssetListings_tokenization_revertsOnAddCapOnly() (gas: 402211)
[PASS] test_executeHubAssetListings_tokenization_revertsOnEmptyName() (gas: 404366)
[PASS] test_executeHubAssetListings_tokenization_revertsOnEmptySymbol() (gas: 404325)
[PASS] test_executeHubAssetListings_tokenization_revertsOnProxyAdminOwnerOnly() (gas: 404340)
[PASS] test_executeHubAssetListings_tokenization_revertsOnZeroProxyAdminOwner() (gas: 402297)
[PASS] test_executeHubAssetListings_tokenization_zeroAddCap_deploysInactiveCapped() (gas: 4125876)
[PASS] test_executeHubAssetListings_withTokenization() (gas: 4130503)
[PASS] test_executeHubAssetListings_withTokenization_duplicateUnderlying_revertsBeforeCreate2() (gas: 4116535)
[PASS] test_executeHubSpokeCapsResets() (gas: 169862)
[PASS] test_executeHubSpokeConfigUpdates_addCapOnly() (gas: 97371)
[PASS] test_executeHubSpokeConfigUpdates_allFields() (gas: 152601)
[PASS] test_executeHubSpokeConfigUpdates_capsBoth() (gas: 102548)
[PASS] test_executeHubSpokeConfigUpdates_capsNeither() (gas: 52361)
[PASS] test_executeHubSpokeConfigUpdates_drawCapOnly() (gas: 97337)
[PASS] test_executeHubSpokeConfigUpdates_haltedOnly() (gas: 93137)
[PASS] test_executeHubSpokeConfigUpdates_multipleHubs() (gas: 149826)
[PASS] test_executeHubSpokeConfigUpdates_multipleUpdates() (gas: 136494)
[PASS] test_executeHubSpokeConfigUpdates_riskPremiumThreshold() (gas: 93058)
[PASS] test_executeHubSpokeConfigUpdates_statusBoth() (gas: 109357)
[PASS] test_executeHubSpokeDeactivations() (gas: 162321)
[PASS] test_executeHubSpokeToAssetsAdditions() (gas: 7275348)
[PASS] test_executeHubSpokeToAssetsAdditions_revert_spokeAlreadyListed() (gas: 77413)
[PASS] test_fuzz_executeHubAssetConfigUpdates_feeOnly(uint256) (runs: 5000, μ: 147003, ~: 147422)
Logs:
  Bound result 4978

[PASS] test_fuzz_executeHubSpokeConfigUpdates_addCap(uint256) (runs: 5000, μ: 101221, ~: 101528)
Logs:
  Bound result 925020712585

[PASS] test_fuzz_executeHubSpokeConfigUpdates_capsBoth(uint256,uint256) (runs: 5000, μ: 102484, ~: 102356)
Logs:
  Bound result 521561012887
  Bound result 100

[PASS] test_fuzz_executeHubSpokeConfigUpdates_drawCap(uint256) (runs: 5000, μ: 101144, ~: 101451)
Logs:
  Bound result 925020712585

[PASS] test_fuzz_executeHubSpokeConfigUpdates_riskPremiumThreshold(uint256) (runs: 5000, μ: 101517, ~: 101739)
Logs:
  Bound result 8908425

[PASS] test_tokenizationSpokeDeployer_deploy_revertsOnZeroProxyAdminOwner() (gas: 11506)
Suite result: ok. 51 passed; 0 failed; 0 skipped; finished in 5.28s (5.26s CPU time)

Ran 20 tests for tests/contracts/spoke/risk-premium/Spoke.RiskPremium.t.sol:SpokeRiskPremiumTest
[PASS] test_getUserRiskPremium_fuzz_applyInterest_two_reserves_borrowed(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2361314, ~: 2411973)
Logs:
  Bound result 80000000000000000000000000
  Bound result 3226685077
  Bound result 9332
  Bound result 10000000000000000000
  Bound result 17194

[PASS] test_getUserRiskPremium_fuzz_applyingInterest(uint256,uint256,uint256,uint256) (runs: 5000, μ: 1674705, ~: 1730723)
Logs:
  Bound result 8780
  Bound result 3179
  Bound result 55555555555554845
  Bound result 13427

[PASS] test_getUserRiskPremium_fuzz_four_reserves_change_cr(uint256,uint256,uint256,uint256,uint256,uint24) (runs: 5000, μ: 2091095, ~: 2073282)
Logs:
  Bound result 6369
  Bound result 748111466082993287060025057983
  Bound result 1
  Bound result 163154532952117007
  Bound result 6304403909286328381
  Bound result 60380874664557845373500555178

[PASS] test_getUserRiskPremium_fuzz_four_reserves_change_one_price(uint256,uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 2269191, ~: 2252939)
Logs:
  Bound result 8218757779814625
  Bound result 748111466082993287060025057983
  Bound result 1
  Bound result 163154532952117007
  Bound result 6304403909286328381
  Bound result 60380874664557845373500555178

[PASS] test_getUserRiskPremium_fuzz_four_reserves_prices_supply_debt((uint256,uint256,uint256,uint256,uint24,uint256),(uint256,uint256,uint256,uint256,uint24,uint256),(uint256,uint256,uint256,uint256,uint24,uint256),(uint256,uint256,uint256,uint256,uint24,uint256)) (runs: 5000, μ: 1993292, ~: 2001541)
Logs:
  Bound result 3512276671
  Bound result 5673
  Bound result 4554
  Bound result 91203234511233217875
  Bound result 6672
  Bound result 1663
  Bound result 1463
  Bound result 21876
  Bound result 22945
  Bound result 18190
  Bound result 4000
  Bound result 10000000000000000
  Bound result 81926
  Bound result 4102
  Bound result 0
  Bound result 12782

[PASS] test_getUserRiskPremium_fuzz_four_reserves_supply_and_borrow(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 1593515, ~: 1588227)
Logs:
  Bound result 80000000000000000000000000
  Bound result 9332
  Bound result 3226685077
  Bound result 10000000000000000000
  Bound result 17194

[PASS] test_getUserRiskPremium_fuzz_single_reserve_collateral_borrowed_amount(uint256) (runs: 5000, μ: 433831, ~: 433331)
Logs:
  Bound result 3124043968137

[PASS] test_getUserRiskPremium_fuzz_supply_does_not_impact(uint256,uint256) (runs: 5000, μ: 615620, ~: 615501)
Logs:
  Bound result 68691281934999
  Bound result 100

[PASS] test_getUserRiskPremium_fuzz_three_reserves_supply_and_borrow(uint256,uint256,uint256,uint256) (runs: 5000, μ: 1262845, ~: 1302457)
Logs:
  Bound result 8780
  Bound result 355555555555555555556
  Bound result 3179
  Bound result 13427

[PASS] test_getUserRiskPremium_fuzz_two_reserves_supply_and_borrow(uint256,uint256,uint256) (runs: 5000, μ: 1055410, ~: 1088337)
Logs:
  Bound result 615514462186775432459
  Bound result 573251106969745917
  Bound result 446067553769140138733721804

[PASS] test_getUserRiskPremium_multi_reserve_collateral() (gas: 981475)
[PASS] test_getUserRiskPremium_multi_reserve_collateral_lower_rp_than_highest_cr() (gas: 1741895)
[PASS] test_getUserRiskPremium_multi_reserve_collateral_weth_partial_cover() (gas: 1315244)
[PASS] test_getUserRiskPremium_no_collateral() (gas: 96798)
[PASS] test_getUserRiskPremium_no_collateral_set() (gas: 203084)
[PASS] test_getUserRiskPremium_single_reserve_collateral() (gas: 216069)
[PASS] test_getUserRiskPremium_single_reserve_collateral_borrowed() (gas: 428001)
[PASS] test_getUserRiskPremium_two_reserves_equal_parts() (gas: 1128067)
[PASS] test_riskPremium_collateral_insufficient_to_cover_debt() (gas: 2466252)
[PASS] test_riskPremium_postActions() (gas: 1356273)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 185.53s (185.50s CPU time)

Ran 11 tests for tests/contracts/spoke/libraries/KeyValueList.t.sol:KeyValueListTest
[PASS] test_add_unique() (gas: 352075)
[PASS] test_fuzz_add(uint256,uint256) (runs: 5000, μ: 231243, ~: 232296)
[PASS] test_fuzz_add_unique(uint256,uint256) (runs: 5000, μ: 239784, ~: 241124)
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, μ: 179993, ~: 153550)
[PASS] test_fuzz_pack_unpack_roundtrip(uint256,uint256) (runs: 5000, μ: 9177, ~: 9363)
Logs:
  Bound result 1869986064
  Bound result 100

[PASS] test_fuzz_sortByKey(uint256[]) (runs: 5000, μ: 434723, ~: 428136)
[PASS] test_fuzz_sortByKey_length(uint256) (runs: 5000, μ: 202006, ~: 201153)
Logs:
  Bound result 37

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

Ran 2 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.CollateralToLiquidate.t.sol:LiquidationLogicCollateralToLiquidateTest
[PASS] test_calculateCollateralAmountToLiquidate() (gas: 174095)
[PASS] test_calculateCollateralToLiquidate_fuzz((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 198449, ~: 186709)
Logs:
  Bound result 4
  Bound result 16
  Bound result 10000000000000000
  Bound result 99000000000000000000000009623
  Bound result 4
  Bound result 32
  Bound result 10
  Bound result 4225520975934896864
  Bound result 10916

Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 2.43s (2.40s CPU time)

Ran 3 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.DebtToLiquidate.t.sol:LiquidationLogicDebtToLiquidateTest
[PASS] test_calculateDebtToLiquidate_fuzz((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 39373, ~: 39480)
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, μ: 41789, ~: 41991)
Logs:
  Bound result 785313957678203974627183018866376986505469994849063860044824576030
  Bound result 10098
  Bound result 7901
  Bound result 1052238805970149242
  Bound result 7001
  Bound result 13671
  Bound result 6
  Bound result 1200
  Bound result 99000000000000000000000023159
  Bound result 7812
  Bound result 999
  Bound result 13671
  Bound result 7812

[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 41674, ~: 41676)
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 3.17s (3.14s CPU time)

Ran 7 tests for tests/contracts/spoke/accrual/Spoke.AccrueInterest.t.sol:SpokeAccrueInterestTest
[PASS] test_accrueInterest_NoActionTaken() (gas: 154571)
[PASS] test_accrueInterest_NoInterest_NoDebt(uint40) (runs: 5000, μ: 715444, ~: 715277)
Logs:
  Bound result 9

[PASS] test_accrueInterest_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 275919, ~: 275914)
Logs:
  Bound result 9

[PASS] test_accrueInterest_TenPercentRp(uint256,uint40) (runs: 5000, μ: 618276, ~: 618722)
Logs:
  Bound result 68691281934999
  Bound result 0

[PASS] test_accrueInterest_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 577677, ~: 578052)
Logs:
  Bound result 68691281934999
  Bound result 0

[SKIP: pending rft] test_accrueInterest_fuzz_RPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint40) (runs: 0, μ: 0, ~: 0)
[PASS] test_accrueInterest_fuzz_RatesRPBorrowAndSkipTime((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256),(uint96,uint96,uint96,uint96),uint40) (runs: 5000, μ: 4872992, ~: 4892444)
Logs:
  Bound result 10677
  Bound result 10600
  Bound result 3453
  Bound result 6212
  Bound result 2894
  Bound result 998072426600296280649962311868
  Bound result 250000000000000
  Bound result 2226133359
  Bound result 25110
  Bound result 8499
  Bound result 19225
  Bound result 11450
  Bound result 10796
  Bound result 2894
  Bound result 46433265767216
  Bound result 405120
  Bound result 457

Suite result: ok. 6 passed; 0 failed; 1 skipped; finished in 105.08s (105.06s CPU time)

Ran 7 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.DebtToTargetHealthFactor.t.sol:LiquidationLogicDebtToTargetHealthFactorTest
[PASS] test_calculateDebtToTargetHealthFactor_HealthFactorEqualsTargetHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 23367, ~: 23420)
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: 28007)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 17498)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 28029)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5000, μ: 20596, ~: 20569)
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, μ: 22876, ~: 22929)
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, μ: 22672, ~: 22725)
Logs:
  Bound result 3116123919
  Bound result 10725
  Bound result 2977
  Bound result 1486249897798496545
  Bound result 555054242782847130
  Bound result 6199474701275945
  Bound result 9

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

Ran 16 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 8919)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8932)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8930)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8942)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8968)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 8991)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 8911)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 8944)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 8899)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8955)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8889)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8922)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8921)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8956)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8907)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 8962)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 23.62ms (919.26µs CPU time)

Ran 4 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.ExecuteLiquidation.t.sol:LiquidationLogicExecuteLiquidationTest
[PASS] test_executeLiquidation() (gas: 385499)
[PASS] test_executeLiquidation_revertsWith_InvalidDebtToCover() (gas: 86003)
[PASS] test_executeLiquidation_revertsWith_MustNotLeaveDust_Collateral() (gas: 155559)
[PASS] test_executeLiquidation_revertsWith_MustNotLeaveDust_Debt() (gas: 155684)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 27.67ms (1.21ms CPU time)

Ran 3 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256,bool) (runs: 5000, μ: 211544, ~: 195789)
Logs:
  Bound result 99999987886613104001
  Bound result 22394

[PASS] test_liquidateCollateral_revertsWith_ArithmeticUnderflow() (gas: 28110)
[PASS] test_liquidateCollateral_revertsWith_ArithmeticUnderflow_FeeShares() (gas: 123764)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 1.99s (1.97s CPU time)

Ran 4 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5000, μ: 236616, ~: 226818)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 111952)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 121410)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 181814)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 2.05s (2.02s CPU time)

Ran 4 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 386562)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 78781)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 152355)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 156499)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 28.23ms (1.33ms CPU time)

Ran 5 tests for tests/contracts/spoke/accrual/Spoke.AccrueLiquidityFee.EdgeCases.t.sol:SpokeAccrueLiquidityFeeEdgeCasesTest
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium(uint256,uint256,uint256,uint256) (runs: 5000, μ: 563430, ~: 563500)
Logs:
  Bound result 13721
  Bound result 739555556
  Bound result 0
  Bound result 2518

[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5000, μ: 827470, ~: 827480)
Logs:
  Bound result 16440
  Bound result 64000000
  Bound result 0
  Bound result 9229
  Bound result 15271

[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 283089362)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 199200906)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 563518)
Logs:
  Bound result 5000
  Bound result 34560000
  Bound result 2
  Bound result 500000000000000000000

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

Ran 7 tests for tests/contracts/spoke/accrual/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 930985)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 137770)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5000, μ: 265077, ~: 265035)
Logs:
  Bound result 9

[PASS] test_accrueLiquidityFee_exact() (gas: 937293)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5000, μ: 1019687, ~: 1043729)
Logs:
  Bound result 68691281934999
  Bound result 0

[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 569577)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 931798)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 16.56s (16.54s CPU time)

Ran 8 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 176672)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 177311)
[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, μ: 298408, ~: 287460)
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, μ: 251404, ~: 239742)
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, μ: 270083, ~: 258346)
Logs:
  Bound result 0
  Bound result 3309
  Bound result 0
  Bound result 10007
  Bound result 14
  Bound result 301
  Bound result 10007
  Bound result 8800
  Bound result 1000000000000009011
  Bound result 0
  Bound result 1777214294589695
  Bound result 9
  Bound result 2583
  Bound result 99000000000000000000000009451
  Bound result 353578
  Bound result 517042
  Bound result 46
  Bound result 10
  Bound result 271
  Bound result 1280000000000000000
  Bound result 4
  Bound result 301
  Bound result 10007
  Bound result 8800
  Bound result 1000000000000009011
  Bound result 0
  Bound result 1777214294589695
  Bound result 9
  Bound result 2583
  Bound result 99000000000000000000000009451
  Bound result 353578
  Bound result 517042
  Bound result 1777214294589695
  Bound result 106
  Bound result 1000000000001280000000000000001
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129625894

[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, μ: 256255, ~: 244892)
Logs:
  Bound result 375432813350852580
  Bound result 260
  Bound result 910263248750974465
  Bound result 10001
  Bound result 7
  Bound result 732885939034101754412035068186386392
  Bound result 10000
  Bound result 449
  Bound result 1000000004222081553
  Bound result 910263248750974465
  Bound result 7065868447691181
  Bound result 10
  Bound result 404047111600004542223883525277
  Bound result 99000632956926421447158437533
  Bound result 813340
  Bound result 1413904
  Bound result 9325242007251034
  Bound result 18
  Bound result 2
  Bound result 1000000000000000000000000000000
  Bound result 1
  Bound result 2656986205510
  Bound result 404047111600004542223883525277

[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, μ: 280818, ~: 269377)
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, μ: 261485, ~: 249724)
Logs:
  Bound result 0
  Bound result 3309
  Bound result 0
  Bound result 10007
  Bound result 14
  Bound result 301
  Bound result 10007
  Bound result 8800
  Bound result 1000000000000009011
  Bound result 0
  Bound result 1777214294589695
  Bound result 9
  Bound result 2583
  Bound result 99000000000000000000000009451
  Bound result 353578
  Bound result 517042
  Bound result 46
  Bound result 10
  Bound result 271
  Bound result 1280000000000000000
  Bound result 4
  Bound result 301
  Bound result 10007
  Bound result 8800
  Bound result 1000000000000009011
  Bound result 0
  Bound result 1777214294589695
  Bound result 9
  Bound result 2583
  Bound result 99000000000000000000000009451
  Bound result 353578
  Bound result 517042
  Bound result 1777214294589695
  Bound result 106

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

Ran 4 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 12533)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 12487)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 20330, ~: 20129)
Logs:
  Bound result 9588
  Bound result 7610
  Bound result 555555555555555556
  Bound result 10656

[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5000, μ: 23231, ~: 23029)
Logs:
  Bound result 9588
  Bound result 7610
  Bound result 555555555555555556
  Bound result 10656
  Bound result 7757

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 821.82ms (798.54ms CPU time)

Ran 11 tests for tests/contracts/spoke/libraries/liquidation-logic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26014)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259368)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31813)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26818)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26957)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27034)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27019)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26948)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31976)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31976)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33747)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 24.13ms (1.04ms CPU time)

Ran 8 tests for tests/deployments/utils/Logger.t.sol:LoggerTest
[PASS] test_getJson_returnsAccumulatedState() (gas: 58377)
[PASS] test_multipleWrites() (gas: 87907)
[PASS] test_save() (gas: 69885)
Logs:
  Saving log to output/reports/deployments/test/

[PASS] test_writeAddress() (gas: 55765)
[PASS] test_writeGroupAddress() (gas: 108836)
[PASS] test_writeGroupValue() (gas: 19751)
[PASS] test_writeString() (gas: 10351)
[PASS] test_writeUint() (gas: 9633)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 8.36ms (10.43ms CPU time)

Ran 15 tests for tests/contracts/spoke/position-manager/Spoke.SetUserPositionManagerWithSig.t.sol:SpokeSetUserPositionManagersWithSigTest
[PASS] test_DOMAIN_SEPARATOR() (gas: 4415038)
[PASS] test_eip712Domain() (gas: 4420218)
[PASS] test_positionManagerUpdate_typeHash() (gas: 3903)
[PASS] test_setUserPositionManager_typeHash() (gas: 17669)
[PASS] test_setUserPositionManagersWithSig() (gas: 210106)
[PASS] test_setUserPositionManagersWithSig_ERC1271() (gas: 382205)
[PASS] test_setUserPositionManagersWithSig_ERC1271_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 396579, ~: 395307)
[PASS] test_setUserPositionManagersWithSig_ERC1271_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 282609)
[PASS] test_setUserPositionManagersWithSig_ERC1271_revertsWith_InvalidSignature_dueTo_InvalidHash() (gas: 334098)
[PASS] test_setUserPositionManagersWithSig_multiple_updates((address,bool)[]) (runs: 5000, μ: 2820481, ~: 2805986)
[PASS] test_setUserPositionManagersWithSig_revertsWith_InvalidAccountNonce(bytes32) (runs: 5000, μ: 196953, ~: 198882)
[PASS] test_setUserPositionManagersWithSig_revertsWith_InvalidSignature_dueTo_ExpiredDeadline() (gas: 38789)
[PASS] test_setUserPositionManagersWithSig_revertsWith_InvalidSignature_dueTo_InvalidSigner() (gas: 39182)
[PASS] test_setUserPositionManagersWithSig_zero_updates() (gas: 175838)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5000, μ: 15345, ~: 15345)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 48.27s (48.25s CPU time)

Ran 9 tests for tests/contracts/spoke/misc/Spoke.SetUsingAsCollateral.t.sol:SpokeSetUsingAsCollateralTest
[PASS] test_setUsingAsCollateral() (gas: 319525)
[PASS] test_setUsingAsCollateral_collateralStatusUnchanged() (gas: 473471)
[PASS] test_setUsingAsCollateral_revertsWith_MaximumUserReservesExceed...*[Comment body truncated]*

Comment thread src/spoke/Spoke.sol
constructor(address oracle_, uint16 maxUserReservesLimit_, address gate_) {
require(IAaveOracle(oracle_).decimals() == ORACLE_DECIMALS, InvalidOracleDecimals());
require(maxUserReservesLimit_ > 0, InvalidMaxUserReservesLimit());
require(gate_ != address(0), InvalidAddress());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we always call the gate no matter what, which increases gas costs
short-circuiting in _isPositionActionAllowed fn when msg.sender == onBehalfOf d go against the idea of the gate right

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