From a275ef3ed62d4c05d19b3eca4f3fdba264d090e1 Mon Sep 17 00:00:00 2001 From: Kogaroshi <25688223+Kogaroshi@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:46:22 +0100 Subject: [PATCH 1/3] opt : skip RP update in withdraw if no debt --- snapshots/NativeTokenGateway.Operations.json | 4 ++-- snapshots/SignatureGateway.Operations.json | 2 +- snapshots/Spoke.Operations.ZeroRiskPremium.json | 10 +++++----- snapshots/Spoke.Operations.json | 10 +++++----- src/spoke/Spoke.sol | 5 ++++- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/snapshots/NativeTokenGateway.Operations.json b/snapshots/NativeTokenGateway.Operations.json index 1593c113b..83bdda04a 100644 --- a/snapshots/NativeTokenGateway.Operations.json +++ b/snapshots/NativeTokenGateway.Operations.json @@ -3,6 +3,6 @@ "repayNative": "166460", "supplyAsCollateralNative": "160122", "supplyNative": "135753", - "withdrawNative: full": "125548", - "withdrawNative: partial": "136735" + "withdrawNative: full": "125568", + "withdrawNative: partial": "136760" } \ No newline at end of file diff --git a/snapshots/SignatureGateway.Operations.json b/snapshots/SignatureGateway.Operations.json index f16cfa12f..ad83341d5 100644 --- a/snapshots/SignatureGateway.Operations.json +++ b/snapshots/SignatureGateway.Operations.json @@ -6,5 +6,5 @@ "supplyWithSig": "151985", "updateUserDynamicConfigWithSig": "63120", "updateUserRiskPremiumWithSig": "62090", - "withdrawWithSig": "130803" + "withdrawWithSig": "130823" } \ No newline at end of file diff --git a/snapshots/Spoke.Operations.ZeroRiskPremium.json b/snapshots/Spoke.Operations.ZeroRiskPremium.json index d565f7bab..58d6fdb7f 100644 --- a/snapshots/Spoke.Operations.ZeroRiskPremium.json +++ b/snapshots/Spoke.Operations.ZeroRiskPremium.json @@ -26,9 +26,9 @@ "usingAsCollateral: 1 borrow, enable": "42504", "usingAsCollateral: 2 borrows, disable": "127250", "usingAsCollateral: 2 borrows, enable": "42516", - "withdraw: 0 borrows, full": "127944", - "withdraw: 0 borrows, partial": "132840", - "withdraw: 1 borrow, partial": "159894", - "withdraw: 2 borrows, partial": "174452", - "withdraw: non collateral": "105891" + "withdraw: 0 borrows, full": "109316", + "withdraw: 0 borrows, partial": "109116", + "withdraw: 1 borrow, partial": "160457", + "withdraw: 2 borrows, partial": "175015", + "withdraw: non collateral": "105916" } \ No newline at end of file diff --git a/snapshots/Spoke.Operations.json b/snapshots/Spoke.Operations.json index 4d15ad498..5ad9e512e 100644 --- a/snapshots/Spoke.Operations.json +++ b/snapshots/Spoke.Operations.json @@ -26,9 +26,9 @@ "usingAsCollateral: 1 borrow, enable": "42504", "usingAsCollateral: 2 borrows, disable": "229165", "usingAsCollateral: 2 borrows, enable": "42516", - "withdraw: 0 borrows, full": "127944", - "withdraw: 0 borrows, partial": "132840", - "withdraw: 1 borrow, partial": "210737", - "withdraw: 2 borrows, partial": "256902", - "withdraw: non collateral": "105891" + "withdraw: 0 borrows, full": "109316", + "withdraw: 0 borrows, partial": "109116", + "withdraw: 1 borrow, partial": "211300", + "withdraw: 2 borrows, partial": "257465", + "withdraw: non collateral": "105916" } \ No newline at end of file diff --git a/src/spoke/Spoke.sol b/src/spoke/Spoke.sol index 998b98924..a3d4497e8 100644 --- a/src/spoke/Spoke.sol +++ b/src/spoke/Spoke.sol @@ -261,7 +261,10 @@ abstract contract Spoke is userPosition.suppliedShares -= withdrawnShares.toUint120(); - if (_positionStatus[onBehalfOf].isUsingAsCollateral(reserveId)) { + PositionStatus storage positionStatus = _positionStatus[onBehalfOf]; + if ( + positionStatus.isUsingAsCollateral(reserveId) && positionStatus.borrowCount(_reserveCount) > 0 + ) { uint256 newRiskPremium = _refreshAndValidateUserAccountData(onBehalfOf).riskPremium; _notifyRiskPremiumUpdate(onBehalfOf, newRiskPremium); } From c4b68471b896a8306164d55ebdff53138ef740d5 Mon Sep 17 00:00:00 2001 From: Kogaroshi <25688223+Kogaroshi@users.noreply.github.com> Date: Fri, 13 Feb 2026 15:37:24 +0100 Subject: [PATCH 2/3] opt : add new isBorrowingAny method --- snapshots/NativeTokenGateway.Operations.json | 6 +- snapshots/SignatureGateway.Operations.json | 8 +-- snapshots/Spoke.Getters.json | 10 +-- .../Spoke.Operations.ZeroRiskPremium.json | 31 ++++---- snapshots/Spoke.Operations.json | 31 ++++---- src/spoke/Spoke.sol | 2 +- src/spoke/libraries/PositionStatusMap.sol | 21 ++++++ tests/mocks/PositionStatusMapWrapper.sol | 4 ++ tests/unit/libraries/PositionStatusMap.t.sol | 72 +++++++++++++++++++ 9 files changed, 136 insertions(+), 49 deletions(-) diff --git a/snapshots/NativeTokenGateway.Operations.json b/snapshots/NativeTokenGateway.Operations.json index 83bdda04a..95a3f15ab 100644 --- a/snapshots/NativeTokenGateway.Operations.json +++ b/snapshots/NativeTokenGateway.Operations.json @@ -1,8 +1,8 @@ { - "borrowNative": "228557", + "borrowNative": "228878", "repayNative": "166460", "supplyAsCollateralNative": "160122", "supplyNative": "135753", - "withdrawNative: full": "125568", - "withdrawNative: partial": "136760" + "withdrawNative: full": "125548", + "withdrawNative: partial": "136735" } \ No newline at end of file diff --git a/snapshots/SignatureGateway.Operations.json b/snapshots/SignatureGateway.Operations.json index ad83341d5..6c4c92f2e 100644 --- a/snapshots/SignatureGateway.Operations.json +++ b/snapshots/SignatureGateway.Operations.json @@ -1,10 +1,10 @@ { - "borrowWithSig": "213790", + "borrowWithSig": "214111", "repayWithSig": "186732", "setSelfAsUserPositionManagerWithSig": "75118", "setUsingAsCollateralWithSig": "85387", "supplyWithSig": "151985", - "updateUserDynamicConfigWithSig": "63120", - "updateUserRiskPremiumWithSig": "62090", - "withdrawWithSig": "130823" + "updateUserDynamicConfigWithSig": "61543", + "updateUserRiskPremiumWithSig": "60513", + "withdrawWithSig": "130803" } \ No newline at end of file diff --git a/snapshots/Spoke.Getters.json b/snapshots/Spoke.Getters.json index 74970e9e7..0f9be6b8d 100644 --- a/snapshots/Spoke.Getters.json +++ b/snapshots/Spoke.Getters.json @@ -1,7 +1,7 @@ { - "getUserAccountData: supplies: 0, borrows: 0": "13014", - "getUserAccountData: supplies: 1, borrows: 0": "49426", - "getUserAccountData: supplies: 2, borrows: 0": "81102", - "getUserAccountData: supplies: 2, borrows: 1": "101454", - "getUserAccountData: supplies: 2, borrows: 2": "120714" + "getUserAccountData: supplies: 0, borrows: 0": "11437", + "getUserAccountData: supplies: 1, borrows: 0": "11437", + "getUserAccountData: supplies: 2, borrows: 0": "11437", + "getUserAccountData: supplies: 2, borrows: 1": "101775", + "getUserAccountData: supplies: 2, borrows: 2": "121035" } \ No newline at end of file diff --git a/snapshots/Spoke.Operations.ZeroRiskPremium.json b/snapshots/Spoke.Operations.ZeroRiskPremium.json index 58d6fdb7f..79e0ea77e 100644 --- a/snapshots/Spoke.Operations.ZeroRiskPremium.json +++ b/snapshots/Spoke.Operations.ZeroRiskPremium.json @@ -1,11 +1,6 @@ { - "borrow: first": "190296", - "borrow: second action, same reserve": "170162", - "liquidationCall (receiveShares): full": "303081", - "liquidationCall (receiveShares): partial": "302499", - "liquidationCall (reportDeficit): full": "367565", - "liquidationCall: full": "320706", - "liquidationCall: partial": "320124", + "borrow: first": "190617", + "borrow: second action, same reserve": "170483", "permitReserve + repay (multicall)": "164565", "permitReserve + supply (multicall)": "146745", "permitReserve + supply + enable collateral (multicall)": "161196", @@ -17,18 +12,18 @@ "supply: 0 borrows, collateral disabled": "122835", "supply: 0 borrows, collateral enabled": "105806", "supply: second action, same reserve": "105735", - "updateUserDynamicConfig: 1 collateral": "74545", - "updateUserDynamicConfig: 2 collaterals": "89413", - "updateUserRiskPremium: 1 borrow": "95657", - "updateUserRiskPremium: 2 borrows": "105337", + "updateUserDynamicConfig: 1 collateral": "36065", + "updateUserDynamicConfig: 2 collaterals": "36065", + "updateUserRiskPremium: 1 borrow": "95978", + "updateUserRiskPremium: 2 borrows": "105658", "usingAsCollateral: 0 borrows, enable": "59616", - "usingAsCollateral: 1 borrow, disable": "105701", + "usingAsCollateral: 1 borrow, disable": "106022", "usingAsCollateral: 1 borrow, enable": "42504", - "usingAsCollateral: 2 borrows, disable": "127250", + "usingAsCollateral: 2 borrows, disable": "127571", "usingAsCollateral: 2 borrows, enable": "42516", - "withdraw: 0 borrows, full": "109316", - "withdraw: 0 borrows, partial": "109116", - "withdraw: 1 borrow, partial": "160457", - "withdraw: 2 borrows, partial": "175015", - "withdraw: non collateral": "105916" + "withdraw: 0 borrows, full": "113367", + "withdraw: 0 borrows, partial": "113167", + "withdraw: 1 borrow, partial": "160215", + "withdraw: 2 borrows, partial": "174773", + "withdraw: non collateral": "105891" } \ No newline at end of file diff --git a/snapshots/Spoke.Operations.json b/snapshots/Spoke.Operations.json index 5ad9e512e..6df6d685a 100644 --- a/snapshots/Spoke.Operations.json +++ b/snapshots/Spoke.Operations.json @@ -1,11 +1,6 @@ { - "borrow: first": "259220", - "borrow: second action, same reserve": "202086", - "liquidationCall (receiveShares): full": "335114", - "liquidationCall (receiveShares): partial": "334532", - "liquidationCall (reportDeficit): full": "359765", - "liquidationCall: full": "352739", - "liquidationCall: partial": "352157", + "borrow: first": "259541", + "borrow: second action, same reserve": "202407", "permitReserve + repay (multicall)": "162036", "permitReserve + supply (multicall)": "146745", "permitReserve + supply + enable collateral (multicall)": "161196", @@ -17,18 +12,18 @@ "supply: 0 borrows, collateral disabled": "122835", "supply: 0 borrows, collateral enabled": "105806", "supply: second action, same reserve": "105735", - "updateUserDynamicConfig: 1 collateral": "74545", - "updateUserDynamicConfig: 2 collaterals": "89413", - "updateUserRiskPremium: 1 borrow": "149005", - "updateUserRiskPremium: 2 borrows": "199256", + "updateUserDynamicConfig: 1 collateral": "36065", + "updateUserDynamicConfig: 2 collaterals": "36065", + "updateUserRiskPremium: 1 borrow": "149326", + "updateUserRiskPremium: 2 borrows": "199577", "usingAsCollateral: 0 borrows, enable": "59616", - "usingAsCollateral: 1 borrow, disable": "159046", + "usingAsCollateral: 1 borrow, disable": "159367", "usingAsCollateral: 1 borrow, enable": "42504", - "usingAsCollateral: 2 borrows, disable": "229165", + "usingAsCollateral: 2 borrows, disable": "229486", "usingAsCollateral: 2 borrows, enable": "42516", - "withdraw: 0 borrows, full": "109316", - "withdraw: 0 borrows, partial": "109116", - "withdraw: 1 borrow, partial": "211300", - "withdraw: 2 borrows, partial": "257465", - "withdraw: non collateral": "105916" + "withdraw: 0 borrows, full": "113367", + "withdraw: 0 borrows, partial": "113167", + "withdraw: 1 borrow, partial": "211058", + "withdraw: 2 borrows, partial": "257223", + "withdraw: non collateral": "105891" } \ No newline at end of file diff --git a/src/spoke/Spoke.sol b/src/spoke/Spoke.sol index a3d4497e8..8ae0095ad 100644 --- a/src/spoke/Spoke.sol +++ b/src/spoke/Spoke.sol @@ -263,7 +263,7 @@ abstract contract Spoke is PositionStatus storage positionStatus = _positionStatus[onBehalfOf]; if ( - positionStatus.isUsingAsCollateral(reserveId) && positionStatus.borrowCount(_reserveCount) > 0 + positionStatus.isUsingAsCollateral(reserveId) && positionStatus.isBorrowingAny(_reserveCount) ) { uint256 newRiskPremium = _refreshAndValidateUserAccountData(onBehalfOf).riskPremium; _notifyRiskPremiumUpdate(onBehalfOf, newRiskPremium); diff --git a/src/spoke/libraries/PositionStatusMap.sol b/src/spoke/libraries/PositionStatusMap.sol index e0b8be876..cb6b0e3f3 100644 --- a/src/spoke/libraries/PositionStatusMap.sol +++ b/src/spoke/libraries/PositionStatusMap.sol @@ -115,6 +115,27 @@ library PositionStatusMap { } } + /// @notice Checks if the user is borrowing any reserve. + /// @dev Disregards potential dirty bits set after `reserveCount`. + /// @param reserveCount The current `reserveCount`, to avoid reading uninitialized buckets. + function isBorrowingAny( + ISpoke.PositionStatus storage self, + uint256 reserveCount + ) internal view returns (bool) { + unchecked { + uint256 bucket = reserveCount.bucketId(); + if (self.map[bucket].isolateBorrowingUntil(reserveCount) != 0) { + return true; + } + while (bucket != 0) { + if (self.map[--bucket].isolateBorrowing() != 0) { + return true; + } + } + return false; + } + } + /// @notice Finds the previous borrowing or collateralized reserve strictly before `fromReserveId`. /// @dev The search starts at `fromReserveId` (exclusive) and scans backward across buckets. /// @dev Returns `NOT_FOUND` if no borrowing or collateralized reserve exists before the bound. diff --git a/tests/mocks/PositionStatusMapWrapper.sol b/tests/mocks/PositionStatusMapWrapper.sol index 0774235ac..52a40a6a3 100644 --- a/tests/mocks/PositionStatusMapWrapper.sol +++ b/tests/mocks/PositionStatusMapWrapper.sol @@ -46,6 +46,10 @@ contract PositionStatusMapWrapper { return _p.borrowCount(reserveCount); } + function isBorrowingAny(uint256 reserveCount) external view returns (bool) { + return _p.isBorrowingAny(reserveCount); + } + function getBucketWord(uint256 reserveId) external view returns (uint256) { return _p.getBucketWord(reserveId); } diff --git a/tests/unit/libraries/PositionStatusMap.t.sol b/tests/unit/libraries/PositionStatusMap.t.sol index d0d74aa36..7e80ba8bf 100644 --- a/tests/unit/libraries/PositionStatusMap.t.sol +++ b/tests/unit/libraries/PositionStatusMap.t.sol @@ -275,6 +275,78 @@ contract PositionStatusMapTest is Base { assertEq(p.borrowCount(reserveCount), borrowCount); } + function test_isBorrowingAny() public { + p.setBorrowing(127, true); + assertTrue(p.isBorrowingAny(128)); + p.setBorrowing(127, false); + + p.setBorrowing(128, true); + assertFalse(p.isBorrowingAny(128)); + assertTrue(p.isBorrowingAny(129)); + + // ignore invalid bits + assertFalse(p.isBorrowingAny(100)); + + p.setBorrowing(2, true); + assertTrue(p.isBorrowingAny(128)); + + p.setBorrowing(32, true); + assertTrue(p.isBorrowingAny(128)); + p.setBorrowing(342, true); + assertTrue(p.isBorrowingAny(343)); + + p.setBorrowing(32, false); + assertTrue(p.isBorrowingAny(343)); + p.setBorrowing(342, false); + p.setBorrowing(128, false); + p.setBorrowing(2, false); + + // disregards collateral reserves + p.setUsingAsCollateral(32, true); + assertFalse(p.isBorrowingAny(343)); + + p.setUsingAsCollateral(79, true); + assertFalse(p.isBorrowingAny(343)); + + p.setUsingAsCollateral(255, true); + assertFalse(p.isBorrowingAny(343)); + } + + function test_isBorrowingAny_ignoresInvalidBits() public { + p.setBorrowing(127, true); + assertFalse(p.isBorrowingAny(100)); + assertTrue(p.isBorrowingAny(200)); + p.setBorrowing(127, false); + + p.setBorrowing(255, true); + assertFalse(p.isBorrowingAny(200)); + p.setBorrowing(133, true); + assertTrue(p.isBorrowingAny(200)); + p.setBorrowing(255, false); + p.setBorrowing(133, false); + + p.setBorrowing(383, true); + assertFalse(p.isBorrowingAny(300)); + p.setBorrowing(283, true); + assertTrue(p.isBorrowingAny(300)); + p.setBorrowing(383, false); + p.setBorrowing(283, false); + + p.setBorrowing(511, true); + assertFalse(p.isBorrowingAny(500)); + assertTrue(p.isBorrowingAny(600)); + p.setBorrowing(511, false); + } + + function test_isBorrowingAny(uint256 reserveCount, uint256 borrowingReserveId) public { + reserveCount = bound(reserveCount, 1, 1 << 10); // gas limit + borrowingReserveId = bound(borrowingReserveId, 0, 1 << 10); // gas limit + + p.setBorrowing(borrowingReserveId, true); + + assertEq(p.isBorrowingAny(reserveCount), reserveCount > borrowingReserveId ? true : false); + } + function test_setters_use_correct_slot(uint256 a) public { uint256 bucket = a / 128; bytes32 slot = keccak256(abi.encode(bucket, p.slot())); From 164907f4f9d21970a4b7b9eecce3e6a1c8371c5f Mon Sep 17 00:00:00 2001 From: Kogaroshi <25688223+Kogaroshi@users.noreply.github.com> Date: Mon, 16 Feb 2026 17:17:09 +0100 Subject: [PATCH 3/3] chore : snasphots --- snapshots/NativeTokenGateway.Operations.json | 6 ++-- snapshots/SignatureGateway.Operations.json | 8 ++--- snapshots/Spoke.Getters.json | 10 +++--- .../Spoke.Operations.ZeroRiskPremium.json | 31 +++++++++++-------- snapshots/Spoke.Operations.json | 31 +++++++++++-------- 5 files changed, 48 insertions(+), 38 deletions(-) diff --git a/snapshots/NativeTokenGateway.Operations.json b/snapshots/NativeTokenGateway.Operations.json index 95a3f15ab..83bdda04a 100644 --- a/snapshots/NativeTokenGateway.Operations.json +++ b/snapshots/NativeTokenGateway.Operations.json @@ -1,8 +1,8 @@ { - "borrowNative": "228878", + "borrowNative": "228557", "repayNative": "166460", "supplyAsCollateralNative": "160122", "supplyNative": "135753", - "withdrawNative: full": "125548", - "withdrawNative: partial": "136735" + "withdrawNative: full": "125568", + "withdrawNative: partial": "136760" } \ No newline at end of file diff --git a/snapshots/SignatureGateway.Operations.json b/snapshots/SignatureGateway.Operations.json index 6c4c92f2e..ad83341d5 100644 --- a/snapshots/SignatureGateway.Operations.json +++ b/snapshots/SignatureGateway.Operations.json @@ -1,10 +1,10 @@ { - "borrowWithSig": "214111", + "borrowWithSig": "213790", "repayWithSig": "186732", "setSelfAsUserPositionManagerWithSig": "75118", "setUsingAsCollateralWithSig": "85387", "supplyWithSig": "151985", - "updateUserDynamicConfigWithSig": "61543", - "updateUserRiskPremiumWithSig": "60513", - "withdrawWithSig": "130803" + "updateUserDynamicConfigWithSig": "63120", + "updateUserRiskPremiumWithSig": "62090", + "withdrawWithSig": "130823" } \ No newline at end of file diff --git a/snapshots/Spoke.Getters.json b/snapshots/Spoke.Getters.json index 0f9be6b8d..74970e9e7 100644 --- a/snapshots/Spoke.Getters.json +++ b/snapshots/Spoke.Getters.json @@ -1,7 +1,7 @@ { - "getUserAccountData: supplies: 0, borrows: 0": "11437", - "getUserAccountData: supplies: 1, borrows: 0": "11437", - "getUserAccountData: supplies: 2, borrows: 0": "11437", - "getUserAccountData: supplies: 2, borrows: 1": "101775", - "getUserAccountData: supplies: 2, borrows: 2": "121035" + "getUserAccountData: supplies: 0, borrows: 0": "13014", + "getUserAccountData: supplies: 1, borrows: 0": "49426", + "getUserAccountData: supplies: 2, borrows: 0": "81102", + "getUserAccountData: supplies: 2, borrows: 1": "101454", + "getUserAccountData: supplies: 2, borrows: 2": "120714" } \ No newline at end of file diff --git a/snapshots/Spoke.Operations.ZeroRiskPremium.json b/snapshots/Spoke.Operations.ZeroRiskPremium.json index 79e0ea77e..1f86c4c1c 100644 --- a/snapshots/Spoke.Operations.ZeroRiskPremium.json +++ b/snapshots/Spoke.Operations.ZeroRiskPremium.json @@ -1,6 +1,11 @@ { - "borrow: first": "190617", - "borrow: second action, same reserve": "170483", + "borrow: first": "190296", + "borrow: second action, same reserve": "170162", + "liquidationCall (receiveShares): full": "303081", + "liquidationCall (receiveShares): partial": "302499", + "liquidationCall (reportDeficit): full": "367565", + "liquidationCall: full": "320706", + "liquidationCall: partial": "320124", "permitReserve + repay (multicall)": "164565", "permitReserve + supply (multicall)": "146745", "permitReserve + supply + enable collateral (multicall)": "161196", @@ -12,18 +17,18 @@ "supply: 0 borrows, collateral disabled": "122835", "supply: 0 borrows, collateral enabled": "105806", "supply: second action, same reserve": "105735", - "updateUserDynamicConfig: 1 collateral": "36065", - "updateUserDynamicConfig: 2 collaterals": "36065", - "updateUserRiskPremium: 1 borrow": "95978", - "updateUserRiskPremium: 2 borrows": "105658", + "updateUserDynamicConfig: 1 collateral": "74545", + "updateUserDynamicConfig: 2 collaterals": "89413", + "updateUserRiskPremium: 1 borrow": "95657", + "updateUserRiskPremium: 2 borrows": "105337", "usingAsCollateral: 0 borrows, enable": "59616", - "usingAsCollateral: 1 borrow, disable": "106022", + "usingAsCollateral: 1 borrow, disable": "105701", "usingAsCollateral: 1 borrow, enable": "42504", - "usingAsCollateral: 2 borrows, disable": "127571", + "usingAsCollateral: 2 borrows, disable": "127250", "usingAsCollateral: 2 borrows, enable": "42516", - "withdraw: 0 borrows, full": "113367", - "withdraw: 0 borrows, partial": "113167", - "withdraw: 1 borrow, partial": "160215", - "withdraw: 2 borrows, partial": "174773", - "withdraw: non collateral": "105891" + "withdraw: 0 borrows, full": "109192", + "withdraw: 0 borrows, partial": "108992", + "withdraw: 1 borrow, partial": "160318", + "withdraw: 2 borrows, partial": "174876", + "withdraw: non collateral": "105916" } \ No newline at end of file diff --git a/snapshots/Spoke.Operations.json b/snapshots/Spoke.Operations.json index 6df6d685a..ff1078d64 100644 --- a/snapshots/Spoke.Operations.json +++ b/snapshots/Spoke.Operations.json @@ -1,6 +1,11 @@ { - "borrow: first": "259541", - "borrow: second action, same reserve": "202407", + "borrow: first": "259220", + "borrow: second action, same reserve": "202086", + "liquidationCall (receiveShares): full": "335114", + "liquidationCall (receiveShares): partial": "334532", + "liquidationCall (reportDeficit): full": "359765", + "liquidationCall: full": "352739", + "liquidationCall: partial": "352157", "permitReserve + repay (multicall)": "162036", "permitReserve + supply (multicall)": "146745", "permitReserve + supply + enable collateral (multicall)": "161196", @@ -12,18 +17,18 @@ "supply: 0 borrows, collateral disabled": "122835", "supply: 0 borrows, collateral enabled": "105806", "supply: second action, same reserve": "105735", - "updateUserDynamicConfig: 1 collateral": "36065", - "updateUserDynamicConfig: 2 collaterals": "36065", - "updateUserRiskPremium: 1 borrow": "149326", - "updateUserRiskPremium: 2 borrows": "199577", + "updateUserDynamicConfig: 1 collateral": "74545", + "updateUserDynamicConfig: 2 collaterals": "89413", + "updateUserRiskPremium: 1 borrow": "149005", + "updateUserRiskPremium: 2 borrows": "199256", "usingAsCollateral: 0 borrows, enable": "59616", - "usingAsCollateral: 1 borrow, disable": "159367", + "usingAsCollateral: 1 borrow, disable": "159046", "usingAsCollateral: 1 borrow, enable": "42504", - "usingAsCollateral: 2 borrows, disable": "229486", + "usingAsCollateral: 2 borrows, disable": "229165", "usingAsCollateral: 2 borrows, enable": "42516", - "withdraw: 0 borrows, full": "113367", - "withdraw: 0 borrows, partial": "113167", - "withdraw: 1 borrow, partial": "211058", - "withdraw: 2 borrows, partial": "257223", - "withdraw: non collateral": "105891" + "withdraw: 0 borrows, full": "109192", + "withdraw: 0 borrows, partial": "108992", + "withdraw: 1 borrow, partial": "211161", + "withdraw: 2 borrows, partial": "257326", + "withdraw: non collateral": "105916" } \ No newline at end of file