refactor: make spoke gates first class - #1338
Open
AlbertoCentonze wants to merge 1 commit into
Open
Conversation
♻️ Forge Gas Snapshots
🔕 Unchanged
|
Forge Build Sizes🔕 Unchanged
|
🌈 Test ResultsNo 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]* |
| constructor(address oracle_, uint16 maxUserReservesLimit_, address gate_) { | ||
| require(IAaveOracle(oracle_).decimals() == ORACLE_DECIMALS, InvalidOracleDecimals()); | ||
| require(maxUserReservesLimit_ > 0, InvalidMaxUserReservesLimit()); | ||
| require(gate_ != address(0), InvalidAddress()); |
Member
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SpokeInstancePositionManagerGatewhose state is scoped by SpokePermissionedSpokeInstanceand support new policies by selecting a gate at deploymentGas 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: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
PositionManagerGateadds 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: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
SpokeInstancePermissionedSpokeInstanceSpokeInstanceThe 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
PositionManagerGateis 7,016 bytes and can be shared because all state is scoped by Spoke. Its bytecode amortization against the old inline implementation is:Three Spokes sharing one
PositionManagerGateis the bytecode break-even point.